5 use Test::More tests => 11;
7 use Business::OnlinePayment;
9 my $package = "Business::OnlinePayment";
10 my $driver = "PlugnPay";
15 $obj = $package->new($driver);
16 isa_ok( $obj, $package );
19 can_ok( $obj, qw(order_number avs_code cvv2_response) );
20 can_ok( $obj, qw(debug expdate_mmyy) );
23 can_ok( $obj, qw(_map_fields _revmap_fields) );
26 my $server = "pay1.plugnpay.com";
28 is( $obj->server, $server, "server($server)" );
29 is( $obj->port, "443", "port(443)" );
30 is( $obj->path, "/payment/pnpremote.cgi", "pnpremote.cgi" );
34 my $obj = $package->new($driver);
37 #OFF [qw(1999.8 08/99)],
38 #OFF [qw(1984-11 11/84)],
39 #OFF [qw(06/7 07/06)],
40 #OFF [qw(06-12 12/06)],
46 foreach my $aref (@exp) {
47 my ( $exp, $moyr ) = @$aref;
48 my ($mmyy) = $obj->expdate_mmyy($exp);
49 is( $mmyy, $moyr, "$exp: MMYY '$mmyy' eq '$moyr' from $exp" );