Subject: | %content not reloaded after mapping breaks credits |
Date: | Tue, 18 Aug 2009 19:12:09 -0600 |
To: | bug-Business-OnlinePayment-PayflowPro [...] rt.cpan.org |
From: | Josh Rosenbaum <josh [...] infogears.com> |
Here's a patch based on my last encoding patched PayflowPro.pm to reload %content after we do field mapping.
This fixes a problem with credits where the ACCT, AMT, and EXPDATE were being required, because the ORIGID detection code was not working, since we hadn't reloaded content after the mapping of order_number to ORIGID.
-- Josh Rosenbaum
--- patch/PayflowPro.pm.new_encoding 2009-08-18 15:32:37.000000000 -0600
+++ PayflowPro.pm 2009-08-18 18:43:01.000000000 -0600
@@ -231,6 +231,10 @@
);
+ # Reload content after our map, since it is different and we need new
+ # fields like ORIGID.
+ %content = $self->content;
+
my @required = qw( TRXTYPE TENDER PARTNER VENDOR USER PWD );
if ( $self->transaction_type() eq 'C' ) { # credit card
if ( $content{'action'} =~ /^[CDV]$/