ERROR_CODE_MERCHANT_ACCOUNT_ERROR (405) when trying Android Pay in a TEST environment using Google Sample Code

Using https://github.com/android-pay/androidpay-quickstart , try Android Pay. Listed below are the minor changes I made to pay for Android, passing the default implementation of Google Wallet in the sample.

  • The latest version (8.4.89) of Google Play Services installed on my device

  • Dependency in build.gradle file changed to use version 8.3 as

    compile 'com.google.android.gms: play-services-wallet: 8.3.0'

  • The Android Pay application from the play store was downloaded on my device and one of the supported bank cards was successfully added.

and

WalletFragmentStyle walletFragmentStyle = new WalletFragmentStyle()
            .setBuyButtonText(BuyButtonText.BUY_WITH_GOOGLE)
            .setBuyButtonAppearance(WalletFragmentStyle.BuyButtonAppearance.ANDROID_PAY_LIGHT)
            .setMaskedWalletDetailsLogoImageType(WalletFragmentStyle.LogoImageType.ANDROID_PAY)
            .setBuyButtonWidth(Dimension.MATCH_PARENT);

, Android Pay CheckOutActivity, " " https://developers.google.com/android-pay/payment-flows. " Android () Pay", 405. " " https://developers.google.com/android-pay/best-practices , .

, , TEST (WalletConstants.ENVIRONMENT_TEST)

WalletFragmentOptions walletFragmentOptions = WalletFragmentOptions.newBuilder()
            .setEnvironment(WalletConstants.ENVIRONMENT_TEST)
            .setFragmentStyle(walletFragmentStyle)
            .setTheme(WalletConstants.THEME_LIGHT)
            .setMode(WalletFragmentMode.BUY_BUTTON)
            .build();

, , , , . , , https://developers.google.com/android-pay/preauth. , , " , Google, , Android", " " https://developers.google.com/android-pay/best-practices

, , . , POC .

+4
2

AndroidManifest.xml?

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

Android Pay

Android Pay, Android Pay API ERROR_CODE_MERCHANT_ACCOUNT_ERROR (405), , Android, , Google Play. ,

https://developers.google.com/android-pay/deployment

+1

Source: https://habr.com/ru/post/1618739/


All Articles