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

data parameter not passed in patchOrder (medusa-paypal-payment) #7097

Open
twietobiii opened this issue Apr 18, 2024 · 0 comments
Open

data parameter not passed in patchOrder (medusa-paypal-payment) #7097

twietobiii opened this issue Apr 18, 2024 · 0 comments

Comments

@twietobiii
Copy link

Bug report

Describe the bug

In the medusa-paypal-payment plugin the data parameter of patchOrder (paypal-sdk.ts line 49) is not passed to the HTTP-Client request. Therefore the amount in the paypal checkout flow is not properly updated on any changes of the cart / payment session (e.g. add or remove a discount code).

System information

Medusa version: 1.20.4
medusa-paypal-payment version: 6.0.3

Steps to reproduce the behavior

  1. Add medusa-paypal-payment plugin
  2. Add paypal as payment provider in admin ui
  3. Go to the checkout of your storefront
  4. Add or Remove a discount code
  5. Amount in paypal checkout flow does not match the correct amount of the storefront checkout

Expected behavior

The amount of the paypal checkout flow should equal the amount of the storefront checkout.

Code snippets

Current implementation:

 async patchOrder(orderId: string, data?: PatchOrder[]): Promise<void> {
    const url = PaypalApiPath.PATCH_ORDER.replace("{id}", orderId)
    return await this.httpClient_.request({ url, method: "PATCH" })
  }

Possible solution:

 async patchOrder(orderId: string, data?: PatchOrder[]): Promise<void> {
    const url = PaypalApiPath.PATCH_ORDER.replace("{id}", orderId)
    return await this.httpClient_.request({ url, method: "PATCH", data })
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant