Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Linkpoint API Problems


tom@westchatham.com

Recommended Posts

Thank you very much for the quick response.

 

I modified the code as you instructed, but still no good.

 

This issue is strange, It was working after I migrated everything to a new server. I then installed a new SSL on the server and it stiopped working. I had them switched back to the original SSL and still no good.

 

I searched the forum and someone had similar problem as I am having now. They claimed that after uncommented out the two lines solved the problem. I did that too but still no good.

 

Someone also suggested downloade the new pem file. I followed that as well, still no good.

 

After you applied the new code (presumably with ascii characters), did you go through any of the steps I outlined point by point?

 

Did you check that the port is open and working? Did you download the test code that works outside of osc for validation? Did you check that you properly have curl installed? Did you turn testing/debug mode off?

Link to comment
Share on other sites

  • Replies 132
  • Created
  • Last Reply

Top Posters In This Topic

After spending more time on the problem and finally figured out it was caused by my isp's DNS.

 

My FTP was pointing to the old server and my browser was pointing to the new server. I kept changing the code and ftp it to the old server while testing on the new server. I ftped the new code to the new server and everything worked fine now.

 

To be clear, I un-commented the 2 lines mentioned before and everything worked.

 

Thank you iofast for your quick reply. I really appreciate it.

Link to comment
Share on other sites

My hosting has port 1129 blocked, however I contacted them and they will open it up for me but they need to know if its ingoing and/or outgoing and whether its TCP or UDP.

 

Does anyone know which protocols I would need opened and in what directions?

 

 

Thank you, I appreciate the help.

Link to comment
Share on other sites

My hosting has port 1129 blocked, however I contacted them and they will open it up for me but they need to know if its ingoing and/or outgoing and whether its TCP or UDP.

 

Does anyone know which protocols I would need opened and in what directions?

 

 

Thank you, I appreciate the help.

 

TCP and ask them for both outgoing / incoming.

Link to comment
Share on other sites

For some reason, I have never been able to get the error codes to show up in anything but the URL bar. I have started to have a larger number of frustrated customers because for some reason they sometimes fail to use the billing address that is linked to their credit card, and then they miss the URL error code. Is their supposed to be a pop-up box that I am somehow missing or where is the error supposed to be generated?

 

Any help would be greatly appreciated.

 

Evan

Link to comment
Share on other sites

For some reason, I have never been able to get the error codes to show up in anything but the URL bar. I have started to have a larger number of frustrated customers because for some reason they sometimes fail to use the billing address that is linked to their credit card, and then they miss the URL error code. Is their supposed to be a pop-up box that I am somehow missing or where is the error supposed to be generated?

 

Any help would be greatly appreciated.

 

Evan

 

Evan,

 

The code creates a red bar just below the breadcrumbs with a verbose description of the problem. We specifically increased the verbosity of the output so you can even see if the address information was just checked (ok for an X code for example) or verified (a Y code). I was going to drop a screenshot here but apparently my workstation needs a reboot. I may put up a screenshot at a later time. The linkpoint information is changing shortly as linkpoint / yourpay become firstdata so we may have a re-release shortly.

Link to comment
Share on other sites

Now that Linkpoint wprks fine for me. I would like to know what lines of code that I need to change so I don't store CC info in my database. I would like to be certified as PCI compliance. It is just a lot easier not to save the CC info.

 

Thank you for all the great support here.

Link to comment
Share on other sites

Now that Linkpoint wprks fine for me. I would like to know what lines of code that I need to change so I don't store CC info in my database. I would like to be certified as PCI compliance. It is just a lot easier not to save the CC info.

 

Thank you for all the great support here.

Someone asked the same question a few posts above yours... our response was:

 

We plan to remove the middle 8 digits of all cards stored in the future but have not gotten to it. If you would like us to do this specifically we can but unfortunately we would need to charge for the time to do it as we are scheduled up for months on projects at the moment and our programming staff is already working at full capacity.

I paste this as I'm on my 15th hour for the day which is becoming increasingly normal so I hope you understand our time constraints. If you want to get this done within, say the next month, take a look at our website services page (posted above) and we can get it done within a few days. Otherwise I don't expect to revisit this code for several months though we will likely be working on any new issues or compatibility problems brought on by firstdata taking over some of yourpay/linkpoint directly.

Link to comment
Share on other sites

Someone asked the same question a few posts above yours... our response was:

 

 

I paste this as I'm on my 15th hour for the day which is becoming increasingly normal so I hope you understand our time constraints. If you want to get this done within, say the next month, take a look at our website services page (posted above) and we can get it done within a few days. Otherwise I don't expect to revisit this code for several months though we will likely be working on any new issues or compatibility problems brought on by firstdata taking over some of yourpay/linkpoint directly.

 

I found the quick way to do it. I modified the code in checkout_processing.php. I put in blanks for all credit card related fields.

Link to comment
Share on other sites

I found the quick way to do it. I modified the code in checkout_processing.php. I put in blanks for all credit card related fields.

 

That is good news, glad to hear you got it working. It would probably help others here on the forum if you could post the exact code changes you made and the result that your changes had (ie, did you X out all 16 digits or just the middle 8 or first 12?).

Link to comment
Share on other sites

  • 2 weeks later...
While running the test of the Linkpoint API using the test credit card number I get the below error:

 

Warning: before_process(/mnt/w0305/d40/s30/b01cdb19/www/blisschicwireless.com/blisschic/catalogincludes/modules/payment/linkpoint_api/lphp.php) [function.before-process]: failed to open stream: No such file or directory in /mnt/w0305/d40/s30/b01cdb19/www/blisschicwireless.com/blisschic/catalog/includes/modules/payment/linkpoint_api.php on line 219

Fatal error: before_process() [function.require]: Failed opening required

'/mnt/w0305/d40/s30/b01cdb19/www/blisschicwireless.com/blisschic/catalogincludes/modules/payment/linkpoint_api/lphp.php' (include_path='.:/usr/local/nf/lib/php') in /mnt/w0305/d40/s30/b01cdb19/www/blisschicwireless.com/blisschic/catalog/includes/modules/payment/linkpoint_api.php on line 219

 

Could someone please help me figure out what's wrong. Thanks

 

Does anyone know what the solution to his problem is, i have the same issue. I can see what the problem is, but i havent found where that setting is yet. Ive looked in both config files where you would think there is a problem, but i dont see it. Something somewhere is missing a trailing /

 

/blisschic/catalogincludes/modules

 

Thanks for any help

Link to comment
Share on other sites

  • 3 weeks later...

Ok... (me pulling paper sack over my head in embarassment)...

 

I am trying to install the LinkPoint API - but I'm unable to locate any instructions regarding where to place the three files that are included in the contribution - admin or catalog?

 

Is the latest contribution supposed to include instructions for installation?

 

In the support thread I'm seeing references to other files that are not included in the contribution?

 

Is there another thread somewhere that covers installation of the LinkPoint API and then the installation of this contribution...

 

Regards,

 

Gaver P

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Ok... (me pulling paper sack over my head in embarassment)...

 

I am trying to install the LinkPoint API - but I'm unable to locate any instructions regarding where to place the three files that are included in the contribution - admin or catalog?

 

Is the latest contribution supposed to include instructions for installation?

 

In the support thread I'm seeing references to other files that are not included in the contribution?

 

Is there another thread somewhere that covers installation of the LinkPoint API and then the installation of this contribution...

 

Regards,

 

Gaver P

 

Ok.. new day - bag coming off .... I found the installation instructions - my fault - there all along.

Guess I was suffering from guy blindness - you know, it's where you stare inside the refrigerator then ask the wife "Where's the ketchup" and she reaches inside and pulls it off the first shelf infront of your nose...

 

Sorry - please disregard previous post.

 

Crow + Ketchup = not bad, but still crow.

 

GP

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Hello & thanks for this great contribution.

 

I don't know if i'm the only one experiencing this issue but i have customers complaining that if they accidentally type in the wrong card information it (of course) gives them an error message BUT when they try to correct the info it reverts back to the incorrect data and they can never change their cc #'s.

 

I've tested this and confirmed it and realized that the user can close that window and log back in through a new window and it no longer saves their card information. But i'm wondering if anyone can help me so either the code will not store the CC info upon getting the error or if they change it uses the new cc info and not the old.

 

I Hope this made sense.

 

Thanks so much.

Link to comment
Share on other sites

Great Contribution!

 

I thought I would post some of what I had to do to get the process to work with my host (hostek.com) / application - maybe it will help others...

 

First off...

LinkPoint has a new set of files available that will help you test the installation - you should use the one titled

"SALE_MININFO.php" (code below) - it has all the code rolled into one page to test the connection process. No form submission required.

You will need to upload three files to test the connection to the staging.linkpt.net server.

1) SALE_MININFO.php

2) lphp.php

3) your .pem file

 

 

You will need to modify a few of the settings in two of the files to get it to work correctly.

 

In file SALE_MININFO.php starting around line 19:

$myorder["host"] = "staging.linkpt.net"; // make sure it reads staging.linkpt.net and not secure.linkpt.net

$myorder["port"] = "1129";

$myorder["keyfile"] = realpath("YOURPEMNUMBERHERE.pem"); # Make sure PEM is in the same folder

$myorder["configfile"] = "YOURSTORENUMBERHERE"; # Change this to your store number

 

On line 28... change "05" to "10" and "9.99" to "9.00"

$myorder["cardexpyear"] = "10";

$myorder["chargetotal"] = "9.00";

 

The "05" will cause a server response indicating the card has expired. (duh)

The "9.99" will cause the server to respond that the charge is a duplicate.

 

Then at line 33 uncomment out this line:

$myorder["debugging"] = "true"; # for development only - not intended for production use

 

So you can see the results of the transaction attempt.

 

There's also an additional debug / response routine at the bottom of the page - but it gave me an error when I tried to uncomment and use it... maybe someone else with more experience can figure out how to use it...

 

In File lphp.php you will need to uncomment two lines...

Lines 290 and 291:

# curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);

# curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

 

Delete the octotrophes (pound signs) at the start of the lines.

 

Lastly - upload all three files to a directory on your server - I moved them to my root directory to avoid any issues with permissions...

 

Then call the SALE_MININFO.php page. e.g. http://www.yourdomain.com/SALE_MININFO.php

 

If you get any server response message - it means your application managed to communicate through the 1129 port to their server via XML; your pem file is located in a spot where it could be found and was able to use it and their server was able to respond back to you through the same port.

 

If all you get is the word "ERROR >" somethings wrong and you will need to call linkpoint for technical support. Thier staff will spend an hour with you on the phone trying to resolve the problem - then if they are not able to resolve it - they will upgrade your issue for an engineer to review.

 

My problem was the two octotrophes - once removed - the script worked as expected.

 

We discovered the problem with lphp.php by changing the linkpt.net server to secure.linkpt.net and running the test - I expected it to fail - but what I got was a response indicating that their server was able to talk to mine. For some reason - removal of the comments infront of the cURL SetOpt functions (noted above) enabled my server to talk to their "STAGING" server. I don't know if those lines will need to be commented out again when I move to the live site.

 

After getting a successful quick test - you will need to modify the same lphp.php file that you previously uploaded as a part of this contribution to reflect the changes you made to the test version in this example.

 

Thanks again for a great contribution...

 

Gaver P

 

 

SALE_MININFO.php

<?php 

/**********************************************************************\

SALE_MININFO.php -  Minimum Required Fields for a Credit Card SALE


Copyright 2003 LinkPoint International, Inc. All Rights Reserved.

This software is the proprietary information of LinkPoint International, Inc.  
Use is subject to license terms.

\***********************************************************************/


include"lphp.php";
$mylphp=new lphp;

$myorder["host"]	   = "staging.linkpt.net";
$myorder["port"]	   = "1129";
$myorder["keyfile"]	= realpath("YOURNUMBERHERE.pem");  # Make sure PEM is in the same folder
$myorder["configfile"] = "YOURNUMBERHERETOO";		# Change this to your store number 

$myorder["ordertype"]	= "SALE";
$myorder["result"]	   = "LIVE"; # For a test, set result to GOOD, DECLINE, or DUPLICATE
$myorder["cardnumber"]   = "4111-1111-1111-1111";
$myorder["cardexpmonth"] = "01";
$myorder["cardexpyear"]  = "10";
$myorder["chargetotal"]  = "9.00";

$myorder["addrnum"]   = "123";   # Required for AVS. If not provided, transactions will downgrade.
$myorder["zip"]	   = "12345"; # Required for AVS. If not provided, transactions will downgrade.
$myorder["debugging"] = "true";  # for development only - not intended for production use


 # Send transaction. Use one of two possible methods  #
//	$result = $mylphp->process($myorder);		# use shared library model
$result = $mylphp->curl_process($myorder);  # use curl methods


if ($result["r_approved"] != "APPROVED")	// transaction failed, print the reason
{	
	print "Status: $result[r_approved]\n";
	print "Error: $result[r_error]\n";
}
else
{	// success
	print "Status: $result[r_approved]\n";
	print "Code: $result[r_code]\n";
	print "OID: $result[r_ordernum]\n\n";
}

/*
// Look at returned hash & use the elements you need //
while (list($key, $value) = each($result))
{
	echo "$key = $value\n";

#if you're in web space, look at response like this:
	 echo htmlspecialchars($key) . " = " . htmlspecialchars($value) . "<BR>\n";
}
*/
?>

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Well...

 

I guess I spoke too soon.

 

The installation worked fine for three tests.

 

Now none of the customer order emails are being generated.

 

Not sure why it would work for the first two or three tests and then die on subsequent attempts...

 

Is it possible that the customer order emails are disabled until the store migrates to the secure.linkpt.net server? I'm getting mail from the application about inbound and outboud as well as mail from Gateway with the details - all the sales transactions are declined though and only the preauths are approved - but based on the readme files I believe that's by design, right?

 

Should the order emails be working or not when using the staging server?

 

Regards,

 

GP

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Well...

 

It's non-cents :rolleyes:

 

I was able to get another successful submission to the staging.linkpt.net server using credit card number 4111-1111-1111-1111

 

... here's what worked for me, your mileage may vary

 

The staging server does not like cents... you have to create a product that is in dollars without any cents eg. $9.00

Your shipping amount can not include any cents either... eg. 4.99 will fail but 5.00 will pass.

Ultimately - make certain that the final price at check out does not include any cents (tax) etc.

You have to create a customer account that has a zip code of 12345

And you have to use 123 as the auth code during the credit card checkout process.

 

Using the constants above - I was able to get the LinkPoint API contribution to do a successful preauth and sale transaction and the contribution generated all the expected email notices - inbound/outbound preauth and sale as well as the customer and "additional" sale email messages.

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Previous Post in error... please disregard.

 

GP

 

John,

 

You may have gotten the linkpoint_api.php files crossed up during the upload to the server.

 

Verify the one located in includes/languages/english/modules/payment measures about 1898 bytes, and that the one located in the /includes/modules/payment directory measures about 37,809 bytes. It's really easy to cross them up during upload.

 

You might also want to re-upload the .pem file again - my FTP application defaulted to binary and it needs to be uploaded in ASCII format (according to this thread).

 

The last option is to verify you have set all the admin variables according to instructions - it blows up there also.

 

Lastly - you can run the SALE_MININFO.php script listed above and get a quick answer on if you server is configured to communicate with the staging.linkpt.net server or not. If you can get a response from their server then your ports are open for bidirectional communication, and then proceed to figure out what's amiss in osCommerce.

 

Hope that helps...

 

GP

Edited by gaverp

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Does anyone know what the solution to his problem is, i have the same issue. I can see what the problem is, but i havent found where that setting is yet. Ive looked in both config files where you would think there is a problem, but i dont see it. Something somewhere is missing a trailing /

 

/blisschic/catalogincludes/modules

 

Thanks for any help

 

A Path error is the most likely cause, I recommend going back to our troubleshooting faq on the prior posts of this thread.

Link to comment
Share on other sites

Hello & thanks for this great contribution.

 

I don't know if i'm the only one experiencing this issue but i have customers complaining that if they accidentally type in the wrong card information it (of course) gives them an error message BUT when they try to correct the info it reverts back to the incorrect data and they can never change their cc #'s.

 

I've tested this and confirmed it and realized that the user can close that window and log back in through a new window and it no longer saves their card information. But i'm wondering if anyone can help me so either the code will not store the CC info upon getting the error or if they change it uses the new cc info and not the old.

 

I Hope this made sense.

 

Thanks so much.

 

This is a situation we tested extensively. In our testing, we OFTEN would use a bad card number, bad expiry date or bad cvv to validate specific failure modes and to increase the verbosity of the error messages. It should also be noted that there are two independant failure checks when using a credit card. osc has a count check with uses a numerical test to see if the card is a viable number and that the expiry date is not in the past. After that, the linkpoint module does a check against the card details to validate the rest of the card information as compared to what is held on file for that cardholder.

 

To be constructive you should check to see what specifically they are entering improperly, what browser they are using (is it ie with auto-fill on or firefox with auto-fill on) and validate that they are typing in the full unique number each time.

Link to comment
Share on other sites

Is the javascript validation routine in the linkpoint_api.php fle supposed to validate the CVV 3 digit code or was it intentionaly disabled?

 

In looking at the code vs the 3 digit field it appears there may be an omission in the javascript function below...

 

$js = '  if (payment_value == "' . $this->code . '") {' . "\n" .
//			'	var cc_owner = document.checkout_payment.linkpoint_api_cc_owner.value;' . "\n" .
		'	var cc_number = document.checkout_payment.linkpoint_api_cc_number.value;' . "\n" .
//			'	if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" .
//			'	  error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CC_OWNER . '";' . "\n" .
//			'	  error = 1;' . "\n" .
//			'	}' . "\n" .
		'	if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" .
		'	  error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CC_NUMBER . '";' . "\n" .
		'	  error = 1;' . "\n" .
  // there's also a missing right brace at this location in the original script.
		'	 }' . "\n" .
		'	if (cc_number == "" || cc_number.length < 3) {' . "\n" .
		'	  error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER . '";' . "\n" .
		'	  error = 1;' . "\n" .											 
		'	}' . "\n" .
		'  }' . "\n";

return $js;
 }

 

We could test the value of the CVV variable with something like this?

 

 var cc_cvmnumber = document.checkout_payment.linkpoint_api_cc_cvm.value;

 

if so.. then the bottom "if" statement would need to be modifed to read like this:

if (cc_cvmnumber== "" || cc_cvmnumber.length < 3) {' . "\n" .
		'	  error_message = error_message + "' . MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER . '";' . "\n" .
		'	  error = 1;' . "\n" .

 

If modified.. then the linkpoint_api.php file located in the includes>languages>english>modules>payment directory will require the addition of a line something like this also...

 

define('MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER', 'Missing the 3 digit Card Verification Value!');

 

Or was this intentionaly disabled for some reason?

 

There's also a missing right brace in the javascript - I added it to the script shown along with a comment - so you can find it in your code.

 

Regards,

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

define('MODULE_PAYMENT_LINKPOINT_API_TEXT_JS_CVV_NUMBER', 'Missing the 3 digit Card Verification Value!');

 

Or was this intentionaly disabled for some reason?

 

There's also a missing right brace in the javascript - I added it to the script shown along with a comment - so you can find it in your code.

 

Regards,

 

The code can be 3 digits for visa, mastercard, discover or 4 digits for amex. We prefer to perform the cvv2 check directly with linkpoint and simply fail the card if it is wrong or wasn't provided by the user.

Link to comment
Share on other sites

This is a situation we tested extensively. In our testing, we OFTEN would use a bad card number, bad expiry date or bad cvv to validate specific failure modes and to increase the verbosity of the error messages. It should also be noted that there are two independant failure checks when using a credit card. osc has a count check with uses a numerical test to see if the card is a viable number and that the expiry date is not in the past. After that, the linkpoint module does a check against the card details to validate the rest of the card information as compared to what is held on file for that cardholder.

 

To be constructive you should check to see what specifically they are entering improperly, what browser they are using (is it ie with auto-fill on or firefox with auto-fill on) and validate that they are typing in the full unique number each time.

 

Thanks for your reply. I tested by entering the incorrect card # on firefox and internet explorer with auto-fill off and both times the incorrect card number could not be changed unless closing all windows and logging back in. I then tested the incorrect month on firefox and explorer with auto-fill off and same result. Both would not let me change the month. Thanks for your help. If i can get this fixed it would sure save me some time in customer service. If needed can you fix the issue for me and i can pay your great company at iofast??? Thanks

 

josh

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...