Jump to content
Mark Evans

Official PayPal IPN Support Thread

Recommended Posts

I do use the contribution "quantity for product attribute", but this bug happens with nothing changed at all in the files from your contribution. :(

Okay - there's your problem. In the user guide, in big bold red letters it says:

Note: Rule of thumb - whenever you make ANY change to checkout_process.php you MUST manually merge the change into paypal_ipn.php and ipn.php

 

The PayPal IPN works different from other payment modules and bypasses the checkout_process file. Which means that any contribution which modifies the checkout_process.php file will require some manual coding TLC in paypal_ipn.php and ipn.php.

 

Which means that you need to manually merge the contribution you are using into the paypal_ipn.php and ipn.php file. Stock update happens in the ipn.php file but without knowing the contrib you are using, I can't give specific advice.

 

all the best - Terra


My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Share this post


Link to post
Share on other sites
Okay - there's your problem. In the user guide, in big bold red letters it says:

Which means that you need to manually merge the contribution you are using into the paypal_ipn.php and ipn.php file. Stock update happens in the ipn.php file but without knowing the contrib you are using, I can't give specific advice.

all the best - Terra

 

This contribution doesn't change anything to the stock of product with attributes.

 

Moreover, if I change anything to checkout_process but does not replicate it in the ipn.php file, it would mean that the IPN contribution would work idependently of any change to checkout_process, right? This file is then bypassed, so any changes brought there do not influe on the IPN contribution, or am I wrong?

Share this post


Link to post
Share on other sites
I do use the contribution "quantity for product attribute", but this bug happens with nothing changed at all in the files from your contribution. :(
This contribution doesn't change anything to the stock of product with attributes.

Okay - in short: the IPN is NOT psychic.

 

In the standard osCom shop, attributes do not have stock. Only products have stock. The IPN is written for the standard osCom shop and therefore deducts the stock from the products.

 

You have a modified shop, where attributes can also have stock. The IPN doesn't know this (as you did not modify the files), so it doesn't update the attribute stock.

 

You will need to go back to the original contrib files, see what changes you made to checkout_process.php when you installed the contrib, and then sit down with a PHP editor and manually merge this changes into the ipn.php file.

 

To sum up - the IPN does not deduct attribute stock as it was written for the standard osCom shop which does not have attribute stock.

 

Terra


My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Share this post


Link to post
Share on other sites
To sum up - the IPN does not deduct attribute stock as it was written for the standard osCom shop which does not have attribute stock.

 

You misunderstood me. I am sorry if I wasn't clear.

 

I do not care about the attributes stock. I care about the main, basic quantity of the product itself. As far as I try, if a product has attributes, its stock doesn't get updated. I am speaking of the stock that every product has, the one that comes with the basic OSC installation. :(

Share this post


Link to post
Share on other sites
I do use the contribution "quantity for product attribute", but this bug happens with nothing changed at all in the files from your contribution. :(
You misunderstood me. I am sorry if I wasn't clear. I do not care about the attributes stock. I care about the main, basic quantity of the product itself. As far as I try, if a product has attributes, its stock doesn't get updated. I am speaking of the stock that every product has, the one that comes with the basic OSC installation. :(

I based my reply on your earlier statement that you use "quantity for product attribute".

 

If you do NOT use that contribution and just use the standard osCom product stock functionality, then the IPN should work. I've just run two test orders through the sandbox (products with attributes) and they worked (stock was deducted, order emails were sent out).

 

Not sure therefore what's going wrong but it should be a problem isolated to your shop set-up, not a contribution bug as I was able to run successful test orders. NB: the code for stock update was moved from paypal_ipn.php to ipn.php for versions 2.x - if you're looking to debug you'll need to focus on the ipn.php file - that's where the stock update happens.

 

all the best - Terra

PS: I use QTPro myself and with QTPro I had to modify the PayPal IPN manually or it didn't work - I based my earlier reply on the assumption that "quantity for product attribute" works in a similar way to QTPro as both modify the shop to allow attribute stock.


My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Share this post


Link to post
Share on other sites

Would it not be a good idea to close this topic at 100-pages and reopen a new one?


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites
PS: I use QTPro myself and with QTPro I had to modify the PayPal IPN manually or it didn't work - I based my earlier reply on the assumption that "quantity for product attribute" works in a similar way to QTPro as both modify the shop to allow attribute stock.

 

It might do, and my attempts at having this contribution work with IPN were unsuccessful. However, I was just trying to get my site to work in the good old way with my post above. :)

Share this post


Link to post
Share on other sites
Agreed! You are spending way too much time confusing people in this thread. Why not stick to your own thread for your own contribution?

 

Vger

I'm sorry that all my efforts trying to improve this module just make you confused. I will stop posting in this thread and hopefully that's what you wish for.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites

Terra, please remove my username in the code and the user guide. I don't want to take any part in this any more. The community sponser just don't like it. I am very sorry.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites

Hmmm - why not have this great contribution improved - whether or not Alex has made another contrib? Confused? No. I think we should let Terra and Alex find all possible errors - they certainly now MUCH more of PHP than most people do...

 

Even if one person is a sponsor, does that mean they are ALWAYS right and everybody must obey?

 

Helle

Share this post


Link to post
Share on other sites
Terra, please remove my username in the code and the user guide. I don't want to take any part in this any more. The community sponser just don't like it. I am very sorry.

 

Come on!

Do not let one person scare you away! :thumbsup:

 

I must say the given support to 2 contributions in one tread is indeed confusing; especially when one is not a coder.

Maybe start your own tread to give support to your own PayPal contri, but please do not forsake us :'(

 

Remember; We already lost a lot of good coders because others think the can bully anyone because they are community sponsors, members of a moderator team or up to their elbows in someone's *ss (pardon my France).

See what recently happened to tomjul and his great contribution called Image Magic!

This is an Open Source Community and therefore everybody is entitled to contribute in anyway they want.


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites

Thanks for this great contribution. I just installed and run a test. it give me this error when I tried to check out.

Warning: fopen(/570732-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 426

Warning: fwrite(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 427

Warning: fclose(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 428

Warning: file_get_contents(xxxx) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 433

Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting private key in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 433

Warning: unlink(/570732-2-data.txt) [function.unlink]: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 435

Warning: file_get_contents(/570732-2-signed.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 438

Warning: fopen(/570732-2-signed.txt) [function.fopen]: failed to open stream: Permission denied in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 442

Warning: fwrite(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 443

Warning: fclose(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 444

Warning: unlink(/570732-2-signed.txt) [function.unlink]: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 450

Warning: file_get_contents(/570732-2-encrypted.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 453

Warning: unlink(/570732-2-encrypted.txt) [function.unlink]: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 457

 

What have I done wrong?

I know there are some settings I really don't know what should I put in and it might created this error.

 

I don't know much about PHP, Anybody can help me out?

 

Thanks in advanced!

Edited by 1stmp3

Share this post


Link to post
Share on other sites

Anyone having problems with order status changes can add this to the list of things to try:

 

Try typing the fully qualified url into a browser for the ipn.php file -

e.g. http://www.mydomain.com/ext/modules/paymen...pal_ipn/ipn.php

 

When I did this I got the following error:

Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory

I ended up putting the proper php.ini in each directory leading up to ipn.php and everything started working. I hope this works for someone else as this caused me much grief. :angry:

But now I'm all smiles: :)

 

If you don't get an error than unfortunately this is not the fix.

If you get a different type of error, it will atleast shed some light on what's happening when paypal sends the acknowledgement. This really is a great contribution and its received some unfair bashing, but everyone should remember that this module was created with blood, sweat and plenty of tears.


Troy Wilson

Keepsake-storybooks.com

Share this post


Link to post
Share on other sites
Thanks for this great contribution. I just installed and run a test. it give me this error when I tried to check out.

Warning: fopen(/570732-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 426

Warning: fwrite(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 427

Warning: fclose(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 428

Warning: file_get_contents(xxxx) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 433

Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting private key in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 433

Warning: unlink(/570732-2-data.txt) [function.unlink]: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 435

Warning: file_get_contents(/570732-2-signed.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 438

Warning: fopen(/570732-2-signed.txt) [function.fopen]: failed to open stream: Permission denied in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 442

Warning: fwrite(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 443

Warning: fclose(): supplied argument is not a valid stream resource in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 444

Warning: unlink(/570732-2-signed.txt) [function.unlink]: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 450

Warning: file_get_contents(/570732-2-encrypted.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 453

Warning: unlink(/570732-2-encrypted.txt) [function.unlink]: No such file or directory in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 457

 

What have I done wrong?

I know there are some settings I really don't know what should I put in and it might created this error.

 

I don't know much about PHP, Anybody can help me out?

 

Thanks in advanced!

 

Looks like something with permissions and "no such file or directory"........


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites
Thanks for this great contribution. I just installed and run a test. it give me this error when I tried to check out.
Warning: fopen(/570732-2-data.txt) [function.fopen]: failed to open stream: Permission denied in /home/sites/xxxx.co.uk/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 426/code]

You have enabled Enable Encrypted Web Payments but it's not working. Either disable it in your admin (set to false) or you'll need to configure it correctly. If you enable Enable Encrypted Web Payments you must enter all the other information (key, certificate, working directory, OpenSSL) correctly and OpenSSL must be enabled on your server. Please read the install guide for more information, there's also information on this thread in the last pages or see the PayPal guide: https://www.paypal.com/us/cgi-bin/webscr?cm...p-intro-outside

 

all the best - Terra


My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Share this post


Link to post
Share on other sites

Hi

 

Well, I know that Vger told me this contrib has nothing to do with danish characters etc.

What I don't understand (not being a PHP shark) is that the ISO code is set to the same on my server - on my PHP pages and on PayPal's languge pages???

 

All is set to:

 

Iso-8859-1

 

Why is it that the characters æøå ( æ ø å) is not being transfered to PayPal. The fields where one of these characters turn up - is emty???

 

Helle *asking all the forbidden questions * :blush:

Share this post


Link to post
Share on other sites
Well, I know that Vger told me this contrib has nothing to do with danish characters etc. What I don't understand (not being a PHP shark) is that the ISO code is set to the same on my server - on my PHP pages and on PayPal's languge pages???
It really isn't a PayPal issue, so please start a new thread.

 

But to answer your query: The character encoding isn't just your php pages - it's also your MySQL database and the server configuration itself (how MySQL and PHP are set up on the server - that's the job of the server admin). Getting the character encoding right will need for all components of a website (server, database, php pages) to use the same encoding.

 

In addition, for text which is entered directly onto PHP pages, your text editor also has to use the same encoding. Even though you don't see the encoding of your text editor it's still there and can really mess up site encoding.

 

There's an excellent overview which I recommend reading: http://www.sitepoint.com/article/guide-web...racter-encoding

 

Character encoding is one of the hardest things to get right and I don't envy you the task ahead. To start pinpointing your problem, try to find out where the data which is rejected is coming from - is it called from the database? is it something you entered in a php file? is it data entered by customers into your website?

 

NB: the MySQL equivalent of ISO8859_1 is latin1. More info on the MysQL site: http://dev.mysql.com/doc/refman/4.1/en/charset.html

With MySQL you have 4 different settings: Server, Database, Table, Column, all of which have an encoding defined.

 

This is a huge subject, so I'd strongly recommend starting a new thread - you may also get more help from other developers if it's flagged as generic encoding problem and not just as an IPN query.

 

all the best - Terra


My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Share this post


Link to post
Share on other sites
It really isn't a PayPal issue, so please start a new thread.

 

It's a PayPal/characterset issue but not this contribution.

 

I had the same issue when using the Dutch words: "Bevestig uw bestelling én uw betaling".

PayPal give an error when trying to pay via the IPN module saying that there was an invalid characterset in use, I contacted PayPal, they checked my site and told me that using "én" was causing the problem.

I could change the "én" or change my characterset in osCommerce and the Database.

After changing "én" to "en", wich means the same but is prenouced differend, the error whas gone.


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites

PayPal IPN and WPP - I am getting 2 errors and I think it has to do with the PayPal IPN? I get an image that tries to download when I'm in the OSC admin, but the image never shows. It's an image that's coming from the PayPal secure side of their site. It looks like this: "https://www.paypal.com%3c/td%3E%20%20%3C/tr%3E%3C/table%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C/td%3E%20%20%20%20%20%20%20%20%20%20%3C/tr%3E%20%20%20%20%20%20%20%20%3C/table%3E%3C/td%3E%20%20%20%20%20%20%3C/tr%3E%20%20%20%20%3C/table%3E%3C/td%3E%3C!--%20body_text_eof%20//--%3E%20%20%3C/tr%3E%3C/table%3E%3C!--%20body_eof%20//--%3E%3C!--%20footer%20//--%3E%3Cbr%3E%3Ctable%20border=" There are no quotes, I added these so you can see the entire link.

 

The second error has to do with receiving a notice that I have an order and there is a payment received in PayPal, but no confirmation email is sent from OSC. All I get is a red X next to the order comments in the OSC admin screen. Then when I ship from PayPal, none of the name and address info is completed on their end.

 

I'm trying to figure this out in here because I have the PayPal IPN integrated with the WPP.

 

Any ideas?

 

Many thanks,

Sticky Pod


Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Share this post


Link to post
Share on other sites

Hi Terra,

 

Just wanted to say Thank you ... ;)

 

 

 

 

Lexi - this is a totally different contribution you are using. Please use their support thread or start a new one. This thread is ONLY for the "osCommerce PayPal IPN Module v1.0 For 2.2MS2" contribution, available here: http://www.oscommerce.com/community/contributions,2679 Whether you want to change to this contrib or use your existing one is entirely your choice - I've never installed Pablo's contrib so no idea what's preferable. However - as Pablo's contrib was last updated in July 2004 you may well want to switch to a different module. Really depends if Pablo's is working for you or not (if it ain't broke, no need to fix it). all the best - Terra.

Share this post


Link to post
Share on other sites

I have three questions.

 

When I use PayPal it asks for some of the information that was provided when the Customer registered with osCommerce. Is there a way to avoid having the Customer input this info twice?

 

Paypal has an option to have the customer redirected back to the Shopping cart, which is important to my site since they download the product from the final screen in osCommerce. PayPal wants a URL to do this, what do I provide for that URL.

 

In order to test that PayPal is working I am creating a transaction using my credit card and then doing a refund. Is this the best way?

 

Thanks for any help!

Share this post


Link to post
Share on other sites

Bill, if you are referring to the Auto-Return feature in your Pay Pal account settings then the return url is something like https://www.yourdomain.com/checkout_process.php (adjust as necessary for your website).

 

However, do not sign up for the Pay Pal IPN service on the Pay Pal website - which is different to this contribution. This contribution handles all of that.

 

Vger

Share this post


Link to post
Share on other sites
Bill, if you are referring to the Auto-Return feature in your Pay Pal account settings then the return url is something like https://www.yourdomain.com/checkout_process.php (adjust as necessary for your website).

 

However, do not sign up for the Pay Pal IPN service on the Pay Pal website - which is different to this contribution. This contribution handles all of that.

 

Vger

 

Thanks for your response.

 

I do not understand what you mean by:

 

However, do not sign up for the Pay Pal IPN service on the Pay Pal website - which is different to this contribution. This contribution handles all of that.

 

I signed up for a Paypal Buisness Account and implemented Website Payment Standard, is this not the correct one?

Share this post


Link to post
Share on other sites
I signed up for a Paypal Buisness Account and implemented Website Payment Standard, is this not the correct one?

This thread is for paypal IPN. The paypal website payment standard doesn't really need a thread as the one already available in stock osC works fine.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hi everyone, I was hoping someone might be able to help me iron out a few minor details with 2.2. It was a huge leap from 1.4 which I have working well. In 2.2 things have been moved around alot and there are no more help files (for the contributions I added when uploading 1.4 - referring to CCGV-trad and package tracking with email mods). Doing a bunch of hunt and search between the two files (catalog/ext/modules/payment/ipn.php and catalog/includes/modules/payment/paypal_ipn.php), I found everything...A hint to those of you out there who want to upgrade and ran into the same thing I did....Most of the email stuff is in the ipn.php file located in ext/modules/....ipn.php directory and the work horse of the contribution is in includes/modules/.....paypal_ipn.php.

Once you figure this out things are pretty smooth with finding anything you need to update.

 

Now to the problem...I uploaded all and went into test mode. Bought some things, checked out and at some point in the checkout I got an error. It was not liking the ccgv (trad) line in includes/modules/payment paypal_ipn.php

//ADDED CCGV BEGIN //
if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');// CCGV
$order_total_modules->clear_posts();// CCGV
//ADDED CCGV END //
  tep_session_unregister('cart_PayPal_IPN_ID');

so I commented it out temporarily

//ADDED CCGV BEGIN //
//if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');// CCGV
//$order_total_modules->clear_posts();// CCGV
//ADDED CCGV END //
  tep_session_unregister('cart_PayPal_IPN_ID');

and continued on. All went well and at that ominous screen where you are supposed to click the button to go back to catalog/checkout_process.php It did something very strange. I could have sworn in the status window that it went to checkout_process.php for a nano second, but where I ended up was back in the shopping cart (empty after the checkout). HMMMM I thought...that's strange, so I go to admin to see if indeed the order went through and voila. It went through confirmed and all and in "Pending" status as it should, however - and this is really my biggest problems, no emails went out, not to the customer ( i know that because I used my daughters email as the customer and we never got it, and the extra email which also comes to me (at another address) never came)

SOOOOOOOO, I'm guessing the the switch around of where pertinent checkout functions in paypal_ipn.php, have changed where the "package tracking with email mods" contribution stuff and obviously the above line for "CCGV (trad)", should go.

Any fixes to this? Does anyone else have any thoughts....Of course in the interim, I have backed out of 2.2 and am back to 1.4 which is working for me, but I would like to upgrade.

Thanks for any input anyone can give

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

×