Seriously, don't transfer the session ID. It's just overcomplicating
matters.

Follow Adam's advice - it's also how I've just handled integration
with the UK secure payments company "Secure Hosting". Basically, this
was my process:

1. Cart contents are stored in a session.
2. On checkout, I dump the relevant details into a form as hidden
fields, then pass those through to the secure server (they take the
payment details on their server, rather than it being handled on
mine). I also store an Order containing the full details of the order,
with the status flag "Payment Pending".
3. The secure server takes the payment, and calls a controller action
on my site with the Order ID and transaction status, so I can then
update my database appropriately.
4. The customer is redirected to either a payment failed or payment
success page depending on what happened.

Steve

On Feb 21, 1:49 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Thx for your answer :)
>
> i manage to transfer the session ID so i can then get infos back from
> the database.
>
> but the sessions infos are serialized. how can i merge infos into the
> new session?
> when i unserialize, i got nothing :s
>
> On 21 fév, 12:31, Adam Royle <[EMAIL PROTECTED]> wrote:
>
> > You should treat session data as volatile, so therefore before sending
> > to the payment gateway you should have the order in your database with
> > all the information required, including an order id. Usually you send
> > the order id along to the payment gateway as well, and they should
> > send this order id back once the payment is finished, so you can match
> > up the two.
>
> > Cheers,
> > Adam
>
> > On Feb 21, 8:57 pm, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > > First i'd like to apologize for my english :)
>
> > > So, i got a website (with cakephp of course) using sessions to store
> > > some data like login, ... and  a cart !
> > > i m using  an api for the payement (Mercanet) so i don't have to
> > > manage with secure payment etc.
>
> > > So i got my session with my cart, i choose then how i wish to pay
> > > (credit card), then it redirects me to the "bank payment server", i
> > > put card number, date, etc
> > > "validate"
> > > and i got an autoresponse from the bank in which i can save data to
> > > database etc. so now if the buyer decide to leave his cart should be
> > > empty because he paid.
> > > but let's go back a little,
> > > i choose my card, then i am on the payment server and "ho surprise !"
> > > i lost my session, and got a new one without my data.
> > > but when the payment is done and i click on "back to shop" i get my
> > > session back....
>
> > > so when i want to delete my cart, i don't have cart infos in session.
>
> > > i hope you will understand what i wanted to explain :)
> > > and i hope someone will be able to help me, i m loosing my hairs ! :-)
>
> > > thx !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to