[ic] Preventing non-US orders from using realtime processing

DB DB at M-and-D.com
Thu Apr 20 22:14:27 EDT 2006


> This works for me:
> 
> [if value country =~ /^(US)$/i]
> 
> <!-- Do real-time credit card -->
> 
> [else]
> 
> <!-- Don't do real-time credit card -->
> 
> [/else]
> [/if]
> 
> YMMV
> 
> 
>> 



I gave your code a shot as shown below, but I get errors about invalid
credit card number and in the log I see entries about routing problems:

[20/April/2006:22:04:22 -0400] mdp /cgi-bin/mdp/process Route log failed.
[20/April/2006:22:04:22 -0400] mdp /cgi-bin/mdp/process ERRORS on ORDER
3958:
> Error during creation of order routing log:
> Route log failed. at /usr/local/interchange/lib/Vend/Order.pm line 1835.


I think I'm missing part of a bigger picture. Here is what I tried:

====================================================

__NAME__                            credit_card

__COMMON_ORDER_PROFILE__

&fatal = yes
email=required
email=email

&set = mv_payment Incomplete

[if value country =~ /^(US)$/i]

[if variable MV_PAYMENT_MODE]
[value name=mv_payment_realtime set=""]
&credit_card=standard keep __CREDIT_CARDS_ACCEPTED__
&set=mv_payment Real-time Credit Card (%c -- [var MV_PAYMENT_MODE])
&set=mv_payment_realtime 1
[else]
&credit_card=standard __CREDIT_CARDS_ACCEPTED__
&set=mv_payment Credit Card (%c)
[/else]
[/if]

[else]
&credit_card=standard __CREDIT_CARDS_ACCEPTED__
&set=mv_payment Credit Card (%c)
[/else]

[/if]


&calc = $Values->{mv_payment} =~ s/\%c/$Values->{mv_credit_card_type}/g; 1;
&final = yes
&setcheck=mv_email [value email]

__END__

=============================

Still trying..... hints still welcomed

DB


More information about the interchange-users mailing list