question

kirank avatar image
kirank asked Lee Tickett answered

paymentConnector For refund requires OrderID but Sale does not require it

We see that we can successfully make a paymentConnector.sale() without an Order.
Then, onSaleResponse returns an order ID in _payment.getOrder().getId()
Now, in paymentConnector.refundPayment this call requires an OrderID. This is asymmetric to sale.

The reason it gets complex for us is that OrderID is something internally generated by Clover (?). Payment ID is now not an enough identifier. We need to maintain two IDs.

Is it possible for Clover SDK to internally resolve the OrderID given the Payment ID only? That is, make OrderID optional for RefundPaymentRequest?
PaymentConnectorRefund
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

Lee Tickett avatar image
Lee Tickett answered
I think you will need to use the payment connector to obtain the order id from the payment id. Clover may add this magic in the future, but I wouldn't expect it to be anytime soon...
10 |2000

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