Fw: [ic] Payment Processor Error Tracking

Mike Heins interchange-users@interchange.redhat.com
Wed Nov 7 17:17:03 2001


Quoting fctmaillist (fctmaillist@megasoft.com):
> > > > >
> > > > > " $Vend::Session->{errors}{mv_credit_card_valid} = $msg;".
> > > > >
> > > > > But we couldnot stop the flow as soon as we get the error for
> example
> > > > > invalid request to the processor.
> 
> ---------------------------------------------------------------------------
> > > > It is all a question of how you are invoking it. Where is that done,
> > > > and how?
> > > >
> ---------------------------------------------------------------------------
> 
> In the profiles.order we have the following code
> __NAME__        credit_card
> fname=required
> lname=required
> address1=required
> city=required
> country=required
> [if value country =~ /^(US|CA)$/i]
>         state=state_province
>         zip=postcode
> [/if]
> &or phone_night=phone, phone_day=phone Must have day or evening phone number
> 
> &fatal = yes
> email=required
> email=email
> 
> &set = mv_payment Incomplete
> [if variable MV_PAYMENT_MODE]
> &credit_card=standard keep __CREDIT_CARDS_ACCEPTED__
> &charge=[var MV_PAYMENT_MODE][cgi mv_payment_test]
> &set=mv_payment Real-time Credit Card (%c -- [var MV_PAYMENT_MODE])
> [else]
> &set=mv_payment Credit Card (%c)
> &charge = [para some inputs ][/para]

Nope -- that will not work. The &charge primitive accepts either a
known mode (one of the Vend::Payment modules) or the nambe of
a globalsub with "custom globalsub".

This is discussed in the docs, but remember that the [itl tags]
get interpolated before the profile primitives. The only way
to do it in-line is with

&calc=<<EOF
	$Values->{mv_credit_card_valid = $Tag->para('input', 'input', @etc);
EOF

I would recommend that you put your usertag into a globalsub
and use the standard interface, or better yet make it into
a Vend::Payment::Para module.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Nature, to be commanded, must be obeyed. -- Francis Bacon