View Full Version : Anyone have a working linkpoint_api.php with FirstData ??

06-10-2009, 08:26 AM
Hey there,

Open SSL, Valid cert
configure.php --> enable SSL=true
admin payment module=live, debugging=off

All relevant files per Trustwave's instructions followed to the letter, except that WestHost's tech moved 3 lines out of the httpd.conf file to the ssl.conf (that resolved another issue). .pem may be corrupted. Will replace this afternoon.

Pulling hair out here. I have a linkpoint_api.php file that I can't get to behave.

I place a customer order using a dummy card number.
Transaction shows up DECL in FirstData terminal but is missing $ info, order #
in osC Admin, the order sequence has skipped 1 order #.


I place an order using a valid card
Click submit to confirm and the next screen is blank
Transaction shows in terminal but is missing $ info, order number
in osC Admin, the order does not show in the Customers >> Orders page, BUT if I search for the missing/skipped order #, it appears with no product.
Data base shows order, no product
No order notification email sent to 'customer.'

Is anyone willing to share their:
so I can compare?

Thanks much in advance! If I resolve my issues, I will post back and help where I can :)


06-10-2009, 03:56 PM
I am not familiar with linkpoint but it almost sounds like there is a missing referral URL someplace. I know that with the PayPal api you have to tell it the URL to return information to once it has processed the payment. I have you checked your settings on your linkpoint account to see if you have to provide the return url there? Like I said I am not familiar with linkpoint but with PayPal there is a default you can set on your account with them. Then that can be overridden by the API itself when the request is made. With most modules for PayPal there is a setting then on the cart side in the Admin section for this.

06-11-2009, 06:56 AM
Shawn, Thanks for your post. I am familiar (and using) the PayPal payment module. And to your point, a return-to-site URL is needed PayPal side to direct or redirect customers back to the success page. Should customers not return, it can cause an order to show in catalog/admin and some confusion. Bottom line is customers leave the site, go to PayPal, and often miss clicking "return to site" if the auto return isn't turned on.

With direct connection to a gateway, such as FirstData (linkpoint), it's good that customers can have their transaction processed without leaving the site. Even though FirstData tech support said there was no reason to fill in the expected incoming, confirmation and error page URLs in the virtual terminal, they are indeed required (ticked as CGI script).

This said, Nick from Westhost and I spent a long time working with the linkpoint_api payment module and we came up with some errors in the log.

1. Blank screen on order submit. Fatal error: cannot redeclare class lphp:
Fix: includes/modules/payment/linkpoint_api.php, find

require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/linkpoint_api/lphp.php');and replace with:

require_once(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/linkpoint_api/lphp.php');

2. Missing Arguments 4 and 5 in the cc_validation.php:
Untried fix: includes/classes/cc_validation.php, find

function validate($number, $expiry_m, $expiry_y, $cvv, $cr_card_type) {and replace with:

function validate($number, $expiry_m, $expiry_y, $cvv="", $cr_card_type="") {At least the site and FirstData are 'talking.' :)

I've got to work on why certain data isn't plugging into the DB and take the error messages out of the address bar to the MessageStack warnings onscreen so customers understand why their card hasn't processed.


06-11-2009, 07:14 AM
Have you contacted the modules author? It seems odd that it would have this many problems. Our environment is not that different them others and I would think many folks would be having problems. Also why are php errors being shown to customers? You should have display_errors turned off for a production site.

06-11-2009, 07:36 AM
PHP errors are not being shown to customers. These are the least of the issues I've had. Many folks are having problems like this and they are posting. The author would now like to be paid for support and has pretty much stopped posting fixes on the osC forum.

If you have another suggestion as to how I can approach this, you have my undivided attention :)


06-11-2009, 06:38 PM
I wish I could be more help. I did down load the module and the other two linkpoint modules. I did a comparison on them and they seem pretty similar. No real glaring faults.

One thing I did notice is in regards to error "Missing Arguments 4 and 5 in the cc_validation.php". Instead of changeing the core cc_validation.php file I would change the linkpoint_api.php. The call to the function that is throwing the warning is on line 276:

$result = $cc_validation->validate($HTTP_POST_VARS['linkpoint_api_cc_number'], $HTTP_POST_VARS['linkpoint_api_cc_expires_month'], $HTTP_POST_VARS['linkpoint_api_cc_expires_year']);

Change to:

$result = $cc_validation->validate($HTTP_POST_VARS['linkpoint_api_cc_number'], $HTTP_POST_VARS['linkpoint_api_cc_expires_month'], $HTTP_POST_VARS['linkpoint_api_cc_expires_year'], "", "");

If I was tracking this down I would study both the osCommerce module info and the linkpoint API info. I would also download a solid working payment module or look at one supplied by osCommerc to compare with this one. That might lead you to figure out why the Product is not being added.

Since you now have it communicateing with Linkpoint are you getting the $ and order # there now?