My approach is creating a return form and then process my refund to payment gateway. The status of return form is alway Completed after I click Complete Return and then it will trigger the ProcessPayment which process the refund payment transaction.
In case of the refund transaction is failed, the return form has already completed and cannot trigger refund transaction again. So in this situiation, return form was marked as completed but customer does not recieve money back.
First attemp: I've tried to set the return form status back to Awaiting Completion but the problem is that I cannot determine which was the correct return form to revert. The refund transaction which was failed does not have any relationship to any return form than refund amount.
Second attemp: I try to create new payment transaction to process refund but have no Idea about doing this.
Have anyone dealed with this kind of refund situiation ?
EPiServer Commerce - 18.104.22.168
Episerver Web Content Management System - 22.214.171.124
In a standard payment gateway solution; the return will not get completed unless the PaymentProcess method returns a PaymentProcessResult variable marked as successful.
Can you post me a screenshot of the PaymentProcess method inside your payment gateway? Specifically the area where you are checking where the TransactionType is Credit.
Hi Surjit, thanks for replying to me.
I've used the QuickSilver sample site & also PayPal payment gateway plugin provided by Episerver.
I just change the code to return an PaymentUnsuccessfulResult to pretend the situiation that error happen like this:
if (cart == null && orderGroup is IPurchaseOrder)
// When "Refund" shipment in Commerce Manager, this method will be invoked with the TransactionType is Credit
if (payment.TransactionType == TransactionType.Credit.ToString())
// Errors happened
return PaymentProcessingResult.CreateUnsuccessfulResult("some errors happen here");
And then after this, the return was completed and a failed credit payment transaction has been created.
That is out of the ordinary.
Are you using Commerce Manager or Order Management to mark the return as complete?
Both use a different set of methods to call the gateway and move the return status along. Try the other one to see if you experience the same behaviour.
I've used both Commerce Manager & Order Management.
With Order Management, I return PaymentUnsuccessfulResult it seem like a bug in the Episerver when the Order Management was blank, not thing happen.
And the "completed return when refund fail" issues occcurred when I processed with Commerce Manager.
I guess from here it feels like you'll need to do some exploratory debugging.
Posting a screenshot of Order Management blank screen would be good to give more context.
Make sure the breakpoint hits at the point where you think the PaymentUnsuccessfulResult is being returning in the PayPal gateway.
Even making sure the payment settings in Commerce Manager are all correct.
<a href = "https://www.sanantoniotruckingpros.com/car-transport-auto-transport-san-antonio">https://www.sanantoniotruckingpros.com/car-transport-auto-transport-san-antonio</a>