WooCommerce Code Reference

WC_Gateway_Paypal_API_Handler
in package

Handles Refunds and other API requests such as capture.

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.
refund_transaction()  : object
Refund an order via PayPal.

Properties

Methods

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.