WC_Gateway_Paypal_Response
in package
Handles Responses.
Table of Contents
- $sandbox : bool
- Sandbox mode
- get_paypal_order() : bool|WC_Order
- Get the order from the PayPal 'Custom' variable.
- payment_complete() : mixed
- Complete order, add transaction ID and note.
- payment_on_hold() : mixed
- Hold order and add note.
Properties
$sandbox
Sandbox mode
protected
bool
$sandbox
= alse
Methods
get_paypal_order()
Get the order from the PayPal 'Custom' variable.
protected
get_paypal_order(string $raw_custom) : bool|WC_Order
Parameters
- $raw_custom : string
-
JSON Data passed back by PayPal.
Return values
bool|WC_Order — objectpayment_complete()
Complete order, add transaction ID and note.
protected
payment_complete(WC_Order $order[, string $txn_id = '' ][, string $note = '' ]) : mixed
Parameters
- $order : WC_Order
-
Order object.
- $txn_id : string = ''
-
Transaction ID.
- $note : string = ''
-
Payment note.
Return values
mixed —payment_on_hold()
Hold order and add note.
protected
payment_on_hold(WC_Order $order[, string $reason = '' ]) : mixed
Parameters
- $order : WC_Order
-
Order object.
- $reason : string = ''
-
Reason why the payment is on hold.