question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: The merchant is not enabled for google pay

See original GitHub issue

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()
    }
  }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Gjoshi3107commented, Aug 3, 2020

@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

3reactions
samzmanncommented, Jul 4, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I receive "This merchant is not enabled for Google Pay ...
Why do I receive "This merchant is not enabled for Google Pay" when attempting a transaction with Google Pay? · In your paywithgoogle....
Read more >
Troubleshooting | Google Pay API
This merchant is not enabled for Google Pay · You have not registered to use this API · This merchant profile does not...
Read more >
This merchant is not enabled for Google Pay. [Android, React ...
i need to integrate android/google Pay in my app. used react-native-payments for integrate native payment wallet. Sheet open in type os TEST ...
Read more >
Use your Google Pay balance to pay businesses (US only)
This info may not apply for Google Pay users outside of the US. ... Set up your Google Pay balance for contactless, in-app...
Read more >
Google Pay - Developer Engine - FIS
To contact Google in order to add your app to their system for production use. Merchant ID. When Google Pay is enabled on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found