vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
MIT License
5.39k stars 943 forks source link

Cancel item does not affect the Payment Settled amount #2912

Open andriinuts opened 1 week ago

andriinuts commented 1 week ago

Describe the bug When you cancel and Settle Payment amount of payment is not updating and you can enter not the real price for the Refundable amount.

To Reproduce Steps to reproduce the behavior:

  1. Create an order and add a product that costs 100$ 2 times so the total cost will be 200$
  2. Pay for the order
  3. Go to the order page in the admin
  4. Click Cancel order or items
  5. Select Cancel specified items and select that you are canceling only 1 item
  6. Click the Settle Payment button, it should be correctly handled by the payment provider
  7. In payments you see Payment 200$ and Settled but in reality, it's only 100$ settled
  8. Click Refund & cancel order and you will see Refundable amount: 200$ but you settled only 100$

Expected behavior I expect then that when you cancel order items before Settle the Settle Payment price should be updated to the price that was Settled in real.

Environment (please complete the following information):