Jump to content
Sign in to follow this  
devosc

PayPal_Shopping_Cart_IPN

Recommended Posts

Guest

Just uploaded a zip version for convience. I tried downloading one of the other 2 and didn't have any problems with WinZip 8.1.

Share this post


Link to post
Share on other sites

Hi,

 

Just installed the contrib that is 21 Apr 2004 - v2.1 and here comes another new contrib on 21 Apr 2004 - v2.1 Again!

 

=>There was an error in the HTML docs '$nbsp;' should of been ' ' for the bit where it said 'Find (line 415):'

 

I can't locate this error. If the error is in the HTML docs, Will it afftect the contrib that I installed. I installed the contrib on 21 Apr 2004.

 

Thanks. :rolleyes:

Edited by akkinmore

Share this post


Link to post
Share on other sites
Guest

Hi Shelly,

No it won't cause any errors, and it is in a non-critical area, actually I have it in my code since I copied and pasted the intructions to test them. But however for good house keeping in the admin/orders.php 'now' at line 453 (or so) it would be adivised to remove them.

Share this post


Link to post
Share on other sites
Guest

Hi, I just installed IPN v2.0 and everything seems to be great except that I'm not getting the typical OSC order emails. (getting paypal emails with order contents though)

 

When I tested, I used a credit card on paypal and not a paypal account. Is the problem because the billing address or email address is not "confirmed"??

 

Finally, am I asking for trouble by accepting orders from "unverified" sources?

 

Any advice would be greatly appreciated. Thanks!

 

Aaron

Share this post


Link to post
Share on other sites
Guest

Aaron,

 

Whether you should automatically accept payments is probably your decision and the type of agreement you have with the customer. You may want to ask PayPal what your standing would be in regard to accepting unverfied addresses.

 

I would state however that I did notice that if you do not require a verified address then the customer address details that they have registered with PayPal are not returned via the IPN. Whether this is absolute I'm not sure and I cannot recall having seen mention of this possible fact in the IPN manual.

 

In v2.0 I forgot to mention that you need to upload the catalog/ipn.php script, also you need to ensure that your email config settings are correct.

 

If you are just starting out then I would suggest that you install v2.1 since this will now be the basis for any upgrades, there seems to one other aspect that needs to be taken care of in order to make the entire PayPal scenario as efficient as possible in terms of usage with osCommerce - however this change will require a change outside of the usual types of files that a payment module would be expected to use. There are other improvements that may be made but what is being refered here to will solidify a PayPal order experience from the customer's perspective.

Share this post


Link to post
Share on other sites

Hello,

 

After I installed the newest version I started having problems which I did not have with previous one:

 

The order status is not updated after the payment goes through and still shows 'Pending PayPal Notification' and the stock quantity is not updated either.

 

Can anyone help please?

Share this post


Link to post
Share on other sites
Guest

Is the second order status set as default? For some reason now with the 2 order status fields neither can be set to 'default' and both should be explicitly set, e.g:

 

Set Pending Notification Status = 'Pending PayPal Notfication'

Set Order Status = 'Pending'

 

Try the above via the IPN Test Panel.

Share this post


Link to post
Share on other sites

The order status is not set as default. I tried that already. I think for some reason the file checkout_update.php is not called and hence nothing is updated.

Share this post


Link to post
Share on other sites
Guest

Are you getting any debug emails?

Share this post


Link to post
Share on other sites
Guest

The Cart Test, is to validate that the amount you received is the amount of the total osC order, it needs working on but sould be ok if both are in USD.

 

Can you show the return path? Can't tell why this is happening right now, with seeing etc, didn't change anyting to do emails so should be the same as previous version.

Share this post


Link to post
Share on other sites

Does it mean I can leave the cart test off without having problems?

 

 

Here is what is shown in the e-mails:

 

Return-Path: <nobody@lma336.host.com>

Received: (from nobody@localhost)

by lma336.host.com (8.11.6/8.11.6) id i3NIrW428845;

Fri, 23 Apr 2004 13:53:32 -0500

Date: Fri, 23 Apr 2004 13:53:32 -0500

Message-Id: <200404231853.i3NIrW428845@lma336.host.com>

To: " " <test@crit.com>

Subject: Order Process

From: "Crit.com" <sales@crit.com>

MIME-Version: 1.0

X-Mailer: osCommerce Mailer

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit

Share this post


Link to post
Share on other sites

This is very scary....

 

Yesterday we had a very high-dollar order. In admin, under orders, the amount is $0.00 with no products but it does show the customer's name. In admin under paypal ipn, the transaction type is "cart", payment status is "completed", and the amount shows the correct amount from the receipt sent from Paypal.

 

The confirmation email sent from oscommerce shows no customer information, and no products; just the default field labels and no info.

 

Our debug level is set to "1", and I received two debug emails around the time the order was placed.

 

One says:

Connection Type

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

curl= 1, socket= , domain= www.paypal.com, port= 

 

PayPal Response

 

And the other says:

An unknown transaction () occurred from 64.4.241.140

Are you running any tests?

 

Now here's the really scary part...... we just received an official email from Paypal saying the funds might have been fraudulent and they have reversed the transaction.

 

The store owner contacted this customer and he said he did in fact place the order, so now I'm wondering, what does this mean? Did this customer fraud our store somehow, or is this a bug with IPN? And how does it relate to the blank information? We have never had a transaction like this before. The contribution version we're using is 1.7, which has worked fine for the many orders we've had before this one.

Share this post


Link to post
Share on other sites
Guest

well in previous versions the Cart Test was removed since there seemed to of been a problem especially with Multi-Currency (MC), the contrib was developed and tested using both USD, i.e. osC USD and that the storeowner's PayPal primary balance is in USD, but MC needs working on, currently the remedial test being performed will append the osC currency suffix to the paypal.mc_gross and this string is then compared to the striptags($order->info['total']) which for USD would mean if ('$0.01' == '$0.01') since osC does not store the order total in a pure numeric format, so the above test is also dependent on what type of currency suffix you use.

You should be ok, nobody has reported any loss so far, but the contrib is trying to tighten up on as much validation as it can.

 

Those email headers are they appearing in the body of the email. Normally, since they are headers this info is not immediately shown unless you have configured your email client to display this info by default, also this contrib doesn't mess around with the email headers, it just uses the osCommerce tep_mail function so it might be assumed that all emails are being sent by osC with those headers. In general the 'nobody' account is an account with very little system priviledges - if your running your own server you masquerade this account name, as long as these headers not appearing in the email body then I wouldn't worry (assuming that 'lma336.host.com' is the name of your host server).

Share this post


Link to post
Share on other sites
Guest

quetzlcoatl,

 

It sounds like that the customer returned to the store prior to the IPN being received, since v1.7 uses the session info in order to access the order info, here I'm assuming that you're using the Auto-Return feature.

 

The best thing to do is try and upgrade to the latest version, since the order info is prestored and allows the customer to click back and still recommence the the checkout sequence for that same (updated) order.

 

Since osC utilizes a combination of both session info and the db table customers_basket, v2.1 needs to be refined a little more so that, if the customer does not immediately return to the site there are 2 types of instances possilbe upon their next return:

 

[1] Their session info has not expired, so the registered session var paypal_order_id still exists.

 

[2] Their session has expired but the cart contents still remain in the db table customers_basket.

 

Currently in the case of [1] should the customer try to checkout (again) but the order associated to that registered paypal_order_id has already been processed, i.e. an IPN has been received in regard to that (previous) order, then the customer is simply redirected to checkout_success.php

 

But from the above it would seem better to perform preliminary tests (upon their return and login) to see whether their previous order has been processed (i.e. an IPN received for it) and hence clear their session and customers_basket if neccessary.

 

Incidentally, a whois of the I.P address showed above shows that it was from PayPal.

Share this post


Link to post
Share on other sites
Guest

Sorry if I'm needlessly confused. In step 3 of the setup, edit the following files.

 

catalog/admin/orders.php

 

this file does not exist in my OSC install.

 

I do have admin/orders.php

 

Am I crazy or is my OSC install screwed up? Thanks, Mike

Share this post


Link to post
Share on other sites
Guest

No, it sounds like you installed osC directly in the root directory so yours would be admin/orders.php

Share this post


Link to post
Share on other sites

Greg,

 

Canucklehead here.

 

I have just updated to the lastest IPN version, and in the process of testing, ran into a problem. My default currency is Canada dollar (set as CDA in the language file). I also want to accept US dolar payment.

 

I had a problem with the cart, in that every time I tried to shop in USD, it reverted back to CDA when I went to checkout. To fix that, I have had to go to config, and select "false" for using default language currency.

 

Now then the problem I have is that when I shop in CDA, it's fine until I get to paypal, where everything reverts to USD.

 

Any idea what I can do?

 

Thanks

Share this post


Link to post
Share on other sites

Zorglub,

 

Trying changing, 'CDA' in the language file etc to 'CAD' since if the selected currency is not either of ('CAD', 'EUR', 'GBP', 'JPY', 'USD') then it will automatically revert to 'USD'.

 

Or alternatively you could change 'CAD' in line 88 of modules/payment/paypal.php to 'CDA' whichever suits your site best.

 

Actually paypal recognizes 'CAD' as the Canadian currency code.

Edited by gregbaboolal

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

Share this post


Link to post
Share on other sites

Greg, thanks a bunch.

 

Replaced all my CDA's with CAD's - The good news is, my proces are still there - nothing goes to "0". But now when I get to Paypal, it tells me the cart is empty. It does not even show my custom paypal page.

 

Any idea now?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×