davidern85 Posted October 31, 2017 Share Posted October 31, 2017 Hi All, I'm a newbie with Prestashop and I would like to ask you:what is the best method to save a variabile related to the customer's cart during the payment process? I have this scenario: 1) Within the controller of the module, before redirecting to the payment processor, I need to save the variabile 'payment_ID'. 2) Now the customer lands to the payment process page (with the credit card form, etc...) 3) Then, the customer returns to the prestashop platform in a specific controller of my payment module. Here I need to get the previous 'payment_ID' variabile. Can anyone help me out? Thanks in advance Davide Link to comment Share on other sites More sharing options...
bellini13 Posted November 2, 2017 Share Posted November 2, 2017 create a new database table (ps_yourmodulename_transaction, or something similar and unique) The table should have two or three columns id_cart id_order id_payment Then before you redirect, you would insert or update a record into this table for the given cart. Then when the customer returns, you can query this table for the given id_cart, and you can also update the id_order value after the order is created. You could also try to use cookies to store the value, but I do not like this approach, as it can be hacked 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now