diff options
author | jeff <jeff> | 2008-07-04 00:47:49 +0000 |
---|---|---|
committer | jeff <jeff> | 2008-07-04 00:47:49 +0000 |
commit | 0dee55d87fdc03e22f0daae8651c9f61c907c5e1 (patch) | |
tree | 597f9290e35ebd10893fb15dda4b0b4d4810ff32 /IPPay.pm | |
parent | 8550d7e61329906a0089aa24ff6f0f48d0c8ec99 (diff) |
set default server and default shipping address to billing address for card transactions
Diffstat (limited to 'IPPay.pm')
-rw-r--r-- | IPPay.pm | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -14,8 +14,8 @@ use Business::OnlinePayment::HTTPS; use vars qw($VERSION $DEBUG @ISA $me); @ISA = qw(Business::OnlinePayment::HTTPS); -$VERSION = '0.01'; -$DEBUG = 1; +$VERSION = '0.02'; +$DEBUG = 0; $me = 'Business::OnlinePayment::IPPay'; sub set_defaults { @@ -23,7 +23,7 @@ sub set_defaults { my %opts = @_; # standard B::OP methods/data - $self->server('test1.jetpay.com') unless $self->server; + $self->server('gateway17.jetpay.com') unless $self->server; $self->port('443') unless $self->port; $self->path('/jetpay') unless $self->path; @@ -237,6 +237,17 @@ sub submit { Phone => 'ship_phone', ); + unless ( $type ne 'CC' || keys %shippingaddr ) { + tie %shippingaddr, 'Tie::IxHash', + $self->revmap_fields( + Address => 'address', + City => 'city', + StateProv => 'state', + Country => 'country', + Phone => 'phone', + ); + } + tie my %shippinginfo, 'Tie::IxHash', $self->revmap_fields( CustomerPO => 'CustomerPO', |