The app I am administering has used the PayPal SDK for iOS, and this works fine for the most part, except that if a user tries to login and gets an error, the error is not reported to the user.
For example, if I use incorrect login credentials, I'll get this error message:
2018-07-12 10:21:28.316449-0400 AppName[52601:6030601] PayPal SDK: Request has failed with error: invalid_user - Incorrect username/password. Please try again. (401) | PayPal Debug-ID: a1f66774362f, a1f66774362f [live, PayPal iOS SDK 2.17.0] | Details: (
Ultimately, when I try to login with these credentials, it gets as far as this function, and then seems to go no further.
func segueToConfigurePaypal(sender: UIButton?) {
print("DEBUG Segue to configure paypal")
let scopeValues: Set = [kPayPalOAuth2ScopeOpenId, kPayPalOAuth2ScopeEmail, kPayPalOAuth2ScopeAddress]
let config = PayPalConfiguration()
config.merchantName = "example"
config.merchantPrivacyPolicyURL = URL(string: "http://www.example.com/privacy")
config.merchantUserAgreementURL = URL(string: "http://www.example.com/terms")
let vc = PayPalProfileSharingViewController.init(scopeValues: scopeValues, configuration: config, delegate: self)
self.present(vc!, animated: true, completion: nil)
}
All of which connects to the SDK.
I am wondering if there's a way to make an event listener that will let me know if there's been a problem with the user logging in. This way a user can have some idea about why they're having trouble rather than thinking it is an issue with the app.
Basically I want an alert on user login issues, that reports the issue to the user.
from How do I report error messages from PayPal iOS SDK to users
No comments:
Post a Comment