#mauliks_cancel-terminal-action

1 messages ยท Page 1 of 1 (latest)

austere pantherBOT
#

๐Ÿ‘‹ 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/1234849129704849449

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

pale islandBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

unborn flame
#

Hi there ๐Ÿ‘‹ do you have more details on what you're seeing? It looks like that's a line to create a Payment Intent, do you see the request being made to Stripe at all?

safe yacht
#

yes I guess I can see in Logs

#

ID: req_uK1iP39gG5QUNE

#

my app is here as of now: - (void)reader:(nonnull SCPReader *)reader didRequestReaderInput:(SCPReaderInputOptions)inputOptions

#

app showing the swipe card on my UI

#

here user cancels the payment I mean goes back to previous screen

#

then come again and try to make payment

#

but app does not receives any response from [[SCPTerminal shared] createPaymentIntent:params completion:^(SCPPaymentIntent *createResult, NSError *createError) method

unborn flame
#

Hm, odd, the request you shared shows that a response is being sent.

safe yacht
#

yes for 1st time

unborn flame
#

Do you have log lines in success and error functions that get triggered when that function completes? Do you see any of those being hit?

safe yacht
#

2nd time nothing

#

just in wating state

unborn flame
#

Oh, are you seeing a requset ID being generated for the second time?

safe yacht
#

how to check that?

#

request ID?

unborn flame
safe yacht
#

let me try again

#

ID: req_ps2jHeuIND8yRv

#

just created

#

now app is in - (void)reader:(nonnull SCPReader *)reader didRequestReaderInput:(SCPReaderInputOptions)inputOptions

#

waiting for card input

#

Swipe / Insert / Tap

#

now I will cancel and going to previous screen and will try again

#

[[SCPTerminal shared] createPaymentIntent:params completion:^(SCPPaymentIntent *createResult, NSError *createError)
{
if (createError)

now app is waiting for this method

#

to get response

#

this time I dont see new ID on logs

unborn flame
#

Yeah, I'm not seeing any evidence that a second request is being made by your app. Do you have logging in plave to make sure your app is getting back to the chunk of code that you think it is? Are you seeing any errors in your logs that could indicate why that method isn't running if it is being reached?

safe yacht
#

checking

#

I checked, all steps are repeated

#

nothing missing

#

app creates SCPPaymentIntentParameters without error

#

then calling [[SCPTerminal shared] createPaymentIntent:params completion:^(SCPPaymentIntent *createResult, NSError *createError)

#

and just waiting

unborn flame
#

I don't see any log lines in the failure block there, are you sure it isn't failing and not logging the returned error? (But I'm also not too familiar with iOS dev environments, so I may be misreading something)

safe yacht
#

this is : SCPPaymentIntentParameters

safe yacht
#

1st time I am getting response but not 2nd time

#

1st time after creating Payment Intent I cancel the process and again trying to create payment intent

#

and it got stuck

unborn flame
#

When you say you cancel the process, what does that mean? Are you canceling the reader action and seeing it leave the screen asking for input?

safe yacht
#

no, just remove the payment screen and re open it

unborn flame
#

So the reader never leaves the card input screen? If so, I think that may be why nothing is happening.

safe yacht
#

reader leaves the card input screen in my app

#

but I dont call any stripe API to notify this

#

more: the reader is in waiting state - (void)reader:(nonnull SCPReader *)reader didRequestReaderInput:(SCPReaderInputOptions)inputOptions

#

to tap card or input card to the reader to capture

#

yoare u understanding?

unborn flame
#

Kind of, but I have no idea why you'd be seeing that behavior. I have teammates looking at the thread to see if they can paint a more complete picture of what you're describing for me.

safe yacht
#

sure

#

if any iOS dev is there, they can understand this code

unborn flame
safe yacht
#

ok let me try

#

do I need to call this when user cancels while reader is in waiting state?

unborn flame
#

Yes

safe yacht
#

I dont think so because it does not make any difference

unborn flame
#

More details?

safe yacht
#

I put this code on my cancel button and tried again to pay

#

and same stuck

unborn flame
#

What code? What are you seeing? What logging is being triggered? Are you seeing any errors?

unborn flame
#

Okay, and you seem to be using an M2, so I'm guessing you're referring to the programatic cancelation shown there rather than the customer initiated approach.

safe yacht
#

correct

unborn flame
#

That code isn't shown in the doc, so can you share what code you added?

safe yacht
unborn flame
#

I see, you added the customer initiated flow which doesn't work for readers without a screen like the M2

safe yacht
#

ok

#

this will require the current payment intent as well right?

unborn flame
#

I don't believe so.

safe yacht
#

ok let me try

#

Done !!!

#

thanks for your patience and time !!!

unborn flame
#

Any time! Glad we were able to get you there!

safe yacht
#

1 more thing

#

just a minor one

#

self.collectCancelable = [[SCPTerminal shared] collectPaymentMethod:createResult completion:^(SCPPaymentIntent *collectResult, NSError *collectError)

during creating payment intent.

cancel click:
[self.collectCancelable cancel:^(NSError * _Nullable error)
{

}];
#

this is my code, is it ok ?

unborn flame
#

My teammate isn't seeing anything obvious jumping out at them. Is it functioning as you're expecting in your testing?

safe yacht
#

yes