create Card Payment Method
Creates a new card payment method, optionally encrypting sensitive fields via Evervault.
When encryptData is true, PaymentMethodRequests.CreateCardPaymentMethodRequest.cardNumber and PaymentMethodRequests.CreateCardPaymentMethodRequest.cvc are encrypted before the request is sent.
Return
A pair of the created payment method and a networking error.
Parameters
The card details and optional customer or account associations.
Whether to encrypt the card number and CVC before transmission. Defaults to true.
Creates a new card payment method on the provided coroutine scope and delivers the result to a callback on the main thread.
When encryptData is true, the card number and CVC are encrypted via Evervault before transmission. The completion handler is always invoked on the main dispatcher.
Parameters
The card details and optional customer or account associations.
Whether to encrypt the card number and CVC before transmission. Defaults to true.
The CoroutineScope on which the encryption and network work is launched.
Called on the main thread with the created payment method on success, or a NetworkingError on failure.