#thiagomacauba88

1 messages · Page 1 of 1 (latest)

neat jettyBOT
cerulean iron
#

Hey, what's the Q?

delicate eagle
#

Hey

#

how are. you?

#

I'm trying to pay with tap to pay

#

but i'm a little bit lost

#

I already connected

#

What do i need to do? get another iphone e put close to this one? I did this but nothing :/

pseudo fox
#

Hi! Can you give more details about your Stripe integration? Also when exactly in the payment flow you get that error?

delicate eagle
#

It happens when I try to pay

stark vigil
#

are you the developer writing an app?

delicate eagle
#

yes

#

we have the stripe terminal working in prod

stark vigil
#

can you share the code you're written and the guide you're following?

delicate eagle
#

1 sec

#

func collectPaymentViaTerminalReader() {
HUD.show(.progress)
let amount = (Decimal(self.amountInCents!) / 100.0 + taxesFeesTip) * 100
APIClient.shared.fetchPaymentIntent(Int(truncating: amount as NSNumber), self.currencyCode) { createResult, createError in
if let error = createError {
DispatchQueue.main.async { () -> Void in
if let errMsg = error.userInfo[NSLocalizedDescriptionKey] as? String {
HUD.flash(.labeledError(title: nil, subtitle: errMsg), delay: 4)
print("createPaymentIntent failed: (error)")
}

            }
        } else if let clientSecret = createResult {
            print("createPaymentIntent succeeded")
            Terminal.shared.retrievePaymentIntent(clientSecret: clientSecret) { (intent, error) in
                if let retrieveError = error {
                    print("Couldn't retrieve payment intent: \(retrieveError)")
                } else if let retrievedIntent = intent {
                    Terminal.shared.collectPaymentMethod(retrievedIntent) { intent, err in
                        if let error = err {
                            print("collectPaymentMethod failed: \(error)")
                            HUD.flash(.labeledError(title: nil, subtitle: error.localizedDescription), delay: 4)
                        } else if let paymentIntent = intent {
                            print("collectPaymentMethod succeeded")
                            self.processPayment(paymentIntent)
                        }
                    }
                }
            }
        }
    }
}
#

It's stuck in Terminal.shared.collectPaymentMethod(retrievedIntent) { intent, err in

#

because it's waiting for the tap to pay interface

stark vigil
delicate eagle
#

checking

#

a question, the another iphone needs to have my app installed?

#

or is it just a "bridge" for payment

stark vigil
#

no the other device doesn't need the app

#

the idea is the customer taps their card on the NFC reader built into the iPhone running your app that uses our SDK(your phone is the Terminal reader)

delicate eagle
#

ok, the other iphone has ios 15.6

#

maybe this is the issue

stark vigil
#

I don't think so, but maybe

#

I've never built this integration myself and nobody on my team is really too familiar with it, for now I'd recommend some more troubleshooting like looking for errors being logged to Console.app when calling those functions

delicate eagle
#

I'll try to update the app, and if i have any issues I reach you out