toJson method

Map<String, dynamic> toJson()

Converts the card details to a map for native bridge communication.

Implementation

Map<String, dynamic> toJson() {
  return {
    'cardholderName': cardholderName,
    'cardNumber': cardNumber,
    'expirationMonth': expirationMonth,
    'expirationYear': expirationYear,
    'securityCode': securityCode,
    if (billingAddress != null) 'billingAddress': billingAddress,
  };
}