Hi, this is my 1st day with WIX and I have this problem:
The wixStores_onNewOrder is not fired. The code is:
import { fetch } from ‘wix-fetch’ ;
export async function wixStores_onNewOrder ( event ) {
const fullUrl = "https://some-domain/api/wix" ;
fetch ( fullUrl , { method : "get" } );
}
The URL “https://some-domain/api/wix” is never called. I added it - as described in the documentation https://www.wix.com/velo/reference/wix-stores-backend/events/onneworder in Backend in event.js - see screenshot.
What am I missing, what am I doing wrong? My intention is to submit the whole order to our server as further steps have to be executed. In the end I want to stringify the event variable, convert it using base64 and submit it to the server.
Is there a way how to test individually an event or do I have to add always some products into the shopping cart and check out?
Thank you!