encryptPaymentRequest abstract method

dynamic encryptPaymentRequest({
  1. required SdkPreparePaymentRequest paymentRequest,
  2. required void onSuccess(
    1. EncryptedPaymentRequest encryptedPaymentRequest
    ),
  3. required void onFailure(
    1. NativeException e
    ),
})

Processes the SdkPreparePaymentRequest.

This method first retrieves the associated public key and then uses this to encrypt the PaymentRequest from the SdkPreparePaymentRequest. The result of this preparation will be provided by a callback on either onSuccess if the preparation was successful or onFailure if it was not. If successful, the resulting EncryptedPaymentRequest can be used to finish the payment. If unsuccessful, the NativeException returned will provide additional information regarding the failure.

Implementation

encryptPaymentRequest(
    {required SdkPreparePaymentRequest paymentRequest,
    required void Function(EncryptedPaymentRequest encryptedPaymentRequest)
        onSuccess,
    required void Function(NativeException e) onFailure});