flutter_stripe_payment icon indicating copy to clipboard operation
flutter_stripe_payment copied to clipboard

Stripe -> GPay native in production issue

Open deimantasa opened this issue 4 years ago • 11 comments

Hello,

I'm facing an issue running GPay native pay in production. Test - working really well. But once I point it to production - it starts failing and gives me This merchant is not available on Google Pay error. IMG_4448

I've GPay API activated in production.

StripePayment.setOptions(StripeOptions(
      publishableKey: Env.data.stripePublishableKey, // my PK from Stripe
      merchantId: "(-hidden-)", //my merchantId for iOS
      androidPayMode: Env.data.googlePayEnvironment, // **test** for testing, **production** for production
    ));

While running code for NativePay, I receive PlatformException Screenshot 2020-03-17 at 9 14 59 AM

Token token = await StripePayment.paymentRequestWithNativePay(
        androidPayOptions: AndroidPayPaymentRequest(
          total_price: priceString,
          currency_code: "HK",
        ),
        applePayOptions: ApplePayPaymentOptions(
          countryCode: 'HK',
          currencyCode: 'HKD',
          items: [
            ApplePayItem(
              label: 'My Label',
              amount: priceString,
            )
          ],
        ),
      ).catchError((onError) async {
        if (onError is PlatformException) {
          if (onError.message != null) onFailure(onError.message); //error comes here
        }
        //Some error
        return null;
      });

Interesting enough, once trying to contact GPay support, they told me I need to get gatewayMerchantId from Stripe (https://developers.google.com/pay/api/android/guides/tutorial#tokenization - Step 2). After contacting Stripe, they told me they don't provide such id.

I am curious, are here anyone done integration GPay in production with Stripe? And how did you make it work? As currently, I'm completely lost.

deimantasa avatar Mar 17 '20 02:03 deimantasa

@zeromaro Im having the same issue as you. How did you resolve this or is this still an issue ? Also contacted Stripe today and they will look into this. Instructions are very unclear on how to use GPay in production.

Im using Stripe Connect so the payments go directly from the customer to the connected account and therefor the instructions from google to setup my own gpay business account if I never receive payments on my platform are very confusing.

Im lost too. No proper way to use GPay with Stripe and Flutter in production ?

emme1009 avatar Jul 12 '20 10:07 emme1009

Hi Emanuel, unfortunately I was not able to solve it therefore had to scrape this implementation..

On Sun, Jul 12, 2020 at 5:01 PM Emanuel Pörnbacher [email protected] wrote:

@zeromaro https://github.com/zeromaro Im having the same issue as you. How did you resolve this or is this still an issue ? Also contacted Stripe today and they will look into this. Instructions are very unclear on how to use GPay in production.

Im using Stripe Connect so the payments go directly from the customer to the connected account and therefor the instructions from google to setup my own gpay business account if I never receive payments on my platform are very confusing.

Im lost too. No proper way to use GPay with Stripe and Flutter in production ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jonasbark/flutter_stripe_payment/issues/127#issuecomment-657200622, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBGD77S6F7TPDI62I4TV2LR3GCYRANCNFSM4LM4SHOQ .

deimantasa avatar Jul 12 '20 12:07 deimantasa

Thats unfortunate. I'll let you know if Im able to sort out a solution.

emme1009 avatar Jul 12 '20 16:07 emme1009

Any progress ?

DryDoge avatar Oct 30 '20 17:10 DryDoge

Still nothing ? That's a big issue

Octet83 avatar Nov 16 '20 10:11 Octet83

nope still nothing...seems impossible for connected accounts..

emme1009 avatar Nov 16 '20 13:11 emme1009

any progress here?

Prayer-RecycleSmart avatar Jan 17 '21 23:01 Prayer-RecycleSmart

I had the issue and solved it , here's my post https://stackoverflow.com/questions/66899675/flutter-stripe-payment-native-pay-not-chargedapple-pay-and-google-pay/66945461#66945461

haifzhan avatar Apr 04 '21 20:04 haifzhan

@haifzhan correct me if I'm wrong, but it looks like all you did was use stripe_payment plugin instead of this plugin?

epiphanatic avatar Apr 14 '21 00:04 epiphanatic

@haifzhan correct me if I'm wrong, but it looks like all you did was use stripe_payment plugin instead of this plugin?

Did I miss anything, Isn't this plugin stripe_payment? I used stripe_payment to get the token and implemented charge functionality by calling stripe charge API on server side.

haifzhan avatar Apr 14 '21 00:04 haifzhan

that's my bad. yes. i was confused by the url.

epiphanatic avatar Apr 14 '21 00:04 epiphanatic