Closed DominiqueBlomsma closed 2 years ago
Another solution might be creating a Widget and render it in OrderPartiallyRefundButtons.
We could disable Refunds in the Xumm Plugin and create a refund widget with a button that uses a redirect flow. This does mean that we have to copy/implement logic to refund and requires shop owners to install 2 extensions (plugin & widget).
Decided flow:
nopCommerce
Payment
Payload is created and an email will be send to the logged in admin.Sign Payload
PaymentStatus.PartiallyRefunded
or PaymentStatus.Refunded
if the transaction was a success or any error in Errors[] if the payload was not signed.
Paid orders will show refund buttons by default at the order detail page to (partially) refund offline. This means that the shop owner has to make sure he refunded the consumer himself.
The Xumm plugin could implement refunding and this will show 2 extra buttons, as shown below.
Clicking on either Refund or Partial refund triggers the Xumm plugin implementation and has 2 outcomes:
Success
(No errors) andNewPaymentStatus
(Pending, Authorized, Paid, PartiallyRefunded, Refunded, Voided)Errors[]
.It is possible to create a payload with refund values but no way to user-friendly integrate this in nopCommerce.
Possible flow: nopCommercel
Payment
payload is created withuser_token
to send a Xumm Event on the shop owners phone.Errors[]
to indicate that there is a Xumm Event and not update the order as refunded.NOTE: Step 5 will add a note to the order
Unable to partially refund order. {error}
Webhook
PaymentStatus.PartiallyRefunded
orPaymentStatus.Refunded
if succeeded or any error inErrors[]
to prevent nopCommerce to update the order as refunded.Example of the error message
Is this an acceptable and user-friendly flow or should we reconsider how we're going to handle refunds?