Closed xujiali08 closed 3 years ago
Hi @xujiali08, the PayPal flow only uses BTViewControllerPresentingDelegate
on iOS 10 and earlier. On iOS 11+, we use SFAuthenticationSession
, which can be presented without a call to presentViewController
, so calling the BTViewControllerPresentingDelegate
methods isn't necessary.
On iOS 10 and earlier, SFAuthenticationSession
is not available, so we use SFSafariViewController
, which must be presented and dismissed by the merchant in the BTViewControllerPresentingDelegate
methods.
This is a bit confusing right now, but we're planning to drop support for iOS 11 and below when we do our next major version bump of the SDK, at which point we'll remove the viewControllerPresentingDelegate
property from BTPayPalDriver
.
If your app doesn't support iOS 10 or below, you don't need to implement BTViewControllerPresentingDelegate
for the PayPal flow. (It may still be required for other payment methods.)
I'm closing this issue, but let us know if you need any additional help!
If your app doesn't support iOS 10 or below, you don't need to implement
BTViewControllerPresentingDelegate
for the PayPal flow. (It may still be required for other payment methods.)
Okay, I see, my problem now is that after the payment page dismissed, it took me two seconds to get paymentMethodNonce, during which time I couldn't find the right place to add loding to let the user know that we were waiting for the payment result.
Hi @xujiali08 - you can conform to the BTAppSwitchDelegate
protocol which receives messages when switching to the PayPal checkout flow. Please see our docs about it here.
Hi @xujiali08 - you can conform to the
BTAppSwitchDelegate
protocol which receives messages when switching to the PayPal checkout flow. Please see our docs about it here.
@scannillo BTAppSwitchDelegate has been removed in v5. As mentioned above, it takes a few seconds between calling requestBillingAgreement and then showing the PayPal web page. If we want to show a loader during that time, is there another alternative for BTAppSwitchDelegate now? https://github.com/braintree/braintree_ios/blob/master/V5_MIGRATION.md
General information
Using cocoapod SDK 4.36.1
Issue description
When using these code and delegates :
Then, we get no callback: no requestsPresentationOfViewController and no requestsDismissalOfViewController
Others
I can't get callbacks even with your demo.