Hi all,
I was wondering if any of you have used Internet Secure's Merchant Direct payment processing system? I am putting together a bid for a company that would like to integrate it into their website. All of the examples on Internet Secure's website use ASP, but I don't see why I couldn't use PHP. If I post XML to their script, it shouldn't make a difference whether PHP or ASP POSTed the variable, correct?
If any of you have used this system before, I would appreciate any input on what goes into it.
Thanks!
Using PHP to integrate Internet Secure's Payment Processing
Moderator: General Moderators
-
thespikeyone
- Forum Newbie
- Posts: 10
- Joined: Wed Jun 25, 2008 5:06 pm
Re: Using PHP to integrate Internet Secure's Payment Processing
Greetings,
Did you ever get any replies to your question?
I am trying to muddle my way through something similar.
I am trying to help someone with their website to integrate with a 3rd party secure payment system, using XML.
I am new to PHP and I am struggling...
I'd like to hear if you were successful, and how...
thanks.
Did you ever get any replies to your question?
I am trying to muddle my way through something similar.
I am trying to help someone with their website to integrate with a 3rd party secure payment system, using XML.
I am new to PHP and I am struggling...
I'd like to hear if you were successful, and how...
thanks.
-
thespikeyone
- Forum Newbie
- Posts: 10
- Joined: Wed Jun 25, 2008 5:06 pm
Re: Using PHP to integrate Internet Secure's Payment Processing
Hi Kimberly,
I did not receive a reply to my question, but I didn't win the bid for the project so I didn't look into the issue any further. The team at Internet Secure sent me an example of how I could implement their services. I have attached it to this reply. I hope it helps you.
I did not receive a reply to my question, but I didn't win the bid for the project so I didn't look into the issue any further. The team at Internet Secure sent me an example of how I could implement their services. I have attached it to this reply. I hope it helps you.
- Attachments
-
- PHP_Working.zip
- Internet Secure Transaction Processing Example
- (25.25 KiB) Downloaded 357 times
Re: Using PHP to integrate Internet Secure's Payment Processing
Thank you very much for the attachment!
I also hope it helps!

I also hope it helps!
-
fulltiltphil
- Forum Newbie
- Posts: 2
- Joined: Tue Sep 03, 2013 10:39 am
Re: Using PHP to integrate Internet Secure's Payment Process
here is a working example of php cURL for the payment Gateway InternetSecure Merchant Direct.
Code: Select all
<?php
// The XML Request
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><TranxRequest>
<xxxTransType>00</xxxTransType>
<GatewayID>90001</GatewayID>
<xxxName>Test Testing</xxxName>
<xxxEmail>tester@internetsecure.com</xxxEmail>
<xxxAddress>7221 Chatman Rd</xxxAddress>
<xxxCity>Knoxville</xxxCity>
<xxxState>TN</xxxState>
<xxxCountry>US</xxxCountry>
<xxxZipCode>37920</xxxZipCode>
<Products>211.00::1::CCD001::Credit Card Deposit Test::</Products>
<xxxCard_Number>4124939999999990</xxxCard_Number>
<xxxCCMonth>12</xxxCCMonth>
<xxxCCYear>2023</xxxCCYear>
<CVV2>354</CVV2>
<CVV2Indicator>1</CVV2Indicator></TranxRequest>";
// ************* Test Card Numbers *************
// MasterCard 5136490000000009
// Visa 4124939999999990
// **************************************************
// $url = "https://secure.internetsecure.com/process.cgi"; // production post URL
$url = "https://test.internetsecure.com/process.cgi"; // sandbox post URL
// PostData XML Transaction URL Encoded
$postData = "xxxRequestMode=X&xxxRequestData=".urlencode($xml);
// Get the curl session object
$session = curl_init();
$header[] = "Content-Length: ".strlen($postData);
$header[] = "Content-Type: application/x-www-form-urlencoded";
// Set the POST options.
curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($session,CURLOPT_URL,$url);
curl_setopt($session, CURLOPT_POST, true);
curl_setopt($session, CURLOPT_POSTFIELDS, $postData);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt($session, CURLOPT_HTTPHEADER, $header);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
// POST the XML then close the session
$response = curl_exec($session);
curl_close($session);
echo "<pre><em><strong>Transaction Request XML:</strong></em><br \>";
echo str_replace('>','>',str_replace('<','<',str_replace('><',">\n<",$xml))).'</pre><br \>';
echo "<pre><em><strong>Transaction Request URL encoded:</strong></em><br \>";
echo str_replace('>','>',str_replace('<','<',str_replace('><',">\n<",$postData))).'</pre><br \>';
echo "<pre><em><strong>Transaction Response:</strong></em><br \>";
echo str_replace('>','>',str_replace('<','<',str_replace('><',">\n<",$response))).'</pre><br \>';
?>
Last edited by fulltiltphil on Tue Sep 03, 2013 2:31 pm, edited 1 time in total.
-
fulltiltphil
- Forum Newbie
- Posts: 2
- Joined: Tue Sep 03, 2013 10:39 am
Re: Using PHP to integrate Internet Secure's Payment Process
The example I posted is using the sandbox environment make sure to use your own Gateway ID and if your using a production Gateway ID change the Post URL. Test Card numbers only work in the Sandbox environment unless you pass the {TEST} flag at the end of the Products String.