diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-11-12 14:30:42 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-11-12 14:30:42 -0800 |
commit | b946d6a32d3fce0a04e175106cc0e824f58ed397 (patch) | |
tree | 574c732aed5c3681d71078ebb31a4458c1f94947 /eSelectPlus.pm | |
parent | 80ce0eff9b7c99603ba4dff0e3bc4b9176f564a6 (diff) |
Fix voids even if an amount is passed (now ignored)
Diffstat (limited to 'eSelectPlus.pm')
-rw-r--r-- | eSelectPlus.pm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/eSelectPlus.pm b/eSelectPlus.pm index 8ef134f..3357703 100644 --- a/eSelectPlus.pm +++ b/eSelectPlus.pm @@ -8,7 +8,7 @@ use Business::OnlinePayment::HTTPS 0.03; use vars qw($VERSION $DEBUG @ISA); @ISA = qw(Business::OnlinePayment::HTTPS); -$VERSION = '0.05'; +$VERSION = '0.06'; $DEBUG = 0; sub set_defaults { @@ -108,9 +108,9 @@ sub submit { if ( $action =~ /^(purchase|preauth|ind_refund)$/ ) { - $self->required_fields( - qw( login password amount card_number expiration ) - ); + $self->required_fields(qw( + login password amount card_number expiration + )); #cardexpiremonth & cardexpireyear $self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/ @@ -123,18 +123,18 @@ sub submit { $self->{_content}{amount} = sprintf('%.2f', $self->{_content}{amount} ); - } elsif ( $action eq 'completion' || $action eq 'purchasecorrection' ) { + } elsif ( $action =~ /^(completion|purchasecorrection|refund)$/ ) { - $self->{_content}{comp_amount} = delete $self->{_content}{amount} - if $action eq 'completion'; + $self->required_fields(qw( + login password order_number authorization + )); - $self->required_fields( qw( login password order_number authorization ) ); - - } elsif ( $action eq 'refund' ) { - - $self->required_fields( - qw( login password order_number authorization ) - ); + if ( $action eq 'completion' ) { + $self->{_content}{comp_amount} = delete $self->{_content}{amount}; + } elsif ( $action eq 'purchasecorrection' ) { + delete $self->{_content}{amount}; + #} elsif ( $action eq 'refund' ) { + } } |