Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Aonz

    (@bugaonz)

    What is the correct notification URL for setting IPN on Paypal?

    Is it https://www.mysite.com/?wc-api=WC_Gateway_Paypal
    or
    https://www.mysite.com/?paypalListener=paypal_standard_IPN
    ?

    Thread Starter Aonz

    (@bugaonz)

    Here is from paypal.txt

    04-21-2013 @ 11:34:32 - Generating payment form for order #1599. Notify URL: https://www.mysite.com/?wc-api=WC_Gateway_Paypal
    04-21-2013 @ 11:34:57 - Checking IPN response is valid...
    04-21-2013 @ 11:34:57 - IPN Request: Array
    (
        [body] => Array
            (
                [cmd] => _notify-validate
                [mc_gross] => 65.00
                [invoice] => SEO-1599
                [protection_eligibility] => Ineligible
                [item_number1] =>
                [payer_id] => DHNKCRBSKLP34
                [tax] => 0.00
                [payment_date] => 04:34:54 Apr 21, 2013 PDT
                [payment_status] => Pending
                [charset] => windows-1252
                [mc_shipping] => 0.00
                [mc_handling] => 0.00
                [first_name] => aonz
                [notify_version] => 3.7
                [custom] => a:2:{i:0;i:1599;i:1;s:19:"order_5173cd20e22c9";}
                [payer_status] => unverified
                [business] => [email protected]
                [num_cart_items] => 1
                [mc_handling1] => 0.00
                [verify_sign] => An5ns1Kso7MWUdW4ErQKJJJ4qi4-AiduoJHNlj-vWzwI1qeuQD4kqsxj
                [payer_email] => [email protected]
                [mc_shipping1] => 0.00
                [tax1] => 0.00
                [txn_id] => 90Y65431J2849625F
                [payment_type] => instant
                [last_name] => buyer
                [item_name1] => Real Visitor Traffic for One Month Campaign
                [receiver_email] => [email protected]
                [quantity1] => 1
                [pending_reason] => unilateral
                [txn_type] => cart
                [mc_gross_1] => 65.00
                [mc_currency] => USD
                [residence_country] => US
                [test_ipn] => 1
                [transaction_subject] => a:2:{i:0;i:1599;i:1;s:19:"order_5173cd20e22c9";}
                [payment_gross] => 65.00
                [ipn_track_id] => 30ecf0a5cab3a
            )
    
        [sslverify] =>
        [timeout] => 60
        [user-agent] => WooCommerce/2.0.5
    )
    
    04-21-2013 @ 11:34:58 - IPN Response: Array
    (
        [headers] => Array
            (
                [date] => Sun, 21 Apr 2013 11:34:58 GMT
                [server] => Apache
                [x-frame-options] => SAMEORIGIN
                [set-cookie] => Array
                    (
                        [0] => c9MWDuvPtT9GIMyPc3jwol1VSlO=6IG3FgE2O1X82BuatDz5EdNRbN22W21E0lGkX_OGwsxbQVU35t1ccGdsFAc0o7ZJJYoXNHaoEpJJkpnuWhWa3EAgGaOjnI-Mra-t2aa5ZFcitMyogdkHW99KZv-Cr_y_tt8M_m%7c6I9xY_3PcYzOD9Ax8bjUl0b73rRo0BaAl5a2F7rAYdlHahwWc71UoRXs5JO8pbGldcplQm%7ciA4KGy8_6i_Fe9nnEjsDD2z47DiEUf1BrUjwfQlRla0z_9CyutGSnOtbQBRLpf7QzYoQGm%7c1366544098; domain=.paypal.com; path=/; Secure; HttpOnly
                        [1] => cookie_check=yes; expires=Wed, 19-Apr-2023 11:34:58 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
                        [2] => navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly
                        [3] => navlns=0.0; expires=Sat, 16-Apr-2033 11:34:58 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
                        [4] => Apache=10.72.109.11.1366544098040452; path=/; expires=Tue, 14-Apr-43 11:34:58 GMT
                    )
    
                [connection] => close
                [content-type] => text/html; charset=UTF-8
            )
    
        [body] => VERIFIED
        [response] => Array
            (
                [code] => 200
                [message] => OK
            )
    
        [cookies] => Array
            (
                [0] => WP_Http_Cookie Object
                    (
                        [name] => c9MWDuvPtT9GIMyPc3jwol1VSlO
                        [value] => 6IG3FgE2O1X82BuatDz5EdNRbN22W21E0lGkX_OGwsxbQVU35t1ccGdsFAc0o7ZJJYoXNHaoEpJJkpnuWhWa3EAgGaOjnI-Mra-t2aa5ZFcitMyogdkHW99KZv-Cr_y_tt8M_m|6I9xY_3PcYzOD9Ax8bjUl0b73rRo0BaAl5a2F7rAYdlHahwWc71UoRXs5JO8pbGldcplQm|iA4KGy8_6i_Fe9nnEjsDD2z47DiEUf1BrUjwfQlRla0z_9CyutGSnOtbQBRLpf7QzYoQGm|1366544098
                        [expires] =>
                        [path] => /
                        [domain] => .paypal.com
                        [secure] =>
                        [httponly] =>
                    )
    
                [1] => WP_Http_Cookie Object
                    (
                        [name] => cookie_check
                        [value] => yes
                        [expires] => 1681904098
                        [path] => /
                        [domain] => .paypal.com
                        [secure] =>
                        [httponly] =>
                    )
    
                [2] => WP_Http_Cookie Object
                    (
                        [name] => navcmd
                        [value] => _notify-validate
                        [expires] =>
                        [path] => /
                        [domain] => .paypal.com
                        [secure] =>
                        [httponly] =>
                    )
    
                [3] => WP_Http_Cookie Object
                    (
                        [name] => navlns
                        [value] => 0.0
                        [expires] => 1997264098
                        [path] => /
                        [domain] => .paypal.com
                        [secure] =>
                        [httponly] =>
                    )
    
                [4] => WP_Http_Cookie Object
                    (
                        [name] => Apache
                        [value] => 10.72.109.11.1366544098040452
                        [expires] => 2312624098
                        [path] => /
                        [domain] =>
                    )
    
            )
    
        [filename] =>
    )
    
    04-21-2013 @ 11:34:58 - Received valid response from PayPal
    04-21-2013 @ 11:34:58 - Found order #1599
    04-21-2013 @ 11:34:58 - Payment status: pending

    I’m having issues with “pending” instead of “processing” too but my site is live and not using the Paypal Sandbox … The funds are being received by the Paypal account successfully. So I’m presuming that WC isn’t being notified by Paypal that the funds have been received… thus the “Pending” status….

    It seems to be a common issue people are having … I’ve been trying to sort it out for a while now and have been everywhere trying to fix this issue.

    When I run https://www.mysite.com/?paypalListener=paypal_standard_IPN I get a failure… but in System Settings it says

    wp_remote_post() was successful - PayPal IPN is working.

    Also I’m a little confused about the notification URL ….

    https://docs.woothemes.com/document/paypal-standard/#section-3

    This gateway should pass the correct notification URL to paypal, however in certain instances you may need to set it up in your paypal account.

    So that’s a notification TO PayPal ….

    But on Paypal’s “Edit Instant Payment Notification (IPN) settings” page it states

    PayPal sends IPN messages to the URL that you specify below.

    Which asks you to enter a url for notification FROM PayPal …. I have added https://www.mysite.com/?wc-api=WC_Gateway_Paypal … but still getting all orders “Pending”.

    @bugaonz …. is this the page on PayPal you are referring to??

    Any help to sort this out would be much appreciates

    Thread Starter Aonz

    (@bugaonz)

    @hilmon
    Exactly, that’s the page I’m referring to.

    I’ve tried both set and not set the notification URL on “Edit Instant Payment Notification (IPN) settings” page but it’s still ‘pending’.

    Moreover, I’ve tried using IPN simulator and set the payment_status=Completed (usually I see that woocommerce always sets it to pending) to paypal. Then, paypal reponses back to me as ‘On-Hold’. This is weird and makes me confused a lot.

    What should ‘payment_status’ parameter be set to send to paypal?
    Processed or Completed ?

    Note to future readers: the solution above is wrong. The “unilateral” code returned from PayPal means that the email address used for payments has not been verified, so the payment is not yet released. WooCommerce is functioning correctly by not treating the payment as confirmed.

    See: https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables#id091EB04C0HS

    edse83

    (@edse83)

    This took me too long to figure out…

    My problem… after a customer made a purchase via PayPal, the order was marked as pending, and I wanted to mark it as “processing”.

    What I did:

    1. Copy content/plugins/woocommerce/templates/checkout/thankyou.php
    2. Paste it on my theme/woocommerce/templates/checkout folder
    3. I open the thankyou.php file, and just below the first else if I added the following code

    <?php else : ?>
    <?php

    if ( $order->payment_method_title == “Tarjeta de Crédito o Débito” ) :
    $order->payment_complete();
    endif;

    ?>

    Change the “Tarjeta de Crédito o Débito”, to the title you wrote on your admin dashboard ->woocommerce->settings->gateways->paypal. And just write what ever your gateway title is. I understand this is not the best practice, but is for you too get an idea on how to solve this.

    Now only orders coming from paypal are marked as “processing”. And wire-transfer and check gateways are marked as “on-hold”.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Will the order status change after Paypal payment?’ is closed to new replies.