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

Verify amount to charge with order total #55

Merged
merged 2 commits into from
Jul 9, 2020

Conversation

seand7565
Copy link
Contributor

@seand7565 seand7565 commented Jul 8, 2020

We need to be able to verify that the amount we receive from PayPal
equals the outstanding balance of the order. So, this adds an API
endpoint that allows us to verify that, and sends the amount PayPal
says is due there for verification.

Also fixes an issue with the cart checkout - moving the advanceOrder
function to a more sensible location.

ref: #37

seand7565 added 2 commits July 8, 2020 15:39
We need to be able to verify that the amount we receive from PayPal
equals the outstanding balance of the order. So, this API endpoint
allows us to check the paypal_balance with the orders outstanding_total.
Adds a function that hits the amount verification API endpoint,
so that we can be sure that the amount PayPal sends us is the
correct amount to charge the user.

Also moves the advanceOrder function to before the addPayment
function, since we need the shipment_total to be updated and
that only happens on the shipment order state.
@seand7565 seand7565 requested a review from elia July 8, 2020 20:45
@seand7565 seand7565 changed the title Add amount check Verify amount to charge with order total Jul 8, 2020
Copy link
Member

@elia elia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go! 🏎️💨

@seand7565 seand7565 merged commit bf696e9 into solidusio:master Jul 9, 2020
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