#jarcher
1 messages · Page 1 of 1 (latest)
You can see an empty string is being passed in the request here: https://dashboard.stripe.com/logs/req_u0Rd8OUbvSrfk7
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Can you share the code you used here?
yeah but is that the SDK that's doing that? cuz we're not updating it
Yeah here's the code on the frontend:
const { initPaymentSheet, presentPaymentSheet } = useStripe();
const onSubmit = () => {
const { customerId, ephemeralKey, clientSecret } = await getCheckout(stuff);
const initResp = await initPaymentSheet({
customerId,
ephemeralKey,
clientSecret,
});
if (initResp.error) {
console.error(initResp.error);
return;
}
const presentResp = await presentPaymentSheet();
if (presentResp.error) {
setReserveInProgress(false);
if (presentResp.error.code === "Canceled") return;
Alert.alert(
presentResp.error.localizedMessage ||
presentResp.error.message
);
return;
}
// stuff
}```
Gotcha so you're confirming directly in the payment sheet
ie you enver call await confirmPaymentSheetPayment(); ?
it's from my understanding that presentPaymentSheet does the confirmation
and if there's an error in presentPaymentSheet then we display the error (Alert.alert)
the error from presentPaymentSheet is the When setup_future_usage is set to off_session with a secret key, you can only update setup_future_usage to off_session using a publishable key.
thank you!
What version of the react native sdk are you using?
Hm that's not too old
There've been some bug fixes since then. Recommend trying latest version though
let me know if that doesn't fix the issue though
okay will try it out