Revert "[FIX] applepay_fast_checkout: integrity url"

This reverts commit 1cd20d5067.
This commit is contained in:
Abdurrahman Saber 2025-10-14 18:21:58 +03:00
parent b3c1b76451
commit a992993ba0
1 changed files with 3 additions and 3 deletions

View File

@ -12,13 +12,13 @@ class ApplePayFastCheckout(Controller):
acquirer_id = request.env['payment.acquirer'].sudo().search([('provider', '=', 'applepay')], limit=1)
if acquirer_id.state == 'test':
url = "https://eu-test.oppwa.com"
url = "https://eu-test.oppwa.com/v1/paymentWidgets.js"
else:
url = "https://eu-prod.oppwa.com"
url = "https://eu-prod.oppwa.com/v1/paymentWidgets.js"
integrity = requests.get(f'{url}/v1/fastcheckout/integrity').json().get('integrity', '')
response = request.render("applepay_fast_checkout.apple_pay_iframe", {'hyperpay_src': f"{url}/v1/paymentWidgets.js", 'merchant_id': acquirer_id.applepay_entity_id, 'nonce': nonce, 'integrity': integrity})
response = request.render("applepay_fast_checkout.apple_pay_iframe", {'hyperpay_src': url, 'merchant_id': acquirer_id.applepay_entity_id, 'nonce': nonce, 'integrity': integrity})
response.headers['Content-Security-Policy'] = "script-src blob: 'self' 'unsafe-inline' 'unsafe-eval' https://*; worker-src blob: 'self' 'unsafe-inline' 'unsafe-eval' https://*;connect-src 'self' https://* wss://*;frame-src 'self' blob: https://*;"
return response