Implemented Flexible and extensible payment gateway / provider API

Chris D

XenForo developer
Staff member
#2
XF 2.0 includes a flexible payment framework which supports Stripe, PayPal, Two Checkout, and Braintree out of the box, plus very easy for developers to add additional providers going forward.
 

Robust

Well-known member
#6
That's not what I want to do.
I got the idea that this was also about there being an API to make/handle payments via PayPal.
Sorry, I don't understand what the question is here.

Yes, PayPal is one of the payment providers that come shipped in XenForo. The implementation is using the payment provider API.

Do you mean you want to use the payment providers outside of user upgrades?
 

Alfa1

Well-known member
#7
XF 2.0 includes a flexible payment framework which supports Stripe, PayPal, Two Checkout, and Braintree out of the box, plus very easy for developers to add additional providers going forward.
I was very happy to read this post, but this post by @Mike seems to state the opposite:
It's a reasonably complex process. You would need to refer to the base implementations. Look at XF\Payment\AbstractProvider and the specific implementations along with the xf_payment_provider table.
Am I misreading something?

Could you please elaborate on the possibilities and impossibilities of the new payment framework?
 

Robust

Well-known member
#8
I was very happy to read this post, but this post by @Mike seems to state the opposite:

Am I misreading something?

Could you please elaborate on the possibilities and impossibilities of the new payment framework?
It's a fine framework. I've added support for a couple of gateways using it. Takes a bit getting used to, mainly because it's not documented.

It's a bit like hooking into 2FA methods, if I'm to make a comparison. Not too complex, just fairly irritating without documentation. I had to do a bunch of playing around to understand what each of the functions did specifically. Would've been far less painful with documentation. Other than that, they're not too bad to use.

Any specific questions about it?
 
#9
Sorry, I don't understand what the question is here.

Yes, PayPal is one of the payment providers that come shipped in XenForo. The implementation is using the payment provider API.

Do you mean you want to use the payment providers outside of user upgrades?
Yes.
 

Chris D

XenForo developer
Staff member
#10
The system is split up into several distinct parts.

There's the payment provider system which is what provides the ability to pay for items using any of the built in providers, e.g. PayPal, Stripe and the provider system is extensible so other developers can add other providers (see this resource for an example).

Then there's the purchasable item system which is the system that the user upgrades stuff is built upon.

The two systems are entirely separate, so theoretically you don't really need to know how the payment provider system works to create new purchasable items.

In lieu of the documentation, which we will work on at some point in the future, I recommend looking into how the user upgrade system works for guidance on how to create new purchasable items.

If you have any questions after this post, please post in the XenForo development discussions forum as this thread isn't the appropriate place for that kind of support.
 
Top