Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 3 votes

Official PayPal IPN Support Thread


4127 replies to this topic

#41 zzfritz

  • Community Member
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 07 December 2004, 06:44

you state the obvious, mibble ... I guess that's how you racked up so many posts

Inspecting the code, this appears to be a clash between Authorizenet Consolidated 1.7 and PayPal IPN. The authorizenet mod to checkout_process.php has its own 'new order_total' embedded inline, before the standard code calls all the payment modules' before_process(), which in the case of PayPal IPN includes another 'new order_total' instance.

Can someone suggest a workaround? [specifics, not generalities]

#42 devosc

  • Community Member
  • 1,250 posts
  • Real Name:devosc

Posted 07 December 2004, 11:04

zzfritz, on Dec 7 2004, 01:44 AM, said:

Lines 384 to 387 of paypal_ipn.php should read:
  if(!class_exists('order_total')) {
    include_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
  }
    $order_totals = $order_total_modules->process();

Edit: moved $order_totals outside clause.

Edited by devosc, 07 December 2004, 11:06.

"Any fool can know. The point is to understand." -- Albert Einstein

#43 Mibble

  • Community Member
  • 13,404 posts
  • Real Name:JAO
  • Location:MA (US): 42n22, 71w04, Massachusetts

Posted 07 December 2004, 12:58

which paypal_ipn.php are you talking about Greg? i cound not find that in the current, unless there are new files again . .

#44 thefoxrox

  • Community Member
  • 15 posts
  • Real Name:brendan

Posted 07 December 2004, 13:18

Hello, I am new to osCommerce, have set up my cart to download products and am going to use paypal for payment. Couldn't get total to pass to paypal and was lead to believe paypal ipn might be solution to my problems so have installed it but not sure how to configure. I have pasted my current settings below. Am not sure about whole private key, public cert thing, can someone please explain this to me as this is last thing I need to do before cart is operational. All help appreciated...

PayPal IPN

Enable PayPal IPN Module
True

E-Mail Address
my paypal account email address

Transaction Currency
Only GBP

Payment Zone
--none--

Set Preparing Order Status
default

Set PayPal Acknowledged Order Status
default

Gateway Server
Live

Transaction Type
Aggregate

Page Style


Debug E-Mail Address


Sort order of display.
0

Enable Encrypted Web Payments
False

Your Private Key


Your Public Certificate


PayPals Public Certificate


Your PayPal Public Certificate ID


Working Directory


OpenSSL Location
/usr/bin/openssl

#45 cwispy

  • Community Member
  • 4 posts
  • Real Name:Shane Chrisp

Posted 07 December 2004, 16:17

devosc, on Dec 7 2004, 07:04 PM, said:

Lines 384 to 387 of paypal_ipn.php should read:
  if(!class_exists('order_total')) {
    include_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
  }
    $order_totals = $order_total_modules->process();

Edit: moved $order_totals outside clause.

<{POST_SNAPBACK}>



I tried editing the file as you stated above, but it still gives the total twice on testing it with sandbox. Any other ideas on how or why it is sending amount and amount_1 to paypal?

cwispy

#46 devosc

  • Community Member
  • 1,250 posts
  • Real Name:devosc

Posted 07 December 2004, 21:36

cwispy, on Dec 7 2004, 11:17 AM, said:

I tried editing the file as you stated above, but it still gives the total twice on testing it with sandbox. Any other ideas on how or why it is sending amount and amount_1 to paypal?

cwispy

<{POST_SNAPBACK}>


This problem is not related to the edit mentioned above, I also checked paypal's sandbox using the other contrib and saw the discrepency also, so it seems to be a PayPal problem, harald already mentioned that this has been raised with them.

In regard to the $order_totals edit above, $order_totals would also need to be added to the list of global vars above so this part of the script should now look like:

Quote

    function before_process() {
      global $customer_id, $order, $sendto, $billto, $payment, $currencies, $cart, $cart_PayPal_IPN_ID, $order_totals;
      global $$payment;

  if(!class_exists('order_total')) {
    include_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
    $order_totals = $order_total_modules->process();
  }
Note I moved $order_totals back into the clause (per other contrib), this is because if using CCGV then that contrib moves $order_totals before the default osCommerce checkout process method call to $payment_modules->before_process();
"Any fool can know. The point is to understand." -- Albert Einstein

#47 mtblair

  • Community Member
  • 2 posts
  • Real Name:Mark Blair

Posted 08 December 2004, 00:43

I've installed the osCommerce Paypal IPN contrib and it works fine in the sandbox. When I switch to the production Paypal server and issue a transaction:

1. the user returns after making a payment,
2. the order confirmation email is sent and
3. the stock is updated appropriately (problems I had with the other Paypal IPN contrib),

but the status is not set to "Pending". The status remains at "Preparing Paypal IPN" and an order history record is created, which the user can see.

From the install doc, I gathered that if the transaction came back VERIFIED, the status was changed and a history record created. Otherwise, nothing changes (status or stock) and a history record is not created.

Any clues or have I misinterpreted the doc?

#48 zzfritz

  • Community Member
  • 501 posts
  • Real Name:Fritz Clapp
  • Location:California USA

Posted 08 December 2004, 01:05

I found that order status was not being updated because the query string in ipn.php searched on both the order number and the customer id, and the latter was not in the POST vars as apparently expected. I edited the query, and the order status is being updated now.

It is also important to note that IPN is not instantaneous: the status did not change from the interim 'Preparing [PayPal IPN]' for a few minutes and in one case it took 18 minutes before the verification was received and the order status updated.

#49 devosc

  • Community Member
  • 1,250 posts
  • Real Name:devosc

Posted 08 December 2004, 02:15

zzfritz, on Dec 7 2004, 08:05 PM, said:

I found that order status was not being updated because the query string in ipn.php searched on both the order number and the customer id, and the latter was not in the POST vars as apparently expected.  I edited the query, and the order status is being updated now.

It is also important to note that IPN is not instantaneous:  the status did not change from the interim 'Preparing [PayPal IPN]' for a few minutes and in one case it took 18 minutes before the verification was received and the order status updated.

<{POST_SNAPBACK}>

If your saying you removed the customer_id from the query (it should be the $_POST['custom'] field), then you've just removed any form of security currently available, the encryption of the form fields only serves as a mask, and the customer_id is the only value that can not be readily determined, one can determine the expected order_id from the customer's account history and the contribution does not currently implement any additional checks as suggested by paypal, receiver id and payment amount, need to put it back....
"Any fool can know. The point is to understand." -- Albert Einstein

#50 Harald Ponce de Leon

  • Manager
  • 3,150 posts
  • Real Name:Harald Ponce de Leon
  • Gender:Male
  • Location:Solingen, Germany

Posted 08 December 2004, 02:26

mtblair said:

but the status is not set to "Pending".  The status remains at "Preparing Paypal IPN" and an order history record is created, which the user can see.

From the install doc, I gathered that if the transaction came back VERIFIED, the status was changed and a history record created.  Otherwise, nothing changes (status or stock) and a history record is not created.

That is partly correct. An order status history entry is made regardless if the transaction came back as VERIFIED or not, and stores the appropriate transaction status information along with the order status string.

If the order status is only the Preparing status, then the IPN notification was more than likely not received, or malformed as Fritz describes with the customer ID not existing in the "custom" parameter value.

zzfritz said:

I found that order status was not being updated because the query string in ipn.php searched on both the order number and the customer id, and the latter was not in the POST vars as apparently expected. I edited the query, and the order status is being updated now.

Do you have any contributions installed that affect the checkout procedure? The customer ID is passed to PayPal as the "custom" parameter, and the IPN notification should contain it.

zzfritz said:

It is also important to note that IPN is not instantaneous: the status did not change from the interim 'Preparing [PayPal IPN]' for a few minutes and in one case it took 18 minutes before the verification was received and the order status updated.

I haven't experienced such long delays during development on the Sandbox server - it is something that the module has no influence over though.

Edited by hpdl, 08 December 2004, 02:27.

Harald Ponce de Leon
osCommerce, Sell With Emotion

#51 pbreit

  • Community Member
  • 161 posts
  • Real Name:Patrick Breitenbach

Posted 08 December 2004, 03:04

The double display of the "Total Amount" appears to be a bug. I've logged a bug on our side. Since it's a cosmetic bug, I don't think it will make it into an emergency fix so we may not see a fix for a week or two.

I will work with the osC team to see if we can come up with a better way to handle addresses so that merchants can make sure they ship to an address they are comfortable with. Thanks for the feedback.
Patrick Breitenbach

#52 famous58

  • Community Member
  • 44 posts
  • Real Name:Ryan
  • Location:US

Posted 08 December 2004, 20:37

Hi guys. I love the ease of the instasll but I'm confused.

I've got the mod installed as stated on the install instructions. I am using the live server and not ussing SSL encryption. I have the Preparing order stauts set to "Preparing [Paypal IPN]" and the Acknoweldge status set to "Pending". I've had IPN on and off in Pyapal, currently it's on.

When I make an order everything works fine. The order goes through and I'm taken back to the osC confirmation page.

However, when I go to the osC admin area the order is listed as "Preparing [Paypal IPN]". When I log into Paypal the order is there but I have to "Accept" or "Deny" the payment. (I've double and triple checked that my account address in osC matches my Paypal account).

Herein lies the confusion. Does this mean that I will have to accept or deny every payment made? Isn't the whole point of IPN not to have to do that?

I'm sure I am just missing something but the more I stare at this stuff the worse it gets. Please steer me in the right direction

T.I.A.

#53 PandA.nl

  • Community Member
  • 323 posts
  • Real Name:Paul
  • Location:Haarlem, Netherlands

Posted 08 December 2004, 20:59

famous58, on Dec 8 2004, 10:37 PM, said:

Does this mean that I will have to accept or deny every payment made?  Isn't the whole point of IPN not to have to do that?

<{POST_SNAPBACK}>

I'm no PayPal expert, but don't think this has anything to do with the PayPal IPN module, or even IPN in general.
Do you have a verified PayPal account? If not, that might the cause that you have to "Accept" or "Deny" the payments.
Please do not PM me for support, I will not respond anyway.

#54 famous58

  • Community Member
  • 44 posts
  • Real Name:Ryan
  • Location:US

Posted 08 December 2004, 21:13

PandA.nl, on Dec 8 2004, 01:59 PM, said:

I'm no PayPal expert, but don't think this has anything to do with the PayPal IPN module, or even IPN in general.
Do you have a verified PayPal account? If not, that might the cause that you have to "Accept" or "Deny" the payments.

<{POST_SNAPBACK}>


Ya we have a verfied account, 425 verified orders. We were running the other Paypal IPN module for about five months with no problems but lately we've been having problems with it dropping orders and not giving correct info.

The "error" Paypal is giving on the new mod is that the address (of the buyer) is not verified, that's why the "Accept/Deny" options are showing up.

In the other Paypal IPN mod there is an area for entering an address. I did notice that with the new mod on the Paypal "Make Your Payment" screen (after logging in) there is no address option as there was before. Is it possible that the address is not being passed on to Paypal?

#55 PandA.nl

  • Community Member
  • 323 posts
  • Real Name:Paul
  • Location:Haarlem, Netherlands

Posted 08 December 2004, 21:53

famous58, on Dec 8 2004, 11:13 PM, said:

The "error" Paypal is giving on the new mod is that the address (of the buyer) is not verified, that's why the "Accept/Deny" options are showing up.

<{POST_SNAPBACK}>

Hopefully the experts can help you with this then. The only thing that I can add that I'm also using this module (osCommerce PayPal IPN Module v1.0 For 2.2MS2) and also received several payments from unverfied customers, but I don't have to accept or deny any of the payments.
Please do not PM me for support, I will not respond anyway.

#56 famous58

  • Community Member
  • 44 posts
  • Real Name:Ryan
  • Location:US

Posted 08 December 2004, 23:10

PandA.nl, on Dec 8 2004, 02:53 PM, said:

The only thing that I can add that I'm also using this module (osCommerce PayPal IPN Module v1.0 For 2.2MS2) and also received several payments from unverfied customers, but I don't have to accept or deny any of the payments.

<{POST_SNAPBACK}>


Fixed it. About line 328 of includes/modules/paypal_ipn.php I replaced this:

      $parameters['no_shipping'] = '1';

with this:

      $parameters['no_shipping'] = '0';

And voila. The shipping area show in Paypal and the accept deny buttons are gone.

#57 mtblair

  • Community Member
  • 2 posts
  • Real Name:Mark Blair

Posted 09 December 2004, 04:56

hpdl, on Dec 7 2004, 07:26 PM, said:

Do you have any contributions installed that affect the checkout procedure? The customer ID is passed to PayPal as the "custom" parameter, and the IPN notification should contain it.

zzfritz said:

It is also important to note that IPN is not instantaneous: the status did not change from the interim 'Preparing [PayPal IPN]' for a few minutes and in one case it took 18 minutes before the verification was received and the order status updated.

I haven't experienced such long delays during development on the Sandbox server - it is something that the module has no influence over though.

<{POST_SNAPBACK}>


It looks like I may have been experiencing a significant "lag" in the IPN response on the production Paypal server. I ran a couple of tests today and 2 of the transactions took over 20 minutes to change from "Preparing..." to "Pending".

I'll keep an eye on this to see if I can detect a pattern or a particular time when it occurs most often.

Thanks for the help! This is a great contrib!

#58 mhormann

  • Community Member
  • 138 posts
  • Real Name:Matthias C Hormann
  • Location:This same small planet where we ALL live.

Posted 09 December 2004, 17:32

Just a sidenote regarding 'verified address':

According to a PayPal rep I talked to on the phone a few days ago, THERE IS NO WAY to have a 'verified address' EXCEPT IF YOU ARE LOCATED IN THE U.S.

So this poses the problem for international sellers whether to ship to an 'unverified address' or not, since effectively ALL addresses outside the U.S. will be UNVERIFIED.

I've had the problem a few times, and decided to allow shipping to unverified addresses in order to have an automatic and smooth transaction flow. Then again, I usually sell low-priced goods.

Since they're a 100% daughter company of eBay for a while now, let's hope they come up with something better soon. Like maybe Germany's 'PostIdent' system.

----

Also, if you still use Greg's PP IPN, you should change the text "You do not have to be a PP member to pay...". This also ONLY applies to the U.S. AND IS NOT VALID FOR ANY OTHER COUNTRY.

-----

The 'no_shipping' variable just states if the customer has to enter a shipping address or not. (Should be == '1' for intangible goods.)

-----

A little OT perhaps, but many (especially U.S.) sellers do not seem to know this.

Regards,
M.
I don't want to set the world on fire—I just want to start a flame in your heart.

osCommerce Contributions:
Class cc_show() v1.0 – Show Credit Cards, Gateways
More Product Weight v1.0

#59 mhormann

  • Community Member
  • 138 posts
  • Real Name:Matthias C Hormann
  • Location:This same small planet where we ALL live.

Posted 09 December 2004, 17:40

mtblair, on Dec 9 2004, 05:56 AM, said:

It looks like I may have been experiencing a significant "lag" in the IPN response on the production Paypal server.  I ran a couple of tests today and 2 of the transactions took over 20 minutes to change from "Preparing..." to "Pending".

Be aware. This is normal, ESPECIALLY in Germany.

PayPal, in their never-ending marketing hype, make users believe it would be a great idea to pay a PP transaction using their BANK ACCOUNTS and transferring money to PP's German bank account in order to pay for a PP transaction.

Within the EU, this is a very BAD idea since it usually takes about 5-7 DAYS until the transaction is completed! PP is only fast if you use a CC or have enough money in your PP account. Within the EU, it is usually much faster to have users pay via IBAN/BIC bank transfer.

Just to let you know what to tell your customers if they start complaining about you telling them 'PP is so FAST' (like I do) and they have to wait a week before you even ship...

I'll probably change the 'You don't have be a PP member' popup to one that explains how to use PP to really get fast transactions.

Regards,
M.
I don't want to set the world on fire—I just want to start a flame in your heart.

osCommerce Contributions:
Class cc_show() v1.0 – Show Credit Cards, Gateways
More Product Weight v1.0

#60 devosc

  • Community Member
  • 1,250 posts
  • Real Name:devosc

Posted 09 December 2004, 17:52

mhormann, on Dec 9 2004, 12:32 PM, said:

You don't have to ship to a verified address in order to qualify for Seller Protection. When logged into your account you can see which countries being sold to will apply, curently it looks like that sales from the U.S to either the US, CA or the UK will have seller protection as long as the tangible goods are shipped to the address in the transaction details page - I think this might be what Patrick may of been referring to as needing to be worked on...
"Any fool can know. The point is to understand." -- Albert Einstein