Latest News: (loading..)
Mark Evans

Official PayPal IPN Support Thread

4,145 posts in this topic

Excused for my English.

I have installed the 1.3.0.0 version of paypa_ipn.

In my site I have installed also affiliated OSC 1.8.

I have this problem:

When the customer goes to paypal goes all good.

The site generates a number of order Es. 51200 with name " waiting for pagamento".

When the customer finishes the payment l' order n 51200 changes name " payment effettuato".

The problem arrives when the customer return from paypal to ../checout_process.php

Now it comes generated a new order with number 51201.

This generates confusion for the customers.

I kindly ask to help me

Grazie

Share this post


Link to post
Share on other sites

Hi, I installed the IPN and its showing the items good on Transaction Type: Per Item

but its not sending me emails when i check out or to the customers email (I am running in sandbox) and its not updating the order status.

 

Thanks for any help.

 

PHP Version 5.2.17

 

cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

 

osCommerce Online Merchant v2.2 RC2a

 

PayPal IPN v2.3.4.6

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Sorted.

By mistake I have emptied table orders_status whilst copying the shop. The Preparing [Paypal IPN] appeared in the table after placing a test order. I added the rest manualy to db.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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!!!!!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Posted (edited)

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now