Hello,
I need to make a script sending to an API the content of an order when it become "paid".
For some products, i made custom fields and i need to put the choice made by customer in an "array" :
// Game server information
"game_id" => $infoFromYourAPI["game_id"],
"max_players" => $infoFromYourAPI['Players'],
"pub_priv" => $infoFromYourAPI["pubpriv"],
"login_path" => $infoFromYourAPI["no"],
"sv_location" => $infoFromYourAPI["Location"],
How to do that, please ?
Hello,
If you are familiar with PHP programming and joomla plugins developemt you could use vmpayment plugin and build or change your payment plugin when a payment and plgVmOnPaymentResponseReceived is fired to post the above data to your game server and of course do some validation.
You can take a look over here: http://dev.virtuemart.net/projects/virtuemart/wiki/Payment_Plugins
Except that and easier you could make a piece of code when the checkout was successful inside your cart to post those data to your server.
I m sure that the API have instructions how should post your data.
Hope helps you out.
No, i'm not a PHP developper... I just add a code to the file [website_root]/administrator/components/com_virtuemart/models/orders.php.
I just want to permit to virtuemart sending data to my GameCP API...
I began a "howto" here :
http://forums.gamecp.com/viewtopic.php?f=66&t=6197
But i'm not able to get datas from custom fields i made :(
Never change the models!
All triggers are there. Important is that you select "Cart attribute" to yes!