[interchange] * Remove default debug output from all payment modules.

Mike Heins interchange-cvs at icdevgroup.org
Sun Mar 23 14:08:48 UTC 2014


commit f3016690ca21cd6294c3af7955df1e7d87b7b365
Author: Mike Heins <heins at icdevgroup.com>
Date:   Sun Mar 23 10:04:21 2014 -0400

    * Remove default debug output from all payment modules.

 lib/Vend/Payment/CyberSource.pm    |   20 ++++++++++----------
 lib/Vend/Payment/GoogleCheckout.pm |    8 ++++----
 lib/Vend/Payment/SagePay.pm        |    6 +++---
 3 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/lib/Vend/Payment/CyberSource.pm b/lib/Vend/Payment/CyberSource.pm
index 49d490e..7a7c051 100644
--- a/lib/Vend/Payment/CyberSource.pm
+++ b/lib/Vend/Payment/CyberSource.pm
@@ -856,7 +856,7 @@ sub cybersource {
     my ($opt) = @_;
     $opt->{order_number} ||= $opt->{order_id};
 
-::logDebug("cybersource opt hash: %s", $debug_scrub->($opt));
+#::logDebug("cybersource opt hash: %s", $debug_scrub->($opt));
 
     my %type_map = qw/
         sale            auth_bill
@@ -919,7 +919,7 @@ sub cybersource {
         || charge_param('transaction')
         || 'auth';
 
-::logDebug("transaction type: $transtype");
+#::logDebug("transaction type: $transtype");
 
     $transtype = $type_map{$transtype}
         or return (
@@ -950,7 +950,7 @@ sub cybersource {
         push (@apps, $_)
             if exists $opt_apps{ lc ($_) };
     }
-::logDebug ("Applications: " . ::uneval \@apps);
+#::logDebug ("Applications: " . ::uneval \@apps);
 
     ## Allow IC-relative page paths for return and cancel URLs
     if ($acct_type eq 'pp' && grep { /^pp_ec_set$/ } @apps) {
@@ -1468,7 +1468,7 @@ sub cybersource {
     ::logError("Error in ship_map route param: $@")
         if $@;
 
-::logDebug('%%ship_method: %s', ::uneval(\%ship_method));
+#::logDebug('%%ship_method: %s', ::uneval(\%ship_method));
 
     ## Special Cases
     $required_map{ics_bill} = [ 'ccCaptureService_run' ]
@@ -1485,7 +1485,7 @@ sub cybersource {
     my %actual = $opt->{actual} ? %{ $opt->{actual} } : map_actual();
     $actual{mv_credit_card_number} ||= $opt->{mv_credit_card_number};
 
-::logDebug('%%actual: %s', $debug_scrub->(\%actual));
+#::logDebug('%%actual: %s', $debug_scrub->(\%actual));
 
     my @required_keys = (
         @{ $required_map{all} },
@@ -1809,7 +1809,7 @@ sub cybersource {
             die $sigalrm_die_msg;
         };
 
-::logDebug("cybersource Sending Request...\n%s", $debug_scrub->(\%request));
+#::logDebug("cybersource Sending Request...\n%s", $debug_scrub->(\%request));
 
         my $start = time;
         alarm $timeout;
@@ -1821,7 +1821,7 @@ sub cybersource {
 
         my $end = time;
 
-::logDebug("cybersource Response (%ds):\n%s", $end - $start, ::uneval(\%resp));
+#::logDebug("cybersource Response (%ds):\n%s", $end - $start, ::uneval(\%resp));
 
         # Initiate a timeout payment if the gateway response
         # itself was a timeout error
@@ -1947,7 +1947,7 @@ sub cybersource {
     $resp{acct_type}  = $acct_type;
     $resp{rc_msg}     = $reason_code_map{ $resp{reasonCode} } || 'Unknown';
 
-::logDebug("decision: $status, reason code: $resp{reasonCode}");
+#::logDebug("decision: $status, reason code: $resp{reasonCode}");
 
     if ($status ne 'success') {
         if ($acct_type eq 'bml') {
@@ -1980,7 +1980,7 @@ EOP
         }
     }
 
-::logDebug("Returning %%resp: %s",::uneval(\%resp));
+#::logDebug("Returning %%resp: %s",::uneval(\%resp));
     return %resp;
 }
 
@@ -2054,7 +2054,7 @@ sub init {
             . ".xsd";
 
         $xsd = Vend::File::readfile($file);
-::logDebug("cybersource: found cached xsd for version " . $self->attr('CYBS_VERSION') . " at $file") if $xsd;
+#::logDebug("cybersource: found cached xsd for version " . $self->attr('CYBS_VERSION') . " at $file") if $xsd;
     }
 
     unless ($xsd) {
diff --git a/lib/Vend/Payment/GoogleCheckout.pm b/lib/Vend/Payment/GoogleCheckout.pm
index d186b90..93cbc98 100644
--- a/lib/Vend/Payment/GoogleCheckout.pm
+++ b/lib/Vend/Payment/GoogleCheckout.pm
@@ -499,7 +499,7 @@ print "GCO".__LINE__.": tax=$salestax; shipping=$shipping, $::Values->{mv_shippi
               $zip_pattern = "$1"."*";
     my $taxshipping = 'false';
               $taxshipping = 'true' if (($country =~ /$::Variable->{TAXSHIPPING}/) or ($state =~ /$::Variable->{TAXSHIPPING}/) or ($alwaystaxshipping == '1'));
-::logDebug(":GCO:".__LINE__.": shipping=$::Session->{final_shipping}, $shipping; handling=$handling; taxshipping=$::Variable->{TAXSHIPPING}; country=$country; tx=$taxshipping");
+#::logDebug(":GCO:".__LINE__.": shipping=$::Session->{final_shipping}, $shipping; handling=$handling; taxshipping=$::Variable->{TAXSHIPPING}; country=$country; tx=$taxshipping");
  my $stax = Vend::Interpolate::salestax();
  print "GCO:".__LINE__.": stax=$stax; mvst=$::Values->{mv_salestax}, $::Values->{salestax}\n";
 if ($salestax == '0') { 
@@ -514,7 +514,7 @@ if ($salestax == '0') {
   else { 
          $taxrate =  ($salestax / $subtotal || '0');
 }
-::logDebug(":GCO:".__LINE__.": subtotal=$subtotal; taxrate=$taxrate");
+#::logDebug(":GCO:".__LINE__.": subtotal=$subtotal; taxrate=$taxrate");
 
 ### Check that the currency sent to GCO is the one registered with them, or return to the checkout
 my $user_currency = $::Scratch->{iso_currency_code} || $::Values->{iso_currency_code} || $currency;
@@ -918,7 +918,7 @@ elsif ($$xmlIpn =~ /order-state-change-notification/) {
 					$qty = $items->{'quantity'};
 					$sthi = $dbh->prepare("UPDATE inventory SET quantity = quantity -'$qty' WHERE sku = '$itm'");
 					$sthi->execute() or die errmsg("Cannot update table inventory");
-::logDebug(":GCO:".__LINE__.": Decremented inventory for $itm by $qty");
+#::logDebug(":GCO:".__LINE__.": Decremented inventory for $itm by $qty");
 					}
 				  }	
 	   			}
@@ -1335,7 +1335,7 @@ use MIME::Base64;
      $header->header('Accept'        => "application/xml");
   my $request = HTTP::Request->new(POST => $gcourl, $header, $xmlOut);
   my $response = $agent->request($request);
-::logDebug(":GCO:".__LINE__.": sendxml: gcourl=$gcourl\nxmlOut=$xmlOut");
+#::logDebug(":GCO:".__LINE__.": sendxml: gcourl=$gcourl\nxmlOut=$xmlOut");
   return $response->content;
 }
 
diff --git a/lib/Vend/Payment/SagePay.pm b/lib/Vend/Payment/SagePay.pm
index d0b0c4f..a6aba3e 100644
--- a/lib/Vend/Payment/SagePay.pm
+++ b/lib/Vend/Payment/SagePay.pm
@@ -778,7 +778,7 @@ sub sagepay {
 	my $clientIPAddress    = $CGI::remote_addr if $CGI::remote_addr;
 			$::Values->{authcode} = '';
 	
-::logDebug("SP".__LINE__.": bCity=$billingCity; mvccType=$cardType; start=$mvccStartDate; issue=$issue;");
+#::logDebug("SP".__LINE__.": bCity=$billingCity; mvccType=$cardType; start=$mvccStartDate; issue=$issue;");
 		
 # ISO currency code sent to SagePay, from the page or fall back to config files.
 	my $currency = $::Values->{iso_currency_code} || $::Values->{currency_code} || $Vend::Cfg->{Locale}{iso_currency_code} ||
@@ -988,7 +988,7 @@ if ($request eq 'psp') {
 		$response = $post->{status_line};
 		$page     = $post->{result_page};
 
-::logDebug("SP".__LINE__.": response page:\n-------------------------\n$page \n---------------------------\nend of SagePay results page\n\n");
+#::logDebug("SP".__LINE__.": response page:\n-------------------------\n$page \n---------------------------\nend of SagePay results page\n\n");
 		
 		$result{TxType}         = $txtype;
 		$result{Currency}       = $currency;
@@ -1067,7 +1067,7 @@ EOB
  	     		$::Scratch->{tds} = 'yes' ;
  	     		$Vend::Session->{payment_result} = \%result;
 
-::logDebug("SP".__LINE__.": secureStatus=$result{SecureStatus} so now to run routes; result hash=".::uneval(\%result));
+#::logDebug("SP".__LINE__.": secureStatus=$result{SecureStatus} so now to run routes; result hash=".::uneval(\%result));
 
  	     		Vend::Dispatch::do_process();
  	     		}



More information about the interchange-cvs mailing list