[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] mv_credit_card_reference
Hi Mike,
May I follow up this conversation from long, long ago (2001-05-10). Here you
said:
> 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.
Now I have some doubts about this. The question is: should the return value
of &calc terminate the profile if it is non-true? In my experience the
results of &calc are always ignored. Look at Order.pm, sub check_order,
lines 904-905 (IC 4.8.3):
($val, $var, $message) = do_check(...);
next if ! $var;
This means that the results of every pragma/check are ignored unless they
return something in the 2nd position of the return array. Looking at the
tag_calc code, I see that it always returns scalar!
So, what should be the good behavior of &calc=return 0;? To cause or not to
cause profile failure?
Javier