GetnetPaymentPayload constructor
GetnetPaymentPayload({
- required GetnetPaymentType paymentType,
- GetnetCurrencyPosition currencyPosition = GetnetCurrencyPosition.CURRENCY_BEFORE_AMOUNT,
- int currencyCode = 986,
- GetnetCreditType? creditType,
- int? installments,
- required double amount,
- required String callerId,
- required String orderId,
Implementation
GetnetPaymentPayload({
required this.paymentType,
this.currencyPosition = GetnetCurrencyPosition.CURRENCY_BEFORE_AMOUNT,
this.currencyCode = 986,
this.creditType,
this.installments,
required this.amount,
required this.callerId,
required this.orderId,
}) : assert(
paymentType != GetnetPaymentType.credit ||
creditType == null ||
(installments != null && installments > 1),
"Installments cannot be null and must be greater than 1 when paymentType is 'credit' and creditType is 'creditMerchant' or 'creditIssuer'.",
),
assert(
callerId.length <= 50,
'callerId size must be less than or equal to 50 characters',
),
assert(
orderId.length <= 50,
'orderId size must be less than or equal to 50 characters',
);