PHP 클래스 WC_Gateway_Paypal_Request

파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

공개 메소드들

메소드 설명
__construct ( WC_Gateway_Paypal $gateway ) Constructor.
get_request_url ( WC_Order $order, boolean $sandbox = false ) : string Get the PayPal request URL for an order.

보호된 메소드들

메소드 설명
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.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( WC_Gateway_Paypal $gateway )
$gateway WC_Gateway_Paypal

add_line_item() 보호된 메소드

Add PayPal Line Item.
protected add_line_item ( string $item_name, integer $quantity = 1, float $amount, string $item_number = '' ) : boolean
$item_name string
$quantity integer
$amount float
$item_number string
리턴 boolean successfully added or not

currency_has_decimals() 보호된 메소드

Check if currency has decimals.
protected currency_has_decimals ( string $currency ) : boolean
$currency string
리턴 boolean

delete_line_items() 보호된 메소드

Remove all line items.
protected delete_line_items ( )

get_line_item_args() 보호된 메소드

Get line item args for paypal request.
protected get_line_item_args ( WC_Order $order ) : array
$order WC_Order
리턴 array

get_line_items() 보호된 메소드

Return all line items.
protected get_line_items ( )

get_order_item_name() 보호된 메소드

Get order item names as a string.
protected get_order_item_name ( WC_Order $order, array $item ) : string
$order WC_Order
$item array
리턴 string

get_order_item_names() 보호된 메소드

Get order item names as a string.
protected get_order_item_names ( WC_Order $order ) : string
$order WC_Order
리턴 string

get_paypal_args() 보호된 메소드

Get PayPal Args for passing to PP.
protected get_paypal_args ( WC_Order $order ) : array
$order WC_Order
리턴 array

get_paypal_state() 보호된 메소드

Get the state to send to paypal.
protected get_paypal_state ( string $cc, string $state ) : string
$cc string
$state string
리턴 string

get_phone_number_args() 보호된 메소드

Get phone number args for paypal request.
protected get_phone_number_args ( WC_Order $order ) : array
$order WC_Order
리턴 array

get_request_url() 공개 메소드

Get the PayPal request URL for an order.
public get_request_url ( WC_Order $order, boolean $sandbox = false ) : string
$order WC_Order
$sandbox boolean
리턴 string

get_shipping_args() 보호된 메소드

Get shipping args for paypal request.
protected get_shipping_args ( WC_Order $order ) : array
$order WC_Order
리턴 array

number_format() 보호된 메소드

Format prices.
protected number_format ( float | integer $price, WC_Order $order ) : string
$price float | integer
$order WC_Order
리턴 string

prepare_line_items() 보호된 메소드

Get line items to send to paypal.
protected prepare_line_items ( WC_Order $order ) : boolean
$order WC_Order
리턴 boolean

round() 보호된 메소드

Round prices.
protected round ( double $price, WC_Order $order ) : double
$price double
$order WC_Order
리턴 double

프로퍼티 상세

$gateway 보호되어 있는 프로퍼티

Pointer to gateway making the request.
protected WC_Gateway_Paypal $gateway
리턴 WC_Gateway_Paypal

$line_items 보호되어 있는 프로퍼티

Stores line items to send to PayPal.
protected array $line_items
리턴 array

$notify_url 보호되어 있는 프로퍼티

Endpoint for requests from PayPal.
protected string $notify_url
리턴 string