The PaymentMatcherRepositoryContract
Plenty\Modules\Payment\Contracts
public checkMapFindAssignPayment(int $mopId, $data):string
int | $mopId | |
$data |
The PaymentPropertyTypeRepositoryContract is the interface for the payment property type repository. List, get, create and update payment properties.
Plenty\Modules\Payment\Contracts
public allTypes(string $lang):array
Lists payment property types. The language of the property type must be specified.
string | $lang | The language of the payment property type |
public findTypesById(int $id, string $lang):array
Gets a payment property type. The ID of the property type must be specified.
int | $id | The ID of the payment property type. The following property types are available:
|
string | $lang | The language of the payment property type |
public createType($data):PaymentPropertyType
Creates a payment property type.
$data |
public changeProperty($data):PaymentPropertyType
Updates a payment property type.
$data |
The PaymentOrderRelationRepositoryContract is the interface for the payment order relation repository. Create and delete relations between payments and orders.
Plenty\Modules\Payment\Contracts
public createOrderRelation(Payment $payment, Order $order):PaymentOrderRelation
Creates a payment order relation.
Payment | $payment | The ID of the payment |
Order | $order | The ID of the order |
public findOrderRelation(Payment $payment):PaymentOrderRelation
Gets the payment order relation.
Payment | $payment |
public deleteOrderRelation(Payment $payment):void
Deletes a payment order relation.
Payment | $payment | The ID of the payment |
The PaymentContactRelationRepositoryContract is the interface for the payment contact relation repository. Create and delete relations between payments and contact.
Plenty\Modules\Payment\Contracts
public createContactRelation(Payment $payment, Contact $contact):PaymentContactRelation
Creates a payment contact relation.
Payment | $payment | The ID of the payment |
Contact | $contact | The ID of the contact |
public deleteContactRelation(Payment $payment):void
Deletes a payment contact relation.
Payment | $payment | The ID of the payment |
The PaymentRepositoryContract is the interface for the payment repository. List, get, create and update payments. Payments can come into plentymarkets automatically or can be booked manually. Existing payments can be filtered by payment method, by ID, by payment status, by transaction type, by order or by date. Existing payments can also be updated.
Plenty\Modules\Payment\Contracts
public getAll(int $itemsPerPage = 50, int $page = 1):array
Lists payments.
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public getPaymentById(int $paymentId):Payment
Gets a payment. The ID of the payment must be specified.
int | $paymentId | The ID of the payment |
public getPaymentsByMethodId(int $methodId, int $itemsPerPage = 50, int $page = 1):array
Lists payments of a payment method. The ID of the payment method must be specified.
int | $methodId | The ID of the payment method |
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public getPaymentsByStatusId(int $statusId, int $itemsPerPage = 50, int $page = 1):array
Lists payments of a payment status. The ID of the payment status must be specified.
int | $statusId | The ID of the payment status |
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public getPaymentsByTransactionType(int $transactionType, int $itemsPerPage = 50, int $page = 1):array
Lists payments of a transaction type. The transaction type must be specified.
int | $transactionType | The transaction type of the payment |
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public getPaymentsByOrderId(int $orderId):array
Lists payments of an order. The ID of the order must be specified.
int | $orderId | The ID of the order |
public getPaymentsByImportDateInterval(string $startDate, string $endDate, int $itemsPerPage = 50, int $page = 1):array
Lists payments by import date. The start and the end of the date range must be specified.
string | $startDate | The start date of the date range for the import date of the payment |
string | $endDate | The end date of the date range for the import date of the payment |
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public getPaymentsByEntryDateInterval(string $startDate, string $endDate, int $itemsPerPage = 50, int $page = 1):array
Lists payments by entry date. The start and the end of the date range must be specified.
string | $startDate | The start date of the date range for the entry date of the payment |
string | $endDate | The end date of the date range for the entry date of the payment |
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public getPaymentsByPropertyTypeAndValue(int $propertyTypeId, $propertyValue, int $itemsPerPage = 50, int $page = 1):void
Lists payments by payment property type and value.
int | $propertyTypeId | The property type |
$propertyValue | The property value | |
int | $itemsPerPage | The number of items to list per page |
int | $page | The page of results to search for |
public createPayment($data):Payment
Creates a payment.
$data |
public updatePayment($data):Payment
Updates a payment.
$data |
public getStatusConstants():array
public getOriginConstants():array
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
The PaymentPropertyRepositoryContract is the interface for the payment property repository. List, get, create and update payment properties.
Plenty\Modules\Payment\Contracts
public all():array
Lists properties.
public findByPropertyId(int $propertyId):array
Gets a property. The ID of the payment property must be specified.
int | $propertyId | The ID of the payment property |
public allByPaymentId(int $paymentId):array
Lists properties of a payment. The ID of the payment must be specified.
int | $paymentId | The ID of the payment |
public allByTypeId(int $typeId):array
Lists properties of a property type. The ID of the property type must be specified.
int | $typeId | The ID of the payment property type. The following property types are available:
|
public findByCreatedDateInterval(string $startDate, string $endDate):array
Lists properties by creation date. The start and the end of the date range must be specified.
string | $startDate | The start date of the date range for the date of creation of the property |
string | $endDate | The end date of the date range for the date of creation of the property |
public createProperty($data):PaymentProperty
Creates a payment property.
$data |
public changeProperty(PaymentProperty $data):PaymentProperty
Updates a payment property.
PaymentProperty | $data |
The PaymentPropertyTypeNameRepositoryContract is the interface for the repository of payment property type names. List, get, create and update payment property names.
Plenty\Modules\Payment\Contracts
public allTypeNames(string $lang):array
Lists payment property type names. The language of the property type names must be specified.
string | $lang | The language of the payment property type name |
public findByNameId(int $nameId):array
Finds a payment property type name. The ID of the payment property type name must be specified.
int | $nameId | The ID of the payment property type name |
public createTypeName($data):PaymentPropertyTypeName
Creates a payment property type name.
$data |
public changeProperty($data):array
Updates a payment property type name.
$data |
The payment model
Plenty\Modules\Payment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment |
float | amount | The amount of the payment |
float | exchangeRatio | The exchange rate. Exchange rates are used if the default currency saved in plentymarkets differs from the currency of the order. |
int | parentId | The ID of the parent payment |
int | deleted | A deleted payment. Deleted payments have the value 1 and are not displayed in the plentymarkets back end. |
int | unaccountable | An unassigned payment. Unassigned payments have the value 1. |
string | currency | The currency of the payment in ISO 4217 code. |
string | type | The payment type. Available types are credit and debit. |
string | hash | The hash code of the payment. The hash code consists of 32 characters and is automatically generated. |
int | origin | The origin of the payment. The following origins are available:
|
string | receivedAt | The time the payment was received |
string | importedAt | The time the payment was imported |
int | status | The status of the payment |
int | transactionType | The transaction type of the payment. The following transaction types are available:
|
int | mopId | The ID of the payment method |
Payment | parent | The parent payment |
PaymentMethod | method | The payment method |
array | histories | The payment history |
array | properties | The properties of the payment |
bool | regenerateHash | If $regenerateHash is true, regenerate the payment hash value. Default is false. |
bool | updateOrderPaymentStatus | If $updateOrderPaymentStatus is true, update the order payment status. Default is false. |
bool | isSystemCurrency | If $isSystemCurrency is false, the value will be converted to the standard currency with the provided exchange rate. If $isSystemCurrency is false, the value is not converted. Default is true. |
public toArray()
Returns this model as an array.
The payment property type name model
Plenty\Modules\Payment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the name of the property type |
int | typeId | The ID of the property type |
string | lang | The language of the name of the property type |
string | name | The name of the property type |
public toArray()
Returns this model as an array.
The payment property model
Plenty\Modules\Payment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment property |
int | paymentId | The ID of the payment |
int | typeId | The ID of the property type. The following property types are available:
|
string | value | The value of the property type |
public toArray()
Returns this model as an array.
The payment property type model
Plenty\Modules\Payment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the property type |
int | erasable | Specifies whether the property type can be deleted. Property types that can be deleted have the value 1. Default property types cannot be deleted. |
int | position | The position number of the property type |
PaymentPropertyTypeName | name | The name of the property type |
public toArray()
Returns this model as an array.
The payment contact relation model
Plenty\Modules\Payment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment order relation |
int | paymentId | The ID of the payment |
int | contactId | The ID of the contact |
string | assignedAt | The time the payment contact relation was assigned |
public toArray()
Returns this model as an array.
The payment order relation model
Plenty\Modules\Payment\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment order relation |
int | paymentId | The ID of the payment |
int | orderId | The ID of the order |
string | assignedAt | The time the payment order relation was assigned |
public toArray()
Returns this model as an array.
The PaymentHistoryRepositoryContract is the interface for the payment history repository. Get and create the payment history.
Plenty\Modules\Payment\History\Contracts
public getByPaymentId(int $paymentId, int $typeId):array
Gets the payment history for a payment. The ID of the payment and the ID of the payment type must be specified.
int | $paymentId | The ID of the payment |
int | $typeId | The ID of the history type. The following types are available:
|
public createHistory($data):PaymentHistory
Creates the payment history.
$data |
The payment history model
Plenty\Modules\Payment\History\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment history |
int | paymentId | The ID of the payment |
int | typeId | The ID of the history type. The following types are available:
|
string | value | The language of the payment history |
string | user | The user who initiated the action |
public toArray()
Returns this model as an array.
The event is triggered when a payment is executed.
Plenty\Modules\Payment\Events\Checkout
public setOrderId(int $orderId):Checkout
Updates the ID of the order in the checkout. The ID must be specified.
int | $orderId | The ID of the order |
public getOrderId():int
Gets the ID of the order.
public setMop(int $mop):Checkout
Updates the ID of the payment method. The ID must be specified.
int | $mop | The ID of the payment method |
public getMop():int
Gets the ID of the payment method.
public setType(string $type):Checkout
Updates the content type.
string | $type | The content type of the payment plugin |
public getType():string
Gets the content type.
public setValue(string $value):Checkout
Updates the value of the content type.
string | $value | The value of the content type |
public getValue():string
Gets the value of the content type.
The event is triggered after the payment method is selected in the checkout.
Plenty\Modules\Payment\Events\Checkout
public setMop(int $mop):Checkout
Updates the ID of the payment method. The ID must be specified.
int | $mop | The ID of the payment method |
public getMop():int
Gets the ID of the payment method.
public setType(string $type):Checkout
Updates the content type.
string | $type | The content type of the payment plugin |
public getType():string
Gets the content type.
public setValue(string $value):Checkout
Updates the value of the content type.
string | $value | The value of the content type |
public getValue():string
Gets the value of the content type.
public setParams($params):Checkout
Updates the parameters. The parameters must be specified.
$params | The parameters |
public getParams():void
Gets the parameters.
The PaymentMethodRepositoryContract is the interface for the payment method repository. List, get, create and update payment methods.
Plenty\Modules\Payment\Method\Contracts
public all():array
Lists payment methods.
public allForPlugin(string $pluginKey):array
Lists payment methods for a plugin key. The plugin key must be specified.
string | $pluginKey | The plugin key |
public allPluginPaymentMethods():array
public allOldPaymentMethods():array
public findByPaymentMethodId(int $paymentMethodId):PaymentMethod
Gets a payment method. The ID of the payment method must be specified.
int | $paymentMethodId | The ID of the payment method |
public getPreviewList(string $language = null):array
Get an array with all payment methods with the ID as key and the name as value.
string | $language | The names will be returned in this language. |
public createPaymentMethod($paymentMethodData):PaymentMethod
Creates a payment method.
$paymentMethodData |
public updateName($paymentMethodData):PaymentMethod
Updates the payment method name.
$paymentMethodData |
public preparePaymentMethod(int $mop):array
Prepares a payment method. The ID of the payment method must be specified.
int | $mop | The ID of the payment method |
public executePayment(int $mop, int $orderId):array
Executes a payment. The ID of the payment method and the ID of the order must be specified.
int | $mop | The ID of the payment method |
int | $orderId | The ID of the order |
The payment method container
Plenty\Modules\Payment\Method\Contracts
public register(string $paymentKey, string $paymentMethodServiceClass, array $rebuildEventClassesList):void
string | $paymentKey | The unique key of a payment plugin |
string | $paymentMethodServiceClass | The class of the payment method. This class contains information of the payment plugin, such as the name and whether the payment method is active. |
array | $rebuildEventClassesList | A list of events. It is checked again for the list of events whether the payment method is active. |
public isRegistered(string $paymentKey):bool
string | $paymentKey |
The payment method service
Plenty\Modules\Payment\Method\Contracts
The payment method model
Plenty\Modules\Payment\Method\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment method |
string | pluginKey | The plugin key of the payment method |
string | paymentKey | The payment key of the payment method |
string | name | The name of the payment method |
public toArray()
Returns this model as an array.
The payment method name model
Plenty\Modules\Payment\MethodName\Models
Type | Name | Description |
---|---|---|
int | paymentMethodId | |
string | lang | |
string | name |
public toArray()
Returns this model as an array.