[Skip to main content](#vessel-content)

#   Credit Card Payment Definition

##

- **[shoppist](/forum/user/31108-shoppist "View shoppist's Profile")**
- [![shoppist's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31108-shoppist "View shoppist's Profile") Topic Author
- [ Offline](/forum/user/31108-shoppist)

Less More

- Posts: 108
- Thank you received: 1
-
-

11 years 6 months ago -  11 years 6 months ago [\#200398](#200398) by [shoppist](/forum/user/31108-shoppist "View shoppist's Profile")  *[Credit Card Payment Definition](/forum/29-payment-methods/876711-credit-card-payment-definition#200398 "-- 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 &quot;Action&quot; 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 &gt;  and if to be more precise:   $val) { $poststring .= $key . &quot;=&quot; . $val . &quot;&amp;&quot;; } // strip off trailing ampersand $poststring = substr($poststring, 0, -1); // init curl connection $CR = curl&#95;init(); curl&#95;setopt($CR, CURLOPT&#95;URL, &quot;https://&quot;.$host.$path); curl&#95;setopt($CR, CURLOPT&#95;POST, 1); curl&#95;setopt($CR, CURLOPT&#95;FAILONERROR, true); curl&#95;setopt($CR, CURLOPT&#95;POSTFIELDS, $poststring); curl&#95;setopt($CR, CURLOPT&#95;RETURNTRANSFER, 1); curl&#95;setopt($CR, CURLOPT&#95;SSL&#95;VERIFYPEER, 0); // actual curl execution perfom $result = curl&#95;exec( $CR ); $error = curl&#95;error( $CR ); // on error - exit with error message if( !empty( $error )) { die($error); } curl&#95;close( $CR ); // re-format the string into array $response =explode('&amp;', $result); foreach($response as $key=&gt;$value) { unset($tmparr); $tmparr=explode(&quot;=&quot;,$value); $answer&#91;$tmparr&#91;0&#93;&#93;=$tmparr&#91;1&#93;; } print &quot;&quot;; print&#95;r($answer); // response array with string keys  Thank you")* was created by *[shoppist](/forum/user/31108-shoppist "View shoppist's Profile")*

*This attachment is hidden for guests.
Please log in or register to see it.*

-- 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](https://secure5.tranzila.com/cgi-bin/tranzila31.cgi)
method=POST &gt;

and if to be more precise:

&lt;?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 =&gt; $val) { $poststring .= $key . "=" . $val . "&amp;"; } // 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('&amp;', $result); foreach($response as $key=&gt;$value) { unset($tmparr); $tmparr=explode("=",$value); $answer[$tmparr[0]]=$tmparr[1]; } print "&lt;pre&gt;"; print_r($answer); // response array with string keys

Thank you

Last edit: 11 years 6 months ago by [shoppist](/forum/user/31108-shoppist "View shoppist's Profile"). Reason: added file

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzY3MTEtY3JlZGl0LWNhcmQtcGF5bWVudC1kZWZpbml0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#200400](#200400) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Credit Card Payment Definition](/forum/29-payment-methods/876711-credit-card-payment-definition#200400 "-- 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 &quot;Action&quot; 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 &gt;  and if to be more precise:   $val) { $poststring .= $key . &quot;=&quot; . $val . &quot;&amp;&quot;; } // strip off trailing ampersand $poststring = substr($poststring, 0, -1); // init curl connection $CR = curl&#95;init(); curl&#95;setopt($CR, CURLOPT&#95;URL, &quot;https://&quot;.$host.$path); curl&#95;setopt($CR, CURLOPT&#95;POST, 1); curl&#95;setopt($CR, CURLOPT&#95;FAILONERROR, true); curl&#95;setopt($CR, CURLOPT&#95;POSTFIELDS, $poststring); curl&#95;setopt($CR, CURLOPT&#95;RETURNTRANSFER, 1); curl&#95;setopt($CR, CURLOPT&#95;SSL&#95;VERIFYPEER, 0); // actual curl execution perfom $result = curl&#95;exec( $CR ); $error = curl&#95;error( $CR ); // on error - exit with error message if( !empty( $error )) { die($error); } curl&#95;close( $CR ); // re-format the string into array $response =explode('&amp;', $result); foreach($response as $key=&gt;$value) { unset($tmparr); $tmparr=explode(&quot;=&quot;,$value); $answer&#91;$tmparr&#91;0&#93;&#93;=$tmparr&#91;1&#93;; } print &quot;&quot;; print&#95;r($answer); // response array with string keys  Thank you")*

Hi,

I recommend you our developer documentation.
[ www.hikashop.com/support/support/documen...on.html#howtopayment](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html#howtopayment)

You can download the sample plugin directly from the documentation but you can also see it though github.
[ github.com/HikaShop/sample-payment-plugin](https://github.com/HikaShop/sample-payment-plugin)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NzY3MTEtY3JlZGl0LWNhcmQtcGF5bWVudC1kZWZpbml0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.042 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
