Skip to content
Docs
Get RestroPress

Action

rpress_paypal_web_accept

Updated
On this page

Fires to process a PayPal IPN notification that has no handler for its transaction type.

Runs in rpress_process_paypal_ipn as the fallback when no action is registered for the IPN txn_type, which includes the web_accept type. RestroPress hooks rpress_process_paypal_web_accept_and_cart here at priority 10 to update the order status.

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_web_accept( $encoded_data_array, $payment_id ) {
	if ( $payment_id && isset( $encoded_data_array['txn_id'] ) ) {
		update_post_meta( $payment_id, '_my_paypal_txn_id', sanitize_text_field( $encoded_data_array['txn_id'] ) );
	}
}
add_action( 'rpress_paypal_web_accept', 'my_paypal_web_accept', 20, 2 );

Source#

Fired from:

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

See also#

Was this page helpful?