Skip to content
Docs
Get RestroPress

Action

rpress_paypal_{$txn_type}

Updated
On this page

Fires for a PayPal IPN notification of a specific transaction type.

Runs in rpress_process_paypal_ipn when at least one callback is registered for the hook built from the IPN txn_type value, for example rpress_paypal_cart. If no callback is registered, the rpress_paypal_web_accept action fires instead. The payment ID is looked up from the transaction ID, or from the custom field.

Parameters#

ParameterTypeDescription
$encoded_data_arrayarrayIPN data posted by PayPal.
$payment_idintID of the matching order, or 0 when none is found.

Example#

function my_paypal_cart_ipn( $encoded_data_array, $payment_id ) {
	if ( $payment_id ) {
		rpress_insert_payment_note( $payment_id, 'Cart IPN received from PayPal.' );
	}
}
add_action( 'rpress_paypal_cart', 'my_paypal_cart_ipn', 10, 2 );

Notes#

The built-in rpress_paypal_web_accept callback means web_accept notifications are handled by this branch under their own type name.

Source#

Fired from:

  • includes/gateways/paypal-standard.php (line 1612), in rpress_process_paypal_ipn()

See also#

Was this page helpful?