Order API - Reconstructing Shopping Cart after Credit Card D
Posted: Sun Jan 09, 2005 12:49 am
Hello,
I'm using the Order API as a mechanism by which to use a payment
processing gateway that is not supported by ShopSite.
I intend to use Perl and a combination of the CGI and LWP modules to
create a new HTTP request which will pass the necessary values from the
Checkout page to my payment processor and in turn handle the response
that comes back from the payment processor (authorize, decline etc).
Though I'm pretty new to Perl, I've already written a script that works
with the Shipping API in order to achieve something similar so I'm
comfortable about this part of the process.
I have both the "Email receipts to buyer, merchant" and "Screen receipt
for buyer" options unchecked in the Order API configuration options
inside ShopSite Admin. I have done this as I intend to handle this side
of things from my custom Perl CGI.
So, if the credit card transaction is authorized, then all is well and
good. I can transfer the customer to a thank you page (or output one
from Perl) and email both the customer and myself (as the merchant) the
necessary confirmation emails.
However, if the credit card transaction is declined, or there is a
problem with the payment processing gateway itself (it could not be
contacted, or returns an internal error), I somehow need to rebuild the
shopping cart and give my customer the opportunity to try again.
This is what I'm not sure how to achieve.
I can see that there are various places in which data surrounding the
order is stored, cookies and HTTP POST name/value pairs, and I can get
access to all of these via my PERL CGI script, but I can't seem to find
all the order line item details, and even if they were there, what would
I do with them? I would guess that the shopping basket is stored in the
backend database and referenced by an ID stored in one of the
client-side cookies, but that's just a guess...
I'm not even sure if it's possible to achieve what I'm trying to
achieve, although I really really hope it is. I guess that ShopSite
needs to cater for declines from supported payment processing gateways
somehow, but perhaps the same thing can't be done via the Order API...
Anyway, I'm hoping someone out there can help me in some way.
Kind regards,
Ian Scorer
P.S. Using ShopSite 7.1.2
I'm using the Order API as a mechanism by which to use a payment
processing gateway that is not supported by ShopSite.
I intend to use Perl and a combination of the CGI and LWP modules to
create a new HTTP request which will pass the necessary values from the
Checkout page to my payment processor and in turn handle the response
that comes back from the payment processor (authorize, decline etc).
Though I'm pretty new to Perl, I've already written a script that works
with the Shipping API in order to achieve something similar so I'm
comfortable about this part of the process.
I have both the "Email receipts to buyer, merchant" and "Screen receipt
for buyer" options unchecked in the Order API configuration options
inside ShopSite Admin. I have done this as I intend to handle this side
of things from my custom Perl CGI.
So, if the credit card transaction is authorized, then all is well and
good. I can transfer the customer to a thank you page (or output one
from Perl) and email both the customer and myself (as the merchant) the
necessary confirmation emails.
However, if the credit card transaction is declined, or there is a
problem with the payment processing gateway itself (it could not be
contacted, or returns an internal error), I somehow need to rebuild the
shopping cart and give my customer the opportunity to try again.
This is what I'm not sure how to achieve.
I can see that there are various places in which data surrounding the
order is stored, cookies and HTTP POST name/value pairs, and I can get
access to all of these via my PERL CGI script, but I can't seem to find
all the order line item details, and even if they were there, what would
I do with them? I would guess that the shopping basket is stored in the
backend database and referenced by an ID stored in one of the
client-side cookies, but that's just a guess...
I'm not even sure if it's possible to achieve what I'm trying to
achieve, although I really really hope it is. I guess that ShopSite
needs to cater for declines from supported payment processing gateways
somehow, but perhaps the same thing can't be done via the Order API...
Anyway, I'm hoping someone out there can help me in some way.
Kind regards,
Ian Scorer
P.S. Using ShopSite 7.1.2