PHP 클래스 WC_Addons_Gateway_Simplify_Commerce

부터: 2.2.0
저자: WooThemes
상속: extends WC_Gateway_Simplify_Commerce
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ) Constructor.
add_subscription_payment_meta ( array $payment_meta, WC_Subscription $subscription ) : array Include the payment meta data required to process automatic recurring payments so that store managers can.
delete_resubscribe_meta ( integer $resubscribe_order ) : void Don't transfer customer meta to resubscribe orders.
hosted_payment_args ( array $args, integer $order_id ) : array Hosted payment args.
process_payment ( integer $order_id ) : array Process the payment.
process_pre_order_release_payment ( WC_Order $order ) : WP_Error | null Process a pre-order payment when the pre-order is released.
process_subscription_payment ( WC_order $order, integer $amount ) : boolean | WP_Error process_subscription_payment function.
return_handler ( ) Return handler for Hosted Payments.
scheduled_subscription_payment ( float $amount_to_charge, WC_Order $renewal_order ) scheduled_subscription_payment function.
update_failing_payment_method ( WC_Subscription $subscription, WC_Order $renewal_order ) Update the customer_id for a subscription after using Simplify to complete a payment to make up for.
validate_subscription_payment_meta ( string $payment_method_id, array $payment_meta ) : array Validate the payment meta data required to process automatic recurring payments so that store managers can.

보호된 메소드들

메소드 설명
order_contains_pre_order ( integer $order_id ) : boolean Check if order contains pre-orders.
order_contains_subscription ( integer $order_id ) : boolean Check if order contains subscriptions.
process_pre_order ( WC_Order $order, string $cart_token = '' ) : array Process the pre-order.
process_subscription ( WC_Order $order, string $cart_token = '' ) : array Process the subscription.
save_subscription_meta ( integer $order_id, string $customer_id ) Store the customer and card IDs on the order and subscriptions in the order.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

add_subscription_payment_meta() 공개 메소드

manually set up automatic recurring payments for a customer via the Edit Subscription screen in Subscriptions v2.0+.
부터: 2.4
public add_subscription_payment_meta ( array $payment_meta, WC_Subscription $subscription ) : array
$payment_meta array associative array of meta data required for automatic payments
$subscription WC_Subscription An instance of a subscription object
리턴 array

delete_resubscribe_meta() 공개 메소드

Don't transfer customer meta to resubscribe orders.
public delete_resubscribe_meta ( integer $resubscribe_order ) : void
$resubscribe_order integer The order created for the customer to resubscribe to the old expired/cancelled subscription
리턴 void

hosted_payment_args() 공개 메소드

Hosted payment args.
public hosted_payment_args ( array $args, integer $order_id ) : array
$args array
$order_id integer
리턴 array

order_contains_pre_order() 보호된 메소드

Check if order contains pre-orders.
protected order_contains_pre_order ( integer $order_id ) : boolean
$order_id integer
리턴 boolean

order_contains_subscription() 보호된 메소드

Check if order contains subscriptions.
protected order_contains_subscription ( integer $order_id ) : boolean
$order_id integer
리턴 boolean

process_payment() 공개 메소드

Process the payment.
public process_payment ( integer $order_id ) : array
$order_id integer
리턴 array

process_pre_order() 보호된 메소드

Process the pre-order.
protected process_pre_order ( WC_Order $order, string $cart_token = '' ) : array
$order WC_Order
$cart_token string
리턴 array

process_pre_order_release_payment() 공개 메소드

Process a pre-order payment when the pre-order is released.
public process_pre_order_release_payment ( WC_Order $order ) : WP_Error | null
$order WC_Order
리턴 WP_Error | null

process_subscription() 보호된 메소드

Process the subscription.
protected process_subscription ( WC_Order $order, string $cart_token = '' ) : array
$order WC_Order
$cart_token string
리턴 array

process_subscription_payment() 공개 메소드

process_subscription_payment function.
public process_subscription_payment ( WC_order $order, integer $amount ) : boolean | WP_Error
$order WC_order
$amount integer (default: 0)
리턴 boolean | WP_Error

return_handler() 공개 메소드

Return handler for Hosted Payments.
public return_handler ( )

save_subscription_meta() 보호된 메소드

Store the customer and card IDs on the order and subscriptions in the order.
protected save_subscription_meta ( integer $order_id, string $customer_id )
$order_id integer
$customer_id string

scheduled_subscription_payment() 공개 메소드

scheduled_subscription_payment function.
public scheduled_subscription_payment ( float $amount_to_charge, WC_Order $renewal_order )
$amount_to_charge float The amount to charge.
$renewal_order WC_Order A WC_Order object created to record the renewal payment.

update_failing_payment_method() 공개 메소드

an automatic renewal payment which previously failed.
public update_failing_payment_method ( WC_Subscription $subscription, WC_Order $renewal_order )
$subscription WC_Subscription The subscription for which the failing payment method relates.
$renewal_order WC_Order The order which recorded the successful payment (to make up for the failed automatic payment).

validate_subscription_payment_meta() 공개 메소드

manually set up automatic recurring payments for a customer via the Edit Subscription screen in Subscriptions 2.0+.
부터: 2.4
public validate_subscription_payment_meta ( string $payment_method_id, array $payment_meta ) : array
$payment_method_id string The ID of the payment method to validate
$payment_meta array associative array of meta data required for automatic payments
리턴 array