commerceql
commerceql copied to clipboard
Paypal implementation possible?
Hey guys!
I love Stripe and have great appreciation for it being the main implementation for CommerceQL. However, I have a few clients that really want to be on this platform, but refuse to swap over from PayPal. I'm just curious if there's any advice (nothing major/extensive) on how to inject PayPal without breaking the current flow of the module, before I start making any claims to clients.
I'm new to Prisma, I've broken some things, and I just want to keep the spirit of clean architecture and minimal approach. Thank you!
CommerceQL is phenomenal, btw! Such a great/clever service.
Hey @napierIO
It wouldn't be too difficult to support PayPal. I'll try put together a demo of how this could work over the next few weeks.
I'm thinking we could remove token
from the Checkout
mutation and add an additional payWithX
mutation that takes in the necessary args to process a payment with provider X.
We could end up with mutations for:
-
payWithStripe
-
payWithBraintree
-
payWithPayPal
- etc.
@notrab That would be incredible and much appreciated!
My only thing with PayPal integration is whether or not their UX will get in the way.
Could the token
just be used differently? Maybe just add options
to AuthPayload
and do a check prior to checkout being processed..?
https://github.com/prismagraphql/graphql-server-example seems to have PayPal options, Payment Account
s and methods with Prisma on the backend. I'm not sure if it will still involve the redirect to PayPal or show the usual modal approach, but maybe it's worth a look for ideas.