Ivan Kohler > Business-OnlinePayment-VirtualNet-0.02 > Business::OnlinePayment::VirtualNet

Download:
Business-OnlinePayment-VirtualNet-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Business::OnlinePayment::VirtualNet - Vital VirtualNet backend for Business::OnlinePayment

SYNOPSIS ^

  use Business::OnlinePayment;

  my $tx = new Business::OnlinePayment("VirtualNet",
    'merchant_id' => '999999999911',
    'store'       => '0011',
    'terminal'    => '9911',
    'mcc'         => '5999', #merchant category code
    'bin'         => '999995', #acquirer BIN (Bank Identification Number)
    'zip'         => '543211420', #merchant zip (US) or assigned city code

    'agent'       => '000000', #agent bank
    'v'           => '00000001',

    'merchant_name'  => 'Internet Service Provider', #25 char max
    'merchant_city'  => 'Gloucester', #13 char max
    'merchant_state' => 'VA', #2 char

    'seq_file'      => '/tmp/bop-virtualnet-sequence',
    'batchnum_file' => '/tmp/bop-virtualnet-batchnum', # :/  0-999 in 5 days

  );
  $tx->content(
      type           => 'CC',
      login          => 'test',
      action         => 'Authorization Only',
      description    => 'Business::OnlinePayment test',
      amount         => '49.95',
      invoice_number => '100100',
      name           => 'Tofu Beast',
      card_number    => '4111111111111111',
      expiration     => '09/03',
  );
  $tx->submit();

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

 if( $tx->is_success() ) {

      my $capture = new Business::OnlinePayment("VirtualNet",
        'agent'       => '000001',
        'chain'       => '000000', #optional?
        'v'           => '00000001',

        'merchant_id' => '999999999911',
        'store'       => '0011',
        'terminal'    => '9911',
        'mcc'         => '5999', #merchant category code
        'bin'         => '999995', #acquirer BIN (Bank Identification Number)
      );

      $capture->content(
        type           => 'CC',
        action         => 'Post Authorization',
        amount         => '49.95',
        card_number    => '4111111111111111',
        expiration     => '09/03',
        authorization             => $tx->authorization,
        authorization_source_code => $tx->authorization_source_code,
        returned_ACI              => $tx->returned_ACI,
        transaction_identifier    => $tx->transaction_identifier,
        validation_code           => $tx->validation_code,
        transaction_sequence_num  => $tx->transaction_sequence_num,
        local_transaction_date    => $tx->local_transaction_date,
        local_transaction_time    => $tx->local_transaction_time,
        AVS_result_code           => $tx->AVS_result_code,
        #description    => 'Business::OnlinePayment::VirtualNet test',

          action         => 'Post Authorization',
      #    order_number   => $ordernum,
      #    amount         => '0.01',
      #    authorization  => $auth,
      #    description    => 'Business::OnlinePayment::VirtualNet test',
      );

      $capture->submit();

      if( $capture->is_success() ) { 
          print "Card captured successfully\n";
      } else {
          print "Error: ".$capture->error_message."\n";
      }

  }

DESCRIPTION ^

For detailed information see Business::OnlinePayment.

NOTE ^

COMPATIBILITY ^

This module implements the interface documented at http://www.vitalps.com/sections/int/int_Interfacespecs.html

Specifically, start with http://www.vitalps.com/pdfs_specs/VirtualNet%020Specification%0200011.pdf and then http://www.vitalps.com/pdfs_specs/EIS%0201080%020v6_4_1.pdf and http://www.vitalps.com/pdfs_specs/EIS_1081_v_6_4.pdf and maybe even http://www.vitalps.com/pdfs_specs/EIS%0201051.pdf and http://www.vitalps.com/pdfs_specs/EIS%0201052.pdf

AUTHOR ^

Ivan Kohler <ivan-virtualnet@420.am>

SEE ALSO ^

perl(1). Business::OnlinePayment.

syntax highlighting: