Checkout – Step One
To checkout, please enter your order details, billing information and shipping information on Step One. Proceed to Step Two to securely enter your credit card details and finish checking out.
Your Order
$
saveXML();
curl_setopt($ch, CURLOPT_FAILONERROR, 1); // Fail on errors
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // Allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Return into a variable
curl_setopt($ch, CURLOPT_PORT, 443); // Set the port number
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Times out after 30s
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlString); // Add XML directly in POST
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// This should be unset in production use. With it on, it forces the ssl cert to be valid
// before sending info.
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
if (!($data = curl_exec($ch))) {
print "curl error =>" .curl_error($ch) ."\n";
throw New Exception(" CURL ERROR :" . curl_error($ch));
}
curl_close($ch);
return $data;
}
// Helper function to make building xml dom easier
function appendXmlNode($domDocument, $parentNode, $name, $value) {
$childNode = $domDocument->createElement($name);
$childNodeValue = $domDocument->createTextNode($value);
$childNode->appendChild($childNodeValue);
$parentNode->appendChild($childNode);
}
?>