How can I modify Stripe Checkout to instead send an AJAX request?

后端 未结 3 840
刺人心
刺人心 2021-01-01 16:14

I\'m using Stripe and Checkout to create a payment form and I want to be able to use Checkout\'s awesome javascript library, but I also want to change the form submission fr

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 17:01

    There are two options for Checkout integrations, the first, which you're using, is the 'simple' integration. The second is a custom integration which has a success callback ('token' function). It looks like this:

    
    

    You would put your ajax_payment function within the token function.

提交回复
热议问题