
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] mv_credit_card_reference
Quoting Javier Martin (martin@trymedia.com):
> IC 4.8.2, quick question:
>
> I wish to do the following in my order profile:
>
>
> >>>>>>>>>>>>
>
> &credit_card=standard keep
>
> [perl]
> # do something with $::Values->{mv_credit_card_reference};
> [/perl]
>
> >>>>>>>>>>>>
>
>
> As far as I know the &credit_card pragma takes the credit card info held in
> the variables mv_credit_card_number, mv_credit_card_exp_month, etc.
> validates them and then places a shortened version of the CC in the variable
> mv_credit_card_reference. I would like to use this variable from a perl
> portion of code right after the pragma, but the variable appears empty. Is
> it that [perl]...[/perl] is evaluated BEFORE the execution of &credit_card?
>
Yes.
If you want to do it inline, i.e. after the &credit_card, do:
&calc=<<EOF
# do something with $::Values->{mv_credit_card_reference};
EOF
Make sure that returns a true value, otherwise the profile will
fail. You would be required to set any errors in $Session->{errors}
yourself.
If you need to open any tables, make sure you put a
[perl tables="table"][/perl]
somewhere in the profile so you won't error out during run of
tag_data or such.
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users