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
#2
I forgot to mention, future versions of my job queue will use either Gearman or Beanstalk. My main goals with UserSpice are to create an easy to use subscription (Done) access to an API (Done) script I can deploy many sites/services with. My current job queue code is very nice but Gearman or Beanstalk are a natural progression since they're more scalable (Can farm jobs out to multiple servers even).

The use of my job queue and API are not necessary in order to use the subscription model but they're there. The API does contain the code for processing payments but all other API functionality can safely be removed.
  Reply
#3
Hi!

Were you able to finish your project and upload it to github?
I am really curious about how you solved these issues :-)

Thanks
jeremy
  Reply
#4
Did you guys ever get this figured out?
  Reply
#5
Please see this thread: https://userspice.com/forums/topic/strip...ions-done/

I had to backspace all my Braintree code because I didn't get through their application process.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)