google-pay / google-pay/flutter-plugin

GooglePayButton disappears after loading is finished on the physical phone

Open
#267 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
176
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Hello,

GooglePayButton disappears after loading is finished on the physical phone only

Here my code :

        GooglePayButton(
                  paymentConfiguration: PaymentConfiguration.fromJsonString(
                      payment_configurations.defaultGooglePay),
                  paymentItems: paymentItems,
                  type: GooglePayButtonType.buy,
                  // width: 8.sw,
                   // height: 50,
                  margin: const EdgeInsets.only(top: 15.0),
                  onPaymentResult: (result)=> onSubscribe(context,result),
                  loadingIndicator: const Center(
                    child: CircularProgressUi(),
                  ),
                ),

Here my payment_configurations.defaultGooglePay :

const String defaultGooglePay = '''{
  "provider": "google_pay",
  "data": {
    "environment":  "PRODUCTION", 
    "apiVersion": 2, 
    "apiVersionMinor": 0,
    "allowedPaymentMethods": [
      {
        "type": "CARD",
        "tokenizationSpecification": {
          "type": "PAYMENT_GATEWAY",
          "parameters": {
            "gateway": "example",
            "gatewayMerchantId": "gatewayMerchantId"
          }
        },
        "parameters": {
          "allowedCardNetworks": ["VISA", "MASTERCARD"],
          "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
          "billingAddressRequired": true,
          "billingAddressParameters": {
            "format": "FULL",
            "phoneNumberRequired": true
          }
        }
      }
    ],
    "merchantInfo": {
      "merchantId": "xxxxxxxxxxxxxxx",
      "merchantName": "Subscription"
    },
    "transactionInfo": {
      "countryCode": "US",
      "currencyCode": "USD"
    }
  }
}''';

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the GooglePayButton usage and its PaymentConfiguration.fromJsonString call, then reproduce the loading transition on a physical phone using the provided configuration. Done means the GooglePayButton remains visible after loading finishes, with the behavior compared against the supplied code and settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.