4 # Make sure to copy Business::OnlinePayment::vSecureProcessing into its
5 # proper system directory (aka /usr/share/perl5/Business/Onlinepayment)
9 use Business::OnlinePayment;
12 url =>'dvrotsos2.kattare.com',
13 platform => 'Buypass',
14 gid => '1432479912596791',
16 userid=> 'tom@yiptv.com',
23 action => 'Normal Authorization',
24 description => 'Business::OnlinePayment visa test',
25 # card_number => '4007000000027',
26 card_number => '4111111111111111',
28 expiration => expiration_date(),
31 email => 'fake@acme.com',
32 address => '123 Anystreet',
39 my $transaction = Business::OnlinePayment->new("vSecureProcessing", %opt);
40 $transaction->content(%content);
41 eval { $transaction->submit(); };
49 if ( $transaction->is_success() ) {
50 print "Card processed successfully: ". $transaction->authorization()."\n";
52 print "Card was rejected: ". $transaction->error_message(). "\n";
60 my($month, $year) = (localtime)[4,5];
62 $year++; # So we expire next year.
63 $year %= 100; # y2k? What's that?
65 return sprintf("%02d/%02d", $month, $year);