WC_Gateway_Paypal_Refund
extends WC_Gateway_Paypal_API_Handler
in package
Here for backwards compatibility.
Tags
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<string|int, mixed>
- Get capture request args.
- get_refund_request() : array<string|int, mixed>
- Get refund request args.
- get_request() : array<string|int, mixed>
- 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
$api_password
API Password
public
static string
$api_password
$api_signature
API Signature
public
static string
$api_signature
$api_username
API Username
public
static string
$api_username
$sandbox
Sandbox
public
static bool
$sandbox
= alse
Methods
do_capture()
Capture an authorization.
public
static do_capture(WC_Order $order[, float $amount = null ]) : object
Parameters
- $order : WC_Order
-
Order object.
- $amount : float = null
-
Amount.
Return values
object — Either an object of name value pairs for a success, or a WP_ERROR object.get_capture_request()
Get capture request args.
public
static get_capture_request(WC_Order $order[, float $amount = null ]) : array<string|int, mixed>
See https://developer.paypal.com/docs/classic/api/merchant/DoCapture_API_Operation_NVP/.
Parameters
- $order : WC_Order
-
Order object.
- $amount : float = null
-
Amount.
Return values
array<string|int, mixed> —get_refund_request()
Get refund request args.
public
static get_refund_request(WC_Order $order[, float $amount = null ][, string $reason = '' ]) : array<string|int, mixed>
Parameters
- $order : WC_Order
-
Order object.
- $amount : float = null
-
Refund amount.
- $reason : string = ''
-
Refund reason.
Return values
array<string|int, mixed> —get_request()
Get refund request args. Proxy to WC_Gateway_Paypal_API_Handler::get_refund_request().
public
static get_request(WC_Order $order[, float $amount = null ][, string $reason = '' ]) : array<string|int, mixed>
Parameters
- $order : WC_Order
-
Order object.
- $amount : float = null
-
Refund amount.
- $reason : string = ''
-
Refund reason.
Return values
array<string|int, mixed> —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
object — Either 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.