Worldpay / Worldpay-Magento2-CG

Worldpay Magento 2 Plugin for Worldpay Corporate Gateway
Other
17 stars 36 forks source link

CryptoJS is not defined on step 2 checkout #141

Open ionutpeterfb opened 3 months ago

ionutpeterfb commented 3 months ago

Hi, Recently we cam across the below issue on step 2 on the checkout page. Selection_4047

Steps to reproduce: 1) - login on the website with a valid user 2) - add a product to the basket 3) - go to Billing step on the checkout page 4) - the following JS error will appear : "ReferenceError: CryptoJS is not defined" in the console log

The error appears due to not having the main cryptojs library : https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js Can you please create a patch and add the Crypto-JS library to the following file: /vendor/sapient/module-worldpay/view/frontend/requirejs-config.js:48

Thank you and please let me know if you need any other information. Ionut Peter

twinklekumarsapient commented 3 months ago

Hi, Could you please let us know the following information? It will help us debug the issue: 1) Magento version 2) Worldpay plugin version 3) Have you replicated the issue on a vanilla version of Magento? 4) PHP version

Thank you.

ionutpeterfb commented 3 months ago

Hello, 1) - Adobe Commerce ver. 2.4.6-p5 2) - Worldpay version "2.4.6-p30124" 3) - Testing on Vanilla 2.4.6 version 4) - PHP version: 8.1.28 Thank you.

Ahtisham-Ali149 commented 2 months ago

Hi, I am also getting this issue on our Magento 2 Site. iFrame is disabled from the backend configurations but we are still getting this on frontend

image

We're using

  1. Adobe Commerce version 2.4.6
  2. Worldpay version 2.4.6-rc0523
  3. PHP version is 8.1
ionutpeterfb commented 1 month ago

Hi, Recently we cam across the below issue on step 2 on the checkout page. Selection_4047

Steps to reproduce:

1. * login on the website with a valid user

2. * add a product to the basket

3. * go to Billing step on the checkout page

4. * the following JS error will appear : "ReferenceError: CryptoJS is not defined" in the console log

The error appears due to not having the main cryptojs library : https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js Can you please create a patch and add the Crypto-JS library to the following file: /vendor/sapient/module-worldpay/view/frontend/requirejs-config.js:48

Thank you and please let me know if you need any other information. Ionut Peter

Hello, Any update on this issue? Please advice. Thank you.

twinklekumarsapient commented 1 month ago

Hi, We tested this on a vanilla Magento 2.4.6-p5 installation but were unable to replicate the issue. Could you please provide a screengrab of the issue you're experiencing? This will help us guide you more effectively.

Thank you!