we want User can payment with saved list card from BackEnd. you can see this image
We success handle payment with new card and save it to use again in the future. But, when we want payment using saved card, we always still got error like Card details not complete.
this is what we do currently.
var paymentIntent = await getPaymentIntent(
selectedPaymentMethod.id, availabilityResponse.timeslotId.toString());
if (paymentIntent.paymentClientSecret != null) {
await Stripe.instance.confirmPayment(
paymentIntent.paymentClientSecret,
PaymentMethodParams.cardFromMethodId(
paymentMethodData: PaymentMethodDataCardFromMethod(
paymentMethodId: selectedPaymentMethod.id
)
),
);
} else {
print("here");
await Stripe.instance.confirmSetupIntent(
paymentIntent.setupClientSecret,
PaymentMethodParams.cardFromMethodId(
paymentMethodData: PaymentMethodDataCardFromMethod(
paymentMethodId: selectedPaymentMethod.id,
)
),
);
}
we always got error Card detail is not complete when using confirmSetupIntent. any idea ?