[Webinar] Streamline your web hosting managementRegister Today

x
  • 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?
<order>
	<billing>
		<name>Reza Valinezhad</name> 
		<company /> 
		<address1>Test Address</address1> 
		<address2 /> 
		<addrnum>Test Address</addrnum> 
		<city>Istanbul</city> 
		<state>ARD</state> 
		<zip>32141341</zip> 
		<country>TR</country> 
		<phone>65875858</phone> 
		<email>mymailaddress@gmail.com</email> 
	</billing>
	<orderoptions>
		<result>Live</result> 
		<ordertype>Preauth</ordertype> 
	</orderoptions>
	<merchantinfo>
		<configfile>12345678</configfile> 
	</merchantinfo>
	<creditcard>
		<cardnumber>411111111111</cardnumber> 
		<cardexpmonth>11</cardexpmonth> 
		<cardexpyear>22</cardexpyear> 
		<cvmvalue>2333</cvmvalue> 
		<cvmindicator>provided</cvmindicator> 
		</creditcard>
	<payment>
		<chargetotal>62.00</chargetotal> 
	</payment>
	<transactiondetails>
		<transactionorigin>ECI</transactionorigin> 
		<oid>50_1270465626</oid> 
		<ip>212.95.134.0</ip> 
	</transactiondetails>
	<notes>
		<comments>Your Store</comments> 
	</notes>
</order>

Open in new window

0
Eqbal
Asked:
Eqbal
  • 3
  • 2
1 Solution
 
neeraj523Commented:
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..
0
 
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?
0
 
neeraj523Commented:
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
0
 
neeraj523Commented:

<?php

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';

		$myorder["debugging"]="true";
		//$myorder["debug"]="true";
	
	$result = $mylphp->curl_process($myorder);
	
	if ($result["r_approved"] == "APPROVED")
	{
		$status = "true;" .  $result["r_ordernum"];
	}
	else
	{
		$status = "false;" .  $result["r_error"];
	}

	return $status;

}
?>

Open in new window

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

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