My restaurant uses Laravel Cashier and Stripe.
I want to use multiple payment methods supported by Stripe for my clients, but I can't find any information in the Laravel Cashier documentation about using multiple payment methods in Stripe.
The Accept Payments document in the Stripe documentation is exactly what I need. Is there a way to implement the method described in this document with Laravel Cashier?
SetupIntent created to collect payment methods acceptsCards仅。此外,前端也仅使用 Laravel Cashier 文档中的 Card Element,用于收集卡信息。
by defaultTo accept other payment method types, you first need to use otherpayment_method_typeson the server and then pass the client key to the payment element instead of the card element for rendering. The payment element allows one or more payment methods. For more information you can refer to the documentation here:https://stripe.com/docs/payments/save-and-reuse
Please note that not all payment methods support SetupIntent (for future use). You can refer to the documentation here to learn about payment methods that support SetupIntent:https://stripe.com/docs/ payments/ payment-methods/integration-options#additional-api-supportability
This requires running php and js scripts for striping,
its referencehere
You first need a setup intent, which you must use to call
And access the value on the front end. On your card/payment page you have to set stripe js card element. Then capture and process the card element as shown in the following example (using axios)
Once the stripe request is successful, you will get the payment method ID, which you can push back to your server, as in the example above, and then attach the payment back to that user by calling
addPaymentMethod