[freeside-commits] freeside/FS/FS cust_main.pm,1.276,1.277
Ivan,,,
ivan at wavetail.420.am
Wed Mar 21 15:09:09 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv32489
Modified Files:
cust_main.pm
Log Message:
realtime_bop: if a transaction fails without an error_message, output additional debugging information, if available
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -d -r1.276 -r1.277
--- cust_main.pm 20 Mar 2007 17:03:42 -0000 1.276
+++ cust_main.pm 21 Mar 2007 22:09:07 -0000 1.277
@@ -21,6 +21,7 @@
use String::Approx qw(amatch);
use Business::CreditCard 0.28;
use Locale::Country;
+use Data::Dumper;
use FS::UID qw( getotaker dbh );
use FS::Record qw( qsearchs qsearch dbdef );
use FS::Misc qw( send_email );
@@ -2767,6 +2768,42 @@
my $perror = "$processor error: ". $transaction->error_message;
+ unless ( $transaction->error_message ) {
+
+ my $t_response;
+ #this should be normalized :/
+ #
+ # bad, ad-hoc B:OP:PayflowPro "transaction_response" BS
+ if ( $transaction->can('param')
+ && $transaction->param('transaction_response') ) {
+ $t_response = $transaction->param('transaction_response')
+
+ # slightly better, ad-hoc B:OP:TransactionCentral without "param"
+ } elsif ( $transaction->can('response_page') ) {
+ $t_response = {
+ 'page' => ( $transaction->can('response_page')
+ ? $transaction->response_page
+ : ''
+ ),
+ 'code' => ( $transaction->can('response_code')
+ ? $transaction->response_code
+ : ''
+ ),
+ 'headers' => ( $transaction->can('response_headers')
+ ? $transaction->response_headers
+ : ''
+ ),
+ };
+ } else {
+ $t_response .=
+ "No additional debugging information available for $processor";
+ }
+
+ $perror .= "No error_message returned from $processor -- ";
+ ( ref($t_response) ? Dumper($t_response) : $t_response );
+
+ }
+
if ( !$options{'quiet'} && !$realtime_bop_decline_quiet
&& $conf->exists('emaildecline')
&& grep { $_ ne 'POST' } $self->invoicing_list
More information about the freeside-commits
mailing list