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

DB DB at m-and-d.com
Tue Apr 18 12:37:21 EDT 2006


I just added Skipjack realtime credit card processing to a store and it
is working. I would like to have non-US orders to still use the old
default non-realtime credit card payment method.

I edited my etc/profiles.order in an attempt to make this happen but it
does not seem to be working as I'd hoped. I changed the credit card
section in that file from this:

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

__NAME__                            credit_card

__COMMON_ORDER_PROFILE__

&fatal = yes
email=required
email=email

&set = mv_payment Incomplete

[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]

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

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

to this:


========================================
__NAME__                            credit_card

__COMMON_ORDER_PROFILE__

&fatal = yes
email=required
email=email

&set = mv_payment Incomplete

    [if value country=US]

        [then]

[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]


      [/then]

      [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]

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

With this change in place, if I try a non-US order I get an error saying
that the credit card number is invalid, even though I know the number is
valid (without the edit in place it behaves as it should)

Can anyone tell me why this is failing?

DB






More information about the interchange-users mailing list