WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_IPN_Handler::valid_response() public WC 1.0

There was a valid response.

{} It's a method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Gateway_Paypal_IPN_Handler = new WC_Gateway_Paypal_IPN_Handler();
$WC_Gateway_Paypal_IPN_Handler->valid_response( $posted );
$posted(array) (required)
Post data after wp_unslash.

Code of WC_Gateway_Paypal_IPN_Handler::valid_response() WC 5.6.0

public function valid_response( $posted ) {
	$order = ! empty( $posted['custom'] ) ? $this->get_paypal_order( $posted['custom'] ) : false;

	if ( $order ) {

		// Lowercase returned variables.
		$posted['payment_status'] = strtolower( $posted['payment_status'] );

		WC_Gateway_Paypal::log( 'Found order #' . $order->get_id() );
		WC_Gateway_Paypal::log( 'Payment status: ' . $posted['payment_status'] );

		if ( method_exists( $this, 'payment_status_' . $posted['payment_status'] ) ) {
			call_user_func( array( $this, 'payment_status_' . $posted['payment_status'] ), $order, $posted );
		}
	}
}