I created an auto-process for registering a plan purchase.
I am using react webhook with email and plan parameters.
I can’t get values from the request
Я создал автоматический процесс регистрации покупки тарифного плана.
Я использую реагирующий веб-перехватчик с параметрами электронной почты и плана.
Я не могу получить значения из запроса
export function post_InsertUserPlans(request) {
let query = wixLocation.query;
let options = {
"headers": {
"Content-Type": "application/json"
}
};
let toInsert = {
"email": query.email,
"plans": query.plan
};
return wixData.insert("usersPLans", toInsert)
.then( () => {
options.body = {
"items": "ok"
};
return ok(options);
} )
.catch( (error) => {
options.body = {
"error": error
};
return serverError(options);
} );
}