Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal IPN module adjustments


Recommended Posts

Posted (edited)

1. Change the PayPal sandbox server by editing

 

oscommerce/includes/modules/payment/paypal_ipn.php around line# 37

 

$this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';

 

2. Change the "payment action" FROM 'authorization' to 'sale' on or about line# 118

 

'paymentaction' => 'authorization');

 

3. And further :-) adjust the whole PayPal IPN module to work with GoDaddy (and similar hosting providers) by adding the following 4 lines (some of which may be unecessary, but it works so... :-)

 

curl_setopt($curl, CURLOPT_TIMEOUT, 120);

curl_setopt ($curl, CURLOPT_HTTPPROXYTUNNEL, true);

curl_setopt($curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);

curl_setopt($curl, CURLOPT_PROXY,"http://proxy.shr.secureserver.net:3128");

 

to file: oscommerce/includes/classes/payment.php at around line# 108 just BEFORE these:

 

curl_setopt($curl, CURLOPT_HEADER, 0);

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);

curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);

curl_setopt($curl, CURLOPT_POST, 1);

curl_setopt($curl, CURLOPT_POSTFIELDS, $parameters);

 

Have fun!

Edited by pgorganics

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...