Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

  • 1 month later...

I noticed in the lastest releases of this module (2.3.4.7), the file /includes/modules/payment/paypal_ipn.php contains a few bits of code that appear to be a workaround.

They are after the variable: $cart_PayPal_IPN_ID gets set in the function confirmation() (near the bottom). One was an attempt to set a session variable, another was the same but for a global variable.

 

While both are syntactically correct, neither need to be set since the variable is declared as a global at the beginning of the function.

If anyone is having trouble with the $_POST['invoice'] var not being sent to paypal, check your checkout_confirmation.php file and make sure the confirmation() call is being made before the process_button() call. Otherwise the variable wont get set for the process_button call that sends the data to paypal.

 

Hope this helps someone.

 

Regards,

Tim Gall

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

After a PayPal payment I see the order has a new status, with a little comment like:

"PayPal IPN Verified [Pending (Verified; €15,70); paymentreview]"

 

Why is there € and not the Euro symbol?

All other pages do show the correct symbol... I don't know how to fix this (besides manually in the database)

Link to comment
Share on other sites

Hello Guys,

 

I have been using this great contribution for few years now without any problems.

 

Recently I just copied my shop and installed another one under different domain, and after changing configuration settings it works fine yet there is a problem with PayPal IPN.

It works, I can receive payments but the only one order status appears to be Preparing [PayPal IPN] and it doesn't change when the orrder is completed.

I can't select other satuses in configuration of PayPal IPN module simply because I gon only one option to choose - Preparing [PayPal IPN]

 

So far I have tried to remove the module and then copy all the files again on my server, then install the module again but it doesn't seem to change anything.

 

Does anyone have an idea what could help?

Edited by artur78
Link to comment
Share on other sites

  • 3 months later...

Hi everyone, I have a small issue which I cannot seemt to sort out.

 

When a customer pays with Paypal the customers country is not getting transferred to the order process email???

 

It looks like below:

 

Delivery Address

------------------------------------------------------

Jane Dow

1121 Main St E

Toronto, M1M 1M1

Ontario,

 

Billing Address

------------------------------------------------------

Jane Dow

1121 Main St E

Toronto, M1M 1M1

Ontario,

 

It seems to work fine when a customer pays with my other payment module... Only when they choose paypal?

 

I have looked at the following code in ipn.php

 

	    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
					    EMAIL_SEPARATOR . "\n" .
   tep_address_format($order->delivery['format_id'], $order->delivery,  0, '', "\n") . "\n";
	  }
	  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
					  EMAIL_SEPARATOR . "\n" .
    tep_address_format($order->billing['format_id'], $order->billing, 0, '', "\n") . "\n\n";

 

I have tried to take snippets from checkout_process.... but no luck... any ideas?

Link to comment
Share on other sites

  • 1 month later...

I seem to be having a problem with the Paypal Express and Standard module. The 2 errors I'm getting are:

Fatal error: Class 'httpClient' not found in /.............../html/includes/modules/shipping/ups.php on line 265

 

Fatal error: Class 'httpClient' not found in /.............../html/includes/modules/shipping/usps.php on line 303

 

The common denominator seems to be Paypal. No matter which shipping module I run, when it comes to checking out with Pay Pal I get this httpclient error. I also run Paypal Pro with no issues what-so-ever, it only seems to be a problem when Paypal (I assume) tries to redirect them off of my site onto theirs. Any and all help would, will and can be greatly appreciated.

Link to comment
Share on other sites

One more thing I might add to this conversation (seeing as how I'm the only one conversing) I found this on another part of the forum

 

Possible fix

if (!class_exists('httpClient')) {

include('includes/classes/http_client.php');

}

$http = new httpClient();

if ($http->Connect('www.ups.com', 80)) {

$http->addHeader('Host', 'www.ups.com');

$http->addHeader('User-Agent', 'osCommerce');

$http->addHeader('Connection', 'Close');

 

Possible Problem

$http = new httpClient();

if ($http->Connect('www.ups.com', 80)) {

$http->addHeader('Host', 'www.ups.com');

$http->addHeader('User-Agent', 'osCommerce');

$http->addHeader('Connection', 'Close');

 

after swapping these pieces of code I got the error, "wrong security header" or something similar but this is where the problem seems to be as both of the above reference fatal errors BOTH point to similar code in both files.

Link to comment
Share on other sites

Last comment for the night. I think I've gotten the security header issue taken care of but now it tells me "You must specify one shipping option type as the default." I have been on the paypal site and thought I had it, I've checked OSC and thought I had it, the only common thing between the both of them was, I found out I didn't have it. Can someone tell me how to make these things work and how to get rid of this cursed error!!!!!

Link to comment
Share on other sites

  • 8 months later...

The customer receives about 13 order process emails. I also noticed 13 PayPal IPN Verified notifications on the admin side of the orders. I know the module version I have is not up to date. This version has always worked for me. I looked through this thread for a solution but can't find one. Has anyone ran into this issue before?

 

 

I got a email from PayPal today stating the following:

 

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:

 

catalog/ext/modules/payment/paypal_ipn/ipn.php

 

 

 

I am not sure if this is a permission issue with access to the ipn.php file. Please help me with this issue.

 

Pimpton did you sort that problem ?

I got same issue and cant find solve for it

Link to comment
Share on other sites

  • 4 months later...
  • 10 months later...

Hello,

 

In the standard setup PayPal IPN deletes the (so-called temporary) order (and thereby also the order-ID) when a customer decides to interrupt (and thereby effectively cancel) his payment at the Paypal website.

 

Obviously this approach saves space in the database (by clearing uncompleted orders), but also has an important drawback from an accounting/control viewpoint: it creates gaps in the subsequent numbering of orders.

 

An solution would be to change the code in includes/functions/general.php:

// START DELETE TEMP PAYPAL IPN ORDER
// This is used in shopping_cart.php when a temporary order needs to be deleted
// after it was cancelled by customer on paypal site.
  function tep_remove_order($order_id, $restock = false) {
    if ($restock == 'on') {
      $order_query = tep_db_query("select products_id, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
      while ($order = tep_db_fetch_array($order_query)) {
        tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . " where products_id = '" . (int)$order['products_id'] . "'");
      }
    }

    tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
    tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
    tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "'");
    tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$order_id . "'");
    tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'");
  }
// END DELETE TEMP PAYPAL IPN ORDER

Instead of deleting the order in the orders table, the order could be emptied (meaning all entries other than the order_id) and the orders_status set to a new status, reflecting that payment of the order was cancelled during the Paypal process.

 

Can anyone point out possible problems with this approach (other than additional database size)?

 

Kind regards,

 

Dennis

Link to comment
Share on other sites

  • 1 month later...

Hi everyone

Using Paypal Official 3.2 version on oscommerce 2.3.4-

I am using checkout_process.php on Autoreturn URL

 

I am facing same issue below like greasemonkey-
 

 

......., I have a small issue which I cannot seemt to sort out.

When a customer pays with Paypal the customers country is not getting transferred to the order process email???

It looks like below:

Delivery Address
------------------------------------------------------
Jane Dow
1121 Main St E
Toronto, M1M 1M1
Ontario,

Billing Address
------------------------------------------------------
Jane Dow
1121 Main St E
Toronto, M1M 1M1
Ontario,

It seems to work fine when a customer pays with my other payment module... Only when they choose paypal?

I have looked at the following code in ipn.php

         $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
                         EMAIL_SEPARATOR . "\n" .
     tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n") . "\n";
         }
         $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                         EMAIL_SEPARATOR . "\n" .
     tep_address_format($order->billing['format_id'], $order->billing, 0, '', "\n") . "\n\n";
I have tried to take snippets from checkout_process.... but no luck... any ideas?

 

Could anyone help on this....

Link to comment
Share on other sites

  • 6 months later...
  • 5 months later...

Hello I'm using an old release of PayPal IPN Official, the last compatible with 2.2.

I have been using the release for two years without a scratch. Last week express_checkout.php returned an error 500.

Looking at the server's log the only information I have is the following:

" End of script output before headers"

 

 the error feedback is not enough for me to understand what happened. I immediately though our hosters changed something in the PHP version our space is running but I have received confirmation nothing has changed in the server's configuration.

 Can anybody help me guess what happened?

Thank you

Link to comment
Share on other sites

  • 1 year later...

I've successfully used the PayPal IPN Module v1.0 for my old 2.2-MS2 site for 12+ years!  In all that time I've never had a problem, so I'm curious if the latest version (which one?) will osCommerce 2.3.4 standard?

Which latest full version is most stable?  Will it run in PHP 5.6? 

https://apps.oscommerce.com/MfJlW

Edited by ezfindit

Chris

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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