startCardEntryFlowWithBuyerVerification static method

Future startCardEntryFlowWithBuyerVerification({
  1. required BuyerVerificationSuccessCallback onBuyerVerificationSuccess,
  2. required BuyerVerificationErrorCallback onBuyerVerificationFailure,
  3. required CardEntryCancelCallback onCardEntryCancel,
  4. required String buyerAction,
  5. required Money money,
  6. required String squareLocationId,
  7. required Contact contact,
  8. bool collectPostalCode = true,
})

Implementation

static Future startCardEntryFlowWithBuyerVerification(
    {required BuyerVerificationSuccessCallback onBuyerVerificationSuccess,
    required BuyerVerificationErrorCallback onBuyerVerificationFailure,
    required CardEntryCancelCallback onCardEntryCancel,
    required String buyerAction,
    required Money money,
    required String squareLocationId,
    required Contact contact,
    bool collectPostalCode = true}) async {
  _buyerVerificationSuccessCallback = onBuyerVerificationSuccess;
  _buyerVerificationErrorCallback = onBuyerVerificationFailure;
  _cardEntryCancelCallback = onCardEntryCancel;
  var params = <String, dynamic>{
    'buyerAction': buyerAction,
    'money': _standardSerializers.serializeWith(Money.serializer, money),
    'contact':
        _standardSerializers.serializeWith(Contact.serializer, contact),
    'squareLocationId': squareLocationId,
    'collectPostalCode': collectPostalCode,
  };
  await _channel.invokeMethod(
      'startCardEntryFlowWithBuyerVerification', params);
}