projects
/
Business-OnlinePayment.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f02659
)
Rework build_subs(), thanks to Michal Schwern, closes: CPAN#22073
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 25 Feb 2014 08:20:32 +0000
(
00:20
-0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 25 Feb 2014 08:20:32 +0000
(
00:20
-0800)
Changes
patch
|
blob
|
history
OnlinePayment.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
f3fc130
..
a0fc2b7
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-6,6
+6,7
@@
Revision history for Perl extension Business::OnlinePayment.
- Document repository moved from CVS to git
- Add avs_code and cvv2_response to build_subs, they're standard fields
- Document best-practice eval of the submit() method in example
- Document repository moved from CVS to git
- Add avs_code and cvv2_response to build_subs, they're standard fields
- Document best-practice eval of the submit() method in example
+ - Rework build_subs(), thanks to Michal Schwern, closes: CPAN#22073
3.02 Fri Aug 19 16:20:04 PDT 2011
- Fix fatal error calling ->info('supported_actions') on a gateway that
3.02 Fri Aug 19 16:20:04 PDT 2011
- Fix fatal error calling ->info('supported_actions') on a gateway that
diff --git
a/OnlinePayment.pm
b/OnlinePayment.pm
index
f8417ba
..
86551c4
100644
(file)
--- a/
OnlinePayment.pm
+++ b/
OnlinePayment.pm
@@
-6,7
+6,7
@@
use Carp;
require 5.005;
require 5.005;
-$VERSION = '3.03_0
1
';
+$VERSION = '3.03_0
2
';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
# Remember subclasses we have "wrapped" submit() with _pre_submit()
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
# Remember subclasses we have "wrapped" submit() with _pre_submit()
@@
-37,6
+37,8
@@
my @methods = qw(
cvv2_response
);
cvv2_response
);
+__PACKAGE__->build_subs(@methods);
+
#fallback
sub _info {
my $class = shift;
#fallback
sub _info {
my $class = shift;
@@
-88,7
+90,6
@@
sub new {
croak("unknown processor $processor ($@)") if $@;
my $self = bless {processor => $processor}, $subclass;
croak("unknown processor $processor ($@)") if $@;
my $self = bless {processor => $processor}, $subclass;
- $self->build_subs(@methods);
if($self->can("set_defaults")) {
$self->set_defaults(%data);
if($self->can("set_defaults")) {
$self->set_defaults(%data);
@@
-159,7
+160,6
@@
sub _pre_submit {
unless ( $@ =~ m/^Can\'t locate/ );
} else {
my $risk_tx = bless( { processor => $fraud_detection }, $subclass );
unless ( $@ =~ m/^Can\'t locate/ );
} else {
my $risk_tx = bless( { processor => $fraud_detection }, $subclass );
- $risk_tx->build_subs(@methods);
if ($risk_tx->can('set_defaults')) {
$risk_tx->set_defaults();
}
if ($risk_tx->can('set_defaults')) {
$risk_tx->set_defaults();
}