Class TerminalPaymentRequest

java.lang.Object
com.codename1.payment.terminal.TerminalPaymentRequest

public final class TerminalPaymentRequest extends Object

What a PaymentTerminal should charge.

The amount is in the currency's minor unit -- cents for USD, yen for JPY -- the way every payment provider takes it, so no floating point rounding ever reaches a price.

TerminalPaymentRequest req = new TerminalPaymentRequest(1250, "USD")
        .setReference("order-1042");
  • Constructor Details

    • TerminalPaymentRequest

      public TerminalPaymentRequest(long amount, String currency)
      Parameters
      • amount: the amount in the currency's minor unit; must be positive

      • currency: the ISO 4217 code, such as USD

  • Method Details