4

My app has a web-based online payment flow — using Adyen Hosted Payment Page (HPP) — in SFSafariViewController (as recommended by Adyen). When a payment flow happens entirely inside Safari, this works very well.

But some banks use their native iOS app for authorizing a web payment (typically by entering a PIN code there after entering one's user ID into the web flow). When returning to my app, the Safari view controller often reloads its contents, resetting the entire payment flow before the payment has been completed. (Same thing often happens also by simply visiting any other app — guess it has something to do with memory consumption?)

Is there any way to force the Safari view controller to retain its current state, no matter what?

villapossu
  • 2,737
  • 4
  • 18
  • 19

2 Answers2

2

While my answer doesn't relate to SFSafariViewController, I'd suggest that you take a look at the new Directory Lookup SDK from Adyen: https://github.com/Adyen/adyen-dl-ios It's assumed to be used instead of HPP (when suitable) and provides better user experience for accepting local payment methods.

uselight
  • 31
  • 2
1

I'm finding the same behavior in my app. In our case we are not using Adyen. But the behavior is the same.

Each time the app returns to the foreground after a while it loses its status and reloads to the original state.

I did not find any way to avoid this behavior. Is there any way to force the SFSafariViewController to keep its state?

UPDATE: I have found this behavior is only happening in iOS 10.0.1

Fvinader
  • 51
  • 1
  • 4
  • Wow. Funny I just now saw this (when I googled for the same issue – assuming it still existed since we worked around it last time with quite some trouble – and found this thread again). Indeed, SFSafariViewController now seems much less forgetful! – villapossu Aug 09 '17 at 22:40