You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day @Usama9999, I've tried your configuration with a valid pk_test_ key and it works for me.
Double check your publishable key and see if you get a result.
My Code:
pay.GooglePayButton(
paymentConfiguration: pay.PaymentConfiguration.fromJsonString('''{
"provider": "google_pay",
"data": {
"environment": "TEST",
"apiVersion": 2,
"apiVersionMinor": 0,
"allowedPaymentMethods": [{
"type": "CARD",
"tokenizationSpecification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "stripe",
"stripe:version": "2022-11-15",
"stripe:publishableKey": "pk_test_..."
}
},
"parameters": {
"allowedCardNetworks": ["VISA", "MASTERCARD"],
"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
"billingAddressRequired": true,
"billingAddressParameters": {
"format": "FULL",
"phoneNumberRequired": true
}
}
}],
"merchantInfo": {
"merchantId": "BR.....",
"merchantName": "E....."
},
"transactionInfo": {
"countryCode": "US",
"currencyCode": "USD"
}
}
}'''),
paymentItems: [
pay.PaymentItem(
amount: (int.parse(controller.amount ?? '0') +
(int.parse(controller.amount ?? '0') *
(controller.paymentMethodModel?.eureecaFee ?? 0)))
.floor()
.toString(),
type: pay.PaymentItemType.total,
label: 'Add money into Eureeca wallet')
],
width: double.infinity,
height: 48,
type: pay.GooglePayButtonType.pay,
cornerRadius: 4,
margin: const EdgeInsets.only(top: 15.0),
onPaymentResult: (paymentResult) async {
TokenData token =
await Stripe.instance.createApplePayToken(paymentResult);
The text was updated successfully, but these errors were encountered: