LINE —
Interchange 5.7.0:
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 490 (context shows lines 480-494 in googlecheckout():399)
if ($gcorequest eq 'post') {
undef $gcorequest;
my $salestax = $::Values->{tax} || Vend::Interpolate::salestax() || '0.00';
my $shipmode = $::Values->{mv_shipmode} || charge_param('default_shipmode') || 'upsg';
my $shipping = $::Session->{final_shipping} || Vend::Ship::shipping($shipmode) \
|| charge_param('default_shipping') || '0.00';
my $handling = $::Values->{handlingtotal} || Vend::Ship::tag_handling() || '';
$shipping += $handling;
my $shipmsg = $::Session->{ship_message};
my $subtotal = $::Values->{amount} || Vend::Interpolate::subtotal();
my $ordertotal = charge_param('amount') || Vend::Interpolate::total_cost();
print "GCO".__LINE__.": tax=$salestax; shipping=$shipping, $::Values->{mv_shipping}; \
shipmode=$shipmode\n";
my $defaultcountry = charge_param('defaultcountry');
my $defaultstate = charge_param('defaultstate');
my $country = uc($actual->{country});
$country = $defaultcountry unless $country;
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 504 (context shows lines 494-508 in googlecheckout():399)
$country = $defaultcountry unless $country;
my $state = uc($actual->{state});
$state = $defaultstate unless $state;
my $zip_pattern = $actual->{zip} || $::Values->{zip};
$zip_pattern =~ /(\S\S\S).*/;
$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");
my $stax = Vend::Interpolate::salestax();
print "GCO:".__LINE__.": stax=$stax; mvst=$::Values->{mv_salestax}, $::Values->{salestax}\n";
if ($salestax == '0') {
$taxrate = '0.00';
}
elsif ($taxshipping eq 'true') {
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 517 (context shows lines 507-521 in googlecheckout():399)
}
elsif ($taxshipping eq 'true') {
$taxrate = ($salestax / ($subtotal + $shipping) || '0');
}
elsif ($calculate_included_tax == '1') {
$taxrate = $default_taxrate;
}
else {
$taxrate = ($salestax / $subtotal || '0');
}
::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;
#::logDebug(" ".__LINE__.": user currency = $user_currency, $::Scratch->{iso_currency_code}, \
$::Values->{iso_currency_code}; currency=$currency");
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 921 (context shows lines 911-925 in googlecheckout():399)
$cart = eval ($cart);
my $dbi = dbref('inventory') or die errmsg("cannot open inventory table");
my $dbhi = $dbi->dbh() or die errmsg("cannot get handle for tbl 'inventory'");
my ($sthi, $itm, $qty);
foreach my $items (@{$cart}) {
$itm = $items->{'code'};
$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");
}
}
}
else {
Source: lib/Vend/Payment/GoogleCheckout.pm
Line 1338 (context shows lines 1328-1342 in sendxml():1326)
my $xmlOut = shift;
my $agent = LWP::UserAgent->new;
my $data = "$merchantid:$merchantkey";
my $signature = encode_base64($data, "");
$header = HTTP::Headers->new;
$header->header('Authorization' => "Basic " . $signature);
$header->header('Content-Type' => "application/xml; charset=UTF-8");
$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");
return $response->content;
}
1;
Source: lib/Vend/Payment/SagePay.pm
Line 781 (context shows lines 771-785 in sagepay():576)
my $customerEmail = $actual->{email};
$customerEmail =~ s/[^a-zA-Z0-9.\@\-_]//gi;
my $contactFax = $::Values->{fax} || '';
$contactFax =~ s/[\(\)]/ /g;
$contactFax =~ s/[^0-9-+ ]//gi;
my $giftAidPayment = $::Values->{giftaidpayment} || charge_param('giftaidpayment') || '0';
my $authCode = $::Values->{authcode} || '';
my $clientIPAddress = $CGI::remote_addr if $CGI::remote_addr;
$::Values->{authcode} = '';
::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} ||
charge_param('currency') || $::Variable->{MV_PAYMENT_CURRENCY} || 'GBP';
Source: lib/Vend/Payment/SagePay.pm
Line 991 (context shows lines 981-995 in sagepay():576)
push @query, "$key=$query{$key}";
}
my $string = join '&', @query; # replicates the string as actually sent: \
useful to quote this for debugging
#::logDebug("SP".__LINE__.": string to SagePay: $string");
$post = post_data($opt, \%query);
$response = $post->{status_line};
$page = $post->{result_page};
::logDebug("SP".__LINE__.": response page:\n-------------------------\n$page \
\n---------------------------\nend of SagePay results page\n\n");
$result{TxType} = $txtype;
$result{Currency} = $currency;
$result{CardRef} = $::Session->{sagepay}{CardRef};
Source: lib/Vend/Payment/SagePay.pm
Line 1070 (context shows lines 1060-1074 in sagepay():576)
$result{'Status'} = 'OK';
$::Scratch->{mstatus} = 'success';
$::Scratch->{order_id} = $result{'order-id'};
$::Values->{mv_payment} = "Real-time card $result{CardInfo}";
$::Values->{psp} = charge_param('psp') || 'SagePay';
$::CGI::values{mv_todo} = 'submit';
if ($result{SecureStatus} =~ /OK|ATTEMPTONLY/i) {
$::Scratch->{tds} = 'yes' ;
$Vend::Session->{payment_result} = \%result;
::logDebug("SP".__LINE__.": secureStatus=$result{SecureStatus} so now to \
run routes; result hash=".::uneval(\%result));
Vend::Dispatch::do_process();
}
}
Source: lib/Vend/Payment/SagePay.pm
Line 1195 (context shows lines 1185-1199 in sagepay():576)
$::Values->{mv_payment} = "Processing card $result{CardInfo}";
$CGI::values{mv_todo} = 'submit';
#::logDebug("SP".__LINE__.": request=$request; tds=$::Scratch->{tds}");
}
undef $request;
$::Values->{request} = '';
::logDebug("SP".__LINE__.":result=".::uneval(\%result));
# Now extra logging for backup order and/or log of events
if ($logorder =~ /y|1/) {
#--- write the full basket and address to failsafe file
Source: lib/Vend/Payment/Worldpay.pm
Line 505 (context shows lines 495-509 in worldpay():433)
$::Scratch->{orderID} = $orderID;
# Disable order number creation in log_transaction and create it here instead, unless IC is old
if ($::Values->{inv_no}) {
$purchaseID = $::Values->{inv_no};
}
else{
# Use temporary number as the initial order number, and only replace upon \
successful order completion
$purchaseID = "$tmpPrefix".Vend::Interpolate::tag_counter("$wpcounter");
$Vend::Session->{mv_order_number} = $::Values->{mv_order_number} = \
$purchaseID if ($oldic == 1);# prevents early ICs setting order number prior to log_transaction
::logDebug("WP:".__LINE__.": purchaseID=$purchaseID; $Vend::Session->{mv_order_number}");
}
my $cartId = $desc = $::Scratch->{purchaseID} = $purchaseID;
Source: lib/Vend/Payment/PaypalExpress.pm
Line 1138 (context shows lines 1128-1142 in paypalexpress():501)
$basket .= <<EOB;
Item = $itm->{code}, "$itm->{rpDescription}"; Price = $itm->{price}; \
Qty = $itm->{quantity}; Subtotal = $itm->{subtotal}
EOB
my ($dorecurringbilling, $cntr);
my $rpamount = $itm->{'rpamount_field'} || $itm->{'rpamount'};
$nonrp = '1' if (! $rpamount); # only run Do request if have standard purchase as well
if ($rpamount) {
# $cntr++;
print "PP".__LINE__.": cntr=$cntr; initamount=$itm->{initAmount}; rpAmount=$itm->{rpAmount}; \
trialAmount=$itm->{trialAmount}\n";
$dorecurringbilling = (
SOAP::Data->name("BillingAgreementDetails" =>
\SOAP::Data->value(
SOAP::Data->name("BillingType" => 'RecurringPayments')->type(""),