MCPcopy
hub / github.com/ampproject/amphtml / getIframeUrl_

Method getIframeUrl_

third_party/subscriptions-project/swg.js:15605–15611  ·  view source on GitHub ↗

* Returns the payframe URL based on the environment. * * @param {string} origin The origin that is opening the payframe. * @param {string|null=} merchantId The merchant id. * @return {string} * @private

(origin, merchantId)

Source from the content-addressed store, hash-verified

15603 * @private
15604 */
15605 static getIframeUrl_(origin, merchantId) {
15606 // TrustedResourceUrl header needs to start with https or '//'.
15607 const iframeUrl = `https://pay${environment == Constants.Environment.PREPROD ?
15608 '-preprod.sandbox' :
15609 environment == Constants.Environment.SANDBOX ? '.sandbox' : ''}.google.com/gp/p/ui/payframe?origin=${origin}&mid=%{merchantId}`;
15610 return iframeUrl;
15611 }
15612}
15613
15614/**

Callers 1

loadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected