executeApplePayButton method
Future<MFGetPaymentStatusResponse>
executeApplePayButton(
- MFExecutePaymentRequest? executePaymentRequest,
- dynamic onInvoiceCreated(
- String invoiceId
Implementation
Future<MFGetPaymentStatusResponse> executeApplePayButton(
MFExecutePaymentRequest? executePaymentRequest,
Function(String invoiceId)? onInvoiceCreated) async {
if (onInvoiceCreated != null) {
eventChannel.receiveBroadcastStream().listen((invoiceId) {
onInvoiceCreated(invoiceId);
});
}
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
MFConstants.channelName.executeApplePayButton, codec,
binaryMessenger: _binaryMessenger);
final List<Object?>? replyList =
await channel.send(<Object?>[executePaymentRequest]) as List<Object?>?;
return modelParser<MFGetPaymentStatusResponse>(replyList);
}