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 (

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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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"] = "";
	$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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.