I’m using the paypal gateway that comes with woocommerce, and i noticed that the order won’t turn to processing or complete when i make payment to paypal (successful).
Any idea where could go wrong? I check on IPN but there’s no IPN field to key in.
From what I know, you do not need to set the IPN. The IPN is automatically passed to Paypal along with the purchase information so Paypal knows the callback URL without you having to explicitly setting it.
If your IPN is not getting any response, there are other issues. Perhaps your site is on maintenance mode? That will usually prevent IPN from successfully connecting to your site.
Thanks for the head ups.
When i check on the IPN txt file, they only show this, which doesnt seems to be right.
08-20-2012 @ 01:03:06 – Generating payment form for order #946. Notify URL: http://www.[website].com.au/?paypalListener=paypal_standard_IPN
Any idea where i was missing?
I didn’t manage to fix it.. but i work around with it. Because this woocommerce that i’m using was modified heavily by the other developer. so i have to work around it.
If your woocommerce was not modified, you wont have any problem with ur IPN because it’s automatically captured in woocommerce.
Thanks for replying.
No I have not modified any code in woocommerce yet. When I buy a product, I can pay for the item and come back to my site but in “My Account” section it says that I have to pay until I go on the back-end and change the state to processing. It doesn’t automatically set it or reduce stock.
Not sure what is going on. Can you give me a starting point if I want to try go modify stuff in the back-end?
Thank you very much!
I presume u are using paypal to make payment? When you go into your “Woocommerce” –> “Orders” , does the status stated as “Pending”?
Yes I use paypal for payments.
The order stays in “Pending” until I manually click the “processing” button in “Woocommerce” –> “Orders”.
If the order is in “pending”, as the customer I see in “My account” under actions “Pay” and “view” which is wrong because it’s already paid. I can’t go and manually click “processing” for every order I get 🙁 (the stock doesn’t reduce also)
Any help would be much appreciated.
Hi Nadun ,
I’m having exactly problem as u..
What i did is working on the thank you page in /wp-content/plugins/woocommerce/templates/checkout/thankyou.php
For me, once the payment in paypal is paid, it will redirect me to the thankyou page. so i use that page to write couple of script.
Are you enable ajax in this page “wp-admin/admin.php?page=woocommerce” and is “Enable AJAX add to cart buttons on product archives ” ticked?
So what kind of script do I need to add in the thankyou.php file? Is it too big to put here?
In settings I have all script options enabled(ticked).
- Enable AJAX add to cart buttons on product archives
- Enable WooCommerce lightbox on the product page
- Enable enhanced country select boxes
This is my script but mine doesn’t have inventory to minus for each purchase.
Place these script after “<?php else : ?>”
//To make pending payment to processing ( after paypal redirect) **START**
$fivesdrafts = $wpdb->get_results(“SELECT COUNT(*) as cnt FROM wp_term_relationships where object_id=$order->id and term_taxonomy_id=7;”);
foreach ( $fivesdrafts as $no_of_term )
add_post_meta($order->id,’Download Permissions Granted’,1);
‘term_taxonomy_id’ => 10),
array( ‘object_id’ => $order->id ),
For those who looking for some guidelines on the function for woocommerce.. Here is the link
Just found out last nite.. good luck
Thank you very much for the code. I was going through it and code files in woocommerce last night. My PHP is a bit rusty but understood most of your code.
Is the variable
$orderan object of “WC_Order” (woocommerce/classes/class-wc-order.php) class? If so can we just call
It will update status and reduce stock if it works. Of course this all maybe wrong as I am so out of touch in PHP.
What do you think? Can we call that function from thankyou.php?
before u do any changes, check here
My IPN is enabled and set to “/checkout/order-received” in paypal but still doesn’t work.
Do you think what I said above it valid?
- The topic ‘How can i get my IPN works in woocommerce payment’ is closed to new replies.