question

Sukhbir Singh avatar image
Sukhbir Singh asked Sukhbir Singh commented

Payment connector is not able to give the reason of refund failure.

Hi,
We are facing an issue when we send a refund request via following code:

RefundPaymentRequest refund = new RefundPaymentRequest();
refund.setPaymentId(paymentId);
refund.setOrderId(orderId);
refund.setAmount(amount);
refund.setFullRefund(false);
mPaymentConnector.refundPayment(refund);
We are not able to get the reason/status code in case of refund fail ure. We found only the following details:
{"message":null,"result":"FAIL","success":false,"reason":null,"refund":null}
Can you please suggest to us that how can we get the reason of failure-refund.

Thank you.
PaymentConnector
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Raymond Lee avatar image
Raymond Lee Deactivated answered Sukhbir Singh commented
The response you get from RefundPaymentResponse will not contain the failure reason in the "reason" field, but rather the "message" field. However as you have noted, that is also null.

The issue you are seeing is due to a bug where the refund failure message is not being passed back to PaymentConnector to provide in the RefundPaymentResponse. I will file a bug report for this issue.

As for now, unfortunately there is currently no work around to get the failure message from a failed refund.

Thanks for bringing this to our attention!
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sukhbir Singh avatar image Sukhbir Singh commented ·

OK Thanks @Raymond Lee

0 Likes 0 ·
Raymond Lee avatar image
Raymond Lee Deactivated answered Raymond Lee Deactivated commented
If this is occurring on Station 2018, there was a recent bug found where a payment created through PaymentConnector on Station 2018 could not be refunded.

This has since been fixed on Sandbox, and will be rolled out to Production at a later date.

Can you verify if this issue is occuring for you on Station 2018?
4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sukhbir Singh avatar image Sukhbir Singh commented ·

Hi @Raymond Lee

We are using clover flex and clover mobile device and the issue is still. In the case of failure, we didn't find reasion of failiour.

Thank you.

0 Likes 0 ·
Raymond Lee avatar image Raymond Lee Sukhbir Singh commented ·

Can you provide the paymentId for the payment you are trying to refund? We can take a look as to why the refund failed, and why the reason is null.

0 Likes 0 ·
Sukhbir Singh avatar image Sukhbir Singh Raymond Lee commented ·

Hi @Raymond Lee

Thanks for your answer. But you can also try on your side via the following steps:

Let me clear you via the following example:

1. We did pay for $50.

2. We hit the refund request of $50 for the same transaction. (In that case, the refund will be successful).

3. We hit the refund again for the same transaction.

You will found:

{"message":null,"result":"FAIL","success":false,"reason":null,"refund":null}

Thanks.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community