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

canonicalize transaction__receipt__token #37

Merged
merged 3 commits into from
Jun 25, 2019
Merged

Conversation

nick-mccoy
Copy link
Contributor

We have observed transactions with receipt objects that contain both token and Token keys for transactions where PayPal is the payment type.

We reached out to PayPal support and they told us:

You may see similar tokens returned for express checkout-based transactions as the token, (EC-abc123...) is used mutliple times throughout the transaction process, and it will be associated with all of them. Every token will be unique to each transaction, so if you are seeing multiple identical tokens used for the same transaction, it is safe to ignore the duplicates.

The logic is:

  • If both are present and equal, keep token and drop Token
  • If both are present and not equal, throw an error
  • If only Token is present, convert Token -> token

@KAllan357 KAllan357 self-requested a review June 7, 2019 16:13
@nick-mccoy nick-mccoy merged commit 5f331b2 into master Jun 25, 2019
@dsprayberry dsprayberry deleted the canonicalize_token branch September 20, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants