PayPal Checkout order total display not being updated after PATCH

skiptabor
Contributor
Contributor

Hi,

 

When using PayPal Checkout to process payment we have a case where the user initiates payment before the application has their zip code to calculate shipping and tax. We've managed to handle this using the steps below, but when following those steps the cart total is not updated on PayPal's interface. 

 

  1. Render Paypal button using paypal.Buttons() method

  2. Create order by sending purchase_units info with currency_code and value

  3. In onShippingChange method fetch the already saved address in User’s paypal account and make HTTP calls to our APIs, recalculate the Order Total and add Shipping Charges.

  4. Patch the order to Paypal interface using actions.order.patch method with operation as replace

  5. Patch request is successful and we are getting Success message from Paypal

In this scenario the order is placed successfully with the patched order total, but it is not visible to the user until checkout is completed and they are forwarded back to our application. We have confirmed this by viewing the transactions on our sandbox account. 

 

The screenshot below shows the PayPal checkout window after the order has been patched, but the total is not reflecting the patched amount.

Screen Shot 2020-02-19 at 3.03.36 PM.png

 

This screenshot shows the patch request body for the session in the screenshot above

Screen Shot 2020-02-19 at 3.19.44 PM.png

 

This screenshot shows some of the headers, including the response status code for the request above 

Screen Shot 2020-02-19 at 3.28.08 PM.png

Any help would be greatly appreciated. 

 

Thanks.

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.