jonasbark / flutter_stripe_payment

[DISCONTINUED] A flutter plugin with stripe payment plugin integration
MIT License
309 stars 244 forks source link

Stripe -> GPay native in production issue #127

Open deimantasa opened 4 years ago

deimantasa commented 4 years ago

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.

emme1009 commented 4 years ago

@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 ?

deimantasa commented 4 years ago

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 notifications@github.com 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 .

emme1009 commented 4 years ago

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

DryDoge commented 3 years ago

Any progress ?

Octet83 commented 3 years ago

Still nothing ? That's a big issue

emme1009 commented 3 years ago

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

Prayer-RecycleSmart commented 3 years ago

any progress here?

haifzhan commented 3 years ago

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

epiphanatic commented 3 years ago

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

haifzhan commented 3 years ago

@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.

epiphanatic commented 3 years ago

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