MONEI / MONEI-Salesforce-Commerce-Cloud

Salesforce Commerce Cloud module for MONEI
https://docs.monei.com/docs/e-commerce/salesforce/
MIT License
0 stars 0 forks source link

Checkout controller with client-side code #2

Closed federicogiampietro closed 1 year ago

federicogiampietro commented 1 year ago

Hello,

during integration test, we noticed that the controller extension Checkout.js int_monei_sfra/cartridge/controllers/Checkout.js

contains a client-side javascript that can't be used on backend line #96 setTimeout(function(){

setTimeout returns a 500 error for not being a valid backend code. This is not a way of doing a retry after 3 seconds on server-side javascript.

jimmyn commented 1 year ago

setTimeout is a valid backend code, the issue seems to be in getMoneiNewTransaction function, could you please provide more debug logs/info

federicogiampietro commented 1 year ago

i'm sorry but setTimeout is not a valid backend method of any DW class and not defined as a function anywhere, it throws a 500 error. It also is not documented anywhere in the CC documentation.

getMoneiNewTransaction is used on three different locations and works fine, but the 500 error is always returned when the status is not FAILED, PaymentCanceled or AUTHORIZED.

9i10MY1xf -piei0SLZGR5AAAK-0-00 4436373350473129984 - Exception occurred during request processing: ScriptingException ReferenceError: "setTimeout" is not defined. (int_monei_sfra/cartridge/controllers/Checkout.js#96)
System

RequestID: -piei0SLZGR5AAAK-0-00
SessionType: STOREFRONT
Truncated SessionID: J9i10MY1xf
Customer UUID (guest): abZHgPP0eMuCLd95eVdjbBLeyK
ServerName: 10.0.29.202
ServerPort: 10299