Question

I would like my user to login his Paypal account after registering in my iPhone app. However I was unable to find any api calls in MPL for this.

I checked the REST API calls. Unable to find what I'm looking for.

Is there any way to login Paypal and store the session details and use it for checkout ? Or do I have to go through the default flow of Paypal button -> Login -> checkout ? If I select 'Keep me logged in' while logging in with the above mentioned flow (using Paypal button), when will this session expire ? Will my user have to login in Paypal again ?

No correct solution

OTHER TIPS

To my understanding, you must use the Login button to initiate the payment flow. I'm not sure what the session expiry is but I would guess it is similar to the web client's one. If they are not on a fresh install, they will be logged in next time they use the app, provided that they selected that option.

I am not clear of the question though, hope what you are asking about how to keep the user logs in after a session been initialized. So, the session timeout is totally controlled by the server end (Paypal backend server), this is due to the security reasons I guess. If you want to know the number of seconds your the session will be kept alive, you can refer to the property given in the JSON respond,

"expires_in": 28800

This is given in their tutorial https://developer.paypal.com/webapps/developer/docs/integration/direct/make-your-first-call/

I had to deal with a similar situation, so what I did was I took this value just after user logs into the application and created a NSTimer which gets fired after the 'expires_in' time (i.e. in 28800 seconds), so whenever the time expires, I give a message to the user saying that he should refresh his Paypal login before continue with the purchase. In that case, user won't be surprised at the end of his purchase flow by having to login into the Paypal again. So anyway, that was my requirement, hope you can use this information to get around with your issue.

EDIT

Is there any way to login Paypal and store the session details and use it for checkout ?

Can you save the Cookie ID in the storage (Keychain or NSUserDefaults)

when will this session expire ?

Refer to the response property I described above please

Will my user have to login in Paypal again ?

If you save the Cookie ID, theoretically I don't think so, but I haven't done it so cannot really answer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top