1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Payment Handlers

Discussion in 'XenForo Suggestions' started by digitalpoint, Feb 16, 2015.

  1. digitalpoint

    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:


    ...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.
    RichardGaspa, Walter, markku and 7 others like this.
  2. Daniel Hood

    Daniel Hood Well-Known Member

    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.
  3. Xon

    Xon Well-Known Member

    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.
  4. digitalpoint

    digitalpoint Well-Known Member

    Yep, there is a lot more to that table... You know things like dollar amounts, status, etc... :)
    Xon likes this.

Share This Page