I am using Laravel 7 and have a subscriptions page that list out all the services that a user is subscribed to. On the same page, I have a button where the user can update the quantity of each subscription.
Following the below instructions, I was able to redirect the user to the HATEOS link where the user can confirm and agree to the new quantity and new monthly recurring fee.
As indicated in the above documentation, the subscription on Paypal's side (both the buyer and the sellers paypal accounts) will only be updated if the buyer confirm and agree/approved the new quantity and new recurring free in the HATEOS approval link.
The challenge I have is: how do I capture the users confirmation in the provided HATEOS link or if the user did not approve the new quantity and recurring fee by simply closing the browser with the HATEOS link -- as this will obviously determine whether to update the subscription table database (i.e. update database if user approved the change in the HATEOS link or no change in the database if user did not approve the HATEOS link)?
Note: in my subscription page, I am not using Paypal's Smart Button. I am using a normal button that calls a controller and a function that executes the Subscription API code (i.e. curl bash) which returns the HATEOS links including the link for the user to approve the change.
Hope someone can help! Thanks!