diff --git a/processcheckout.php b/processcheckout.php new file mode 100644 index 0000000..b6cb621 --- /dev/null +++ b/processcheckout.php @@ -0,0 +1,79 @@ + + + +'.$PAYBILL_NO.' +ZTcxY2M3M2U1ZDM1ZGEyZTRiN2UyNGUyNDk0NGQwOTVkMzgzOTNmN2UzOTEzN2RlNDE1N2M0ZjViNDIzMWU0Yw== +'.$TIMESTAMP.' + + + + + +'.generateRandomString().' + +? + + +'; /// Your SOAP XML needs to be in this variable +try { + +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL, $ENDPOINT); +curl_setopt($ch, CURLOPT_HEADER, 0); + + +curl_setopt($ch, CURLOPT_VERBOSE, '0'); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, $body); + +curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0'); +curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, '0'); + +$output = curl_exec($ch); +curl_close($ch); + + + +// Check if any error occured +if(curl_errno($ch)) +{ + echo 'Error no : '.curl_errno($ch).' Curl error: ' . curl_error($ch); +} +print_r($output); + + +} catch (SoapFault $fault) { + echo $fault; +} +function generateRandomString() { + $length = 10; + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + return $randomString; +} + +?>