The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Business::OnlinePayment::WesternACH - Western ACH backend for Business::OnlinePayment

SYNOPSIS

  use Business::OnlinePayment;

  ####
  # Electronic check authorization.  We only support 
  # 'Normal Authorization' and 'Credit'.
  ####

  my $tx = new Business::OnlinePayment("WesternACH");
  $tx->content(
      type           => 'ECHECK',
      login          => 'testdrive',
      password       => 'testpass',
      action         => 'Normal Authorization',
      description    => 'Business::OnlinePayment test',
      amount         => '49.95',
      invoice_number => '100100',
      first_name     => 'Jason',
      last_name      => 'Kohles',
      address        => '123 Anystreet',
      city           => 'Anywhere',
      state          => 'UT',
      zip            => '84058',
      account_type   => 'personal checking',
      account_number => '1000468551234',
      routing_code   => '707010024',
      check_number   => '1001', # optional
  );
  $tx->submit();

  if($tx->is_success()) {
      print "Check processed successfully: ".$tx->authorization."\n";
  } else {
      print "Check was rejected: ".$tx->error_message."\n";
  }

  my $tx = new Business::OnlinePayment("WesternACH");
  $tx->content(
      login     => 'testdrive',
      password  => 'testpass',
      start     => '2009-06-25', # optional; defaults to yesterday
      end       => '2009-06-26', # optional; defaults to today
      );
  $tx->get_returns;
  

SUPPORTED TRANSACTION TYPES

ECHECK

Content required: type, login, password|transaction_key, action, amount, first_name, last_name, account_number, routing_code, account_type.

DESCRIPTION

For detailed information see Business::OnlinePayment.

METHODS AND FUNCTIONS

See Business::OnlinePayment for the complete list. The following methods either override the methods in Business::OnlinePayment or provide additional functions.

result_code

Currently returns nothing; these transactions don't seem to have result codes.

error_message

Returns the response reason text. This can come from several locations in the response document or from certain local errors.

server_response

Returns the complete response from the server.

Handling of content(%content) data:

action

The following actions are valid:

  normal authorization
  credit

AUTHOR

Mark Wells <mark@freeside.biz> with advice from Ivan Kohler <ivan-westernach@freeside.biz>.

SEE ALSO

perl(1). Business::OnlinePayment.