Skip to content

Google Pay Request failed An unexpected error has occurred Please try again later [DeveloperErrorException] #137

Closed
@aya2453

Description

We are getting this error after calling showPaymentSelector.

Screenshot

Plugin Version

flutter_stripe: ^3.1.0
pay: ^1.0.10

AndroidManifest

<meta-data
    android:name="com.google.android.gms.wallet.api.enabled"
    android:value="true" />

config.json

{
  "provider": "google_pay",
  "data": {
    "environment": "TEST",
    "apiVersion": 2,
    "apiVersionMinor": 0,
    "allowedPaymentMethods": [
      {
        "type": "CARD",
        "tokenizationSpecification": {
          "type": "PAYMENT_GATEWAY",
          "parameters": {
            "gateway": "stripe",
            "stripe:version": "2020-08-27",
            "stripe:publishableKey": "pk_test_SETTLE_OUR_PK"
          }
        },
        "parameters": {
          "allowedCardNetworks": [
            "VISA",
            "MASTERCARD",
            "DISCOVER",
            "JCB",
            "AMEX"
          ],
          "allowedAuthMethods": [
            "PAN_ONLY",
            "CRYPTOGRAM_3DS"
          ]
        }
      }
    ],
    "merchantInfo": {
      "merchantId": "01234567890123456789",
      "merchantName": "OUR_COMPANY_NAME"
    },
    "transactionInfo": {
      "countryCode": "JP",
      "currencyCode": "JPY"
    }
  }
}

Dart code

final Pay _payClient = Pay.withAssets([AppConstant.applePayConfPath, AppConstant.googlePayConfPath]);

final paymentResult = await _payClient.showPaymentSelector(
      provider:  payProvider,
      paymentItems: _createPaymentItems(context),
    );

Logcat

$ adb -d logcat -s WalletMerchantError
-> Nothing displayed

$adb -d logcat -s pay
-> 06-10 23:01:21.297 11152 19749 E Volley  : [2075] cuv.b: Unexpected response code 500 for https://payments-pa.googleapis.com/payments/apis-secure/ui2/buyflowservice/initialize

Other

  • Apple Pay works fine.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions