WooCommerce Code Reference

WC_Gateway_Paypal_Refund extends WC_Gateway_Paypal_API_Handler
in package

Here for backwards compatibility.

Tags
since
3.0.0

Table of Contents

$api_password  : string
API Password
$api_signature  : string
API Signature
$api_username  : string
API Username
$sandbox  : bool
Sandbox
do_capture()  : object
Capture an authorization.
get_capture_request()  : array
Get capture request args.
get_refund_request()  : array
Get refund request args.
get_request()  : array
Get refund request args. Proxy to WC_Gateway_Paypal_API_Handler::get_refund_request().
refund_order()  : object
Process an order refund.
refund_transaction()  : object
Refund an order via PayPal.

Properties

Methods

refund_order()

Process an order refund.

public static refund_order(WC_Order $order[, float $amount = null ][, string $reason = '' ][, bool $sandbox = false ]) : object
Parameters
$order : WC_Order

Order object.

$amount : float = null

Refund amount.

$reason : string = ''

Refund reason.

$sandbox : bool = false

Whether to use sandbox mode or not.

Return values
objectEither an object of name value pairs for a success, or a WP_ERROR object.

refund_transaction()

Refund an order via PayPal.

public static refund_transaction(WC_Order $order[, float $amount = null ][, string $reason = '' ]) : object
Parameters
$order : WC_Order

Order object.

$amount : float = null

Refund amount.

$reason : string = ''

Refund reason.

Return values
objectEither an object of name value pairs for a success, or a WP_ERROR object.