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',
24 action => 'Normal Authorization',
25 description => 'Business::OnlinePayment visa test',
26 # card_number => '4007000000027',
27 card_number => '4111111111111111',
29 expiration => expiration_date(),
32 email => 'fake@acme.com',
33 address => '123 Anystreet',
40 my $transaction = Business::OnlinePayment->new("vSecureProcessing", %opt);
41 $transaction->content(%content);
42 eval { $transaction->submit(); };
50 if ( $transaction->is_success() ) {
51 print "Card processed successfully: ". $transaction->authorization()."\n";
53 print "Card was rejected: ". $transaction->error_message(). "\n";
61 my($month, $year) = (localtime)[4,5];
63 $year++; # So we expire next year.
64 $year %= 100; # y2k? What's that?
66 return sprintf("%02d/%02d", $month, $year);