gform_post_payment_completed

The Gravity Forms + Stripe gform post payment completed hook.

Description

do_action( 'gform_post_payment_completed', (unknown) $entry, (callback) $transaction_response_subscription_id ); 

Parameters (2)

0. $entry (unknown)
The entry.
1. $transaction_response_subscription_id — Optional. (callback) => array( 'type' => 'complete_payment', 'amount' => $transaction[ 'amount' ], 'transaction_type' => $transaction[ 'type' ], 'transaction_id' => $transaction[ 'id' ], 'subscription_id' => ( 2 == $transaction_type ) ? self::$transaction_response[ 'subscription' ][ 'id' ] : false, 'entry_id' => $transaction[ 'entry_id' ], 'payment_status' => $entry[ 'payment_status' ], 'payment_date' => $payment_date, 'payment_method' => ( 2 == $transaction_type ) ? self::$transaction_response[ 'subscription' ][ 'customer' ]->default_source[ 'brand' ] : self::$transaction_response[ 'customer' ]->default_source[ 'brand' ] )
The array.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'gform_post_payment_completed', $entry, $transaction_response_subscription_id ); 
The following example is for adding a hook callback.
  1. // define the gform_post_payment_completed callback 
  2. function action_gform_post_payment_completed( $entry, $transaction_response_subscription_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'gform_post_payment_completed', 'action_gform_post_payment_completed', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'gform_post_payment_completed', 'action_gform_post_payment_completed', 10, 2 ); 

Defined (1)

The action is defined in the following location(s).

/includes/class-gfp-stripe.php  
  1. do_action( 'gform_post_payment_completed', $entry, array(