#mauliks_code

1 messages ยท Page 1 of 1 (latest)

ruby cometBOT
#

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

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

pastel elmBOT
#

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.

random crest
#

Hi, let me help you with this.

calm arrow
#

req_sCVxyxNehoTNYb

random crest
#

Are you confirming the PaymentIntent on the device? Because I see that the request was sent from the backend.

calm arrow
#

I am using simulator for testing

random crest
#

Are you able to collect the Payment Method prior to confirming?

calm arrow
#

by this method collectPaymentMethod ?

#

yes collectPaymentMethod method gives me no errors

#

after this I am calling capturePaymentIntent method with above result's stripeId

random crest
#

It needs to be: collectPaymentMethod -> confirmPaymentIntent -> capturePaymentIntent

calm arrow
#

but confirmPaymentIntent give error

#

payment_intent_unexpected_state
You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method or ConfirmationToken.

random crest
#

I don't see that a Payment Method is ever added to this PaymentIntent. Could you please share the complete code?

calm arrow
#

ok

odd thicket
calm arrow
#

code is too long to send here so sent as file

odd thicket
#

you jump straight from collectPaymentMethod to capturePaymentIntent, you're missing the part of actually confirming the PaymentIntent.

calm arrow
#

hold ON

#

please select Object C code

#

my be for objective code is not there

#

my code is just copy from the above URL

odd thicket
#

it is there.

calm arrow
#

ok I added this missing piece of code... sorry for this ๐Ÿ˜ฆ

#

but now I got this error:

#

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}

odd thicket
#

no it means there's something wrong with how you set up the ConnectionToken endpoint and code that calls it

calm arrow
#

how can I use automatic capture

#

with automatic which steps can I skip?

odd thicket
#

you set capture_method:"automatic" when creating the PaymentIntent

odd thicket
calm arrow
#

SCPPaymentIntentParameters *params = [[[SCPPaymentIntentParametersBuilder alloc] initWithAmount:100 currency:@"usd"] build:&paramError];

#

here?

calm arrow
#

yes but it says readOnly @property (nonatomic, readonly) SCPCaptureMethod captureMethod;

#

so I can not set

odd thicket
#

you can, just give it a try

#

if it's not possible, then you'd need to create the PaymentIntent on the backend instead of the frontend

calm arrow
odd thicket
#

ok then you need to create it on the backend instead

calm arrow
#

๐Ÿ˜ฆ

#

ok after this, what can I skip?

#

Create a PaymentIntent
Collect a payment method
Confirm the payment

from these

odd thicket
#

I have to leave sorry, and the Discord channel is closed for the next few hours.

#

hopefully this has been helpful!

calm arrow
#

ok take care