• I have this in my functions.php:

    add_action('paypal_ipn_for_wordpress_ipn_response_handler', 'paymentfailed_todos', 10, 3);
    function paymentfailed_todos($posted) {
    wp_mail('[email protected]','test',print_r($posted));
    }

    and i’m sending fake IPN with this:

    <form target="_new" method="post" action="https://mydomain.com/?AngellEYE_Paypal_Ipn_For_Wordpress&action=ipn_handler">
    
    <input type="hidden" name="payment_cycle" value="every 4 Weeks">
    <input type="hidden" name="txn_type" value="recurring_payment_failed">
    <input type="hidden" name="last_name" value="Tester">
    <input type="hidden" name="next_payment_date" value="03:00:00 Oct 03, 2013 PDT">
    <input type="hidden" name="residence_country" value="US">
    <input type="hidden" name="initial_payment_amount" value="0">
    <input type="hidden" name="currency_code" value="JPY">
    <input type="hidden" name="time_created" value="05:14:37 Aug 01, 2012 PDT">
    <input type="hidden" name="verify_sign" value="AOTn5qT2D05NGLBeQowuGwhI5kTFAIPV01VWay1FayueRmXhAYd2KLZp">
    <input type="hidden" name="period_type" value=" Regular">
    <input type="hidden" name="payer_status" value="unverified">
    <input type="hidden" name="test_ipn" value="1">
    <input type="hidden" name="tax" value="0">
    <input type="hidden" name="payer_email" value="[email protected]">
    <input type="hidden" name="first_name" value="Ecaf">
    <input type="hidden" name="receiver_email" value="[email protected]">
    <input type="hidden" name="payer_id" value="VCLJR9E79V4KJ">
    <input type="hidden" name="product_type" value="1">
    <input type="hidden" name="shipping" value="0">
    <input type="hidden" name="amount_per_cycle" value="1">
    <input type="hidden" name="profile_status" value="Active">
    <input type="hidden" name="charset" value="windows-1252">
    <input type="hidden" name="notify_version" value="3.7">
    <input type="hidden" name="amount" value="1">
    <input type="hidden" name="outstanding_balance" value="1">
    <input type="hidden" name="recurring_payment_id" value="I-P90BX92X15DR">
    <input type="hidden" name="product_name" value="Welcome to the world of shopping where you get everything">
    <input type="hidden" name="ipn_track_id" value="ab99ea6823e24">
    <input type="submit" value="Send Payment Failed"> </form>

    The action is triggered (i am getting a mail) and in the plugin’s page i see the IPN with all the data sent from this form. but my mail is empty (actually not completely empty, i get “1”). any ideas what to test to check what is the problem?

    BTW – same thing if i do print_r($_POST) instead.

    Thanks!

    • This topic was modified 7 years, 7 months ago by Begin.
    • This topic was modified 7 years, 7 months ago by Begin.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Begin

    (@bentalgad)

    Another BTW – seems weird to me that in the plugins ipn data i see [IPN_status] => Verified which if i understand right suppose to be “unverified” if i send fake data with html form like i do. isn’t it?

    • This reply was modified 7 years, 7 months ago by Begin.
    Plugin Contributor angelleye

    (@angelleye)

    When you email yourself array data you need to include an additional parameter. Try this:

    add_action('paypal_ipn_for_wordpress_ipn_response_handler', 'paymentfailed_todos', 10, 3);
    function paymentfailed_todos($posted) {
    wp_mail('[email protected]','test',print_r($posted, true));
    }
    • This reply was modified 7 years, 7 months ago by angelleye.
    Thread Starter Begin

    (@bentalgad)

    Oh, ok, it works. is it something with php in general or does it has to do with the plugin?

    Anyway – still not getting the ipn_status. any ideas what tests i can run to get a hint?

    Also – Do you know why i am getting the [IPN_status] => Verified (when isee the “PayPal IPN raw data” area on the plugin’s page)? isn’t suppose to be unverified?

    Plugin Contributor angelleye

    (@angelleye)

    That’s a general option for print_r() in PHP.

    >If you would like to capture the output of print_r(), use the return parameter. When this parameter is set to TRUE, print_r() will return the information rather than print it.

    That’s necessary if you’re saving it to a log file, outputting in an email, or anything like that.

    I’m more confused about your IPN_status issue now. First you’re telling me you aren’t getting it at all, but then you’re telling me you are getting it, but it’s it Verified when it should be Invalid..??

    Thread Starter Begin

    (@bentalgad)

    I’m confused as u are (more, i guess.. because i don’t have any idea how the plugin works).

    But just to be clear. i still don’t get the “IPN_status” in the $posted array (nor in the $_POST variable). i see it only on your plugins backend page on the “PayPal IPN raw data” area.

    And as i said what i use is the form i pasted the code of in the first massage so how can it be verified?

    Thread Starter Begin

    (@bentalgad)

    That’s what i see on the plugins page:
    From the plugin's page

    Thread Starter Begin

    (@bentalgad)

    And that’s what i get from the $posted and the same from $_POST on my mail:

    Array
    (
        [payment_cycle] => every 4 Weeks
        [txn_type] => recurring_payment_failed
        [last_name] => Tester
        [next_payment_date] => 03:00:00 Oct 03, 2013 PDT
        [residence_country] => US
        [initial_payment_amount] => 0
        [currency_code] => JPY
        [time_created] => 05:14:37 Aug 01, 2012 PDT
        [verify_sign] => AOTn5qT2D05NGLBeQowuGwhI5kTFAIPV01VWay1FayueRmXhAYd2KLZp
        [period_type] =>  Regular
        [payer_status] => unverified
        [test_ipn] => 1
        [tax] => 0
        [payer_email] => [email protected]
        [first_name] => Ecaf
        [receiver_email] => [email protected]
        [payer_id] => VCLJR9E79V4KJ
        [product_type] => 1
        [shipping] => 0
        [amount_per_cycle] => 1
        [profile_status] => Active
        [charset] => windows-1252
        [notify_version] => 3.7
        [amount] => 1
        [outstanding_balance] => 1
        [recurring_payment_id] => I-P90BX92X15DR
        [product_name] => Welcome to the world of shopping where you get everything
        [ipn_track_id] => ab99ea6823e24
    )
    Thread Starter Begin

    (@bentalgad)

    I just tried the same thing on another site. same thing. could it be something to do with the server?

    Do you have some kind of a requirements list / ideas i can send them to make sure they do have all that is required?

    Plugin Contributor angelleye

    (@angelleye)

    I can’t think of anything on the server that would cause that to not show up, but there must be something unique going on there because we don’t have any other reports of this and we cannot reproduce it ourselves.

    IPN_status won’t be available in $_POST, which is the raw data PayPal sends. We load $_POST into $posted[] and then we add IPN_status based on whether it came back verified from the call back to PayPal.

    Are you doing anything to affect the $posted data in other hooks or custom code anywhere, by chance?

    Thread Starter Begin

    (@bentalgad)

    I don’t do anything to affect the $posted data anywhere. also tried on another site and it was the same result so i guess it doesn’t have to do with the theme. also tried to deactivate all plugin and get the same result still.

    Plugin Contributor angelleye

    (@angelleye)

    We could do some direct troubleshooting on your site for you, but you’d need to submit an order for premium support in order for us to do that.

    If it turns out to be an issue with our plugin then we would refund that fee. On the other hand, if it’s something unique there causing the problem, and if it takes longer than 1 hour we’ll need to bill additional time.

    Thread Starter Begin

    (@bentalgad)

    Thanks, i would be using this gladly, but it’s really expensive for me, i guess ill try to make a regular IPN listener with the PayPal examples. thanks any way!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Getting IPN but $posted and $_POST are empty’ is closed to new replies.