question

sonu avatar image
sonu asked sonu commented

We want to make partial refund of full payment of single order?(clover station)

We want to make partial refund payment of full payment of single order

We are able do spilt payment spilit amount refund but we need to do partial refund in clover. So please look at this and inform us.

Thank you in advance.

Refund
10 |2000

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

1 Answer

·
bryanvargas avatar image
bryanvargas answered sonu commented

You should be able to use the RefundPaymetRequest with the PaymentConnector/CloverConnector and specify the amount you want to refund. Just know that this refund request has to have the orderId and the paymentId

7 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.

sonu avatar image sonu commented ·
Hi bryanvargas,

Thanks for you quick responce,

We are using below code in clover station but we are not able to do partial payment. So please guide us and share refereance code which we can for partial.

initPaymentConector()
var mAmt: Double = setAmount.toDouble()
mAmt *= 100
val refundAmount = mAmt.toLong()
val refundRequest = RefundPaymentRequest()
refundRequest.paymentId = setPaymentId
refundRequest.orderId = setOrderId
refundRequest.amount = refundAmount
refundRequest.fullRefund = setFullRefund
refundRequest.disablePrinting = false
refundRequest.disableReceiptSelection = false
if (paymentConnector != null) {
    paymentConnector.refundPayment(refundRequest)
} 

Thanks in adcvance.


0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ sonu commented ·

You are setting the refundRequest to fullRefund that is why you are not able to refund partial amount, remove this line and just use the amount.

refundRequest.fullRefund = setFullRefund

0 Likes 0 ·
sonu avatar image sonu bryanvargas ♦♦ commented ·

We are using this line as boolean false but we are not to do refund.

refundRequest.fullRefund = setFullRefund(false)


0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community