Purchase With Cashback Builder
Builds a TransactionType.PURCHASE_WITH_CASHBACK request. cashbackAmount(...) must be called - unlike amount, there is no reasonable default for it, and the whole point of this transaction type is to carry one.
Functions
Amount to charge.
amount taking the ISO-4217 numeric currency code - the officially supported form, for example amount(1050, 2, 756) for CHF 10.50 - instead of the alphabetic code.
Amount to charge, expressed with fractionDigits fraction digits instead of currency's own default, for example amount(1050, 2, "CHF") for CHF 10.50 - useful when the value is only known at a different (or unknown) scale, for example digit-by-digit from a UI text field typed by a cashier, without needing java.math.BigDecimal. Rescaled to currency's actual minor units, rounding half up if fractionDigits is more precise than the currency supports.
Builds the TransactionRequest.
Cashback included in the total amount, in the same currency and no greater than the total.
cashbackAmount taking the ISO-4217 numeric currency code instead of the alphabetic one.
Cashback amount, expressed with fractionDigits fraction digits instead of currency's own default - see amount for why this overload exists.
Sets pan/expiryDate/cvc2 together for manual PAN key entry ("MPKE") - see TransactionRequest.pan for field meaning. cvc2 is optional.
Sets TransactionRequest.transactionId. Optional - defaults to a random UUID if never called. Set explicitly to control it, for example to persist it before starting the transaction (see "Payment recovery" in the README).