SMFHacks.com

SMF Store => Support => Topic started by: shuban on August 06, 2016, 01:43:18 am

Title: Rewriting the subscription coding
Post by: shuban on August 06, 2016, 01:43:18 am
I am curious if this would work. Please hear me out ::)

I want to make subscription cycling per user, not per item based as it comes stock.

So, let's say a user wants to purchase a membership upgrade that lasts 7 days. In the item purchase page, I add an input box { [] make this purchase recurring }. If it is clicked, once a payment is recorded, the quantity column records 0 instead of the default 1.

Now, when the CheckGroupExpire function is activated, it will check whether the quantity is 0 or 1. If it is zero, it sends a new payment transaction, and upon success, updates the number of days again to 7.

Is this method plausible? My only concern is how I would validate a new payment transaction. Does PayPal allow something like this to happen?