<?php
$fields = 'name='.$_POST['first_name'].' '.$_POST['last_name'];
$fields .= '&email='.$_POST['payer_email'];
$fields .= '&prodIDMulti=1,5,7,9';
$fields .= '&licAmountMulti=2,0,1,3';
$fields .= '&apiKey=AO2CN4UJGW3PR08YIVKB';
$fields .= '¬es=These are some notes..blah blah';
$fields .= '&timeline=New sales created from website XX';
$fields .= '&ip='.$_SERVER['REMOTE_ADDR'];
$fields .= '&orderno=ABC123';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://www.example.com/guardian/index.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$fields);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_exec($ch);
curl_close($ch);
?>
Here, the user has purchased 4 products as follows:
2 licenses for product 1
Unlimited licenses for product 5
1 license for product 7
3 licenses for product 9
Both multi params should have a matching set. For example, if you have 4 comma delimited values for "prodIDMulti", there MUST be 4 for "licAmountMulti".