0

I am using laravel 5 and omnipay 2 to handle payments in my website. I am creating the payment with the purchase method and stores all the parameters in sessions. The custommer is then sent to paypal express and when his credit card have been accepted he is then sent back to my page where the payment is confirmed using the completePurchase with the parameters stored in sessions. Somehow the sessions is empty(null) and the methods fails.

Anyone that have experienced this? The user passes acl control every request and is not denied to access the confirmation page, so shouldnt be a problem with expired session.

  • Would it be better to extract the token before the user is redirected and store the details in database. So when the user is redirected from paypal I can just retrieve the params from database matching the token from paypal and proceed the payment? – Ronny Pedersen Apr 28 '15 at 20:01
  • The data in the session should not simply disappear, so I suspect something else is happening. Is this gateway one that uses a "notify URL", so that PayPal can contact your application directly with the results? If it is, then bear in mind that callback will be in a different session to your user. This is where you need to store the transaction in the database so it can be shared between sessions, as described in the previous comment. – Jason Jun 17 '15 at 13:05

0 Answers0