summaryrefslogtreecommitdiff
path: root/t/bop.t
blob: 37bd4a1ddc2431f57049dcadbc65220b85fe9ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/perl

use strict;
use warnings;
use Test::More tests => 6;

use Business::OnlinePayment;

my $package = "Business::OnlinePayment";
my $driver  = "PayflowPro";

{    # new
    my $obj;

    $obj = $package->new($driver);
    isa_ok( $obj, $package );

    # new (via build_subs) automatically creates convenience methods
    can_ok( $obj, qw(vendor partner cert_path) );
    can_ok( $obj, qw(order_number avs_code cvv2_code) );

    # defaults
    my $server = "payflow.verisign.com";

    is( $obj->server,    $server, "server($server)" );
    is( $obj->port,      "443",   "port(443)" );
    is( $obj->cert_path, undef,   "cert_path" );
}