gform_paypal_ipn_{transaction_type}

Description

This action hook allows performing actions for a specific IPN transaction type. The “{transaction_type}” will be replaced with the current transaction type.

Usage

add_action( 'gform_paypal_ipn_{transaction_type_to_use}', 'your_function_name, 10, 10 );

Parameters

  • $entry Entry ObjectThe current entry.
  • $feed Feed Object

    The current feed.

  • $status string

    The status of the transaction. For example: completed, reversed, processed, pending, refunded, and others.

  • $txn_type string

    The transaction type. For example: cart, subscr_payment, subscr_cancel.

  • $transaction_id int

    The transaction id.

  • $parent_txn_id int

    The parent transaction id, in case of some transactions, such as a refund.

  • $subscriber_id int

    The subscriber id.

  • $amount string

    The payment amount.

  • $pending_reason string

    If the payment status is “Pending”, this will explain why.

  • $reason string

    The reason code.

Examples

add_action( 'gform_paypal_ipn_cart', 'create_note', 10, 10 );
function create_note( $entry, $feed, $status, $txn_type, $transaction_id, $parent_txn_id, $subscriber_id, $amount, $pending_reason, $reason ){
	GFFormsModel::add_note( $entry['id'], 0, 'PayPal', 'This is a test.', '' );
}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms PayPal Standard version 1.9.2.

Source Code

This filter is located in GFPayPal::post_callback() in gravityformspaypal/class-gf-paypal.php.