medusa
medusa copied to clipboard
data parameter not passed in patchOrder (medusa-paypal-payment)
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
- Add medusa-paypal-payment plugin
- Add paypal as payment provider in admin ui
- Go to the checkout of your storefront
- Add or Remove a discount code
- 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 })
}
Any updates on this?
any solution im having same issue !!