fix: trigger onError callback when loading google pay js failed
Background: https://pay.google.com/gp/p/js/pay.js will be failed to load in china if the user don't have the agent software. It's better to call the onError callback when loading js errored.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
For more information, open the CLA check for this pull request.
Hi @shirly-chen-awx, thank you for your PR. I added two comments for your review.
Hi @JlUgia , thanks for your review, the pr updated.
Thank you for the update @shirly-chen-awx. Two final comments and we'll be good to go.
@JlUgia updated :raised_hands:
@JlUgia the build failed, can you help check with that?
Hi, @socsieng can you help check with failed build? It seems it was broken several months ago.
Hi, @socsieng can you help check with failed build? It seems it was broken several months ago.
Looks like it's failing here: https://github.com/google-pay/google-pay-button/runs/6650864917?check_suite_focus=true#step:7:22
Checking formatting... [warn] examples/react/src/serviceWorker.ts [warn] Code style issues found in the above file(s). Forgot to run Prettier?
Working locally for me, but might be worth running npm run pretty to reformat all files.
Created https://github.com/google-pay/google-pay-button/pull/143 to fix the prettier issue.
#143 now merged. triggering a "rebase and merge" on this PR.