Property | Type | Description | |
---|---|---|---|
$gateway | WC_Gateway_Paypal | Pointer to gateway making the request. | |
$line_items | array | Stores line items to send to PayPal. | |
$notify_url | string | Endpoint for requests from PayPal. |
Method | Description | |
---|---|---|
__construct ( WC_Gateway_Paypal $gateway ) | Constructor. | |
get_request_url ( WC_Order $order, boolean $sandbox = false ) : string | Get the PayPal request URL for an order. |
Method | Description | |
---|---|---|
add_line_item ( string $item_name, integer $quantity = 1, float $amount, string $item_number = '' ) : boolean | Add PayPal Line Item. | |
currency_has_decimals ( string $currency ) : boolean | Check if currency has decimals. | |
delete_line_items ( ) | Remove all line items. | |
get_line_item_args ( WC_Order $order ) : array | Get line item args for paypal request. | |
get_line_items ( ) | Return all line items. | |
get_order_item_name ( WC_Order $order, array $item ) : string | Get order item names as a string. | |
get_order_item_names ( WC_Order $order ) : string | Get order item names as a string. | |
get_paypal_args ( WC_Order $order ) : array | Get PayPal Args for passing to PP. | |
get_paypal_state ( string $cc, string $state ) : string | Get the state to send to paypal. | |
get_phone_number_args ( WC_Order $order ) : array | Get phone number args for paypal request. | |
get_shipping_args ( WC_Order $order ) : array | Get shipping args for paypal request. | |
number_format ( float | integer $price, WC_Order $order ) : string | Format prices. | |
prepare_line_items ( WC_Order $order ) : boolean | Get line items to send to paypal. | |
round ( double $price, WC_Order $order ) : double | Round prices. |
public __construct ( WC_Gateway_Paypal $gateway ) | ||
$gateway | WC_Gateway_Paypal |
protected currency_has_decimals ( string $currency ) : boolean | ||
$currency | string | |
return | boolean |
protected get_line_item_args ( WC_Order $order ) : array | ||
$order | WC_Order | |
return | array |
protected get_order_item_name ( WC_Order $order, array $item ) : string | ||
$order | WC_Order | |
$item | array | |
return | string |
protected get_order_item_names ( WC_Order $order ) : string | ||
$order | WC_Order | |
return | string |
protected get_paypal_args ( WC_Order $order ) : array | ||
$order | WC_Order | |
return | array |
protected get_phone_number_args ( WC_Order $order ) : array | ||
$order | WC_Order | |
return | array |
public get_request_url ( WC_Order $order, boolean $sandbox = false ) : string | ||
$order | WC_Order | |
$sandbox | boolean | |
return | string |
protected get_shipping_args ( WC_Order $order ) : array | ||
$order | WC_Order | |
return | array |
protected prepare_line_items ( WC_Order $order ) : boolean | ||
$order | WC_Order | |
return | boolean |
protected round ( double $price, WC_Order $order ) : double | ||
$price | double | |
$order | WC_Order | |
return | double |
protected WC_Gateway_Paypal $gateway | ||
return | WC_Gateway_Paypal |
protected array $line_items | ||
return | array |
protected string $notify_url | ||
return | string |