#jemagnie_defered-pi-ios
1 messages ยท Page 1 of 1 (latest)
๐ 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/1243116443034451978
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Firstly, Is there a particular reason for following that guide ?
Why not following this guide:
https://docs.stripe.com/payments/accept-a-payment?platform=react-native
Hello,
Indeed at the beginning I followed the integration that you shared, unfortunately the backend did its job poorly and prevented me from using this integration, so I have to follow the other integration while the modifications are made by the backend to return to the first (which will not be done for a month)
the backend did its job poorly
Can you share more details ?
I don't have all the details because the Android team started the feature before me so the exchanges with the backend were mainly with the Android team
But I just know that the Android team followed this other integration to resolve the problem in the meantime
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=ios&type=payment
If you could share more details about the issue, that could be benefical to assist you better, other wise it's not clear what is th issue you are facing, sorry
jemagnie_defered-pi-android
I see that you renamed the show name to "...Android" but I am part of the iOS team and my question concerns help on iOS
Here is the link of the show with the android dev, this allows you to have more context on my situation
oh sorry, I saw "Android" in your message while I was quickly catching up
jemagnie_defered-pi-ios
can you please give me a moment to properly catch up on your question?
No worries, and sorry if I express myself badly, I'm French ๐ฅ
no worries
what issues are you facing?
just fyi, this statement is not really accurate
The backend I work with did not respect modern documentation
the deferred flow is newer than the accept-a-payment flow you shared
but each has a different use-case
so it's not about being modern or not
would you mind sharing more details about what you're facing exactly?
My problem is to know what will be called by stripe after calling StripeAPI.handleURLCallback(with:url) in the SceneDelegate
Is it the completion of the function that will be directly called by stripe?
public func present(
from presentingViewController: UIViewController,
completion: @escaping (PaymentSheetResult) -> Void
)
yes.
a pretty normal implementation of that is
@objc
func didTapCheckoutButton() {
// MARK: Start the checkout process
paymentSheet?.present(from: self) { paymentResult in
// MARK: Handle the payment result
switch paymentResult {
case .completed:
print("Your order is confirmed")
case .canceled:
print("Canceled!")
case .failed(let error):
print("Payment failed: \n\(error.localizedDescription)")
let fullError = error as NSError
print(fullError.code)
print(fullError.description)
dump(fullError.userInfo)
}
}
}
the callback happens when the payment is finished, if it's a payment method that involves opening another app or a URL, then when the user comes back(via returnUrl + your AppDelegate invoking handleURLCallback) , the payment is finished and that callback happens.
Thank you very much for the answer, is there a way to test this in a dev environment?
Because the card 4000 0025 0000 3155 which needs authentication does not take me out of the application
Likely the best way is to pay with a payment method like iDEAL in the PaymentSheet.
Ok thanks i would try this