The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My Payment Subscription Model
#1
I've been coding a user subscription system and I'm almost done. The last thing will be to add new functionality to the admin panel. My system uses Braintree (http://www.braintreepayments.com) as the payment processor. Currently I have completed...

* Subscription product data is stored in a table.
* A transaction log is kept in a table.
* Coupon codes are stored in a table.
* Users can subscribe to a product by paying.
* Users can get a discount by using a coupon code.
* Subscribed users are allowed to view certain restricted page(s) that correspond to the product they're subscribed to.
* Users can view their billing history.
* Users can unsubscribe.
* A custom API handles payments via ajax.

My code is clean and does not modify any of the base tables or code. The existing page access code and tables are used to manage access along with the new subscription system. When a user subscribes/pays, they're added to a UserSpice group using the built-in function. If they cancel or don't pay, they're similarly removed from that special group but can still login.

I've also coded an API that allows subscribed users to, through an ajax interface, add jobs to a job queue by filling out a form. The ajax page also lists their jobs in a table and shows other arbitrary stats related to my products (A service that runs server-side code). I have my site setup so that when a subscriber submits a job to the job queue, a PHP-CLI script thread forks to complete the job.

This can be used to create many types of online services. I'll probably post the code on GitHub as a fork when I'm done next week.

Any suggestions are welcome.
  Reply


Messages In This Thread
My Payment Subscription Model - by Trioxin - 01-21-2017, 09:35 AM
My Payment Subscription Model - by Trioxin - 01-21-2017, 09:51 AM
My Payment Subscription Model - by jeremy - 02-08-2017, 08:35 PM
My Payment Subscription Model - by mudmin - 02-14-2017, 01:22 PM
My Payment Subscription Model - by Trioxin - 05-23-2017, 07:17 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)