cust_id: Use customer number instead of invoice number / order_id: Append "-invoice_n...
[Business-OnlinePayment-eSelectPlus.git] / t / order_num_ca.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 eval "use Net::SSLeay;";
4 if ( $@ ) {
5   print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit;
6 }
7
8 use Business::OnlinePayment;
9
10 my $tx = new Business::OnlinePayment("eSelectPlus");
11
12 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
13 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
14 $Business::OnlinePayment::eSelectPlus::DEBUG = 1;
15 $Business::OnlinePayment::eSelectPlus::DEBUG = 1;
16
17 $tx->content(
18     type           => 'VISA',
19     login          => 'moot',
20     password       => 'moot',
21     action         => 'Normal Authorization',
22     amount         => '0.80',
23     currency       => 'CAD',
24     card_number    => '4242424242424242',
25     expiration     => '01/12',
26     invoice_number => '540',
27 );
28 $tx->test_transaction(1); # test, dont really charge
29 $tx->submit();
30     warn $tx->order_number."\n";
31
32 if ( $tx->order_number =~ /-540$/ ) {
33     print "ok 1\n";
34 } else {
35     warn $tx->order_number."\n";
36     print "not ok 1\n";
37 }
38