[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: credit cards via Empath: calculations done too late
On Wed, 16 Jun 1999, Alan Curry wrote:
> ****** message to minivend-users from "Alan Curry" <pacman-mvend@cqc.com> ******
>
> I'm trying to get a minivend catalog, based on the simple demo, to interface
> with the credit card verification services of Empath Systems (www.empath.net)
>
> The way they work is that our site (the minivend store) should, at checkout
> time, send back a form whose ACTION attribute is a particular URL at
> secure.empath.net. This form must include all the fields that are necessary
> for credit card processing: firstname, lastname, ccnum, amount to charge, etc.
> There is an additional hidden field called "returnto" which contains any URL
> I want to put into it. The handler at empath returns an HTTP Redirect to this
> returnto page after it records the transaction. (The actual credit card
> verification is not done immediately; they are queued up and sent off in a
> group once a day.)
>
> My first idea was to just alter pages/ord/checkout.html to point to empath's
> verification page. There are problems with that though. The order number
> doesn't exist yet. The shipping destination may be altered, requiring the
> amount of the charge to be changed. But this checkout.html page is the _last_
> page before the final "receipt" is sent back to the customer, so I can't
> find a good place to insert the hook to the empath server.
>
> Has anyone done a minivend->empath link before, or anything similar?
I use PaymentNet but had to do something odd because of the order number
problem. I could never get order numbers to match, so I simply started
creating my own using the code that I found in some of the CyberCash
modules in the Vend library. If you follow some of the instructions that
appeared on the list a few months ago for a multiple page checkout
sequence, I think you could probably do this.
I have nothing against the existing system of order numbers, but it didn't
work for me at all. I had to get an order number nailed down in order to
pass it to another routine to stick it into a order database before I
tried to authenticate the credit card. In future versions of MV, it would
be nice if order numbers would be locked-in the moment you hit a checkout
page. I added a few snippets of code and a UserTag to generate new order
numbers. If the order checkout succeeds, I copy the order number to
another variable and reset the old one. If I get back to the checkout
page and the variable is either null or reset, then I generate a new
number. That lets me keep the same order number through multiple attempts
at passing through the checkout page. Only once the order succeeds do I
clear the order number. So far it seems to work fine.
Best,
Kyle