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

SYNOPSIS

This is a plugin for the Business::OnlinePayment interface. Please refer to that documentation for general usage, and here for CardConnect specific usage.

In order to use this module, you will need to have an account set up with CardConnect https://cardconnect.com

  use Business::OnlinePayment;
  my $tx = Business::OnlinePayment->new("CardConnect");

  $tx->content(
      type           => 'CC',
      login          => 'testdrive',
      password       => '123qwe',
      action         => 'Normal Authorization',
      description    => 'FOO*Business::OnlinePayment test',
      amount         => '49.95',
      customer_id    => 'tfb',
      name           => 'Tofu Beast',
      address        => '123 Anystreet',
      city           => 'Anywhere',
      state          => 'UT',
      zip            => '84058',
      card_number    => '4007000000027',
      expiration     => '09/02',
      cvv2           => '1234', #optional
      invoice_number => '54123',
  );
  $tx->submit();

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

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

Returns the response error code.

error_message

Returns the response error description text.

server_request

Returns the complete request that was sent to the server. The request has been stripped of card_num, cvv2, and password. So it should be safe to log.

server_request_dangerous

Returns the complete request that was sent to the server. This could contain data that is NOT SAFE to log. It should only be used in a test environment, or in a PCI compliant manner.

server_response

Returns the complete response from the server. The response has been stripped of card_num, cvv2, and password. So it should be safe to log.

server_response_dangerous

Returns the complete response from the server. This could contain data that is NOT SAFE to log. It should only be used in a test environment, or in a PCI compliant manner.

Handling of content(%content) data:

action

The following actions are valid

  normal authorization
  authorization only
  post authorization
  credit
  void
  auth reversal

TESTING

In order to run the provided test suite, you will first need to apply and get your account setup with CyberSource. Then you can use the test account information they give you to run the test suite. The scripts will look for three environment variables to connect: BOP_USERNAME, BOP_PASSWORD, BOP_MERCHANTID

FUNCTIONS

_info

Return the introspection hash for BOP 3.x

_info

Return the introspection hash for BOP 3.x

set_defaults

Used by BOP to set default values during "new"

test_transaction

Get/set the server used for processing transactions. Possible values are Live, Certification, and Sandbox Default: Live

  #Live
  $self->test_transaction(0);

  #Test
  $self->test_transaction(1); # currently not different from live

  #Read current value
  $val = $self->test_transaction();

submit

Submit your transaction to cybersource