WC_Gateway_Paypal_IPN_Handler::validate_receiver_email( WC_Order $order, string $receiver_email )

Check receiver email from PayPal. If the receiver email in the IPN is different than what is stored in.


Description Description

WooCommerce -> Settings -> Checkout -> PayPal, it will log an error about it.


Parameters Parameters

$order

(Required) Order object.

$receiver_email

(Required) Email to validate.


Top ↑

Source Source

File: includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php

	protected function validate_receiver_email( $order, $receiver_email ) {
		if ( strcasecmp( trim( $receiver_email ), trim( $this->receiver_email ) ) !== 0 ) {
			WC_Gateway_Paypal::log( "IPN Response is for another account: {$receiver_email}. Your email is {$this->receiver_email}" );

			/* translators: %s: email address . */
			$order->update_status( 'on-hold', sprintf( __( 'Validation error: PayPal IPN response from a different email address (%s).', 'woocommerce' ), $receiver_email ) );
			exit;
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.