#mauliks_code

1 messages ยท Page 1 of 1 (latest)

solid wagonBOT
#

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

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

hardy plinthBOT
#

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.

mild ferry
#

request ID is : req_6JnmGvdvedokpi

hardy plinthBOT
sage geode
mild ferry
#

wait how?

#

every time got error from the app how it got sccuess ?

#

my app prints this :
capture failed: Error Domain=com.stripe-terminal-ios.example Code=2000 "Missing secret in ConnectionToken JSON response" UserInfo={NSLocalizedDescription=Missing secret in ConnectionToken JSON response}

#

I just did another transaction and same error

sage geode
#

Can you share the code and the line that threw this error?

mild ferry
#

ok

#

[[StripeAPIClient shared] capturePaymentIntent:confirmResult.stripeId completion:^(NSError *captureError)

sage geode
mild ferry
#

yes server side only this will call server end point

#

just let me know my capture method is set automatically

SCPPaymentIntentParametersBuilder * builder = [[SCPPaymentIntentParametersBuilder alloc] initWithAmount:111 currency:@"usd"];
[builder setCaptureMethod:SCPCaptureMethodAutomatic];

#

so still I need to call to confirm end point? or Stripe will do it automatic ?

outer salmon
#

๐Ÿ‘‹ jumping in and catching up

#

Your code looks fine and yes that will capture the PaymentIntent for you. Could you share the full stack trace of the error?

#

You should set the capture method to manual

#
    SCPPaymentIntentParametersBuilder * builder = [[SCPPaymentIntentParametersBuilder alloc] initWithAmount:100 currency:@"usd"];
    [builder setCaptureMethod:SCPCaptureMethodAutomatic];
#

You should set this to SCPCaptureMethodManual instead

#

Then you can call Capture upon the confirmed PI

mild ferry
#

ok but what if I set automatically?

#

thing is I want to make as automatically as possible so I need to call less APIs

outer salmon
#

Then you don't need to call the Capture method after confirmation

#

It's up to you

mild ferry
#

[[SCPTerminal shared] confirmPaymentIntent:collectResult completion:^(SCPPaymentIntent *confirmResult, SCPConfirmPaymentIntentError *confirmError)

#

so I need to stop after this?

#

createPaymentIntent succeeded
collectPaymentMethod succeeded
confirmPaymentIntent succeeded

and done right?

outer salmon
#

yes!

mild ferry
#

ok and stripeId is a transaction ID?

#

I mean can we consider it as transaction ID?

outer salmon
#

it's a PaymentIntent Id. It's up to you if you want to consider as a transaction ID

mild ferry
#

got it

#

every time app will create a new PaymentIntent and stripe will provide new PaymentIntent ID

#

after success, correct?

outer salmon
#

Mostly. You will have the ID right when the app created a new PaymentIntent. But only after the app called ConfirmPaymentIntent, then the PI is actually becoming to a successful transaction

mild ferry
#

yes