Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google pay button not visble without any error #270

Open
osama300 opened this issue Aug 1, 2024 · 3 comments
Open

google pay button not visble without any error #270

osama300 opened this issue Aug 1, 2024 · 3 comments

Comments

@osama300
Copy link

osama300 commented Aug 1, 2024

i use string json config
here print error but not print any thing

onError: (e){
print('this error $e');
},

@augustineonu
Copy link

I have same issue.
i don't get an error from the method or plugin, what I get is the childOnError widget which is from the package.
ALso, I want to know if it possible to integrate for Countries like Nigeria. I successfully see the button on ios simulator, but not on ios real device.
Below is a code that doesn't display for android.

FutureBuilder(
future: _googlePayConfigFuture,
builder: (context, snapshot) {
return snapshot.hasData
? GooglePayButton(

                      paymentConfiguration: snapshot.data!,
                      paymentItems: _paymentItems,
                      type: GooglePayButtonType.buy,
                      margin: const EdgeInsets.only(top: 15.0),
                      onPaymentResult: (result) {
                        print("result:: ${result}");
                      },
                      width: phoneWidth,
                      childOnError: const Text("Google Pay not supported"),
                      loadingIndicator: const Center(
                        child: CircularProgressIndicator(),
                      ),
                    )
                  : snapshot.hasError
                      ? textWidget(context,
                          title: "Erro: ${snapshot.error.toString()}")
                      : textWidget(context, title: "unknown error");
            }),

@TetrixGauss
Copy link

Make sure you have a card in your google wallet! This has happened to me and when i added a card in the google wallet the button appeared. The same issues can be fixed with the same way in the ios platform.

@JlUgia
Copy link
Member

JlUgia commented Oct 6, 2024

Hello, the error object contains information about the issue. What do you see there?

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

No branches or pull requests

4 participants