Свойство | Тип | Описание | |
---|---|---|---|
$ID | integer | The Payment ID. |
Свойство | Тип | Описание | |
---|---|---|---|
$_ID | integer | Protected non-read $_ID. | |
$address | array | The physical address used for the payment if provided | |
$completed_date | string | The date the payment was marked as 'complete'. | |
$currency | string | The the payment was made with | |
$customer_id | integer | The customer ID that made the payment | |
$date | string | The date the payment was created | |
string | The email used for the payment | ||
$fees | array | Array of global fees for this payment | |
$fees_total | float | The sum of the fee amounts | |
$first_name | string | The first name of the payee | |
$form_id | string | The Donation Form ID | |
$form_title | string | The Donation Form Title | |
$gateway | string | The gateway used to process the payment | |
$ip | string | IP Address payment was made from | |
$key | string | The unique donation payment key. | |
$last_name | string | The last name of the payee | |
$mode | string | The Gateway mode the payment was made in. | |
$new | boolean | Identify if the payment is a new one or existing. | |
$number | string | The Payment number (for use with sequential payments). | |
$old_status | string | When updating, the old status prior to the change | |
$parent_payment | integer | The parent payment (if applicable) | |
$post_date | string | The date the payment post was created. | |
$post_status | string | ||
$price_id | string | integer | The Donation Form Price ID | |
$status | string | The status of the donation payment. | |
$status_nicename | string | The display name of the current payment status. | |
$subtotal | float | The Subtotal fo the payment before fees | |
$total | float | Includes donation amount and fees. | |
$transaction_id | string | The transaction ID returned by the gateway | |
$user_id | integer | The User ID (if logged in) that made the payment |
Метод | Описание | |
---|---|---|
__construct ( integer $payment_id = false ) : mixed | Setup the Give Payments class | |
__get ( string $key ) : mixed | Magic GET function. | |
__isset ( string $name ) : boolean | Magic ISSET function, which allows empty checks on protected elements | |
__set ( string $key, mixed $value ) | Magic SET function | |
add_donation ( integer $form_id, array $args = [], array $options = [] ) : boolean | Add a donation to a given payment | |
add_fee ( array $args, boolean $global = true ) : boolean | Add a fee to a given payment | |
add_note ( string $note = false ) : void | Add a note to a payment | |
array_convert ( ) : array | Converts this object into an array for special cases | |
get_fees ( string $type = 'all' ) : array | Get the fees, filterable by type | |
get_meta ( string $meta_key = '_give_payment_meta', boolean $single = true ) : mixed | Get a post meta item for the payment | |
refund ( ) : void | Change the status of the payment to refunded, and run the necessary changes | |
remove_donation ( integer $form_id, array $args = [] ) : boolean | Remove a donation from the payment | |
remove_fee ( integer $key ) : boolean | Remove a fee from the payment | |
remove_fee_by ( string $key, integer | string $value, boolean $global = false ) : boolean | Remove a fee by the defined attributed | |
save ( ) : boolean | Save | |
update_meta ( string $meta_key = '', string $meta_value = '', string $prev_value = '' ) : integer | boolean | Update the post meta | |
update_payment_setup ( integer $payment_id ) : void | Payment class object is storing various meta value in object parameter. | |
update_status ( string $status = false ) : boolean | Set the payment status and run any status specific changes necessary. |
Метод | Описание | |
---|---|---|
decrease_fees ( float $amount ) : void | Decrease the payment's subtotal. | |
decrease_subtotal ( float $amount ) : void | Decrease the payment's subtotal. | |
delete_sales_logs ( ) : void | Delete sales logs for this purchase | |
get_address ( ) : array | Retrieve payment billing address | |
get_completed_date ( ) : string | Retrieve payment completion date | |
get_currency ( ) : string | Retrieve payment currency | |
get_customer_id ( ) : integer | Retrieve payment customer ID | |
get_email ( ) : string | Retrieve payment email | |
get_form_id ( ) : string | Retrieve payment form id | |
get_gateway ( ) : string | Retrieve payment gateway | |
get_ip ( ) : string | Retrieve payment IP | |
get_key ( ) : string | Retrieve payment key | |
get_number ( ) : integer | string | Retrieve payment number | |
get_subtotal ( ) : float | Retrieve payment subtotal | |
get_transaction_id ( ) : string | Retrieve payment transaction ID | |
get_user_id ( ) : integer | Retrieve payment user ID | |
get_user_info ( ) : array | Retrieve payment user info | |
increase_fees ( float $amount ) : void | Increase the payment's subtotal. | |
increase_subtotal ( float $amount ) : void | Increase the payment's subtotal | |
insert_payment ( ) : integer | boolean | Create the base of a payment. | |
maybe_alter_stats ( boolean $alter_store_earnings, boolean $alter_customer_value, boolean $alter_customer_purchase_count ) : void | Used during the process of moving to refunded or pending, to decrement stats | |
process_cancelled ( ) : void | Process when a payment moves to cancelled | |
process_failure ( ) : void | Process when a payment is set to failed | |
process_pending ( ) : void | Process when a payment moves to pending | |
process_refund ( ) : void | When a payment is set to a status of 'refunded' process the necessary actions to reduce stats | |
process_revoked ( ) : void | Process when a payment moves to revoked | |
recalculate_total ( ) : void | Set or update the total for a payment. | |
setup_address ( ) : array | Setup the Address for the payment | |
setup_completed_date ( ) : string | Setup the payment completed date | |
setup_currency ( ) : string | Setup the currency code | |
setup_customer_id ( ) : integer | Setup the customer ID | |
setup_email ( ) : string | Setup the email address for the donation. | |
setup_fees ( ) : array | Setup any fees associated with the payment | |
setup_fees_total ( ) : float | Setup the payment fees | |
setup_form_id ( ) : integer | Setup the form ID | |
setup_form_title ( ) : string | Setup the form title | |
setup_gateway ( ) : string | Setup the gateway used for the payment | |
setup_ip ( ) : string | Setup the IP Address for the payment | |
setup_mode ( ) : string | Setup the payment mode | |
setup_payment ( integer $payment_id ) : boolean | Setup payment properties | |
setup_payment_key ( ) : string | Setup the payment key | |
setup_payment_number ( ) : integer | string | Setup the payment number | |
setup_price_id ( ) : integer | Setup the price ID | |
setup_subtotal ( ) : float | Setup the payment subtotal | |
setup_total ( ) : float | Setup the payment total | |
setup_transaction_id ( ) : string | Setup the transaction ID | |
setup_user_id ( ) : integer | Setup the User ID associated with the purchase | |
setup_user_info ( ) : array | Setup the user info |
public __construct ( integer $payment_id = false ) : mixed | ||
$payment_id | integer | A given payment |
Результат | mixed | void|false |
public array_convert ( ) : array | ||
Результат | array | The payment object as an array |
public remove_fee ( integer $key ) : boolean | ||
$key | integer | The array key index to remove |
Результат | boolean | If the fee was removed successfully |
public remove_fee_by ( string $key, integer | string $value, boolean $global = false ) : boolean | ||
$key | string | The key to remove by |
$value | integer | string | The value to search for |
$global | boolean | False - removes the first value it fines, True - removes all matches. |
Результат | boolean | If the item is removed |
public update_meta ( string $meta_key = '', string $meta_value = '', string $prev_value = '' ) : integer | boolean | ||
$meta_key | string | The meta key to update |
$meta_value | string | The meta value |
$prev_value | string | Previous meta value |
Результат | integer | boolean | Meta ID if the key didn't exist, true on successful update, false on failure |
public update_payment_setup ( integer $payment_id ) : void | ||
$payment_id | integer | Payment ID. |
Результат | void |
public update_status ( string $status = false ) : boolean | ||
$status | string | The status to set the payment to. |
Результат | boolean | $updated Returns if the status was successfully updated. |
protected array $address | ||
Результат | array |
protected string $completed_date | ||
Результат | string |
protected string $currency | ||
Результат | string |
protected int $customer_id | ||
Результат | integer |
protected array $fees | ||
Результат | array |
protected float $fees_total | ||
Результат | float |
protected string $first_name | ||
Результат | string |
protected string $form_title | ||
Результат | string |
protected string $gateway | ||
Результат | string |
protected string $last_name | ||
Результат | string |
protected string $mode | ||
Результат | string |
protected bool $new | ||
Результат | boolean |
protected string $number | ||
Результат | string |
protected string $old_status | ||
Результат | string |
protected int $parent_payment | ||
Результат | integer |
protected string $post_date | ||
Результат | string |
protected string $status | ||
Результат | string |
protected string $status_nicename | ||
Результат | string |
protected float $subtotal | ||
Результат | float |
protected float $total | ||
Результат | float |
protected string $transaction_id | ||
Результат | string |
protected int $user_id | ||
Результат | integer |