You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should be able to refund as many times as possible, as long as it doesn't exceed the original amount of the order.
Actual behavior
Here is the current refund issue I'm having :
I'm placing an order with a certain amount with more than one item.
I create a return for a certain item in the order after everything is fulfilled and delivered.
After the return has been created, I issue a refund.
Refund is processed successfully.
If I repeat this exact process for another item in the same order, the refund is not successfull, I'm faced with this error :
{
message: 'Order does not have an outstanding balance to refund',
name: 'Error',
stack: 'Error: Order does not have an outstanding balance to refund\n' +
' at Object.<anonymous> (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/core-flows/src/payment/workflows/refund-payment.ts:32:13)\n' +
' at Object.invoke (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/create-step-handler.ts:72:67)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async DistributedTransaction.handler (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/orchestration/src/workflow/workflow-manager.ts:214:16)\n' +
' at async stepHandler (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:827:20)\n' +
' at async Promise.allSettled (index 0)\n' +
' at async promiseAll (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/utils/src/common/promise-all.ts:27:18)\n' +
' at async TransactionOrchestrator.executeNext (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:965:7)\n' +
' at async executeNext (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:1013:14)\n' +
' at async TransactionOrchestrator.resume (/home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:1028:5)\n' +
'⮑ sat /home/kzm/documents/wizards/gaya-v2/node_modules/@medusajs/core-flows/dist/payment/workflows/refund-payment.js: [refund-payment-workflow -> validate-refund-step (invoke)]',
__isMedusaError: true,
type: 'invalid_data',
code: undefined,
date: 2025-01-06T15:20:40.573Z
}
Link to reproduction repo
/
The text was updated successfully, but these errors were encountered:
Package.json file
Node.js version
v20.18.1
Database and its version
PgSQL 16.4.1
Operating system name and version
Archlinux
Browser name
Google Chrome
What happended?
Expected behavior
Actual behavior
Here is the current refund issue I'm having :
If I repeat this exact process for another item in the same order, the refund is not successfull, I'm faced with this error :
Link to reproduction repo
/
The text was updated successfully, but these errors were encountered: