WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Blocks\StoreApi\Routes

Checkout::process_payment() private WC 1.0

Fires an action hook instructing active payment gateways to process the payment for an order and provide a result.

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

{} Это метод класса: Checkout{}

Возвращает

null. Ничего.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->process_payment( $request, $payment_result );
$request(WP_REST_Request) (обязательный)
Request object.
$payment_result(PaymentResult) (обязательный)
Payment result object.

Код Checkout::process_payment() WC 5.8.0

private function process_payment( \WP_REST_Request $request, PaymentResult $payment_result ) {
	try {
		// Transition the order to pending before making payment.
		$this->order->update_status( 'pending' );

		// Prepare the payment context object to pass through payment hooks.
		$context = new PaymentContext();
		$context->set_payment_method( $this->get_request_payment_method_id( $request ) );
		$context->set_payment_data( $this->get_request_payment_data( $request ) );
		$context->set_order( $this->order );

		/**
		 * Process payment with context.
		 *
		 * @hook woocommerce_rest_checkout_process_payment_with_context
		 *
		 * @throws \Exception If there is an error taking payment, an \Exception object can be thrown with an error message.
		 *
		 * @param PaymentContext $context        Holds context for the payment, including order ID and payment method.
		 * @param PaymentResult  $payment_result Result object for the transaction.
		 */
		do_action_ref_array( 'woocommerce_rest_checkout_process_payment_with_context', [ $context, &$payment_result ] );

		if ( ! $payment_result instanceof PaymentResult ) {
			throw new RouteException( 'woocommerce_rest_checkout_invalid_payment_result', __( 'Invalid payment result received from payment method.', 'woocommerce' ), 500 );
		}
	} catch ( \Exception $e ) {
		throw new RouteException( 'woocommerce_rest_checkout_process_payment_error', $e->getMessage(), 400 );
	}
}