Our requirement was: Using Payment connector, if a Payment (SaleResponse) contained a tip added, refund Object (RefundPaymentResponse) returned from SDK should contain the original tip amount as well.
What we are doing:
onSaleResponse: Payment _payment = saleResponse.getPayment(); tip = _payment.getTipAmount() == null ? 0 : _payment.getTipAmount(); onRefundPaymentResponse: Refund refundObj = refundResponse.getRefund(); long tip = refundObj.getTipAmount() == null ? 0 : refundObj.getTipAmount();
We have confirmed tip onSale is correct.
We think refundObj.getTipAmount() is returning null/0.
Is this the right place to check for tip refunded?
Other details: Sandbox, US on Flex device.