Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1] 2   Go Down
Print
Author Topic: LinkPoint Payment Processor Setup - Step by Step  (Read 36634 times)
EFARMSTRONG
Newbie
*
Posts: 5


« on: January 08, 2008, 12:04:02 PM »

Pre - setup: Get, buy and set a SSL for the store domain, Install it and test it before anything! this is very important!

(Some items listed from Post : http://forum.virtuemart.net/index.php?topic=17559.0) Thanks a lot user: coalese. for the clues to solve this conundrum.

Steps to get it:


1 ) Download the 'lphp.php' file from LinkPoint, which is packed in the API zip. (http://www.linkpoint.com/viewcart/down_index.htm) and install it in the /administrator/components/com_virtuemart/classes/payment/ dir next to ps_linkpoint.php (I beth that most of us just need the LinkPoint API for PHP)


2 ) Obtained pem file from linkpoint (https://www.linkpointcentral.com/) :To address security concerns, you must now login to LinkPoint.com with your customer logon and download the PEM file.  Click the Support link and then click the Download link. You will need to answer one of the following questions:

a. TaxID (Federal Tax ID of your customer)

The resulting 'pem" file will be the store ID ending with pem, example: 123456.pem

3) Modify Settings in VM back end management -> "Store" -> "List Payment Method" and select "configuration" tab to set in " Location Of Public Key file" and set path for the "*.pem" file.


4 ) "pem" file location is crucial and depend of the individual hosting plan (Full server, Virtual or collocation) you must locate the "temp" or "tmp" of your local domain account other that the public publishing folder, create a folder and copy the file there, to avoid confission just name it "linkpoint". in my case was /home/*user*/tmp/linkpoint/123456.pem and you must set the full path VERY IMPORTANT!


5 ) Open Database and create an additional table added to the database called (mos or) jos_vm_linkpoint with two fields

* Id type int()
* Last Attempt type varchar(11)
*
* Then add 1 record to the table, with an Id of 1, and Last Attempt of WEB-xxx (where xxx is your last good order number)


6 ) Setup new payment module using ps_linkpoint.php; add a new payment, added the code "LP" and "ps_linkpoint" for my payment class.

Active?: Check
Payment Method Name: Credit Card
Code: LP
Payment class name: ps_linkpoint
Payment method type: Use Payment Processor
Accepted Credit Card Types: Visa, MC, etc.

Then in Configuration:

Linkpoint Store ID: ###### (your store id #)
Location Of Public Keyfile: READ ITEM 6 (the full path of your LinkPoint Keyfile)
Request/Capture Credit Card Code Value: YES
Recurring Billings? NO
Pre Auth for Recurring Billing? NO
Payment Extra Info: EMPTY (no form code needed)


7 ) SMALL FILE MODIFICATION

(From Post : http://forum.virtuemart.net/index.php?topic=13808.msg37053#msg37053 )

By James McMillan, the author of the ps_linkpoint.php code and he kindly replied with the FIX for my Error: Failure in Processing the Payment (ps_linkpoint). So now it works as advertised

On line 345 (latest build) of ps_linkpoint.php please change the following:


if ($result["r_approved"] != "SUBMITTED")

TO

if ($result["r_approved"] != "APPROVED")


8 ) After following all this steps and without using the "staging.linkpt.net"  I just created a test product with a value of .80 cents, then and I used my own credit card; Go to the www.linkpointcentral.com logon (Where you got the "pem" file and not the other portal provided for Card Services Intl. customers www.mymerchantoffice.com because is not real time, It may apply to other LinkPoint resellers)in there I was able to verify in real time the transaction,  if you have everything correct the Email confirmation will be gorgeous and full of info. Remember that you must use either your admin account or create a customer for this task.

I hope the guys of VM think more on the American side of the shopping cart business and get more volunteer developers that understand the companies involved here in the other side of the pond. Remember the prestige of the development team is what really counts on the Open Source arena.


« Last Edit: January 24, 2008, 09:28:21 AM by EFARMSTRONG » Logged
VB Enterprises
Newbie
*
Posts: 30


« Reply #1 on: January 09, 2008, 19:34:57 PM »

Thanks EFARMSTRONG! Smiley
Logged
Tripg
Newbie
*
Posts: 1


« Reply #2 on: January 23, 2008, 15:30:05 PM »

Spent three days troubleshooting this on a shared server and thought I would contribute back a little bit!!  This mod will allow CURL to write headers and connection information to a log file that you can read.

//Trip-G Software troubleshooting modifications to lphp.php
//paste this in on top of the existing (matching) code to generate a log file
//that may help you resolve your issue!!

//In lphp.php v3.0.005  20 Aug. 2003  this is lines 285-298

      $fh = fopen('/home/uname/tmp/curl-response-headers.txt','w') or die($php_errormsg);  //replace 'uname' with your valid user name
      $fh2 = fopen('/home/uname/tmp/curl-error-log.txt','w') or die($php_errormsg);  //replace 'uname' with your valid user name
      

         $ch = curl_init ();
         curl_setopt ($ch, CURLOPT_URL,$host);
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt ($ch, CURLOPT_POST, 1);
         curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml);
         curl_setopt ($ch, CURLOPT_SSLCERT, $key);
#         curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
#         curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
         curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt ($ch, CURLOPT_STDERR, $fh2);
         curl_setopt($ch, CURLOPT_WRITEHEADER, $fh);


            echo "<br>ggg using BUILT-IN PHP curl methods" . $cpath . "<br><br>";

         if ($this->debugging)  {
            curl_setopt ($ch, CURLOPT_VERBOSE, 1);
            echo "<br>ggg curl Verbosse set<br><br>";
         }
               
         #  use curl to send the xml SSL string
         $result = curl_exec ($ch);
           echo "<br>ggg after curl_exec" . $result . "<br>" . $host . "<br>" . $xml . "<br>" . $key . "<br><br>";
           fclose($fh) or die($php_errormsg);
           fclose($fh2) or die($php_errormsg);



Logged
dvcmt
Newbie
*
Posts: 1


« Reply #3 on: January 28, 2008, 12:03:47 PM »

Anybody able to get this module do pre-auth on NON-recurring billings?   It seems it will only do this on recurring billings?

We don't always ship right away, and need to authorize without fully settling the ticket.

Any help greatly appreciated!!
Logged
otherlancer
Newbie
*
Posts: 4


« Reply #4 on: February 25, 2008, 13:18:32 PM »

hi guys, sounds like this is the way to fix this problem, can anyone out there help me out with step 5, i haven't messed with SQL much at all and this serves to be the scariest part of this set up! if anyone out there can help, let me know!
Logged
otherlancer
Newbie
*
Posts: 4


« Reply #5 on: February 26, 2008, 13:42:45 PM »

hi guys,

now i'm totally confused after i read though this, i realized step 3 doesnt even exist...how can i add a .pem file to a payment method that doesn't exist yet.

3) Modify Settings in VM back end management -> "Store" -> "List Payment Method" and select "configuration" tab to set in " Location Of Public Key file" and set path for the "*.pem" file.

please help!

-rob
Logged
relamb63
Newbie
*
Posts: 2


« Reply #6 on: April 16, 2008, 14:21:51 PM »

I tried what was mentioned and still cant get it to work. Anyone have anything else  I can try.
Logged
nemmon
Newbie
*
Posts: 13


« Reply #7 on: May 01, 2008, 07:21:31 AM »

This was helpful. Thank you tons, I am now having a problem, I tested purchasing a product after doing this and the purchase worked....but now If I or anyone goes and tries to buy anything the get this error:

SGSG: The order already exists in the database.

How can I fix this.. I have called linkpoint and there is nothing (order) on their side). I have checked the database-->jos_vm_linkpoint and there is not entry for the table...?

Any help would be greatly appreciated...
Logged
bmccune
Newbie
*
Posts: 1


« Reply #8 on: September 23, 2008, 21:20:39 PM »

I'm ready to bang my head against the wall with this problem.  I am still getting:

Error: <
<
Error: Failure in Processing the Payment (ps_linkpoint)

I have followed all of the directions on the site and cannot figure this one out.  What info can I provide to help with assistance in troubleshooting this?

Thanks in advance!

-Brian

Logged
germanizer
Newbie
*
Posts: 4


WWW
« Reply #9 on: October 28, 2008, 09:45:59 AM »

Oh man, I am soooo happy that for once I might be delivering the answer to a question has here on this board. I'm sure each of you have felt the frustration when you're looking through this forum and you find post after post unanswered. Quite frankly I think that's mainly due to people having abused their asking rights and quite frankly I think a lot of people simply are too demanding towards a free product considering every other joomla addon I've used that remotely can generate you money alays costs money but I digress.
I had been working with a client towards completion of a project which included Virtuemart and rather than sending me the API information for authorize.net which I'm rather familiar with, he sent me linkpoint api. First of all I'd never even heard of it and secondly, due to our tight deadline I could already see a wrench having been thrown into the gears. I followed this step by step tutorial and I got no where. Having some what the skills of a junior sysadmin I started tailing various logs to see if I would find anything suspicious. I made sure the IP's weren't being blocked, etc but I couldn't find anything that would have told me where to start.
I was literally just in the process of describing the status of our product so I could post this on a freelance website when I came across a link that EXACTLY described what was happening in my case. Remember, for those of you who haven't gotten it to work, my fix might not work if you don't have everything else in place as described in this topic. The only other thing I could see that's different is that the linkpoint folder from the instructions I found, is located inside the web directory, and not outside of it. In other words I put my .pem file here:
Code:
/home/user/public_html/linkpoint/1231324.pem
In case anyone's wondering, I'm using the method described by linkpoint which only includes curl and none of the other lib files which they make available.
I hope I built enough suspense now, the link I found said two simple things:
Quote
If you receive the following error you need to check 2 things.
   1. Make sure you uploaded the PEM file and entered the correct path.
   2. Contact your web host and make sure port 1129 is not being blocke
The latter part is what made this work for me - as soon as I had opened up that port on the firewall the payment transactions started working.
So, thanks to the original poster and I hope someone who was still chompin' at the bit also has the corresponding port closed and simply needs to open it.
PS: If anyone needs help with this, hit me up via the board here or drop me an email.
« Last Edit: October 28, 2008, 09:48:54 AM by germanizer » Logged

Multimedia Hosting Solutions
Hosting Platform: Dedicated Intel Quad Core Server, 4GB Ram, Raid 1 running RHEL 5
VM Version: 1.1.2
Joomla 1.5.7
PHP: 5.2.6
Mysql: 4.1.2
jeffhoneyager
Newbie
*
Posts: 31


Matt. 11:28


WWW
« Reply #10 on: December 02, 2008, 06:04:26 AM »

When I set the "User Registration Type" to "No Account Creation" The CC drop down disappeared!  A bug.

I turned it back to "Normal Account Creation" and the CC Card Type re-appeared (confirmation of a bug). 

Then got the  "Error: SGS-005003: The order already exists in the database." Error.

Because of all the unanswered posts, we went to PayPal for a while.

I placed an order using PayPal - it went through - and incremented the order number.

Tried a CC (LinkPoint) order again - and it went through!

We'll see if it keeps working...

IMHO: the promise of VM, and all the glowing recommendations leads one to download, install, configure, ...  Some sort of disclaimer needs to help set expectations.  VM is open, and free (aka wild) but requires the skills of a database administrator, a Joomla/php programmer, and a systems administrator.  If you are, or have access to all these, VirtueMart Rocks!  If not - be afraid.

Logged

Peace & Joy,
Jeff Honeyager
http://jeff.honeyager.com
strdesign
Newbie
*
Posts: 20


« Reply #11 on: January 05, 2009, 11:42:44 AM »

I get Fatal error: Call to undefined function curl_init() in /home/user34/public_html/administrator/components/com_virtuemart/classes/payment/lphp.php on line 285

need your help,
Thanks,
Lewis
Logged
jakenav
Newbie
*
Posts: 1


« Reply #12 on: January 18, 2009, 16:49:51 PM »

I followed the step-by-step process as laid out by EFARMSTRONG and still was getting the Linkpoint error.  I couldn't figured out what was causing the error, so I put the project on hold for 3 months.  Then today, I revisited this forum again and after three hours of searching for new solutions, I came across this thread:

http://forum.virtuemart.net/index.php?topic=16152.15

JGANESH was able to solve the missing link in the Linkpoint saga!

Quote
Guys, you are getting the "Could not connect" error because curl is returning an empty result.

Try changing the following code in the lphp.php

# curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
# curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

to

curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

Just uncomment the above codes.

Note:  the above code is found at line 290 of the lphp.php file. 

THANK YOU EFARMSTRONG AND JGANESH.  NOW MY LINKPOINT IS WORKING!!!

NOTE:  IT WORKS EVEN with "staging.linkpt.net" 

Reminders to those who are still experiencing the problem:

1. Insure port 1129 is open for bidirectional communication. Need to request this from your hosting account.
2. Install SSL
3. Upload the PEM file outside of the Public_html folder
Logged
pjwirth
Newbie
*
Posts: 23


« Reply #13 on: February 05, 2009, 17:22:54 PM »

Joomla 1.5.9
VirtueMart 1.1.3

Ok I have followed all of the steps but I am still getting this error
Quote
Error: SGS-005003: The order already exists in the database.

Error: Failure in Processing the Payment (ps_linkpoint)

Here is the SQL of my DB Scructure:
Code:
--
-- Table structure for table `jos_vm_linkpoint`
--

CREATE TABLE IF NOT EXISTS `jos_vm_linkpoint` (
  `Id` int(11) NOT NULL,
  `Last_Attempt` varchar(11) NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `jos_vm_linkpoint`
--

INSERT INTO `jos_vm_linkpoint` (`Id`, `Last_Attempt`) VALUES
(1, 'WEB-001');

I currently only have 1 order. I have tried many things for the last_attempt value. I have tried just 1, WEB-001, and WEB-1. Or maybe thats not even it...

Do you have any suggestions?
Logged
pjwirth
Newbie
*
Posts: 23


« Reply #14 on: February 06, 2009, 11:41:33 AM »

Well I got my table to update correctly with YourPay, the problem was that it should be LastAttempt and the WEB-001 isn't your VM orders table, it is from your YourPay transaction reports.

However, I am having this problem now. Whenever I place my first order it works perfectly. The jos_vm_linkpoint updates correctly along with YourPay transactions. However, on the second order I get this error: Error: SGS-005003: The order already exists in the database.

I check the YourPay and jos_vm_linkpoint tables and they have both increases correctly. But your YourPays transactions says NFRAUD (Duplicate transaction).

To plot this out. I placed a order when my Last Attempt was WEB-6 in both the DB and YourPay (A cleared transaction). And it went through correctly and updated the DB and YourPay to WEB-7. Now I placed another order and I get the error. The DB updated to WEB-7-a.

Then the only way I can fix this is to change processors for 1 transaction then go back. Any suggestions?
Logged
Pages: [1] 2   Go Up
Print
Jump to: