I have website that has page for donation. Merchants registered on the Gateway are to send transaction requests to GTPay via HTTP Post to URL https://ibank.gtbank.com/GTPay/Tranx.aspx
When I submit my request I see this page of the above URL displayed inside my donation page instead of taking me to the URL Below is my code:
$url = 'https://ibank.gtbank.com/GTPay/Tranx.aspx';
$fields = array(
'gtpay_mert_id' => urlencode($gtpay_mert_id),
'gtpay_tranx_id' => urlencode($gtpay_tranx_id),
'gtpay_tranx_amt' => urlencode($gtpay_tranx_amt),
'gtpay_tranx_curr' => urlencode($gtpay_tranx_curr),
'gtpay_cust_id' => urlencode($gtpay_cust_id),
'gtpay_tranx_noti_url' => urlencode($gtpay_tranx_noti_url),
'gtpay_hash' => urlencode($gtpay_hash)
);
//url-ify the data for the POST
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
$form_files=array();
$form_options=array( 'cookies' => array( 'auth' => $auth ) );
http_post_fields($url, $fields, $form_files, $form_options);
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);