Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Android: The merchant is not enabled for google pay #490

Closed
samzmann opened this issue Jun 20, 2019 · 17 comments
Closed

Android: The merchant is not enabled for google pay #490

samzmann opened this issue Jun 20, 2019 · 17 comments

Comments

@samzmann
Copy link

Before I have submitted the issue

[x] I have read an installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

Trying to open Google Pay in release version fails with the message 'The merchant is not enabled for Google Pay'. In dev mode everything works fine.

I downloaded the release version directly from an apk file, NOT via the Play Store, so that might be the problem.
Otherwise, I guess I have to add the merchantId somewhere in my code, but the docs don't mention anything.

Environment

  • tipsi-stripe version: 7.5.0
  • Last tipsi-stripe version where the issue was not reproduced (if applicable): N/A
  • iOS or Android: Android
  • OS version: 6.0.0
  • React-Native version: 0.59.9
  • (Android only) com.google.firebase:firebase-core version: 16.0.6
  • (Android only) com.google.android.gms:play-services-base version: 16.0.1

For Android, please provide the following sections from android/app/build.gradle:

  • android.compileSdkVersion 28
  • android.buildToolsVersion 28.0.3
  • android.defaultConfig.minSdkVersion 19
  • android.defaultConfig.targetSdkVersion 28
  • android.defaultConfig.multiDexEnabled true

Screenshot

IMG_0350

Code To Reproduce Issue (Good To Have)

Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.

This is how I set stripe options:

stripe.setOptions({
      publishableKey: AppConfig.STRIPE_PUBLIC_KEY,
      merchantId: Platform.OS === 'ios' ? AppConfig.APPLE_PAY_MERCHANT_ID : AppConfig.GOOGLE_PAY_MERCHANT_ID,
      androidPayMode: __DEV__ ? 'test' : 'production',
    })

This is how I the function I use to request payment:

const requestPay = async () => {
    try {
      const items = [{
        label: `Some item`,
        amount: `10.00`,
      }]

      const options = Platform.select({
        ios: {
          currencyCode: 'EUR',
          countryCode: 'de',
          shippingType: 'store_pickup',
        },
        android: {
          total_price: `${amountToPay}`,
          currency_code: 'EUR',
          line_items: [],
        },
      })

      const token = await stripe.paymentRequestWithNativePay(options, items)

      await stripe.completeNativePayRequest()

      handleNativePayment({
        ...token,
        paymentType: Platform.OS === 'ios' ? 'native-apple-pay' : 'native-google-pay',
      })
    } catch (error) {
      console.log('Error requesting native pay:', error)
      stripe.cancelNativePayRequest()
    }
  }
@tomrevansecho
Copy link

Did you manage to resolve this? Also having the same issue.

@samzmann
Copy link
Author

@tomrevansecho I haven't gotten it working yet but I think this message appears in release mode because Google hasn't approved our merchant ID for production yet.
If you go take a look at the very bottom of the integration checklist, there is a link to request production access. I submitted a request and am waiting for approval. I hope this will solve this issue.

@cybergrind
Copy link
Member

Hi @tomrevansecho, @Lavielle is right, you need to get approval from Google team by submitting the form from integration checklist, they will contact email from your request and ask for required information, builds (test and then production builds) and then you will be able to start accepting production payments

@cybergrind
Copy link
Member

Published more thorough doc for this process: https://tipsi.github.io/tipsi-stripe/docs/google-pay.html

@samzmann
Copy link
Author

samzmann commented Jul 4, 2019

The error goes away once the Google Payment API team accepted our request.
Thanks @cybergrind for better docs :)
Closing this issue.

@samzmann samzmann closed this as completed Jul 4, 2019
@Marcusg62
Copy link

@Lavielle How long did it take for them to respond after submitting the request?

@samzmann
Copy link
Author

@Marcusg62 I don't remember exactly but the whole exchange took a few days, maybe a week. (They replied, we needed to adjust something, then waiting...)

@deimantasa
Copy link

Quick question, for Android, you are using AppConfig.GOOGLE_PAY_MERCHANT_ID. However, when I asked for Gpay support staff, they told me GPay doesnt need any merchant ID to be provided.

Also, I'm in this topic since I'm facing same issue, The merchant is not enabled for Google Pay.
jonasbark/flutter_stripe_payment#127

@Peeeep
Copy link

Peeeep commented Apr 23, 2020

I had the same issue (8.0.0-beta10) running in test environment and realized I had put

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

into the manifest directly instead of the application section of android/app/src/main/AndroidManifest.xml... See https://tipsi.github.io/tipsi-stripe/docs/google-pay.html

@Gjoshi3107
Copy link

@zeromaro I had the same query, I checked this------> link, and focused on the part Check the returned error details for more information.
In my error Log, I found:- GPay payWithGpay error:----> loadPaymentData failed. Error code: 405
There are many reasons as to why this error can occur, to find them :-
Make sure that your device is connected to System and the system has adb installed. Then:-
in your terminal, type:- adb -d logcat -s WalletMerchantError, and then in the log search for Error in loadPaymentData
I got Signing key fingerprints {*******} do not match our records for this app. which means that i had to use the signed apk, not react-native run-android. you can find your error-----> here

@Edgaras91
Copy link

@zeromaro I had the same query, I checked this------> link, and focused on the part Check the returned error details for more information.
In my error Log, I found:- GPay payWithGpay error:----> loadPaymentData failed. Error code: 405
There are many reasons as to why this error can occur, to find them :-
Make sure that your device is connected to System and the system has adb installed. Then:-
in your terminal, type:- adb -d logcat -s WalletMerchantError, and then in the log search for Error in loadPaymentData
I got Signing key fingerprints {*******} do not match our records for this app. which means that i had to use the signed apk, not react-native run-android. you can find your error-----> here

Alternatively, Opening LogCat from the visual studio while debugging and searching for WalletMerchantError showed the error too.
image

@suresh1502067
Copy link

@Lavielle and @cybergrind I'm also getting "The merchant is not enabled for google pay" issue in production environment .Can you give me a link to production setup to google pay.

In Test mode is working fine, But "production" mode getting that issue. So can you help to resolve this

@Edgaras91
Copy link

@Lavielle and @cybergrind I'm also getting "The merchant is not enabled for google pay" issue in production environment .Can you give me a link to production setup to google pay.

In Test mode is working fine, But "production" mode getting that issue. So can you help to resolve this

I had to do this for production which took weeks:
https://developers.google.com/pay/api/web/guides/test-and-deploy/request-prod-access

@cybergrind
Copy link
Member

@silviCloudAnalogy
Copy link

The error goes away once the Google Payment API team accepted our request.
Thanks @cybergrind for better docs :)
Closing this issue.

@cybergrind , Can you please tell that how we make request to google payment api team ?

@cybergrind
Copy link
Member

After that, you need to submit a production request form from the bottom of the page.

@cybergrind
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants