John Cappiello wrote:
> On Wed, Feb 07, 2007 at 05:00:17PM +0000, Jim Rey wrote:
>>   1. Display a page that requests card details from the holder (this is
>>   easy).
>>   2. Pass (POST) the data to a non-display page on the merchant's
>>   website. (How, LWP?)
>>   3. Receive the response code(s). (How, LWP?)
>>   4. Notify the customer of the status of the transaction. (this is
>>   easy, but how do I wait for 2 and 3?)
> 
> You can initiate a background process and then have part 4 reload every few
> seconds until the background process has indicated completion and return the
> status to the client.
> 
> Further improved with a bit of ajax to make it appear more fluid to the user.
> 
> John 
> 

I don't think this method is the best.

You should be able to make a POST request to the merchant, and recieve
the response synchronously. That is, your perl script won't progress
beyond that point until you either have your response, or there has been
some error like a timeout.

The script that handles the data posted from your form /can/ do this,
but the problem is that the form page will remain on the clients screen
until everything is finished processing, meaning that if the merchant
site takes a while to respond, bored users might decided clicking twice,
three times etc. on the submit button would be a good idea. Much badness.

A better solution, is to post to a script that displays a 'please wait'
message, and uses a meta refresh to re-direct to a page that actually
POSTs to the merchant site, meaning that while the users wait for your
script to get a reply from the merchant, they are looking at the 'please
wait' page.

The difficulty with this, is passing the credit card details from one
script to another, and will require storing them somewhere temporarily.
The benefit is that it doesn't require javascript, or the page to
constantly reload.

-Oli

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to