Hi everyone, I am trying to call a backend function from client-side but I got this error :
"["Error loading web module backend/managePayments.jsw: window is not defined"]"
On this backend function, I am calling an NPM module that I previously installed :
import Fluidpay from 'fluidpay-js'
import wixSecretsBackend from 'wix-secrets-backend';
export function createPayment(amount, userEmail, cardInfo) {
const fp = new Fluidpay({
apiKey: wixSecretsBackend.getSecret("fluidPay_API_key"),
environment: 'sandbox'
})
Any idea on what might be the issue ?
Thanks !