CheckoutModel constructor

CheckoutModel({
  1. required String cancelUrl,
  2. required String phone,
  3. required String email,
  4. required String errorUrl,
  5. required String notifyUrl,
  6. required String successUrl,
  7. required List<String> paymentMethods,
  8. required String expireDate,
  9. required List<CheckoutItem> items,
  10. required List<Beneficiary> beneficiaries,
  11. required String lang,
})

Implementation

CheckoutModel({
  required this.cancelUrl,
 // required this.nonce,
  required this.phone,
  required this.email,
  required this.errorUrl,
  required this.notifyUrl,
  required this.successUrl,
  required this.paymentMethods,
  required this.expireDate,
  required this.items,
  required this.beneficiaries,
  required this.lang,
}) : nonce = '' {
  generateNonce(); // Generate the nonce during object creation
}