From 4887d27e52f2c62474794599dff471709defb65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Manciot?= Date: Sat, 7 Sep 2024 10:49:52 +0200 Subject: [PATCH] define setup intent usage to be ON_SESSION --- .../scala/app/softnetwork/payment/spi/StripeCardApi.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stripe/src/main/scala/app/softnetwork/payment/spi/StripeCardApi.scala b/stripe/src/main/scala/app/softnetwork/payment/spi/StripeCardApi.scala index 3ac31c6..5740ba4 100644 --- a/stripe/src/main/scala/app/softnetwork/payment/spi/StripeCardApi.scala +++ b/stripe/src/main/scala/app/softnetwork/payment/spi/StripeCardApi.scala @@ -48,7 +48,7 @@ trait StripeCardApi extends CardApi { _: StripeContext => .builder() .addPaymentMethodType("card") .setCustomer(customer.getId) - .setUsage(SetupIntentCreateParams.Usage.OFF_SESSION) + .setUsage(SetupIntentCreateParams.Usage.ON_SESSION) .setPaymentMethodOptions( SetupIntentCreateParams.PaymentMethodOptions .builder() @@ -62,7 +62,7 @@ trait StripeCardApi extends CardApi { _: StripeContext => ) .build() ) - .setUseStripeSdk(false) +// .setUseStripeSdk(false) .addFlowDirection(SetupIntentCreateParams.FlowDirection.INBOUND) .putMetadata("currency", currency) .putMetadata("external_uuid", externalUuid)