GetnetPaymentPayload constructor

GetnetPaymentPayload({
  1. required GetnetPaymentType paymentType,
  2. GetnetCurrencyPosition currencyPosition = GetnetCurrencyPosition.CURRENCY_BEFORE_AMOUNT,
  3. int currencyCode = 986,
  4. GetnetCreditType? creditType,
  5. int? installments,
  6. required double amount,
  7. required String callerId,
  8. 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',
     );