How to add in stripe api code to a form

swmckay 18 Jan, 2017
Hello,

I'd like to install the stripe api code on my customers' order confirmation page to process the payment for their selected product. It seems pretty simply, but I'm not sure how to translate it to steps in adding it to my order confirmation form. For reference, here are stripe's steps with my follow up questions. Any assistance or guidance is greatly appreciated!


1. "Add the following code to your payment page, making sure that the form submits to your own server-side code within the action attribute." What step(s) would I take to do this? What element in the form, etc?

2. "Once the form, with the stored payment token, is submitted to your server, you'll want to use the payment details just collected.
Once you've securely collected and tokenized your customer's credit card, you can charge the card. On your server, grab the Stripe token in the POST parameters submitted by your form. From there, it's one simple API call to charge the card." What step(s) would I take to do this? Stripe provides the code in several options (curl, ruby, python, php, java, node and go). Which should I use?

3. "That's it! If the charge creation request succeeds, the card has been successfully charged."

For additional reference, here's the link to the info above https://stripe.com/docs/quickstart#checkout

Thank you in advance!
Max_admin 19 Jan, 2017
Hi swmckay,

Just add the code you have in a "custom code" action in the "on submit" event, I think that should get it to work.

You have to use the "PHP" code.

I suggest that you test this with some test mode enabled first, because things may not work at the first try.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 19 Jan, 2017
Hi swmckay,

I have used the Stripe libraries* with ChronoForms and have started wot write a FAQ about it (not yet published). I'll try to complete this in the next few days.

Bob

* Both the payment library you are using and their public validation library that is very useful in validating credit card info even if you are using another payment gateway.
gfadel 19 Mar, 2018
Hi,

Did you finish this FAQ document? I plan to use Stripe in my forms.

Thx,

Gustavo
GreyHead 21 Mar, 2018
Hi Gustavo,

The FAQ is here

Bob
This topic is locked and no more replies can be posted.