#Ronit

1 messages · Page 1 of 1 (latest)

drifting glenBOT
noble scroll
#

Sorry what Doc are you following (where do you see confirmPaymentIntent)?

golden plover
#

let me give you the code snipet that i am using and have error

noble scroll
golden plover
#

let me inform you that i am implementing tap and pay via physical card for ios so does this work or not i had gone through so many docs

noble scroll
#

It should be processPayment to work AFAIK

golden plover
#

ok let me check and get back to you

#

metadata = {
}; status = requires_payment_method; stripeId = pi_3NNr2p4DfIvvXFPZ0XD2WuhY>
SCPReaderInputOptions(rawValue: 7)

#

this returns me this issue

noble scroll
#

Sorry can you capture screen or get here the concrete error?

golden plover
#

sure let me send you screenshot

#

i m getting the payment intent from backend and retrieve it using client secret and process the payment so is there anything i need to check on backend if this is from backend issue.

noble scroll
#

Looking at the PI it's normal to me. Doesn't seem to be issue with backend

golden plover
#

here is log printed and code

noble scroll
#

I don't see any error, just some compiler warning

#

You may want to see the full compiler warning to fix it

golden plover
#

if you can see first screenshot there is status = requires_payment_method

#

which comes in collectionmethod output

noble scroll
#

Yes that's expected

#

But you don't see any "collectPaymentMethod failed" or "collectPaymentMethod succeeded", right?

#

If you add one more line right inside the callback of collectPaymentMethod and put a breakpoint, do you see it stops by and what's value of collectError and collectResult?

golden plover
#

yes doing that and send you the response

#

print("retrievePaymentIntent succeeded: (paymentIntent.metadata)")

#

i am not getting the response in metadata in retrieve payment intent and this method is not calling going outside the method self.collectCancelable = Terminal.shared.collectPaymentMethod(paymentIntent) { collectResult, collectError in

noble scroll
#

I can confirm the PI doesn't have metadata, but that's expected and could be a different thing

#

the issue here is collectPaymentMethod isn't called

golden plover
#

yes

#

and here is the payment intent json
[AnyHashable("livemode"): 0, AnyHashable("metadata"): {
}, AnyHashable("amount_details"): {
tip = {
};
}, AnyHashable("payment_method_options"): {
"card_present" = {
"request_extended_authorization" = 0;
"request_incremental_authorization_support" = 0;
};
}, AnyHashable("amount_capturable"): 0, AnyHashable("id"): pi_3NNrei4DfIvvXFPZ0Ifv9HlL, AnyHashable("currency"): usd, AnyHashable("amount_received"): 0, AnyHashable("charges"): {
data = (
);
"has_more" = 0;
object = list;
"total_count" = 0;
url = "/v1/charges?payment_intent=pi_3NNrei4DfIvvXFPZ0Ifv9HlL";
}, AnyHashable("capture_method"): automatic, AnyHashable("created"): 1687932908, AnyHashable("application"): ca_AChoOiKcXbKSBzH1TqnhNB8sCGyhNWdk, AnyHashable("confirmation_method"): automatic, AnyHashable("status"): requires_payment_method, AnyHashable("client_secret"): pi_3NNrei4DfIvvXFPZ0Ifv9HlL_secret_k5ptyVreS9EMxZqqWEMoHuRb1, AnyHashable("application_fee_amount"): 3392, AnyHashable("object"): payment_intent, AnyHashable("setup_future_usage"): off_session, AnyHashable("amount"): 120500, AnyHashable("payment_method_types"): <__NSSingleObjectArrayI 0x281dd46e0>(
card_present
)
]

noble scroll
#

What does processResult and processError look like?

golden plover
#

method is not calling because the i am not recieving the error or success in self.collectCancelable = Terminal.shared.collectPaymentMethod(paymentIntent) method

noble scroll
#

Yes, but if you print(processResult) and print(processError) inside the callback on line 278, do you see any value?

golden plover
#

no any value it's empty even error is empty

noble scroll
#

can you show me your latest code?

#

So it did go into the callback?

golden plover
#

yes sure let me share whole code snippet i have used

noble scroll
#

You put breakpoints there, if you click on collectResult and collectError what does it show? I mean the entire object

golden plover
noble scroll
#

It never goes into Line 285?

golden plover
#

yes that's i am saying it's wierd

noble scroll
#

What terminal device is that?

golden plover
#

M2

noble scroll
#

Sorry I ran out of idea here. Are you using Terminal SDK that you can jump straight into collectPaymentMethod and put breakpoint inside the SDK? I remember if you use CocoaPod you can do that

#

We don't know yet if something prevent the callback to ever been called

#

To summarize, this is M2, Tap to Pay, correct? And what is your Stripe Account Id? acct_xxx

golden plover
#

yes let me give you id

#

"location_id":"tml_FHwmfgXKcv8DZY","stripe_publishable_key":"pk_test_3Lq7ThDZIiqXF588YR5b1qDX","connected_account_id":"acct_1KsYtK4DfIvvXFPZ","payment_intent_id":"pi_3NNtEQ4DfIvvXFPZ0GTEliVP

#

this are the details i am using and yes i am tap to pay implementation

drifting glenBOT
noble scroll
#

When you call collectPaymentMethod, did you perform any action with the reader?

#

It should be in waiting state

golden plover
#

it is in waiting state no any other action i am doing with reader

wary prawn
#

Hi! I'm taking over this thread.

#

I'm not sure. I would recommend to ask your question to Stripe support directly here: https://support.stripe.com/contact
Make sure to include all relevant information (code, error message, object IDs, etc.) And they will have more time to invetigate the issue.

golden plover
#

i had already made contact still no any solution i am getting they redirected me here

wary prawn
#

You need to push to be redirected to the technical team, who will have more time to investigate/reproduce the issue than here on Discord.