WC_Gateway_Paypal_API_Handler::get_capture_request()public staticWC 1.0

Get capture request args. See https://developer.paypal.com/docs/classic/api/merchant/DoCapture_API_Operation_NVP/.

Метод класса: WC_Gateway_Paypal_API_Handler{}

Хуки из метода

Возвращает

Массив.

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

$result = WC_Gateway_Paypal_API_Handler::get_capture_request( $order, $amount );
$order(WC_Order) (обязательный)
Order object.
$amount(float)
Amount.
По умолчанию: null

Код WC_Gateway_Paypal_API_Handler::get_capture_request() WC 8.7.0

public static function get_capture_request( $order, $amount = null ) {
	$request = array(
		'VERSION'         => '84.0',
		'SIGNATURE'       => self::$api_signature,
		'USER'            => self::$api_username,
		'PWD'             => self::$api_password,
		'METHOD'          => 'DoCapture',
		'AUTHORIZATIONID' => $order->get_transaction_id(),
		'AMT'             => number_format( is_null( $amount ) ? $order->get_total() : $amount, 2, '.', '' ),
		'CURRENCYCODE'    => $order->get_currency(),
		'COMPLETETYPE'    => 'Complete',
	);
	return apply_filters( 'woocommerce_paypal_capture_request', $request, $order, $amount );
}