'PayPal held reservation expiration time
I am integrating PayPal payments with php, and need some help if user redirect to payment page but if they do not complete their success payment within some specific time then how can I expire their session and update my database so another user can purchase.
Because I am creating booking website and give slot time, 1 slot time only allowed for 1 person.
Solution 1:[1]
This is a straightforward feature, there's many ways to implement it.
The simplest way would likely be to hold a slot by storing a current timestamp (epoch) in the column indicating it's reserved/held. Then later when you check to see if it's held, retrieve the timestamp and add e.g. (15 * 60) seconds to it for a 15 minute hold. Compare that value to the current time, and if <= it's no longer held.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
