Hi
I want create user with API function in vm 3
I checked how a user was register
in public_html/administrator/component/com_virtuemart/models/user.php there is a function named store(&$data).
public function store(&$data){
$message = '';
==> vRequest::vmCheckToken('Invalid Token, while trying to save user');
if(empty($data)){
vmError('Developer notice, no data to store for user');
return false;
}
This function checks vRequest::vmCheckToken
How can I fill out the vRequest?
You need to call 2 times the server to do something secured
First time using JSession::getFormToken(); to get the form field name and you have to set it to 1
Using CURL you need to send POST datas.
Some explain to get token here : https://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms
You can perhaps set this directly in the server POST datas using Joomla or virtuemart input function.