We have identified the subscription problem everyone is having and are working on the solution.
SUBSCRIPTION PROBLEM:
Root cause: during the subscription process Paypal payment token has expired, which prevented Lottodds to complete creating of billing agreement for a user. There was no way to reset the process to start the subscription again. Subscription process has 3 steps:
Lottodds creates a billing agreement for a user. When this is done, user is redirected to Paypal page.
User logs into Paypal account, chooses payment method and confirms the subscription (and billing agreement). When this is done, user is redirected back to Lottodds page.
Lottodds page executes billing agreement and is waiting for payment confirmation. When payment is confirmed by a separate backend request, Lottodds activates user’s subscription.
On the third step we were unable to finalize billing agreement because Paypal payment token from the first step was expired. It’s not supposed to expire for 3h, however in this case it did expired in 17 min. This is how long it took user to complete step 2 on the Paypal page. Probably he had to set up a new Paypal account and had multiple session changes.
Solution: from now on Lottodds knows on the 3rd step if token is expired. When this happens, it marks user subscription as expired because there is no way to renew payment token. Then it shows a page with the message and link to Subscription page with suggestion to restart the process. When user opens Subscription page and tries to Enable subscription, the whole process is restarted with new token. No payment is charged as a result of the unfinished initial process. We simply start clean.
For those users who already suffered this issue, the solution is to go to the Subscription page and try to activate it again.
Problem: User wasn’t able to re-activate subscription because of the failed payment. Currently our subscription tolerates only one failed payment. As soon as Paypal registers that recurring payment failed, we suspend subscription both on Paypal and in our database. Turns out activating this subscription back is not available until the outstanding balance created by the failed payment is cleared.
Solution: Clear outstanding balance when re-activating subscription or when suspending. Since user wasn’t able to use website without pay, they do not owe us anything. In this case start date of the re-activated subscription should be today and we need to make sure that user is charged right away. Requires testing.