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.

UX issue during INITIALIZE callbackTrigger

See original GitHub issue

Describe the bug

Hi everyone, thanks for this React button implementation! I have an UX issue that produce error on during my Google Pay payment process. It is due to the fact that in handler onPaymentDataChanged with callbackTrigger === 'INITIALIZE', there is no loader displayed. For other callbackTrigger params, the loader is displayed. Due to the absence of loader + grey overlay, users can click on button “Pay” even if the Promise returned is not resolved (required because I have to fetch data from my backend: price, shipment options, etc.)

To Reproduce

  1. Use following onPaymentDataChange:
onPaymentDataChanged={({ callbackTrigger }) => {
  console.log('start:', callbackTrigger);
  return new Promise((resolve, reject) =>
    setTimeout(() => {
      resolve({});
      console.log('end:', callbackTrigger);
    }, 2000),
  );
}}
  1. Click on Google Pay button: there is no loader
  2. Trigger a call to this handler (change address for example): there is a loader

Expected behavior A clear and concise description of what you expected to happen. Display loader while callback with callbackTrigger === 'INITIALIZE' Promise is not resolved, to block interaction with Google Pay popup.

Screenshots If applicable, add screenshots to help explain your problem. Non blocking during INITIALIZE vs Blocking during shipment address change Click on "Pay" possible even if Promise has not been resolved

Component information:

  • Component
    • React component (@google-pay/button-react)
    • Custom element (@google-pay/button-element)
    • Angular component (@google-pay/button-angular)
  • Component version (e.g. 1.0.0):

Environment:

  • Device (e.g. iPhone6): Desktop (Asus UX430U)
  • OS (e.g. iOS8.1): Ubuntu 21.04
  • Browser (e.g. stock browser, safari): Firefox, Chromium
  • Country/region: FR

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
socsiengcommented, Sep 20, 2021

Thanks for reporting the issue. Will look into it.

0reactions
socsiengcommented, Oct 18, 2021

Closing due to inactivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial | Google Pay API
Follow the steps in this tutorial to integrate a web application with the Google Pay API, and to configure it to accept payment...
Read more >
Problem Statements in UX Discovery - Nielsen Norman Group
In the discovery phase of a UX project, a problem statement is used to identify and frame the problem to be explored and...
Read more >
Combo box | U.S. Web Design System (USWDS)
A combo box helps users select an item from a large list of options. Current accessibility issues. In late 2022, we found some...
Read more >
UI vs UX | Difference Between UI and UX | What is UX or UI
We go in-depth on what is UX vs what UI is. ... UX is focused on the user's journey to solve a problem,...
Read more >
UX issue during INITIALIZE callbackTrigger - Giters
I have an UX issue that produce error on during my Google Pay payment process. It is due to the fact that in...
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