[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1831
  • Last Modified:

FirstData/Linkpoint error: SGS-020006: Please contact merchant services.

I made an opencart site for one of my clients. For payment, I used an extension for First Data API (http://www.unbannable.com/ocstore/firstdata_api).

I have not access to linkpoint members area, but the client sent me PEM file. Everything seems ok, but when we want to pay, we got this error: SGS-020006: Please contact merchant services.

The XML that API sends is like below (note that I changed some sensitive data).

Anyone knows what is the problem?
		<name>Reza Valinezhad</name> 
		<company /> 
		<address1>Test Address</address1> 
		<address2 /> 
		<addrnum>Test Address</addrnum> 
		<comments>Your Store</comments> 

Open in new window

  • 3
  • 2
1 Solution
Which programming language are you using to code payment module ??

Why dont you run your code in debug mode and see what detailed response are you getting..
EqbalAuthor Commented:
OpenCart is a PHP open source shopping cart

I used debug mode to see XML sending to linkpoint getaway. what data I need to see more than that?
Try below code

dont forget to edit $myorder["keyfile"] and $myorder["configfile"] values

also ensure that lphp.php file is in the same location..

post the complete server response


include "lphp.php";

echo ProcessPayment("4111111111111111","11","11","1.0","111","","","PAY");

function ProcessPayment($cnum, $cmonth, $cyear, $price, $cvv, $address, $zip, $mode)
	$mylphp=new lphp;

	$status = "false";
	$myorder["host"] = "staging.linkpt.net";
	$myorder["port"] = "1129";
	$myorder["keyfile"] = "c:/1909160949.pem";
	$myorder["configfile"] = "1909160949";

	$myorder["cardnumber"] = $cnum;
	$myorder["cardexpmonth"] = $cmonth;
	$myorder["cardexpyear"] = $cyear;
	$myorder["chargetotal"] = $price;

	if($mode == "AUTH") // For authorization only
		$myorder["ordertype"] = "PREAUTH"; 
	else  // For payment where $mode="PAY"
		$myorder["ordertype"] = "SALE"; 

	$myorder["cvmvalue"] = $cvv;
	$myorder["cvmindicator"] = "provided";
	$myorder["addrnum"] = $address;
	$myorder["zip"] = $zip;
	$myorder["action"]    = 'SUBMIT';

	$result = $mylphp->curl_process($myorder);
	if ($result["r_approved"] == "APPROVED")
		$status = "true;" .  $result["r_ordernum"];
		$status = "false;" .  $result["r_error"];

	return $status;


Open in new window

EqbalAuthor Commented:
I used the progam and it works. then I checked differences between this code and the api and fixed somethings. Now it works fine. Thank you for your help.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now