vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.75k stars 1.02k forks source link

Could not find a Payment to refund if we try to refund a fulfillment order #2396

Closed tianyingchun closed 1 year ago

tianyingchun commented 1 year ago

Describe the bug

 error 9/15/23, 5:35 PM - [Vendure Server] {
31|kzfoo-s |   "message": "INTERNAL_SERVER_ERROR: Could not find a Payment to refund",
31|kzfoo-s |   "variables": {}
31|kzfoo-s | }
31|kzfoo-s | Error: Could not find a Payment to refund
31|kzfoo-s |     at PaymentService.createRefund (/opt/applications/production/kzfoo-srv/node_modules/@vendure/core/dist/service/services/payment.service.js:253:23)
31|kzfoo-s |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
31|kzfoo-s |     at async OrderService.refundOrder (/opt/applications/production/kzfoo-srv/node_modules/@vendure/core/dist/service/services/order.service.js:1088:16) 

To Reproduce Steps to reproduce the behavior:

  1. Placed an order with two product variant
  2. Make a payment settled
  3. Create fullfillment , flag it as delivered
  4. try refund with cannceled flag it will throw above error

Expected behavior can be correct refund also

Environment (please complete the following information):

Additional context Add any other context about the problem here.

michaelbromley commented 1 year ago

Hi, I just followed the reproduction steps and did not get an error. Are you able to reproduce on a clean install?

tianyingchun commented 1 year ago

yes, in my local it seems not reproduction, if i encounter again, i will reopen this.