Closed atta1234 closed 4 years ago
Yes, for creating Google Pay requests you should include your merchant ID in the BraintreeGooglePaymentRequest
object instance. This is optional in sandbox mode. See: https://pub.dev/documentation/flutter_braintree/latest/flutter_braintree/BraintreeGooglePaymentRequest-class.html
but i have seen the option for web, but in your code i don't see merchant id,
here i the code how to include apple pay and google merchant id, Future loadpaymenthod()async{ var request = BraintreeDropInRequest( tokenizationKey: tokenizationKey, collectDeviceData: true, googlePaymentRequest: BraintreeGooglePaymentRequest( totalPrice: widget.total, currencyCode: 'USD', billingAddressRequired: false, ), paypalRequest: BraintreePayPalRequest( amount: widget.total, displayName: 'FFF', ), ); BraintreeDropInResult result = await BraintreeDropIn.start(request); if (result != null) { showNonce(result.paymentMethodNonce); } } }
The example code does not include a Google merchant ID because it runs in sandbox mode. For production, you need to write:
BraintreeGooglePaymentRequest(
totalPrice: widget.total,
currencyCode: 'USD',
billingAddressRequired: false,
googleMerchantID: "<Your merchant ID>",
),
Do i need to add google merchant id some where in the code?