#mja123_terminal-cancel-intent

1 messages ยท Page 1 of 1 (latest)

brisk ridgeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1275088490966548601

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

high folioBOT
versed citrus
#

Hi there ๐Ÿ‘‹ is there more context that you can share? What environment are you running this in? What type of reader are you using? What response are you getting when you try to cancel the Payment Intent? Do you have the ID of an intent from your testing that you can share?

brisk ridgeBOT
#

mja123_terminal-cancel-intent

final delta
#

the reader is WisePad 3, the user that faced the issue was testing the production app.

#

this is the intent id from a test run pi_3PpW2yH647NVA5sq0EZ5eCBo

versed citrus
#

That intent was successfully canceled by this request:
https://dashboard.stripe.com/test/logs/req_6KixbAGXNF2O0N

Which is why the later attempt to confirm it failed:
https://dashboard.stripe.com/test/logs/req_j3guvPJQGbloKv

Can you elaborate on what you mean when you say the payment is still getting processed? Based on what I'm seeing there that doesn't seem to be the case. Was another intent created to finish the payment process?

final delta
#

the info i got from the user was that when tapping the cancel button it shows loading and the payment is being processed in the reader

#

the loading part is that i am awaiting this fn
try {
if (paymentIntent) {
console.log('Cancelling payment intent');
const res = await cancelPaymentIntent({
paymentIntent,
});
navigation.goBack();
}
}
and then setting setLoading(false).

versed citrus
#

Unfortunately that means very little to me. I don't know what your cancel button in your app is doing. Without being able to look at the impacted intent I also don't have a way to get more insight on what happened.

What have you found in the debugging of your app so far?

final delta
#

this the payment cancel fn

const handlePaymentCancel = async (paymentIntent: any) => {
try {
if (paymentIntent) {
console.log('Cancelling payment intent', paymentIntent);
const res = await cancelPaymentIntent({
paymentIntent,
});
navigation.goBack();
}
} catch (error) {
console.log(error);

              showError({
                    header: 'Error',
                    message: 'An error occurred while cancelling your payment',
              });

              setIsCharging(false);
        }
  };
#

fn for cancel button
const onCancelPress = async () => {
setLoading(true)
await handlePaymentCancel(paymentIntent);
setLoading(false)
}

versed citrus
#

That looks like it should cancel an intent, and the testmode intent you shared seems to align with that. What was seen in your logs when the user ran into the problem you're describing?

final delta
#

sorry unfortunately i do not have any logs for that

#

so the flow is correct right and it work even with real reader?

versed citrus
#

Looks like it