-- HikaShop version -- : Business
-- Joomla version -- : 3.4
Hi,
I would like to process credit cart payments on my site.
I have already contracted a payment gateway server (tranzila) to process the payments.
They have not developed a specific plugin for Hikashop and I suppose I need to do it myself.
I have defined in Hikashop the standard credit card plugin.
The Tranzila ask me to change the "Action" tag so the details will go into their servers.
How can it be done?
for example: The Action should send the form here:
secure5.tranzila.com/cgi-bin/tranzila31.cgi
method=POST >
and if to be more precise:
<?php $host = 'secure5.tranzila.com'; // gateway host $path = '/cgi-bin/tranzila31.cgi'; // gateway uri $formdata='terminalname'; // supplier $formdata='45.70'; // total amount to process $formdata='4444333322221111'; // credit card $formdata='08'; // expiration month $formdata='09'; // expiration year $formdata=' יוסי סלטים '; $formdata='ישראל '; $formdata='ישראלי '; $poststring = ''; // formatting the request string foreach($formdata AS $key => $val) { $poststring .= $key . "=" . $val . "&"; } // strip off trailing ampersand $poststring = substr($poststring, 0, -1); // init curl connection $CR = curl_init(); curl_setopt($CR, CURLOPT_URL, "https://".$host.$path); curl_setopt($CR, CURLOPT_POST, 1); curl_setopt($CR, CURLOPT_FAILONERROR, true); curl_setopt($CR, CURLOPT_POSTFIELDS, $poststring); curl_setopt($CR, CURLOPT_RETURNTRANSFER, 1); curl_setopt($CR, CURLOPT_SSL_VERIFYPEER, 0); // actual curl execution perfom $result = curl_exec( $CR ); $error = curl_error( $CR ); // on error - exit with error message if( !empty( $error )) { die($error); } curl_close( $CR ); // re-format the string into array $response =explode('&', $result); foreach($response as $key=>$value) { unset($tmparr); $tmparr=explode("=",$value); $answer[$tmparr[0]]=$tmparr[1]; } print "<pre>"; print_r($answer); // response array with string keys
Thank you