Implemented Payment Handlers

digitalpoint

Well-known member
It would be nice if XenForo handled payments for user upgrades via a payment handler system. Like user upgrade payments are just a payment handler assigned to the user content type that do certain things upon payment receipt, something else for a refund, etc.

And to be honest, I've already built the system (I don't use it for user upgrades, but everything else I do)... but it would be nice to have it as a core feature. :)

So in my case, I have payment handlers for the following types of content (just to give an idea of how it works):

It makes receiving payments really easy whenever you want to have any content type able to receive payments. For example, I could see it being super useful to just have a payment handler for resources. Then all you need to do is trigger a payment to a certain content type/content ID and then do whatever you want to do when PayPal's IPN sends you a notice of receipt.

Transactions are stored in a central transaction table like so:

upload_2015-2-16_15-0-9.webp

...anyway, like I said... it's something I've already built and it makes payment handling super easy and flexible whenever you want to accept payments for some different type of content.

I'd be happy to donate my payment handler code, but it needs so much clean up, probably not even worth it. Either way, maybe an idea for XenForo 2.0 or something.
 
Upvote 11
This suggestion has been implemented. Votes are no longer accepted.
I've always been a little surprised there wasn't a payment handler system when there's handlers for almost everything else.

Very thorough explanation and generous offer. Kudos Shawn.
 
This is giving me flashbacks to my day job.

@digitalpoint For that table schema, you probably want an charge intent status. This makes reconciliation easier for when something goes horrible wrong.

Such as the payment process stops in the critical point between when being informed of receiving money, and then recording that the money has been received in the local database.
 
This is giving me flashbacks to my day job.

@digitalpoint For that table schema, you probably want an charge intent status. This makes reconciliation easier for when something goes horrible wrong.

Such as the payment process stops in the critical point between when being informed of receiving money, and then recording that the money has been received in the local database.
Yep, there is a lot more to that table... You know things like dollar amounts, status, etc... :)
 
Back
Top Bottom