Fw: [ic] Payment Processor Error Tracking

fctmaillist interchange-users@interchange.redhat.com
Wed Nov 7 06:51:01 2001


> > ----- Original Message -----
> > From: Mike Heins <mheins@redhat.com>
> > To: <interchange-users@interchange.redhat.com>
> > Sent: Wednesday, November 07, 2001 12:03 AM
> > Subject: Re: [ic] Payment Processor Error Tracking
> >
> >
> > > Quoting fctmaillist (fctmaillist@megasoft.com):
> > > > hi
> > > >         we have integrated IC with Paradata  (payment processor)
using
> > their
> > > > perl API.  The problem we are facing now is to handle the negative
> > > > responses.  if the payment processor returns a negative response, we
> > need to
> > > > stop the process and we need to show the error message in the
checkout
> > pages
> > > > or a failure page.  we have searched the mailing list for doing this
> but
> > we
> > > > could not able to get any success.
> > > > we have done the following things when there is some error in the
user
> > tag
> > > >
> > > > " $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]
&fail=../special_pages/payment_response
&fatal = yes
&final = yes
&setcheck=mv_email [value email]

__END__

where para is the usertag to contact the payment processor.

All the errors are assigned as

" $Vend::Session->{errors}{mv_credit_card_valid} = $msg;".

In checkout page we display the errors as follows :

    [if type=explicit compare="[error all=1 show_var=1 keep=1]"]
    <P>
        <B>There were errors in your last submission:<br>
        <blockquote>
        <FONT color="__CONTRAST__">
                [error all=1 keep=1 show_error=1 show_label=1 joiner="<br>"]
        </font>
        </blockquote>
        </p>
        <p>
    The areas you need to correct are shown in
    <FONT color="__CONTRAST__">this color</FONT> below.</B>
    </p>
    [/if]

Our problem is when the payment process return some error like credit card
declined or invalid request we could not able to halt the control showing
the receipt page.  But our intention is throw back the checkout page with
error message displayed.

thanks,
joyce.j.