Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Verify and fix 2 edge cases when processing payment #62

Closed
lojzatran opened this issue Sep 5, 2017 · 2 comments
Closed

Verify and fix 2 edge cases when processing payment #62

lojzatran opened this issue Sep 5, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@lojzatran
Copy link
Contributor

First case:

  1. user inputs an address Berlin, Germany
  2. he clicks on Continue and is redirected to Paypal payment page with this address.
  3. In a different tab, the same user changes his address to Paris, France.
  4. The user confirms the payment in the first tab
  5. Paypal has the address of Berlin, but the shop will deliver the goods to Paris.

Second case:

  1. user has cart with item1=10€
  2. user is redirected to Paypal payment page
  3. in a different tab, user changes his cart to e.g. item2=20€
  4. user completes the payment in the first tab
  5. paypal approves the payment for 10€, but the real total amount has changed to 20€
@lojzatran
Copy link
Contributor Author

Provide a new lookUp endpoint, which needs to be called before execute payment. Frontend needs to compare the total amount and line items, if they are the same as in the current cart. If not, the new payment needs to be created and the payment flow is restarted.

@lojzatran lojzatran added the major label Sep 6, 2017
@lojzatran lojzatran added this to the v1.0.0 milestone Sep 6, 2017
@andrii-kovalenko-ct
Copy link
Contributor

andrii-kovalenko-ct commented Sep 6, 2017

For 1 case:
front end calls patchAddress endpoint every time user changes it.

For 2 case:
Front end has to compare total amount of the payment [identified by paypalPlusPaymentId from successUrl) and total amount of payment's cart before sending execute request.

In any case: we should strictly document both cases the service documentation.

lojzatran added a commit that referenced this issue Sep 13, 2017
lojzatran added a commit that referenced this issue Sep 14, 2017
lojzatran added a commit that referenced this issue Sep 14, 2017
lojzatran added a commit that referenced this issue Sep 14, 2017
lojzatran added a commit that referenced this issue Sep 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants