* 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)
| 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 | /** |