WC_Gateway_Paypal_IPN_Handler::valid_response( array $posted )

There was a valid response.


Description Description


Parameters Parameters

$posted

(Required) Post data after wp_unslash.


Top ↑

Source Source

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

	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 );
			}
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

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