Forum
Stripe Checkout Custom Integration
Hi! Has anyone attempted a custom integration with "Stripe Checkout" ?
I like the "Stripe Checkout" modal but I'm not satisfied with the blue button and styling.
I'm wondering if there is anything to note before attempting this customization, as it relates to Perch..? It was SO easy to plug Stripe into Perch--I'd hate to have to double back on the amazing work that Perch is already doing for us. Do we know of a straightforward way to customize the look of the Checkout modal?
Thank you!
I'm not aware of anyone doing so yet, but people only speak to me when they have problems.
There's an amount of customisation you can do of the Stripe modal via the options in the form that opens it. That form is a template in Shop which you can update.
Thank you Drew! I'll see what I can accomplish in the template...and let you know if I run into anything interesting.
Hi Drew,
I've not been able to style the checkout button with CSS.
I went ahead and tried the "custom integration" of Stripe Checkout (apparently this allows me to customize the button but not the pop-up payment form. [https://stripe.com/docs/checkout#integration-custom]
I passed some Perch template tags into the form and they come through fine but I can't get the payment to process. Am I missing something as far as the tokens are concerned? I have everything set up per the Docs and the default
stripe_paymet_form.html
processes payments no problem.This is my new
stripe_paymet_form.html
(basically copied over from Stipe), but it's not processing the payments. Apologies if this is not in scope--I can direct the question at Stripe.Do you get the Stripe token back?
No I don't think so. From the Stripe docs:
Custom: The custom integration lets you create a custom button and passes a Stripe token to a JavaScript callback. Your JavaScript callback will need to send the token to your server for use.
I thought maybe the server side portion was already contained in Perch. I'm not sure how or where to link up with Perch to get the token back in this case...
The server side portion is there - you pass that token in to
perch_shop_checkout()
.You need to pass the token back to the server, though:
Thank you Drew--all set!
These both work nicely when replacing the existing
stripe_payment_form.html
.For custom button leading to Stripe pop-up payment modal:
For fully custom imbedded form (still need to add jquery.payments library for credit card friendly form):