Zend certified PHP/Magento developer

How to integrate Google Pay library into website?

I’m trying to integrate Google Pay into my Cart page. But, I always get an error, it looks like this:

Uncaught Error: Script error for "https://pay.google.com/gp/p/js/pay.js" https://requirejs.org/docs/errors.html#scripterror
at makeError (require.js:168:17)
at HTMLScriptElement.onScriptError (require.js:1738:36)

The steps i did:

  • define path in requirejs-config.js
    enter image description here
  • inject component in template
    enter image description here
  • component’s content:
    enter image description here

How can I fix it?
Any of your comments will be very helpful to me, thanks!