Re: get confirmation of a payment from other website via a direct action, how to get back to a shopping session?
Re: get confirmation of a payment from other website via a direct action, how to get back to a shopping session?
- Subject: Re: get confirmation of a payment from other website via a direct action, how to get back to a shopping session?
- From: Mike Schrag <email@hidden>
- Date: Thu, 28 May 2009 07:45:17 -0400
you'll either be using cookies, which species sessionid + instance id,
or you'll be using URL encodingand your direct action URL will have
both the instance ID as well as ?wosid=xxx in the URL (http://yoursite/cgi-bin/WebObjects/YourApp.woa/instanceid/daname?wosid=xxx
) ... should work fine
ms
On May 28, 2009, at 7:41 AM, Johan Henselmans wrote:
I have a situation with a shop-site where I communicate some
shopping details to an external website. The shopper pays it's dues
over there, and then get's redirected to the shop site. The
requirements are that the shopper actually has to go to the external
site in the same browser window: popup's etc are not allowed. In the
meantime the products are set aside, to make sure nobody else gets
them while the shopper pays.
Now the a shopper back from somewhere, with two variables: some
transaction ID that the external party creates and an entrance code,
that I can create myself.
I have thought of several approaches:
First I thought to use a direct-action to get the information. Then,
pickup the session where it's left off with all the shopping
details, check if the payment went all right, and get on to the next
step. If the user does not return, the session times out and the
reservation on products are returned to the database.
This approach will only work with one instance of an application on
one server. Say there are more instances, than the instance that
receives the directaction call might not be the one that is still
holding on to the session.
Second approach would be to store all the session information (the
products, user info etc) in a database table, and, once the user
gets back from the payment, pickup from there, and restore it's
previous information. But that might mean that the reservation on
products that have taken place (and are deducted from the available
products) will wait forever because the user is not returning.
So a thread would have to run all the time and remove all the
reservations that have not paid in let's say ten minutes.
I have a feeling that there might be another approach that is better
suited. I had a look at the WOPaypal framework, but I did not
completely understand what was going on there.
Perhaps somebody can explain to me how this works, or is there an
other approach that people use to solve this problem?
Regards,
Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6279159
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden