Viewing 15 replies - 1 through 15 (of 55 total)
  • Thread Starter queenielow

    (@queenielow)

    how can it be resolve when no one replying?

    Plugin Contributor royho

    (@royho)

    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.

    Thread Starter queenielow

    (@queenielow)

    Hi Royho,

    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?

    Cheers,

    Hi queenielow,

    How did you fix it?

    Thread Starter queenielow

    (@queenielow)

    Hi Nadun,

    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.

    Cheers,
    Queenie

    Hey queenielow,

    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!

    Cheers,
    Nadun.

    Thread Starter queenielow

    (@queenielow)

    Hi Nadun,

    I presume u are using paypal to make payment? When you go into your “Woocommerce” –> “Orders” , does the status stated as “Pending”?

    Hey queenielow,

    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.
    Thank you.

    Cheers,
    Nadun.

    Thread Starter queenielow

    (@queenielow)

    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?

    Hi queenielow,

    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
    Thread Starter queenielow

    (@queenielow)

    Hi Nadun,

    This is my script but mine doesn’t have inventory to minus for each purchase.

    Place these script after “<?php else : ?>”

    <?php

    //To make pending payment to processing ( after paypal redirect) **START**
    global $wpdb;

    $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 )
    {
    $cnt=$no_of_term->cnt;
    if ($cnt!=0){
    add_post_meta($order->id,’Download Permissions Granted’,1);
    add_post_meta($order->id,’_recorded_sales’,’yes’);

    $wpdb->update(
    ‘wp_term_relationships’,
    array(
    ‘term_taxonomy_id’ => 10),
    array( ‘object_id’ => $order->id ),
    array( ‘%d’),
    array(‘%d’)
    );
    }

    }

    $item_meta=get_post_meta($order->id,’_order_items’);

    Thread Starter queenielow

    (@queenielow)

    For those who looking for some guidelines on the function for woocommerce.. Here is the link
    http://wcdocs.woothemes.com/apidocs/source-function-woocommerce_pay_action.html#474

    Just found out last nite.. good luck

    Hey queenielow,

    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 $order an object of “WC_Order” (woocommerce/classes/class-wc-order.php) class? If so can we just call $order->payment_complete() ?

    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?

    Thread Starter queenielow

    (@queenielow)

    Hey queenielow,

    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?

    payment_complete()
    http://wcdocs.woothemes.com/apidocs/source-class-WC_Order.html#1134

Viewing 15 replies - 1 through 15 (of 55 total)
  • The topic ‘How can i get my IPN works in woocommerce payment’ is closed to new replies.