projects
/
Business-OnlinePayment-eSelectPlus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
80ce0ef
)
Fix voids even if an amount is passed (now ignored)
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 12 Nov 2012 22:30:42 +0000
(14:30 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 12 Nov 2012 22:30:42 +0000
(14:30 -0800)
Changes
patch
|
blob
|
history
eSelectPlus.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
6aa60b1
..
4c7fe78
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,6
+1,9
@@
Revision history for Perl extension Business::OnlinePayment::eSelectPlus
Revision history for Perl extension Business::OnlinePayment::eSelectPlus
-0.05 Sat Nov 10 14:20:42 PST 2012
+0.06 Mon Nov 12 14:28:16 PST 2012
+ - Fix voids even if an amount is passed (now ignored)
+
+0.05 unreleased to CPAN (Sat Nov 10 14:20:42 PST 2012)
- Pre-auth, capture/completion, voids and credits are now supported.
Note: testing preauth seems to work only with test store #1 (CAD).
- Backwards-compatibility note (align usage of 'authorization' &
- Pre-auth, capture/completion, voids and credits are now supported.
Note: testing preauth seems to work only with test store #1 (CAD).
- Backwards-compatibility note (align usage of 'authorization' &
diff --git
a/eSelectPlus.pm
b/eSelectPlus.pm
index
8ef134f
..
3357703
100644
(file)
--- 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);
use vars qw($VERSION $DEBUG @ISA);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.0
5
';
+$VERSION = '0.0
6
';
$DEBUG = 0;
sub set_defaults {
$DEBUG = 0;
sub set_defaults {
@@
-108,9
+108,9
@@
sub submit {
if ( $action =~ /^(purchase|preauth|ind_refund)$/ ) {
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})$/
#cardexpiremonth & cardexpireyear
$self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/
@@
-123,18
+123,18
@@
sub submit {
$self->{_content}{amount} = sprintf('%.2f', $self->{_content}{amount} );
$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' ) {
+ }
}
}