[ic] Preventing non-US orders from using realtimeprocessing
Steve Graham
icdev at mrlock.com
Fri Jun 16 15:53:02 EDT 2006
> >
> > Curios if you found a solution to this - if so please let us know
> > your final solution.
> >
I finally took a look at some code.
Here is a brute force method..... there are side effects that need to
be addressed.
Manually processing the credit card, and processing the order
slightly different in the Admin UI
Need to put a message on the ord/finalize.html page letting customer
know that the order may need a faxed copy of credit card, etc to
properly ensure security (When country ne 'US").
Put a message in the emailed receipt stating the same thing as above....
and probably something else I forgot......
take a look at /etc/log_transaction
just add a test for the value of country eq "us"
<snip>
[elsif variable MV_PAYMENT_MODE]
[if value country eq "US"]
[then]
[calc]
return if $Scratch->{tmp_total} == $Scratch->{tmp_remaining};
my $msg = sprintf "Your credit card was charged
%.2f", $Scratch->{tmp_remaining};
$Scratch->{pay_cert_total} = $Scratch->{tmp_total} -
$Scratch->{tmp_remaining};
$Scratch->{charge_total_message} = $msg;
return "Credit card will be charged
$Scratch->{tmp_remaining}";
[/calc]
Country: [value country]
Charging with payment mode=[var MV_PAYMENT_MODE]
[tmp name="charge_succeed"][charge route="[var
MV_PAYMENT_MODE]" amount="[scratch tmp_remaining]" order_id="[value
mv_transaction_id]"][/tmp]
[if scratch charge_succeed]
[then]
[set do_invoice]1[/set]
[set do_payment]1[/set]
Real-time charge succeeded. ID=[data session payment_id]
amount=[scratch tmp_remaining]
[/then]
[else]
Real-time charge FAILED. Reason: [data session payment_error]
[calc]
for(qw/
charge_total_message
pay_cert_total
/)
{
delete $Scratch->{$_};
}
die errmsg(
"Real-time charge failed. Reason: %s\n",
errmsg($Session->{payment_error}),
);
[/calc]
[/else]
[/if]
[/then]
[else]
Forcing Offline credit card [value mv_credit_card_type] [value
mv_credit_card_reference].
Payment: [value name=mv_payment set="credit_card"]
[/else]
[/if]
[/elsif]
<snip>
Test at your own risk.....
-Steve
More information about the interchange-users
mailing list