• Resolved girl_number_5

    (@trutherone)


    Hi, just found this plugin and just what i need – however i need a way to trigger a custom function (callback) on success of a transaction ( $ipn_verified = true ). I used to write this stuff manually years ago and cant remember if this is the same as status=”success” denoting a successful transaction. Other statuses would have been (or probably still are) ‘pending’, ‘on-hold’, ‘failed’ etc.

    Do i use the, $ipn_verified = true var to denote a successful transaction? and if so how do i hook into the script (paypal_IPN.php -> wp_paypal_process_ipn() ) to call my callback function.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Noor Alam

    (@naa986)

    @trutherone, You can use the “wp_paypal_ipn_processed” action hook that gets triggered after a PayPal notification is processed in the plugin. Example:

    
    function wp_paypal_ipn_callback( $ipn_response ) {
        /* Your code */
    }
    add_action( 'wp_paypal_ipn_processed', 'wp_paypal_ipn_callback', 10, 1 );
    
    Thread Starter girl_number_5

    (@trutherone)

    Hello Noor,
    Thats it! exactly what i needed … didnt know this was available.

    Many thanks and for this very cool plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom callback function’ is closed to new replies.