php - Transfer input data from form to paypal payment and save if payment was successful
I am trying to integrate a paypal pay button to my website and have a question:
before the users pays with paypal he inputs two variables in a form called name="amount" and name="address".
Then the users clicks on the paypal button and gets redirected to the payment system where it displays how much he wants to buy and the price (thats not the problem), after the payment the user gets redirected back and it simply prints "payment successful", question is, how do i get the access of "amount" and "address" back to store in a database?
is using $_SESSION here safe?
using session is very safe. For instance you can pass the variable as follow
As for getting adrdress and amount to store in database. once the paypal payment is succcessful, pay normal returns the amount paid, transaction Id, currency type etc. in the url. you can get those data using GET method and then store in the database with other variable sessions. Unless I see your code and what you have done so far i will be able to help you further.