Download the PHP package fei/payment-common without Composer
On this page you can find all versions of the php package fei/payment-common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package payment-common
Service Payment - Common
Table of contents
- Entities
- Validators
- Contribution
Entities
Payment entity
In addition to traditional id
and createdAt
fields, Payment entity has eleven important properties:
Properties | Type |
---|---|
id | integer |
uuid | string |
createdAt | datetime |
payedAt | datetime |
expirationDate | datetime |
status | integer |
cancellationReason | string |
requiredPrice | float |
capturedPrice | float |
authorizedPayment | integer |
selectedPayment | integer |
contexts | ArrayCollection |
callbackUrl | ArrayCollection |
uuid
is a string representing a unique identifier of the payment entitycreatedAt
represent the creation datepayedAt
represent the date when the payment has been madeexpirationDate
represent the date when the payment expiresstatus
indicate in which status the payment currently iscancellationReason
is a string representing the reason of the cancellation of the paymentrequiredPrice
is a float representing the price requiredcapturedPrice
is a float representing the price capturedauthorizedPayment
is an int that represent the list of the payment authorised (used like binary flags)selectedPayment
is an integer representing the payment method that has been chosencontexts
is an ArrayCollection of all the contexts for the entitycallbackUrl
is an array of callbacks url that will be used is some events in the application (when the payment is saved for example). Here are the possible value and purpose of the callback url:succeeded
: the url that will be called when an payment authorization successesfailed
: the url that will be called when an payment authorization failedcancelled
: the url that will be called when an payment is cancelled
Context entity
In addition to traditional id
field, Context entity has three important properties:
Properties | Type |
---|---|
id | integer |
key | string |
value | string |
payment | Payment |
key
is a string representing the key of the contextvalue
is a string representing the value attach to this contextpayment
is a Payment entity representing the Payment related to this context
Validators
You have the possibility to validate a Payment
entity with PaymentValidator
class:
By default, only uuid
, createdAt
, expirationDate
, status
, requiredPrice
, authorizedPayment
and callbackUrl
properties must not be empty,
but you're also able to validate only a few properties of your entity, using validate
methods:
Contribution
As FEI Service, designed and made by OpCoding. The contribution workflow will involve both technical teams. Feel free to contribute, to improve features and apply patches, but keep in mind to carefully deal with pull request. Merging must be the product of complete discussions between Flash and OpCoding teams :)
All versions of payment-common with dependencies
fei/entities Version ^1.0.3
doctrine/common Version ~2.6.0
ramsey/uuid Version ~3.6