Navigation Menu

Skip to content

Commit

Permalink
* Remove default debug output from all payment modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Heins committed Mar 23, 2014
1 parent 6c108a8 commit f301669
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions lib/Vend/Payment/CyberSource.pm
Expand Up @@ -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
Expand Down Expand Up @@ -919,7 +919,7 @@ sub cybersource {
|| charge_param('transaction')
|| 'auth';

::logDebug("transaction type: $transtype");
#::logDebug("transaction type: $transtype");

$transtype = $type_map{$transtype}
or return (
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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' ]
Expand All @@ -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} },
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -1980,7 +1980,7 @@ EOP
}
}

::logDebug("Returning %%resp: %s",::uneval(\%resp));
#::logDebug("Returning %%resp: %s",::uneval(\%resp));
return %resp;
}

Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Vend/Payment/GoogleCheckout.pm
Expand Up @@ -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') {
Expand All @@ -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;
Expand Down Expand Up @@ -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");
}
}
}
Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 3 additions & 3 deletions lib/Vend/Payment/SagePay.pm
Expand Up @@ -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} ||
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit f301669

Please sign in to comment.