Guest Posted June 22, 2004 Posted June 22, 2004 This is very weird. Everything has been working fine, but today i get an email saying i have an order. So i go to the admin page and check it out. Wel the order didnt record. SO i try to do a moch order to test the module out, and i get a error! ""There has been an error processing your credit card, please try again : Could not execute curl"" I cant figure it out for anything. THe real kicker is it was working fine before! What could've caused this error and how do i fix it? Poeple are unable to place orders now, this is not good. Its a LinkPoint CC processing module. Thank you Ben www.DormGear.net Quote
Guest Posted June 22, 2004 Posted June 22, 2004 (edited) you need to go into your admin section, then tools and then server info. di an edit find and then type in 'curl' to see if curl is compiled with php. if not, ask your host to compile it in php for you. also, remove your image from in your signature in your profile, it causes problems and wants your admin username and password Edited June 22, 2004 by Mibble Quote
Guest Posted June 22, 2004 Posted June 22, 2004 Ok, I removed the image. Sorry if it was a pain. My question was hopefully answered by your above post, but why whould this happen all of the sudden? Its very random, and nothing was changed to provoke it. Quote
Guest Posted June 22, 2004 Posted June 22, 2004 (edited) has this been working before? your payment module? on another note, your name is fine in your signature, your domain name is not, in accordance with forum rules. that only goes in your profile. Edited June 22, 2004 by Mibble Quote
Guest Posted June 22, 2004 Posted June 22, 2004 Ok, sorry again. Name is removed. Yes the module has been working very well before. But now i am having this odd problem. I cant personally fix the issue with your advice, and my friend is not around. He will look at it tomorrow, but we spent 3 hours trying to figure out what went wrong today with it. It just came out of the blue! WHY!??? thank you! Quote
Mark Evans Posted June 22, 2004 Posted June 22, 2004 Sounds like someone made changes to the server ;) Check with you hosting provider Quote Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds)
Guest Posted June 22, 2004 Posted June 22, 2004 thank you for tht advise, but my firend also hosts the site for me in a remote location and backs it up in his basement. What kind of changes would cause this error? Is it a major porblem (hard to fix) or minor? thank you Quote
phatweb Posted June 22, 2004 Posted June 22, 2004 I am having this exact same problem.. was working fine then all of a sudden just quit. Anyone have any ideas? It's charging the customer's card successfully just returning a cannot execute curl error. Apparently it's executing it fine though if linkpoint charges the card.... Any help would be greatly appreciated. Quote
Guest Posted June 22, 2004 Posted June 22, 2004 i have the answer!!!!!! "i had sql logging all the queries...i turned that off" So turn your sql logging queries off! This may have happened with a reboot. thanx ben and special thanks to Kevin @ www.Drunks.com Quote
Guest Posted June 22, 2004 Posted June 22, 2004 On second thought... Its seems to still be getting that error curl code!!! what is going on!? Someone please help with this exact fix. thank you! Ben Quote
MikeTX Posted June 22, 2004 Posted June 22, 2004 what version of curl and php are you using? I ran into a problem with curl not being up to spec,, so it works fine from the command line, but nothing inside of php works. I'm having my host update the curl software in order to see if that fixes the problem. Quote
jbireton Posted June 22, 2004 Posted June 22, 2004 This issue needs an official thread, if a mod could herd all related queries to a single point. I've been having "could not execute curl" problems since late Friday. I've been on the phone to LinkPoint support and it appears (so far) to be a problem due to an upgrade on their end. The data is successfully submitted to linkpoint, but there's no return code for the transaction, which looks like a failure to OSC, and the order doesn't successfully complete. Working backward... the process() function is not returning a statusCode because the $result from the curl command is coming back null. I'm even getting an error when I send an XML request using the command-line: curl: (52) Empty reply from server. As a work-around, I have temporarily disabled the check in process() where it sets r_approved to "ERROR" and r_error "Could not execute curl". As a side effect, no credit cards are being denied. I think there's some auth info in the variable $retarr but it's probably not formatted in the way the function expected. Running in DEBUG mode, I got this: At end of process(), returned hash: 0 = <r_csp>CSI</r_csp> <r_time>Mon Jun 21 14:01:29 2004</r_time> <r_ref>12345678</r_ref> <r_error></r_error> <r_ordernum>D8A832CC-40D74CA5-673-84E02</r_ordernum> <r_message></r_message> <r_code>12345612345678</r_code> <r_tdate>1087851689</r_tdate> <r_score></r_score> <r_authresponse></r_authresponse> <r_approved>APPROVED</r_approved> <r_avs></r_avs> 1 = I have been assured that someone at linkpoint is "working on it", so I'm not investing any time in rewriting the API on my end if it's going to be changed back to how it worked last week. Quote
Guest Posted June 24, 2004 Posted June 24, 2004 (edited) Hey Guys, I talked to LinkPoint Support and they gave me the following fix: you need to change the following code in the file lphp.php --------------------------------------------------------------------------------- In lphp.php v. 3.0.005 he edited the exec function to read shell_exec. Existing Code: else //*nix string { if ($this->debugging) $result = exec ("'$cpath' $args -v -E '$key' -d '$xml' '$host'", $retarr, $retnum); else $result = exec ("'$cpath' $args -E '$key' -d '$xml' '$host'", $retarr, $retnum); } New Code: else //*nix string { if ($this->debugging) $result = shell_exec ("'$cpath' $args -v -E '$key' -d '$xml' '$host'"); else $result = shell_exec ("'$cpath' $args -E '$key' -d '$xml' '$host'", $retarr, $retnum); } --------------------------------------------------------------------------------- I wonder how many stores LInkPoint broke when they updated their API without fully testing it. Hope this helps you all, -baruch [Edited for vulgarity by DaemonJ] Edited September 4, 2004 by Daemonj Quote
DogTags Posted June 26, 2004 Posted June 26, 2004 (edited) Hi All Just plugged in the Linkpoint Module: http://www.oscommerce.com/community/contri...earch,linkpoint Got the same curl error :( The lpphp.php file that comes with the latest Linkpoint Module download is version 2.0.007 # lpphp.php# A php CLASS to communicate with # LinkPoint: LINKPOINT LSGS API # via the CURL module # v2.0.007 20 jan 2003 Where can I get lpphp.php v. 3.0.005 ? Since the latest download seems to have an old file, is there an fully updated Linkpoint Module available? In lpphp.php v. 2.0.007, the only code that seemed relevant looks like this (starting about line 142): // if php version > 4.0.2 use built-in php curl functions. // otherwise shell out to curl if ($this->PHP_CURLFUNCS != 1) #call curl directly without built in PHP curl functions { if ($this->DEBUGGING == 1) echo "<BR>NOT using PHP curl methods<BR><BR>"; $cpath = $this->curlpath; // Win32 command yikes! # $result = exec ("$cpath -E \"$key\" -m 90 -d \"$xml\" $host", $retarr, $retnum); // *NIX command $result = exec ("'$cpath' -v -E '$key' -m 90 -d '$xml' '$host'", $retarr, $retnum); } else # use PHP curl methods { # if ($this->DEBUGGING == 1) # echo "<BR> Using PHP curl methods <BR>"; // then encrypt and send the xml string $ch = curl_init (); curl_setopt ($ch, CURLOPT_URL,$host); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt ($ch, CURLOPT_SSLCERT, $key); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($ch); } if ($this->DEBUGGING == 1) { echo "\n\nserver response: " . $result . "\n\n"; } Notice the "-m 90" andn some other stuff within the code above. This doesn't match what is in lpphp.php version 3.0.0005 version 2.0.007 // *NIX command $result = exec ("'$cpath' -v -E '$key' -m 90 -d '$xml' '$host'", $retarr, $retnum); version 3.0.005 $result = exec ("'$cpath' $args -E '$key' -d '$xml' '$host'", $retarr, $retnum); So, I'm not sure at this point whether it's safe to substitute the code from 3.0.005 into the 2.0.007 file I've been searching around for any updates, but no luck so far. If anyone could point me in the right direction to get a fully updated Linkpoint Payment Module, I would be very grateful. Thanks very much :) Edited June 26, 2004 by DogTags Quote
Guest Posted June 28, 2004 Posted June 28, 2004 I have been struggling with Linkpoint and osC for over a week now with very little success. I've hacked the crap out of lpphp trying to figgure out exactly what is going on with this curl stuff. Using the following line helps: echo "Error: " . curl_errno($ch) . " - " . curl_error($ch) . "<br>"; I get this: Error: 58 - unable to set certificate file (wrong password?) So, I updated all my mod_ssl stuff (Im running Apache2 on Windows 2003), PHP, etc. Everything is the latest version, just in case. So, I used OpenSSL command line to verify my .PEM file. It checks out, except the certificates coming from Linkpoint are self-signed. So OpenSSL errors out. I beleive this is why CURL is failing, the self-igned linkpoint certificates. I tried using: curl_setopt($ch, CURLOPT_CAPATH, $path); This tells CURL and eventually OpenSSL to look in the CA Path for Trusted signers. This works using the OpenSSL command line with the -capath parameter, and openSSL likes the certificate. But, on a windows platform, I have NO idea where the CA Path really is. I tried making up my own, but I'm lost. I hope we can work together on this and try to solve the problem. I looked at lphp.php version 3.0.005. This can be downloaded from Linkpoints website BTW. I looked through it, and none of the CURL PHP code looks much different. I was going to update lpphp.php with the newer lphp.php file from Linkpoint, but I haven't found a reason to need to yet. My problem at least is with OpenSSL, Windows, and that damn PEM file. Im pretty sure it has something to do with CA Path and finding a way to make the PEM file trusted on the server. But Im no SSL guru. And Im tired of fighting with this lol. Am I missing something dumb and simple? Does ANYONE have this working on a Windows platform? Quote
jameslucasoni Posted June 29, 2004 Posted June 29, 2004 I have been assured that someone at linkpoint is "working on it", so I'm not investing any time in rewriting the API on my end if it's going to be changed back to how it worked last week. So have you heard anything after a week? I have to admit, I'm pretty upset with them over this. It's fairly ridiculous... I know someone posted a solution to the 3.0.005 version of lphp.php, but I'm running v2.0.007 of lpphp.php and I'm not sure what all else needs to be changed in order to upgrade to the new version. Any help that can be offered would be greatly appreciated... Quote
jbireton Posted July 2, 2004 Posted July 2, 2004 (edited) Unfortunately, I have a really full plate, and haven't had time to really sit down and focus on these payment issues. I spent a couple hours this afternoon, and I'm just as frustrated as the last time I looked at the issue. (I'm about ready to execute some curl, if you get my meaning...) player0, you may find some help for your windows environment here: http://curl.oc1.mirrors.redwire.net/docs/sslcerts.html ? ?If you're using the curl command line tool on Windows, curl will search ? ?for a CA cert file named "curl-ca-bundle.crt" in these directories and in ? ?this order: ? ? ?1. application's directory ? ? ?2. current working directory ? ? ?3. Windows System directory (e.g. C:\windows\system32) ? ? ?4. Windows Directory (e.g. C:\windows) ? ? ?5. all directories along %PATH% There might be a solution in using the directive (CURLOPT_SSL_VERIFYPEER, FALSE). However, I don't know what the curl command-line equivalent is, and my environment is setup to shell out to the curl binary. Has anyone actually solved this problem? People above said the 3.0.005 version helped, but I tried it and it did nothing for me. Edited July 2, 2004 by jbireton Quote
sakebomz Posted July 2, 2004 Posted July 2, 2004 A quick workaround to this problem is to comment out the error checking portion of 'modules/payment/linkpointms1.php', which starts at Line 290 for me. However, similar to Jbireton's post above, this will also allow bad credit cards to go through (results in NFRAUD or Declined message in Transactions). We will just have to wait until LinkPoint figures out how to send us a correct return code again. Example: /* if ($myresult["statusCode"] != '1') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_LINKPOINTMS1_TEXT_ERROR_MESSAGE) . ': ' . $myresult["statusMessage"], 'SSL', true, false)); } */ Quote
jbireton Posted July 2, 2004 Posted July 2, 2004 What sakebomz wrote is exactly what I ended up doing, actually. I really dislike running my site in this mode. We have to manually audit every credit card transaction in Linkpoint before processing the OSC order, to make sure it wasn't a bad credit card. We also had to reverse a bunch of affiliate referrals that were submitted using bad credit card info. I'm going to contact Linkpoint again this afternoon. Hopefully my next post here will report some success. Quote
jbireton Posted July 2, 2004 Posted July 2, 2004 (edited) Ok, I'm finally working again. :D To recap, I am using: - lpphp.php v. 2.0.007 - PHP_CURLFUNCS = 0; //shell out to the curl binary With the help of Chuck at the linkpoint API team, we updated the lines mentioned above to: if ($this->DEBUGGING == 1) $result = shell_exec ("'$cpath' -k -v -s -S -E '$key' -m 90 -d '$xml' '$host'"); else $result = shell_exec ("'$cpath' -k -s -S -E '$key' -m 90 -d '$xml' '$host'"); Note that on both lines you need to change exec to shell_exec and on both lines remove $retarr and $retnum from the function call. I hope this helps someone else. Edited July 2, 2004 by jbireton Quote
Guest Posted July 2, 2004 Posted July 2, 2004 I had the same problem with curl, and I went in to the admin area and check out my Linkpoint settings. For some reason, my account number had gotten jumbled. Once I had that reset correctly, it worked. It may seem simple, but I know for a fact that it was entered correctly the first time. Quote
kepa Posted July 3, 2004 Posted July 3, 2004 Ok, I'm finally working again. To recap, I am using: - lpphp.php v. 2.0.007 - PHP_CURLFUNCS = 0; //shell out to the curl binary With the help of Chuck at the linkpoint API team, we updated the lines mentioned above to: CODE if ($this->DEBUGGING == 1) $result = shell_exec ("'$cpath' -k -v -s -S -E '$key' -m 90 -d '$xml' '$host'"); else $result = shell_exec ("'$cpath' -k -s -S -E '$key' -m 90 -d '$xml' '$host'"); Note that on both lines you need to change exec to shell_exec and on both lines remove $retarr and $retnum from the function call. I hope this helps someone else. Thanks, this worked for me. Quote
mental_floss75 Posted July 6, 2004 Posted July 6, 2004 thanks Kepa - that worked for me too Quote Jonathan Dimock Established Solutions Dot Com
sakebomz Posted July 9, 2004 Posted July 9, 2004 After replacing the code written above, I'm getting a blank page at 'checkout_process.php' and the credit card info is never transferred to LinkPoint. Anyone else experiencing this? Quote
mrsym2 Posted July 9, 2004 Posted July 9, 2004 I had this problem also, and was getting nowhere with LinkPoint support. I again went to my hosting company. They checked error logs and responded with the following: I stopped firewall on your server, please check the script now. If it is working we will modify our firewall settings. Now it works. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.