Jump to content
Mark Evans

Official PayPal IPN Support Thread

Recommended Posts

John, please take comfort in the fact your are not alone. I am seeing the same problem. If the customer is not returned to the site the inventory is not updated. For users with a PayPal account already they are Auto Returned. However,

because I do not require a Paypal Account they are presented with the option to Return to the site or save their information. At this point if they close the window I at least get the order and have to manually update my inventory for each item.

 

I am trying some messages to the user to see if it gets any better. However, I would love to find some kind of contrib that will let me at least re-process the order to update the inventory.

 

-G

 

 

No.

 

There have been numerous posts informing me that it shouldn't be turned on, because that's taken care of from my end.  Besides, I'm not having any problems with the ipn part - I'm receiving the verifications from PayPal okay, and the order status is updated.  Just that there are no osC generated emails and stock updates.

 

Cheers

John

Share this post


Link to post
Share on other sites

John. I do not know how to fix the problem but I found a workaround which will allow me to change the order status and update the inventory accordingly. Basically I can live with the fact I do not get the email notification because I get one from PayPal anyway. The inventory was more of a mess but at least now I can fix it fairly easily.

 

For the workaround I hacked the Restore Inventory On Void Order - ver.1.0 to allow me to Add/Subtract inventory for an order by changing its status.

 

I am not sure if you are interested in this but if you are let me know.

 

-G

 

 

 

21 pages!!  My problem hasn't really been answered though, even if the problem has been raised.

 

The module is working fine, except that no emails to customer and shopkeeper from osC, and no stock updates.  I have to update the stock quantities manually, which means that it is possible that another customer can purchase the same product, even if it should be out of stock due to the first purchase.  Order status update from ipn is working okay though.

 

I don't know what the reason is, whether it's because my customers aren't returning to my site, or the fact that I'm sending a total instead of itemised details to PayPal.

 

The solution is probably to create a dedicated checkout_success page for this, and transfer the email and stock transfer parts to the ipn script, with an evaluation for the PayPal status "Verified" - has anyone done this successfully?

 

Any other suggestions?

 

John

Share this post


Link to post
Share on other sites

Hi

 

I believe I see a security vulnerability in osCommerce-PayPal_IPN-v1.1/catalog/ext/modules/payment/paypal_ipn/ipn.php

 

POSTED variables are inserted in the database (via $comment_status) at line 147 without having gone through tep_db_prepare_input or tep_sanitize_string.

 

I know these should be safe from Paypal (equally unprotected insert at line 111), but the insert at line 147 is specifically for invalid IPNs - therefore any not originating from Paypal would be processed here.

 

Please tell me I'm wrong as this looks pretty easy to exploit...

 

Anna

Share this post


Link to post
Share on other sites

:blush: Please excuse my brain-death above - I just couldn't see the tep_db_input in tep_db_perform. Not so bad after all!

Share this post


Link to post
Share on other sites

I installed the osCommerce-PayPal_IPN-v1.1 contribution and so far I think its great. I'm finally done with the days of asking my customers what they ordered. My only issue is that when the customer adds comments to the "Add Comments About Your Order" textarea, those comments are not visible in the order edit page until Paypal is verified and status is updated to "In Process". If the customer fails to return from Paypal, I have no way of seeing or following any special instructions they specify in their comments. Is there a workaround for this?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi,

I have installed the most recent version (I think) paypal_ipn.php,v 1.1.2.11 2004/12/05

 

Installation was easy. The ipn works well accept for the fact that when I receive orders back I am missing all contact information including email, name and address of the customer. I have read threads about this, but have not been able to find a clear answer. The message that specifically asks the same issue I have is found here

 

 

If an answer has been given , if you could, please reply with a link to the answer.... I can't find it.

 

Thank you for your great contribution.

 

Mike

Share this post


Link to post
Share on other sites

Hello all,

 

IF your unencrypted calls to Paypal work, but encrypted ones don't

AND at checkout_confirmation.php you view page source and see that the hidden field called encrypted is empty

AND you have safe_mode on, then read on....

 

The rest of the store was fine & live since last year. I've just added osCommerce-PayPal_IPN-v1.1 and have been testing in the Sandbox. Unencrypted calls went fine (great contribution & easy to install!), but encrypted calls to Paypal were not working as field 'encrypted' was empty.

 

I looked at function process_button in includes/modules/payment/paypal_ipn.php and determined that line 355:

if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt'))

was not true for us (if it's true for you then you have a different problem sorry!) so instead of the openssl_pkcs7_... calls it was doing the execs at lines 382 & 385.

Except that they were not creating the signed and encrypted files which they should have.

 

Well there's problems with exec & spaces with safe mode on (see the 2nd Warning in the PHP Manual (exec) that seems to mean that exec commands using redirects ("<" & ">"), among other things, will not work as expected. (The openssl commands worked fine at the linux command line.)

 

Sure enough, just switching safe mode off for the site worked for us.:thumbsup:

(If you're on a shared server this has security implications.)

 

It would be great if this bit were coded in a way that did not rely on safe mode = off, but having spent too long hunting this down I'm off to tackle my next bit of work. I hope this helps anyone else hitting the same issue.

 

All the best

Anna

(using osCommerce-PayPal_IPN-v1.1 and PHP 4.3.4)

Share this post


Link to post
Share on other sites

Hi all, I posted this message in a different forum thread until I found this specific thread relating to Paypal IPN v1.1. So sorry to anyone who has read it before.

 

I have recently installed the Paypal IPN module v1.1 to a test site which was a very easy process, well done to all contributors. Whilst testing I noticed that when customers proceed to 'Checkout' and reach the 'Confirmation' stage a 'Preparing Paypal IPN' status is created in both my 'Admin' and the 'Customers Account page'. All very good, this is what you'd expect.

 

But, if the customer decides to back out of the purchase (ie. doesn't proceed to Paypal to complete the purchase) and then empties his/her cart as most people would, then the 'Preparing Paypal IPN' status still remains visable from the 'Customers Account page', even though he or she cancelled and removed items from the cart.

 

It appears that the only way the Customer can alter this entry within their accounts section is to build a new cart and reach the 'Confirmation' stage, where by a new Perparing IPN status is created overwriting the existing one. Or obviously I can cancel it through admin.

 

Now, I've probably not understood this module correctly, but should the customer still be able to see 'Preparing Paypal IPN' for an order which they've decided not to proceed with and then removed the items from their cart? Isn't this going to be confusing for customers as they may well believe that their previous order is still somehow live which could deture them from inputing a new order (and reaching the confirmation stage) to overwrite the old one.

 

Would be very grateful if someone could advise, as I'm concerned that this action could cause potential customers testing out mysite to look elsewhere for fear that their cancelled transaction is stuck in the system, or at the very least could be very confussing to clients.

 

Cheers

 

Andy

Share this post


Link to post
Share on other sites
...I'm concerned that this action could cause potential customers testing out mysite to look elsewhere for fear that their cancelled transaction is stuck in the system, or at the very least could be very confussing to clients.

Andy, I agree.

 

I'm interested if anyone has any reasons that shoppers should be able to see orders with this status?

 

Anna

Share this post


Link to post
Share on other sites
Now, I've probably not understood this module correctly, but should the customer still be able to see 'Preparing Paypal IPN' for an order which they've decided not to proceed with and then removed the items from their cart? Isn't this going to be confusing for customers as they may well believe that their previous order is still somehow live which could deture them from inputing a new order (and reaching the confirmation stage) to overwrite the old one.

 

Would be very grateful if someone could advise, as I'm concerned that this action could cause potential customers testing out mysite to look elsewhere for fear that their cancelled transaction is stuck in the system, or at the very least could be very confussing to clients.

Andy, I agree. 

I'm interested if anyone has any reasons that shoppers should be able to see orders with this status?

 

Anna

 

Hi Anna, I'm glad someone agrees with me! I was starting to think I'd installed my module incorrectly and that I was the only one who'd seen this.

 

I'm sure this is the way it was designed to work, but like you I think it can be very confusing to potential client.

 

Has anybody got a idea's which would hide this status from clients after they cancel? Ultimately I know it can be removed by admin, but in normal daily business this might not be for sometime (probably the next day) by which time the client may have given up and decided to go elsewhere.

Share this post


Link to post
Share on other sites

Hi Andy (& anyone else interested!)

 

Here's a quick fix to hide from shoppers their orders that are currently "Preparing" status. Store admin is completely unchanged.

 

It does rely on "Set Preparing Order Status" having been set to a distinctive value e.g. "Preparing [PayPal IPN]" in the Store Admin's Payment Modules - Paypal IPN section. I have NOT checked to see what would happen if this was, for example, 'default'

 

account.php about line 97:

Replace

$orders_query = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id desc limit 3");

with

$orders_query = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_status != '" . MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id desc limit 3");

 

account_history.php about line 65:

Replace

$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC";

with

$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_status != '" . MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC";

 

(I added

and o.orders_status != '" . MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID . "'

to each file's database order query.)

 

Warning! IF a shopper's only orders are (all) preparing status AND they look at account_history.php, they may see something like "Result Pages: -4 -3 -2 -1 0". I think this is because tep_count_customer_orders probably won't exclude orders with preparing status. I don't want to look at the implications of changing tep_count_customer_orders right now. For now, I'd rather show "Result Pages: -4 -3 -2 -1 0" than the "Preparing" orders.

 

Hope that helps!

Anna

Share this post


Link to post
Share on other sites
Hi Andy (& anyone else interested!)

 

Here's a quick fix to hide from shoppers their orders that are currently "Preparing" status.  Store admin is completely unchanged.

 

It does rely on "Set Preparing Order Status" having been set to a distinctive value e.g. "Preparing [PayPal IPN]" in the Store Admin's Payment Modules - Paypal IPN section.  I have NOT checked to see what would happen if this was, for example,  'default'

 

Warning! IF a shopper's only orders are (all) preparing status AND they look at account_history.php, they may see something like "Result Pages:  -4  -3  -2  -1  0".  I think this is because tep_count_customer_orders probably won't exclude orders with preparing status.  I don't want to look at the implications of changing tep_count_customer_orders right now.  For now, I'd rather show "Result Pages:  -4  -3  -2  -1  0" than the "Preparing" orders.

 

Hope that helps!

Anna

 

 

Thanks Anna, I'm gunna give it a try later on my local installation to see how it works.

 

Speak to you soon

 

Andy

Share this post


Link to post
Share on other sites

Hello. I just finished an eshop with QTpro 4.2 on it, plus some small contributions, AND paypal IVN.

 

I have a serious problem, since the purchased items are NOT being subtracted from the QTpro Attribute Stock......

 

Please, help, if there is a solution about it, or any other files i need to change.

 

Thank you very, VERY much...

George.

Share this post


Link to post
Share on other sites

Ok I have just installed this contribution and have read through the entire thread and did not see one person with this problem - so it must be me.

 

As soon as I placed the new files in their appropriate folders I went to the admin section to instal. I have setup as follows:

 

PayPal IPN 

Enable PayPal IPN Module
True

E-Mail Address
sales@popcorn-uk.com

Transaction Currency
Only GBP

Payment Zone
uk

Set Preparing Order Status
Preparing [PayPal IPN]

Set PayPal Acknowledged Order Status
Processing

Gateway Server
Live

Transaction Type
Aggregate

Page Style
paypal

Debug E-Mail Address
admin@popcorn-uk.com

Sort order of display.
2

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

 

After this I went to test and I haven't even got Paypal appearing as an option in my checkout_payment page.

 

Can anyone tell me where I have gone wrong, or what I have to fix or look at?

Share this post


Link to post
Share on other sites

Hey I have some quick questions...

 

I installed the osCommerce PayPal IPN Module and I am getting orders showing up in the "Preparing [PayPal IPN]:" order stage.

 

Question #1:How do I know if the customer actually tried to purchase the product, but just didnt return to the page after confirmation or if they just went through the checkout process and didnt want to actually pay for the item?

Would it make sense by looking in my paypal account to see if any money was sent from that user? And if there isnt any money from that person that means that they didnt complete the checkout process?

 

Question #2:Is there anyway that I can make it so they are automatically returned to my webpage? I have an autoreturn option turned on in my paypal account > profile settings...is that the only way?

 

Thanks guys...

Share this post


Link to post
Share on other sites

i have read through this but cant actually find a solution to this

 

orders go through fine and everything works great - ie moneyt received, customer is happy etc etc

 

but it wont change from

"Preparing [PayPal IPN]"

 

any ideas on a fix. I have it all turned on in my paypal account as i was using a different version previously, so i know it can work

 

Mike


"because it'll hurt more"- the greatest film of all time?

Share this post


Link to post
Share on other sites
i have read through this but cant actually find a solution to this

 

orders go through fine and everything works great - ie moneyt received, customer is happy etc etc

 

but it wont change from

"Preparing [PayPal IPN]"

 

any ideas on a fix.  I have it all turned on in my paypal account as i was using a different version previously, so i know it can work

 

Mike

 

Do you have it set to something else in your website admin area?

Share this post


Link to post
Share on other sites

I realize at the beginning of this post that it was said that user info cannot be passed to paypal if they have a paypal account, but im wondering if anybody has found a way around it. Reason being, I use paypal to print most of my shipping labels (UPS OR USPS), and if a customer purchases soemthing and has a paypal account that they log into to pay with, i have to manually enter every shipping address that comes in like this. If they buy something and pay without signing into an account, then their info is sent to paypal and i dont have to re-enter anything. Just wondering if somebody found a way to get it to work like that for both paypal and non-paypal users the same way, so when im going to print shipping labels for each order i wont have to go back to OSC to find the shipping address. Thanks!!!

Share this post


Link to post
Share on other sites
I realize at the beginning of this post that it was said that user info cannot be passed to paypal if they have a paypal account, but im wondering if anybody has found a way around it.  Reason being, I use paypal to print most of my shipping labels (UPS OR USPS), and if a customer purchases soemthing and has a paypal account that they log into to pay with, i have to manually enter every shipping address that comes in like this.  If they buy something and pay without signing into an account, then their info is sent to paypal and i dont have to re-enter anything.  Just wondering if somebody found a way to get it to work like that for both paypal and non-paypal users the same way, so when im going to print shipping labels for each order i wont have to go back to OSC to find the shipping address.  Thanks!!!

 

 

I was looking for the same answer - having the same issues - & it was driving me nuts with all the typing!! So when reading through all these millions of posts founds this. I just changed the code & haven't actually processed the order, but I checked up to the point of hitting "PAY" and it in fact does have my stored paypal addresses to choose from in a drop down menu. So I would ASSUME that if I select one of those - then hit Pay- it would show up in the order preprinted and have the eligible for seller protection. Course I didn't test it all the way through- i'm just going to let the next customer who uses paypal test it. hahah But the page up to that point at least looks like what it used to at the old store I was using pre-oscomm and paypal ipn..

 

But this is the only change

 

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

 

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

 

with this:

 

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

 

 

Another post somewhere later explained it as "1" is for "intangible" items... "0" is for "tangible"- i.e. something that needs to be shipped!

 

Let me know what happens if you test it... or i'll post back if someone uses paypal at my store in the meantime.

 

:thumbsup:

Share this post


Link to post
Share on other sites

Looking for help with PayPal IPN working with the option type text feature.

 

I've seen that others have the same problem as I'm having, but I can't seem to locate a solution. So I'm hoping that someone out there has been able to fix this.

 

When using the PayPal IPN for payment method, any text options don't get passed along to the admin area where you see the customer's orders. Instead of the normal values, you get "TEXT" as a value. When using other methods, such as the cheque/money order method, it works just fine.

 

Any solutions? Can this even be fixed?

 

I have a hunch that it might have something to do with the database setup. In the Option type contrib, there was something you needed to do in the database near the end of the installation instructions that I couldn't quite understand. It MIGHT have something to do with other contribs working together, but I'm not sure.

 

Thanks,

Brandon.

Share this post


Link to post
Share on other sites

HEEEEEEEELP

 

my paypal ipn works fine when there are no credits to the account, otherwise i get an error as follows at that paypal screen

 

 

 

 

"Please enter an amount greater than zero.

Your shopping cart is empty.

 

 

 

 

Shopping Cart

________________________________________

 

Qty Remove Item Options Price

Cart Empty

Shipping, handling, and tax may be added upon checkout. Amount $0.00 USD "

 

 

This only occurs when a customer adds an item to their account that will credit them, a negative value as well as an item which they intend to purchase

 

 

Please please please does anyone know a work around?

 

 

Many thanks

 

J

Share this post


Link to post
Share on other sites
HEEEEEEEELP

 

my paypal ipn works fine when there are no credits to the account, otherwise i get an error as follows at that paypal screen

"Please enter an amount greater than zero.

Your shopping cart is empty.

 

Shopping Cart

________________________________________

 

Qty Remove Item Options Price

Cart Empty

Shipping, handling, and tax may be added upon checkout. Amount $0.00 USD "

This only occurs when a customer adds an item to their account that will credit them, a negative value as well as an item which they intend to purchase

Please please please does anyone know a work around?

Many thanks

 

J

 

 

Yep same thing happened to me. I couldn't figure out a way to fix it so I went around it. Instead of transferring the shopping cart contents to paypal I changed it to just say shopping cart items or something like that. Not as great as having the paypal payment show the EXACT items purchased- but the order invoice #'s still match so you can look at their order in your admin or the copy that should be emailed to you. Customers don't seem to care that they get the cart contents in one email and a paypal payment email without the items ordered.

If you go into your admin panel- modules- payment- paypal ipn and edit it there is a spot where it says transaction type and there are 2 choices aggregate and something else which I forget- like itemized or something. Anyway- choose aggregate. Worked for me! Now I can have coupons and paypal is happy because they don't see them!

 

:thumbsup: good luck!

Share this post


Link to post
Share on other sites

I recently switched hosts, and my IPN's are no longer processing (i.e. I do not receive debug emails, all orders show as pending despite a customer truly paying for an item, and under a transaction's activity it states: No PayPal Transaction Information Available).

 

I have attempted a deinstall and reinstall of the paypal payment module, with no success. As well, I have tried to turn 'test mode' on and run a "Test IPN', however, I get a 'not found' error: The requested URL /ipn.php was not found on this server.

 

Any help would be appreciated, thank you.

Share this post


Link to post
Share on other sites
Yep same thing happened to me. I couldn't figure out a way to fix it so I went around it.  Instead of transferring the shopping cart contents to paypal I changed it to just say shopping cart items or something like that. Not as great as having the paypal payment show the EXACT items purchased- but the order invoice #'s still match so you can look at their order in your admin or the copy that should be emailed to you. Customers don't seem to care that they get the cart contents in one email and a paypal payment email without the items ordered.

If you go into your admin panel- modules- payment- paypal ipn and edit it there is a spot where it says transaction type and there are 2 choices aggregate and something else which I forget- like itemized or something. Anyway- choose aggregate. Worked for me! Now I can have coupons and paypal is happy because they don't see them!

 

:thumbsup:  good luck!

 

 

Thanks for a quick response, i remember looking at that option before and i didnt want to go that route if i didnt have to but it will suffice for now until i can get the mod fixed, if i find a fix i will pm you

 

Thanks again for responding so quickly

 

J

Share this post


Link to post
Share on other sites
Thanks for a quick response, i remember looking at that option before and i didnt want to go that route if i didnt have to but it will suffice for now until i can get the mod fixed, if i find a fix i will pm you

 

Thanks again for responding so quickly

 

J

 

I'd appreciate it, Thank you!

 

Hope you find a fix. ;)

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

×