• vorticy

    (@vorticy)


    Thank you for creating this payflow plugin. I would like to pass the order number and my site name to payflow manager so that when I run reports or search transactions I can find them quickly. something like this added to php when posting the order.

    ‘COMMENT1’ => $order->get_order_number(),
    ‘COMMENT1’ => ‘my website’

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor angelleyesupport

    (@angelleyesupport)

    Hi @vorticy,

    Thanks for writing us here. We are looking into this and will get back to you soon.

    Thanks!

    Plugin Contributor angelleye

    (@angelleye)

    @vorticy

    We have filter hooks available for these fields already. We just haven’t gotten it documented yet. That’s always helpful, huh!?

    The hook name for COMMENT1 is ae_pppf_custom_parameter, and the hook name for COMMENT2 is ae_pppf_comment2_parameter.

    So this should get what you’re wanting done:

    add_filter( 'ae_pppf_custom_parameter', 'own_ae_pppf_custom_parameter', 10, 2);
    
    function own_ae_pppf_custom_parameter($customer_note , $order) {
        return $order->get_order_number();
    }
    
    add_filter( 'ae_pppf_comment2_parameter', 'own_ae_pppf_comment2_parameter', 10, 2);
    
    function own_ae_pppf_comment2_parameter($empty, $order) {
        return 'My Website';
    }

    Just drop that into your (child) theme’s functions.php, or make yourself a little plugin file for it (which is what I prefer to do) and that should do it.

    Plugin Contributor angelleye

    (@angelleye)

    I did go ahead and get these hooks added to our current hook documentation.

    It’s still not fully complete, but you can see quite a few hooks there you may not have known about.

    Thread Starter vorticy

    (@vorticy)

    Hi and thank you for the quick reply. Comment2 hook worked but Comment1 did not. Not sure if it has to with “ae_pppf_custom_parameter” being tied to Comment1 correctly or if the $order->get_order_number() is not returning anything.

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    Hi @vorticy,

    Sorry for the confusion. I missed this part.

    ae_pppf_comment1_parameter
     
    Add data into the COMMENT1 field available in the PayPal Manager (PayFlow) account transaction details.
     
    add_filter( 'ae_pppf_comment1_parameter', 'own_ae_pppf_comment1_parameter', 10, 2);
    function own_ae_pppf_comment1_parameter($empty, $order) {
        return 'My Website';
    }
    
    This code was for the custom parameter and not for comment-1. Please use the code above to forward anydata to comment one.
    add_filter( 'ae_pppf_custom_parameter', 'own_ae_pppf_custom_parameter', 10, 2);
    
    function own_ae_pppf_custom_parameter($customer_note , $order) {
        return $order->get_order_number();
    }

    Let me know if you have any other questions or concerns.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PAYFLOW COMMENT1 AND COMMENT2’ is closed to new replies.