feat(stripe): Support automatic payment methods (#2492)
This commit is contained in:
@@ -10,5 +10,10 @@ Learn more about how you can use this plugin in the [documentaion](https://docs.
|
||||
{
|
||||
api_key: "STRIPE_API_KEY",
|
||||
webhook_secret: "STRIPE_WEBHOOK_SECRET",
|
||||
automatic_payment_methods: true
|
||||
}
|
||||
```
|
||||
|
||||
## Automatic Payment Methods
|
||||
|
||||
If you wish to use [Stripe's automatic payment methods](https://stripe.com/docs/connect/automatic-payment-methods) set the `automatic_payment_methods` flag to true.
|
||||
|
||||
@@ -148,6 +148,10 @@ class StripeProviderService extends AbstractPaymentService {
|
||||
metadata: { cart_id: `${cart.id}` },
|
||||
}
|
||||
|
||||
if (this.options_?.automatic_payment_methods) {
|
||||
intentRequest.automatic_payment_methods = { enabled: true }
|
||||
}
|
||||
|
||||
if (customer_id) {
|
||||
const customer = await this.customerService_
|
||||
.withTransaction(this.manager_)
|
||||
|
||||
Reference in New Issue
Block a user