lwilliams114 Posted May 4, 2008 Posted May 4, 2008 Websites payment pro wouldn't work with oscommere so I called Paypal and their tech. department pointed me to a link on Godaddy.com's website that shows a code that has to be put into the payment coding in oscommerce and I sure need help trying to figure out exactly where to put it. The following shows what the website says along with the coding. Please help me if you can. Thanks Below is a PHP script that uses CURL to connect securely to a remote system (http://www.paypal.com), obtain data from that system and then creates a Web page based on that data. Note: On our shared hosting, any CURL applications that make secure HTTP connections (HTTPS over port 443) need to pass through a proxy server. The address for this proxy server is proxy.shr.secureserver.net and connections must specify the use of port 3128. The code below already includes this information. <? $URL="https://www.paypal.com"; if (isset($_GET["site"])) { $URL = $_GET["site"]; } $ch = curl_init(); echo "URL = $URL <br>n"; curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE); curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY,"http://proxy.shr.secureserver.net:3128"); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_URL, $URL); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec ($ch); echo "<hr><br>n"; echo 'Errors: ' . curl_errno($ch) . ' ' . curl_error($ch) . '<br><br>'; echo "<hr><br>n"; curl_close ($ch); print "result - $result"; echo "<hr><br>n"; ?> Quote
lwilliams114 Posted May 5, 2008 Author Posted May 5, 2008 Look at this posting. Ben Ben thank you very much. The lines worked perfectly. Lynn Quote
smokinj03 Posted May 7, 2008 Posted May 7, 2008 If you're like me and experiencing problem with SQL connection timeout (due to paypal sandbox or godaddy curl proxy taking too long). Try this and see if it helps (in includes/modules/payment/paypal_wpp.php) // release the db connection since curl is going to take awhile tep_db_close(); $response = curl_exec($ch); // curl is done so reopen connection to db tep_db_connect(); 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.