PHP Класс Mollie_API_Object_Payment, mollie-api-php

All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Автор: Mollie B.V. ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$amount float The amount of the payment in EURO with 2 decimals.
$amountRefunded float | null The amount of the payment that has been refunded to the consumer, in EURO with 2 decimals. This field will be NULL if the payment can not be refunded.
$amountRemaining float | null For some payment methods this amount can be higher than the payment amount. This is possible to reimburse the costs for a return shipment to your customer for example.
$cancelledDatetime string | null Date and time the payment was cancelled in ISO-8601 format.
$createdDatetime string | null Date and time the payment was created in ISO-8601 format.
$customerId string | null The customer ID this payment is performed by.
$description string Description of the payment that is shown to the customer during the payment, and possibly on the bank or credit card statement.
$details object Details of a successfully paid payment are set here. For example, the iDEAL payment method will set $details->consumerName and $details->consumerAccount.
$expiredDatetime string | null Date and time the payment was cancelled in ISO-8601 format.
$expiryPeriod string | null The period after which the payment will expire in ISO-8601 format.
$id string Id of the payment (on the Mollie platform).
$links object
$locale string | null The locale used for this payment.
$mandateId string | null The mandate ID this payment is performed with.
$metadata object | mixed | null During creation of the payment you can set custom metadata that is stored with the payment, and given back whenever you retrieve that payment.
$method string | null If method is empty/null, the customer can pick his/her preferred payment method.
$mode string Mode of the payment, either "live" or "test" depending on the API Key that was used.
$paidDatetime string | null Date and time the payment was paid in ISO-8601 format.
$profileId string The profile ID this payment belongs to.
$recurringType string | null Either "first", "recurring", or NULL for regular payments.
$resource string
$status string The status of the payment.
$subscriptionId string | null The subscription ID this payment belongs to.

Открытые методы

Метод Описание
canBePartiallyRefunded ( ) : boolean
canBeRefunded ( ) : boolean
getAmountRefunded ( ) : float Get the amount that is already refunded
getAmountRemaining ( ) : float Get the remaining amount that can be refunded. For some payment methods this amount can be higher than the payment amount. This is possible to reimburse the costs for a return shipment to your customer for example.
getPaymentUrl ( ) : string | null Get the payment URL where the customer can complete the payment.
hasRecurringType ( ) : boolean Check whether the 'recurringType' parameter has been defined for this payment.
hasRecurringTypeFirst ( ) : boolean Check whether 'recurringType' is set to 'first'. If a 'first' payment has been completed successfully, the consumer's account may be charged automatically using recurring payments.
hasRecurringTypeRecurring ( ) : boolean Check whether 'recurringType' is set to 'recurring'. This type of payment is processed without involving the consumer.
isCancelled ( ) : boolean Is this payment cancelled?
isChargedBack ( ) : boolean Is this payment charged back?
isExpired ( ) : boolean Is this payment expired?
isOpen ( ) : boolean Is this payment still open / ongoing?
isPaid ( ) : boolean Is this payment paid for?
isPaidOut ( ) : boolean Has the money been transferred to the bank account of the merchant?
isPending ( ) : boolean Is this payment pending?
isRefunded ( ) : boolean Is this payment (partially) refunded?

Описание методов

canBePartiallyRefunded() публичный Метод

public canBePartiallyRefunded ( ) : boolean
Результат boolean

canBeRefunded() публичный Метод

public canBeRefunded ( ) : boolean
Результат boolean

getAmountRefunded() публичный Метод

Get the amount that is already refunded
public getAmountRefunded ( ) : float
Результат float

getAmountRemaining() публичный Метод

Get the remaining amount that can be refunded. For some payment methods this amount can be higher than the payment amount. This is possible to reimburse the costs for a return shipment to your customer for example.
public getAmountRemaining ( ) : float
Результат float

getPaymentUrl() публичный Метод

Get the payment URL where the customer can complete the payment.
public getPaymentUrl ( ) : string | null
Результат string | null

hasRecurringType() публичный Метод

Check whether the 'recurringType' parameter has been defined for this payment.
public hasRecurringType ( ) : boolean
Результат boolean

hasRecurringTypeFirst() публичный Метод

Check whether 'recurringType' is set to 'first'. If a 'first' payment has been completed successfully, the consumer's account may be charged automatically using recurring payments.
public hasRecurringTypeFirst ( ) : boolean
Результат boolean

hasRecurringTypeRecurring() публичный Метод

Check whether 'recurringType' is set to 'recurring'. This type of payment is processed without involving the consumer.
public hasRecurringTypeRecurring ( ) : boolean
Результат boolean

isCancelled() публичный Метод

Is this payment cancelled?
public isCancelled ( ) : boolean
Результат boolean

isChargedBack() публичный Метод

Is this payment charged back?
public isChargedBack ( ) : boolean
Результат boolean

isExpired() публичный Метод

Is this payment expired?
public isExpired ( ) : boolean
Результат boolean

isOpen() публичный Метод

Is this payment still open / ongoing?
public isOpen ( ) : boolean
Результат boolean

isPaid() публичный Метод

Is this payment paid for?
public isPaid ( ) : boolean
Результат boolean

isPaidOut() публичный Метод

Note: When a payment is refunded or charged back, the status 'refunded'/'charged_back' will overwrite the 'paidout' status.
public isPaidOut ( ) : boolean
Результат boolean

isPending() публичный Метод

Is this payment pending?
public isPending ( ) : boolean
Результат boolean

isRefunded() публичный Метод

Is this payment (partially) refunded?
public isRefunded ( ) : boolean
Результат boolean

Описание свойств

$amount публичное свойство

The amount of the payment in EURO with 2 decimals.
public float $amount
Результат float

$amountRefunded публичное свойство

The amount of the payment that has been refunded to the consumer, in EURO with 2 decimals. This field will be NULL if the payment can not be refunded.
public float|null $amountRefunded
Результат float | null

$amountRemaining публичное свойство

For some payment methods this amount can be higher than the payment amount. This is possible to reimburse the costs for a return shipment to your customer for example.
public float|null $amountRemaining
Результат float | null

$cancelledDatetime публичное свойство

Date and time the payment was cancelled in ISO-8601 format.
public string|null $cancelledDatetime
Результат string | null

$createdDatetime публичное свойство

Date and time the payment was created in ISO-8601 format.
public string|null $createdDatetime
Результат string | null

$customerId публичное свойство

The customer ID this payment is performed by.
public string|null $customerId
Результат string | null

$description публичное свойство

Description of the payment that is shown to the customer during the payment, and possibly on the bank or credit card statement.
public string $description
Результат string

$details публичное свойство

Details of a successfully paid payment are set here. For example, the iDEAL payment method will set $details->consumerName and $details->consumerAccount.
public object $details
Результат object

$expiredDatetime публичное свойство

Date and time the payment was cancelled in ISO-8601 format.
public string|null $expiredDatetime
Результат string | null

$expiryPeriod публичное свойство

The period after which the payment will expire in ISO-8601 format.
public string|null $expiryPeriod
Результат string | null

$id публичное свойство

Id of the payment (on the Mollie platform).
public string $id
Результат string

$locale публичное свойство

The locale used for this payment.
public string|null $locale
Результат string | null

$mandateId публичное свойство

The mandate ID this payment is performed with.
public string|null $mandateId
Результат string | null

$metadata публичное свойство

During creation of the payment you can set custom metadata that is stored with the payment, and given back whenever you retrieve that payment.
public object|mixed|null $metadata
Результат object | mixed | null

$method публичное свойство

If method is empty/null, the customer can pick his/her preferred payment method.
См. также: Mollie_API_Object_Method
public string|null $method
Результат string | null

$mode публичное свойство

Mode of the payment, either "live" or "test" depending on the API Key that was used.
public string $mode
Результат string

$paidDatetime публичное свойство

Date and time the payment was paid in ISO-8601 format.
public string|null $paidDatetime
Результат string | null

$profileId публичное свойство

The profile ID this payment belongs to.
public string $profileId
Результат string

$recurringType публичное свойство

Either "first", "recurring", or NULL for regular payments.
public string|null $recurringType
Результат string | null

$resource публичное свойство

public string $resource
Результат string

$status публичное свойство

The status of the payment.
public string $status
Результат string

$subscriptionId публичное свойство

The subscription ID this payment belongs to.
public string|null $subscriptionId
Результат string | null