projects
/
Business-OnlinePayment-Cardcom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eee2fc9
)
BOP Cardcom, RT13058
author
levinse
<levinse>
Tue, 7 Jun 2011 01:00:34 +0000
(
01:00
+0000)
committer
levinse
<levinse>
Tue, 7 Jun 2011 01:00:34 +0000
(
01:00
+0000)
Cardcom.pm
patch
|
blob
|
history
diff --git
a/Cardcom.pm
b/Cardcom.pm
index
68ba354
..
57e9d14
100644
(file)
--- a/
Cardcom.pm
+++ b/
Cardcom.pm
@@
-24,7
+24,6
@@
sub set_defaults {
# -Identity number
# -Configurable currency
# -Configurable deal code
# -Identity number
# -Configurable currency
# -Configurable deal code
-# -Refunds or whatever this thing calls them
sub submit {
my($self) = @_;
sub submit {
my($self) = @_;
@@
-38,8
+37,13
@@
sub submit {
cvv2 => 'cvv',
);
cvv2 => 'cvv',
);
- die "invalid action" unless
- $self->{_content}{'action'} =~ /^\s*normal\s*authorization\s*$/i;
+ my $action = $self->{_content}{'action'};
+ if ( $action =~ /^\s*credit\s*$/i ) {
+ $self->{_content}{dealtype} = 51;
+ $self->{_content}{credittype} = 1;
+ } elsif ( $action !~ /^\s*normal\s*authorization\s*$/i ) {
+ die "invalid action";
+ }
$self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/
or croak "unparsable expiration ". $self->{_content}{expiration};
$self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/
or croak "unparsable expiration ". $self->{_content}{expiration};
@@
-111,6
+115,8
@@
sub fields {
Username
userpassword
languages
Username
userpassword
languages
+ dealtype
+ credittype
cvv
);
}
cvv
);
}
@@
-124,9
+130,10
@@
sub _info {
'support_types' => [ 'CC' ],
'token_support' => 0, # well technically the gateway supports it, but we haven't implemented it
'test_transaction' => 1,
'support_types' => [ 'CC' ],
'token_support' => 0, # well technically the gateway supports it, but we haven't implemented it
'test_transaction' => 1,
- 'supported_actions' => [
# XXX refunds
+ 'supported_actions' => [
'Normal Authorization',
'Normal Authorization',
- ],
+ 'Credit',
+ ],
};
}
};
}