Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Innovative Gateway access problem


tototobo

Recommended Posts

I have a similiar problem. My hosting service told me to get gateway server IP and the port the server uses from IGS. But it turns out I dont have a IGS account, I only have a Quickbooks Merchant account and their Quickbooks eCommerce account, not a IGS account. They dont work the same.. oh well.. maybe Authorize.net is a better way to go.

Link to comment
Share on other sites

  • 7 months later...
  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

has anyone found a solution to this?

 

I copied someone's solution and it's posting to my account as declined since i'm using the test cc #. at least now i know i don't have a problem connecting to the gateway anymore.

 

The only 2 issues i have now is:

1. it post the raw data to my checkout_process.php file.

i get something like this:

bphone=1234567890|connection_method=POST|last_used_response_num=5|username=gatew

aytest|month=01|ccidentifier1=123|target_app=WebCharge_v5.06|amount=503.75|approv

al=FDCOsimApproval|fulltotal=503.75|bcountry=Array|response_mode=simple

 

then i also get this warning. I figure it's giving me this warning because I'm requesting an output.

 

Warning: Cannot modify header information - headers already sent by (output started at /home/milen2/public_html/gp/includes/modules/payment/innovative.php:142) in /home/milen2/public_html/gp/includes/functions/general.php on line 33

line 142: $return_string = curl_exec ($ch);

line 33: header('Location: ' . $url);

 

 // post the data
     $cmd = MODULE_PAYMENT_INNOVATIVE_CURL . " -d \"$data\" " . MODULE_PAYMENT_INNOVATIVE_URL;
  exec($cmd, $return_string);

[color="#FF0000"]// here's the code i added.[/color]
if ( empty($return_string) && $this->logfile) { // using exec no curl errors can be retrieved
error_log("Error from cURL using exec() since there is no \$return_string\n", 3, $this->logfile);
}
if ($this->logfile) {
error_log("IGS RESPONSE using exec(): " . $return_string[0] . "\n", 3, $this->logfile);
}
elseif ($this->use_exec == '1') { // if NOT (function_exists('exec') && $this->use_exec == '1'
if ($this->logfile) {
error_log("Sorry, exec() cannot be called\n", 3, $this->logfile);
}
} else{ // default behavior: cURL is assumed to be compiled in PHP
// echo "curl command<br>" . $cmd . "<br>";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, MODULE_PAYMENT_INNOVATIVE_URL);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

if ($this->logfile) {
error_log("IGS REQUEST: " . $return_string . "\n", 3, $this->logfile);
}
[b]$return_string = curl_exec ($ch);   <------------------line 142[/b][color="#FF0000"][/color]if (curl_errno($ch) && $this->logfile) {
$error_from_curl = sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch));
error_log("Error from cURL: " . $error_from_curl . "\n", 3, $this->logfile);
}
if ($this->logfile) {
error_log("RESPONSE: " . $return_string . "\n", 3, $this->logfile);
}
curl_close ($ch);
}
[color="#FF0000"]// end new code[/color]

     // Set up default error condition
     $card_status[0] = "error";
     $card_status[1] = "Error accessing gateway";

 

if i deleted the section then i get the error accessing gateway and it doesn't even post.

if i leave it in the i get the raw data, but it post to my account.

 

Does anyone have any solutions that i can get this to work? I can't seem to get any help from igs.

Link to comment
Share on other sites

  • 4 months later...

I got this working on a Network Solutions hosted OsCommerce site. Here's how I did it:

 

1. Download "OsCommerce v2.2, 2.3 API" from here: Innovative Merchant Solutions Developer Info

 

2. Put the two files in the correct folders on the "catalog" level (not in "admin").

 

3. Go to your Admin > Modules > Payment and click on "Innovative" then "Install"

 

My settings are:

Accept Innovative Payments: True

USERid On Gateway: XxXXX12345 (This was my IMS website "user id", not my "merchant id")

Password: your IMS password

Payment Server: https://transactions.innovativegateway.com/...gateway.aai.Aai

Path to cURL: /usr/bin/curl

 

4. Find out the IP address & Port for your website's secure (SSL) hosting. I had to call Network Solutions for this. They gave me an IP & Port number.

 

5. Log into Innovative's Website using the UserID & Password you used in the module set-up.

 

a. Click on "Security" at the top

b. Click on "Edit Registered IPs"

c. Click on "Add an IP"

d. Add your IP like: 123.123.123.12

e. I added another IP with the port number at the end like so: 123.123.123.12:21

(so I added 2 in total)

 

When I logged out & checked the site, it worked! I didn't mess with any of the code that was provided in the API package.

 

Things to note:

 

I had to change this "http://transactions.innovativegateway.com/servlet/com.gateway.aai.Aai" to this "https://transactions.innovativegateway.com/servlet/com.gateway.aai.Aai"

 

I had to edit the path to cURL (removing "local").

 

I had to contact Network Solutions to get the correct IP address & port number of my SSL server.

 

I have no idea if "registering" both IPs (with port & without) are necessary.

 

Thanks and I hope that helps someone.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...