WC_Gateway_Paypal_Request::authorize_or_capture_payment
Deprecated since 0.5.0. It is no longer supported and may be removed in future releases. Use Automattic\WooCommerce\Gateways\PayPal\Request::authorize_or_capture_payment() instead.
This method authorizes or captures a PayPal payment and updates the order status.
Method of the class: WC_Gateway_Paypal_Request{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Gateway_Paypal_Request = new WC_Gateway_Paypal_Request(); $WC_Gateway_Paypal_Request->authorize_or_capture_payment( $order, $action_url, $action );
- $order(WC_Order) (required)
- Order object.
- $action_url(string|null) (required)
- The URL to authorize or capture the payment.
- $action(string)
- The action to perform. Either
'authorize'or'capture'.
Default:PayPalConstants::PAYMENT_ACTION_CAPTURE
Changelog
| Deprecated since 10.5.0 | Use Automattic\WooCommerce\Gateways\PayPal\Request::authorize_or_capture_payment() instead. |
WC_Gateway_Paypal_Request::authorize_or_capture_payment() WC Gateway Paypal Request::authorize or capture payment code WC 10.5.0
public function authorize_or_capture_payment( $order, $action_url, $action = PayPalConstants::PAYMENT_ACTION_CAPTURE ) {
wc_deprecated_function( __METHOD__, '10.5.0', 'Automattic\WooCommerce\Gateways\PayPal\Request::authorize_or_capture_payment()' );
if ( ! $this->request ) {
$this->request = new PayPalRequest( $this->gateway );
}
$this->request->authorize_or_capture_payment( $order, $action_url, $action );
}