#thiagomacauba88
1 messages · Page 1 of 1 (latest)
Hey, what's the Q?
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 :/
Hi! Can you give more details about your Stripe integration? Also when exactly in the payment flow you get that error?
It happens when I try to pay
are you the developer writing an app?
can you share the code you're written and the guide you're following?
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
are you using a supported device? https://stripe.com/docs/terminal/payments/setup-reader/tap-to-pay-on-iphone#supported-devices
checking
a question, the another iphone needs to have my app installed?
or is it just a "bridge" for payment
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)
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
I'll try to update the app, and if i have any issues I reach you out