WooCommerce Code Reference

Search results

WC_Gateway_Paypal_API_Handler

Handles Refunds and other API requests such as capture.

Table of Contents

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

Properties

Methods

get_refund_request()

Get refund request args.

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

Order object.

$amount : float = null

Refund amount.

$reason : string = ''

Refund reason.

Return values
array

do_capture()

Capture an authorization.

public static do_capture( $order : WC_Order [, $amount : float = 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.

refund_transaction()

Refund an order via PayPal.

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

Order object.

$amount : float = null

Refund amount.

$reason : string = ''

Refund reason.

Return values
object

Either an object of name value pairs for a success, or a WP_ERROR object.

Back to the top