Class TerminalRefundRequest
java.lang.Object
com.codename1.payment.terminal.TerminalRefundRequest
What a PaymentTerminal.refund(TerminalRefundRequest) should return.
A linked refund names the payment it returns money for, and goes back to
that card without the customer present where the provider allows it. An
unlinked refund names none: the customer presents a card on the
terminal, and the money goes to that card. Terminals that support only
one kind say so through TerminalOperation.REFUND and
TerminalOperation.UNLINKED_REFUND.
TerminalRefundRequest linked = new TerminalRefundRequest(500, "USD")
.setOriginalTransactionId("pi_3Nk...");
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe amount to return, in the currency's minor unit.The ISO 4217 currency code.The transaction ID of the payment being refunded, as itsTerminalResult.getTransactionId()reported it; null for an unlinked refund.The app's own identifier for the refund; may be null.booleanTrue when the refund names no earlier payment.setOriginalTransactionId(String originalTransactionId) setReference(String reference) SetsgetReference().
-
Constructor Details
-
TerminalRefundRequest
Parameters
-
amount: the amount to return, in the currency's minor unit; must be positive. A partial refund is an amount below the original's. -
currency: the ISO 4217 code, such asUSD
-
-
-
Method Details
-
getAmount
public long getAmount()The amount to return, in the currency's minor unit. -
getCurrency
The ISO 4217 currency code. -
getOriginalTransactionId
The transaction ID of the payment being refunded, as itsTerminalResult.getTransactionId()reported it; null for an unlinked refund. -
setOriginalTransactionId
-
isUnlinked
public boolean isUnlinked()True when the refund names no earlier payment. -
getReference
The app's own identifier for the refund; may be null. -
setReference
-