Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] paymentToken not present on real device #30

Closed
Andreyco opened this issue Oct 28, 2017 · 4 comments · Fixed by #37
Closed

[iOS] paymentToken not present on real device #30

Andreyco opened this issue Oct 28, 2017 · 4 comments · Fixed by #37
Labels

Comments

@Andreyco
Copy link
Collaborator

Andreyco commented Oct 28, 2017

Yesterdays production deployment kinda surprised me.

When testing in sandbox/production on device, paymentToken got lost. On simulator, it works perfectly.

Despite token arrives into JS "accept" handler , it does pass _getPlatformDetailsIOS
The fact it works on simulator is an accident, present on these lines

return Object.assign({}, details, {
    paymentData: null,
    serializedPaymentData
});

Calling Object.assign copies whatever is present in details object and passes it further.
Unfortunately, for real device, returned values are hand picked.

In both cases, return values should be hand picked to make sure they are equal in shape and/or values.

I am aware of #21 PR, I will try to build on that (unfortunately found the PR after my fix)

Offtopic:
Apple review passed, this lib is definitely safe for work!

@Andreyco Andreyco changed the title paymentToken not present on iOS device [iOS] paymentToken not present on real device Oct 28, 2017
@Andreyco
Copy link
Collaborator Author

Several questions... Should we have access to serializedPaymentData? Isn't it sufficient to keep original/unserialised data?

@Andreyco
Copy link
Collaborator Author

PR provided, open to discussion.

@naoufal
Copy link
Owner

naoufal commented Oct 31, 2017

Just getting to this now.

I decided to expose serializedPaymentData so that users always have access to the original Apple Pay response.

Separately, I don't parse it on the native side, because the bridge serializes it before sending it over to JS.

@Andreyco
Copy link
Collaborator Author

Andreyco commented Nov 6, 2017

I decided to expose serializedPaymentData so that users always have access to the original Apple Pay response.

Deserialising that data does not destroy any of original response, correct?

@Andreyco Andreyco added the bug label Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants