Plentymarkets interface documentation
Payment
Contracts
PaymentContactRelationRepositoryContract
The PaymentContactRelationRepositoryContract is the interface for the payment contact relation repository. Create and delete relations between payments and contact.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public createContactRelation($payment, $contact):Plenty\Modules\Payment\Models\PaymentContactRelation
Return type: PaymentContactRelation
Creates a payment contact relation.
Name |
Type |
Description |
|
The ID of the payment |
|
|
The ID of the contact |
public deleteContactRelation($payment):void
Deletes a payment contact relation.
Name |
Type |
Description |
|
The ID of the payment |
PaymentMatcherRepositoryContract
The PaymentMatcherRepositoryContract automatically matching payments to an order.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public checkMapPayment($mopId, $data):void
Checks and save the payment data
Name |
Type |
Description |
|
||
|
public checkMapFindAssignPayment($mopId, $data):string
Checks and assigns payment data.
Name |
Type |
Description |
|
||
|
public findAssignPayment($payment):void
Finds and assigns payment data
Name |
Type |
Description |
|
public getMatchingRatesForPayment($paymentId):array
Gets the matching of payment data with orders.
Name |
Type |
Description |
|
public getMatchingOrAssigningRatesForPayment($paymentId):array
Get matching or assigning rate list for a payment
Name |
Type |
Description |
|
PaymentOrderRelationRepositoryContract
The PaymentOrderRelationRepositoryContract is the interface for the payment order relation repository. Create and delete relations between payments and orders.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public createOrderRelation($payment, $order):Plenty\Modules\Payment\Models\PaymentOrderRelation
Return type: PaymentOrderRelation
Creates a payment order relation.
Name |
Type |
Description |
|
The ID of the payment |
|
|
The ID of the order |
public findOrderRelation($payment):Plenty\Modules\Payment\Models\PaymentOrderRelation
Return type: PaymentOrderRelation
Gets the payment order relation.
Name |
Type |
Description |
|
public deleteOrderRelation($payment):void
Deletes a payment order relation.
Name |
Type |
Description |
|
The ID of the payment |
public createOrderRelationWithValidation($paymentId, $orderId, $matchingRate = null, $allowMultiplePaymentsPerOrder = false):Plenty\Modules\Payment\Models\PaymentOrderRelation
Return type: PaymentOrderRelation
Assign a payment to an order ID if order ID is valid and order ID doesn't have a payment assigned.
Name |
Type |
Description |
|
||
|
||
|
||
|
public createOrderRelationByInvoiceNumber($paymentId, $invoiceNumber, $allowMultiplePaymentsPerOrder = false):Plenty\Modules\Payment\Models\PaymentOrderRelation
Return type: PaymentOrderRelation
Assign a payment to an order if invoice number is valid.
Name |
Type |
Description |
|
||
|
||
|
public autoAssignPayments($paymentIds):array
Bulk auto assign payments
Name |
Type |
Description |
|
public detachAllPayments($orderId):void
Detach all the payment from and order.
Name |
Type |
Description |
|
public resetPaidAmount($payment):void
Reset paid amount of order payment and add details in payment history
Name |
Type |
Description |
|
PaymentPropertyRepositoryContract
The PaymentPropertyRepositoryContract is the interface for the payment property repository. List, get, create and update payment properties.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public all():array
Lists properties.
public findByPropertyId($propertyId):array
Gets a property. The ID of the payment property must be specified.
Name |
Type |
Description |
|
The ID of the payment property |
public allByPaymentId($paymentId):array
Lists properties of a payment. The ID of the payment must be specified.
Name |
Type |
Description |
|
The ID of the payment |
public allByTypeId($typeId):array
Lists properties of a property type. The ID of the property type must be specified.
Name |
Type |
Description |
|
The ID of the payment property type. The following property types are available: <ul> <li>Transaction ID = 1</li> <li>Reference ID = 2</li> <li>Booking text = 3</li> <li>Transaction password = 4</li> <li>Transaction code = 5</li> <li>Authorisation ID = 6</li> <li>Capture ID = 7</li> <li>Refund ID = 8</li> <li>Credit note ID = 9</li> <li>Order reference = 10</li> <li>Name of the sender = 11</li> <li>Email of the sender = 12</li> <li>The sender’s sort code = 13</li> <li>The sender’s bank name = 14</li> <li>The sender’s bank account number = 15</li> <li>The holder of the bank account = 16</li> <li>The country of the sender’s bank account = 17</li> <li>The sender’s IBAN = 18</li> <li>The sender’s BIC = 19</li> <li>Name of the recipient = 20</li> <li>The recipient’s bank account = 21</li> <li>Reference text of the payment = 22</li> <li>Payment origin = 23</li> <li>Shipping address ID = 24</li> <li>Invoice address ID = 25</li> <li>Item buyer = 26</li> <li>Item number = 27</li> <li>Item transaction ID = 28</li> <li>External transaction type = 29</li> <li>External transaction status = 30</li> </ul> |
public findByCreatedDateInterval($startDate, $endDate):array
Lists properties by creation date. The start and the end of the date range must be specified.
Name |
Type |
Description |
|
The start date of the date range for the date of creation of the property |
|
|
The end date of the date range for the date of creation of the property |
public createProperty($data):Plenty\Modules\Payment\Models\PaymentProperty
Return type: PaymentProperty
Creates a payment property.
Name |
Type |
Description |
|
public changeProperty($data):Plenty\Modules\Payment\Models\PaymentProperty
PaymentPropertyTypeNameRepositoryContract
The PaymentPropertyTypeNameRepositoryContract is the interface for the repository of payment property type names. List, get, create and update payment property names.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public allTypeNames($lang):array
Lists payment property type names. The language of the property type names must be specified.
Name |
Type |
Description |
|
The language of the payment property type name |
public findByNameId($nameId):array
Finds a payment property type name. The ID of the payment property type name must be specified.
Name |
Type |
Description |
|
The ID of the payment property type name |
public createTypeName($data):Plenty\Modules\Payment\Models\PaymentPropertyTypeName
Return type: PaymentPropertyTypeName
Creates a payment property type name.
Name |
Type |
Description |
|
public changeProperty($data):array
Updates a payment property type name.
Name |
Type |
Description |
|
PaymentPropertyTypeRepositoryContract
The PaymentPropertyTypeRepositoryContract is the interface for the payment property type repository. List, get, create and update payment properties.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public allTypes($lang):array
Lists payment property types. The language of the property type must be specified.
Name |
Type |
Description |
|
The language of the payment property type |
public findTypesById($id, $lang):array
Gets a payment property type. The ID of the property type must be specified.
Name |
Type |
Description |
|
The ID of the payment property type. The following property types are available: <ul> <li>Transaction ID = 1</li> <li>Reference ID = 2</li> <li>Booking text = 3</li> <li>Transaction password = 4</li> <li>Transaction code = 5</li> <li>Authorisation ID = 6</li> <li>Capture ID = 7</li> <li>Refund ID = 8</li> <li>Credit note ID = 9</li> <li>Order reference = 10</li> <li>Name of the sender = 11</li> <li>Email of the sender = 12</li> <li>The sender’s sort code = 13</li> <li>The sender’s bank name = 14</li> <li>The sender’s bank account number = 15</li> <li>The holder of the bank account = 16</li> <li>The country of the sender’s bank account = 17</li> <li>The sender’s IBAN = 18</li> <li>The sender’s BIC = 19</li> <li>Name of the recipient = 20</li> <li>The recipient’s bank account = 21</li> <li>Reference text of the payment = 22</li> <li>Payment origin = 23</li> <li>Shipping address ID = 24</li> <li>Invoice address ID = 25</li> <li>Item buyer = 26</li> <li>Item number = 27</li> <li>Item transaction ID = 28</li> <li>External transaction type = 29</li> <li>External transaction status = 30</li> </ul> |
|
|
The language of the payment property type |
public createType($data):Plenty\Modules\Payment\Models\PaymentPropertyType
Return type: PaymentPropertyType
Creates a payment property type.
Name |
Type |
Description |
|
public changeProperty($data):Plenty\Modules\Payment\Models\PaymentPropertyType
Return type: PaymentPropertyType
Updates a payment property type.
Name |
Type |
Description |
|
PaymentRepositoryContract
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.
Namespace
Plenty\Modules\Payment\Contracts
Methods
public getAll($itemsPerPage = 50, $page = 1):array
Lists payments.
Name |
Type |
Description |
|
The number of items to list per page |
|
|
The page of results to search for |
public search($page = 1, $itemsPerPage = \Plenty\Modules\Payment\Models\Payment::MAX_ITEMS_PER_PAGE, $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Searches for a list of payments.
Name |
Type |
Description |
|
The shown page. Default value is 1. |
|
|
The items shown per page. Default value is 50. |
|
|
The relations to be loaded. |
public getPaymentById($paymentId):Plenty\Modules\Payment\Models\Payment
Return type: Payment
Gets a payment. The ID of the payment must be specified.
Name |
Type |
Description |
|
The ID of the payment |
public getPaymentsByMethodId($methodId, $itemsPerPage = 50, $page = 1):array
Lists payments of a payment method. The ID of the payment method must be specified.
Name |
Type |
Description |
|
The ID of the payment method |
|
|
The number of items to list per page |
|
|
The page of results to search for |
public getPaymentsByStatusId($statusId, $itemsPerPage = 50, $page = 1):array
Lists payments of a payment status. The ID of the payment status must be specified.
Name |
Type |
Description |
|
The ID of the payment status |
|
|
The number of items to list per page |
|
|
The page of results to search for |
public getPaymentsByTransactionType($transactionType, $itemsPerPage = 50, $page = 1):array
Lists payments of a transaction type. The transaction type must be specified.
Name |
Type |
Description |
|
The transaction type of the payment |
|
|
The number of items to list per page |
|
|
The page of results to search for |
public getPaymentsByOrderId($orderId):array
Lists payments of an order. The ID of the order must be specified.
Name |
Type |
Description |
|
The ID of the order |
public getPaymentsByImportDateInterval($startDate, $endDate, $itemsPerPage = 50, $page = 1):array
Lists payments by import date. The start and the end of the date range must be specified.
Name |
Type |
Description |
|
The start date of the date range for the import date of the payment |
|
|
The end date of the date range for the import date of the payment |
|
|
The number of items to list per page |
|
|
The page of results to search for |
public getPaymentsByEntryDateInterval($startDate, $endDate, $itemsPerPage = 50, $page = 1):array
Lists payments by entry date. The start and the end of the date range must be specified.
Name |
Type |
Description |
|
The start date of the date range for the entry date of the payment |
|
|
The end date of the date range for the entry date of the payment |
|
|
The number of items to list per page |
|
|
The page of results to search for |
public getPaymentsByPropertyTypeAndValue($propertyTypeId, $propertyValue = "", $itemsPerPage = 50, $page = 1):void
Lists payments by payment property type and value.
Name |
Type |
Description |
|
The property type |
|
|
The property value |
|
|
The number of items to list per page |
|
|
The page of results to search for |
public createPayment($data):Plenty\Modules\Payment\Models\Payment
Return type: Payment
Creates a payment.
Name |
Type |
Description |
|
public updatePayment($data):Plenty\Modules\Payment\Models\Payment
Return type: Payment
Updates a payment.
Name |
Type |
Description |
|
public getStatusConstants():array
public getOriginConstants():array
public deletePayment($paymentId):void
Name |
Type |
Description |
|
public splitAndAssignPayment($paymentId, $orderIds):bool
Split and assign a payment to given order IDs
Name |
Type |
Description |
|
||
|
public deletePayments($paymentIds):array
Bulk delete payments.
Name |
Type |
Description |
|
An array containing payment ids. Eg: [ids ⇒ [1, 2, 3]] |
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.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
Payment
The payment model representing a received payment by a payment service provider.
Namespace
Plenty\Modules\Payment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the payment |
|
amount |
The amount of the payment |
|
exchangeRatio |
The exchange rate. Exchange rates are used if the default currency saved in plentymarkets differs from the currency of the order. |
|
parentId |
The ID of the parent payment |
|
deleted |
A deleted payment. Deleted payments have the value 1 and are not displayed in the plentymarkets back end. |
|
unaccountable |
An unassigned payment. Unassigned payments have the value 1. |
|
currency |
The currency of the payment in ISO 4217 code. |
|
type |
The payment type. Available types are credit and debit. |
|
hash |
The hash code of the payment. The hash code consists of 32 characters and is automatically generated. |
|
origin |
The origin of the payment. The following origins are available: <ul> <li>Undefined = 0</li> <li>System = 1</li> <li>Manually = 2</li> <li>SOAP = 3</li> <li>Import = 4</li> <li>Split payment = 5</li> <li>Plugin = 6</li> <li>POS = 7</li> </ul> |
|
receivedAt |
The time the payment was received |
|
importedAt |
The time the payment was imported |
|
status |
The <a href="https://developers.plentymarkets.com/en-gb/developers/main/rest-api-guides/getting-started.html#_payment_status_ids" target="_blank">status</a> of the payment |
|
transactionType |
The transaction type of the payment. The following transaction types are available: <ul> <li>Interim transaction report = 1</li> <li>Booked payment = 2</li> <li>Split payment = 3</li> </ul> |
|
mopId |
The ID of the payment method |
|
parent |
The parent payment |
|
children |
||
method |
The payment method |
|
order |
||
contact |
||
histories |
The payment history |
|
properties |
The properties of the payment |
|
regenerateHash |
If $regenerateHash is true, regenerate the payment hash value. Default is false. |
|
updateOrderPaymentStatus |
If $updateOrderPaymentStatus is true, update the order payment status. Default is false. |
|
isSystemCurrency |
If $isSystemCurrency is false, the value will be converted to the standard currency with the provided exchange rate. If $isSystemCurrency is true, the value is not converted. Default is true. |
Methods
public toArray()
Returns this model as an array.
PaymentContactRelation
The payment contact relation model
Namespace
Plenty\Modules\Payment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the payment order relation |
|
paymentId |
The ID of the payment |
|
contactId |
The ID of the contact |
|
assignedAt |
The time the payment contact relation was assigned |
Methods
public toArray()
Returns this model as an array.
PaymentOrderRelation
The payment order relation model
Namespace
Plenty\Modules\Payment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the payment order relation |
|
paymentId |
The ID of the payment |
|
orderId |
The ID of the order |
|
assignedAt |
The time the payment order relation was assigned |
Methods
public toArray()
Returns this model as an array.
PaymentProperty
The payment property model
Namespace
Plenty\Modules\Payment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the payment property |
|
paymentId |
The ID of the payment |
|
typeId |
The ID of the property type. The following property types are available: <ul> <li>Transaction ID = 1</li> <li>Reference ID = 2</li> <li>Booking text = 3</li> <li>Transaction password = 4</li> <li>Transaction code = 5</li> <li>Authorisation ID = 6</li> <li>Capture ID = 7</li> <li>Refund ID = 8</li> <li>Credit note ID = 9</li> <li>Order reference = 10</li> <li>Name of the sender = 11</li> <li>Email of the sender = 12</li> <li>The sender’s sort code = 13</li> <li>The sender’s bank name = 14</li> <li>The sender’s bank account number = 15</li> <li>The holder of the bank account = 16</li> <li>The country of the sender’s bank account = 17</li> <li>The sender’s IBAN = 18</li> <li>The sender’s BIC = 19</li> <li>Name of the recipient = 20</li> <li>The recipient’s bank account = 21</li> <li>Reference text of the payment = 22</li> <li>Payment origin = 23</li> <li>Shipping address ID = 24</li> <li>Invoice address ID = 25</li> <li>Item buyer = 26</li> <li>Item number = 27</li> <li>Item transaction ID = 28</li> <li>External transaction type = 29</li> <li>External transaction status = 30</li> <li>The receiver’s IBAN = 31</li> <li>The receiver’s BIC = 32</li> <li>Transaction fee = 33</li> <li>Transaction lifespan = 34</li> <li>Matching rate = 36</li> </ul> |
|
value |
The value of the property type |
|
payment |
||
type |
Methods
public toArray()
Returns this model as an array.
PaymentPropertyType
The payment property type model
Namespace
Plenty\Modules\Payment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the property type |
|
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. |
|
position |
The position number of the property type |
|
name |
The name of the property type |
Methods
public toArray()
Returns this model as an array.
PaymentPropertyTypeName
The payment property type name model
Namespace
Plenty\Modules\Payment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the name of the property type |
|
typeId |
The ID of the property type |
|
lang |
The language of the name of the property type |
|
name |
The name of the property type |
Methods
public toArray()
Returns this model as an array.
Events
Checkout
ExecutePayment
The event is triggered when a payment is executed.
Namespace
Plenty\Modules\Payment\Events\Checkout
Methods
public setOrderId($orderId):Plenty\Modules\Payment\Events\Checkout\ExecutePayment
Return type: ExecutePayment
Updates the ID of the order in the checkout. The ID must be specified.
Name |
Type |
Description |
|
The ID of the order |
public getOrderId():int
Gets the ID of the order.
public setMop($mop):Plenty\Modules\Payment\Events\Checkout\ExecutePayment
Return type: ExecutePayment
Updates the ID of the payment method. The ID must be specified.
Name |
Type |
Description |
|
The ID of the payment method |
public getMop():int
Gets the ID of the payment method.
public setType($type):Plenty\Modules\Payment\Events\Checkout\ExecutePayment
Return type: ExecutePayment
Updates the content type.
Name |
Type |
Description |
|
The <a href="https://developers.plentymarkets.com/dev-doc/payment-plugins#payment-prepare-payment">content type</a> of the payment plugin |
public getType():string
Gets the content type.
public setValue($value):Plenty\Modules\Payment\Events\Checkout\ExecutePayment
Return type: ExecutePayment
Updates the value of the content type.
Name |
Type |
Description |
|
The value of the content type |
public getValue():string
Gets the value of the content type.
GetPaymentMethodContent
The event is triggered after the payment method is selected in the checkout.
Namespace
Plenty\Modules\Payment\Events\Checkout
Methods
public setMop($mop):Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent
Return type: GetPaymentMethodContent
Updates the ID of the payment method. The ID must be specified.
Name |
Type |
Description |
|
The ID of the payment method |
public getMop():int
Gets the ID of the payment method.
public setType($type):Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent
Return type: GetPaymentMethodContent
Updates the content type.
Name |
Type |
Description |
|
The <a href="https://developers.plentymarkets.com/dev-doc/payment-plugins#payment-prepare-payment">content type</a> of the payment plugin |
public getType():string
Gets the content type.
public setValue($value):Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent
Return type: GetPaymentMethodContent
Updates the value of the content type.
Name |
Type |
Description |
|
The value of the content type |
public getValue():string
Gets the value of the content type.
public setParams($params):Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent
Return type: GetPaymentMethodContent
Updates the parameters. The parameters must be specified.
Name |
Type |
Description |
|
The parameters |
public getParams():void
Gets the parameters.
History
Contracts
PaymentHistoryRepositoryContract
The PaymentHistoryRepositoryContract is the interface for the payment history repository. Get and create the payment history.
Namespace
Plenty\Modules\Payment\History\Contracts
Methods
public getByPaymentId($paymentId, $typeId):array
Gets the payment history for a payment. The ID of the payment and the ID of the payment type must be specified.
Name |
Type |
Description |
|
The ID of the payment |
|
|
The ID of the history type. The following types are available: <ul> <li>Created = 1</li> <li>Status updated = 2</li> <li>Assigned = 3</li> <li>Detached = 4</li> <li>Deleted = 5</li> <li>Updated = 6</li> </ul> |
public getByOrderId($orderId):void
Get payment history by order ID.
Name |
Type |
Description |
|
public createHistory($data):Plenty\Modules\Payment\History\Models\PaymentHistory
Models
PaymentHistory
The payment history model
Namespace
Plenty\Modules\Payment\History\Models
Name | Type | Description |
---|---|---|
id |
The ID of the payment history |
|
paymentId |
The ID of the payment |
|
typeId |
The ID of the history type. The following types are available: <ul> <li>Created = 1</li> <li>Status updated = 2</li> <li>Assigned = 3</li> <li>Detached = 4</li> <li>Deleted = 5</li> <li>Updated = 6</li> </ul> |
|
value |
The value of the payment history |
|
user |
The user who initiated the action |
Methods
public toArray()
Returns this model as an array.
MatcherRules
Contracts
PaymentMatcherRulesContainerContract
Payment Matcher Rules Container Service
Namespace
Plenty\Modules\Payment\MatcherRules\Contracts
Methods
public registerRule($ruleClass, $mopIds = []):void
Register a specific rule class, either for specific methods of payment, or, lacking the second param, for all
Name |
Type |
Description |
|
||
|
public getRegisteredRules($mopId):array
Gets all registered rules that apply to a specific method of payment If the payment method doesn't have any specificity, the rule set that applies generically is returned
Name |
Type |
Description |
|
public excludeRuleForMethods($ruleClass, $mopIds):void
Excludes the specified rule from the method's ruleset.
Name |
Type |
Description |
|
||
|
Rules
CheckMatchedOrderInvoiceAmount
Invoice Amount Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchAlreadyOverpaid
Already Overpaid Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchAmount
Amount Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchCustomerEmail
Customer E-Mail Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchCustomerId
Customer ID Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchCustomerName
Customer Name Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchDeutschePost
Deutsche Post Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchEbayName
Ebay Name Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchEbayTransactionId
Ebay Transaction ID Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchEbayUniquePaymentId
Ebay Unique Payment ID Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchExternalOrderId
External Order ID Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchInvoiceNumber
Invoice Number Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchOrderId
Order ID Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchPackageNum
Package Number Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchPaymentBeforeEntryDate
Payment Before Entry Date Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
MatchPaymentTransactionId
Payment Transaction ID Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
PaymentMatcherBaseRule
Abstract Payment Matcher Rule
Namespace
Plenty\Modules\Payment\MatcherRules\Rules
Methods
public getScoreUp():int
public setScoreUp($scoreUp):void
Name |
Type |
Description |
|
public getScoreDown():void
public setScoreDown($scoreDown):void
Name |
Type |
Description |
|
public calculateMatchingCondition($payment):int
calculate the matching condition used in 2 rules - amount and email
Name |
Type |
Description |
|
public canScore($payment, $matchScore, $scoringLog):bool
Name |
Type |
Description |
|
||
|
||
|
public score($payment, $order):float
Name |
Type |
Description |
|
||
|
Method
Contracts
PaymentMethodContainer
The payment method container
Namespace
Plenty\Modules\Payment\Method\Contracts
Methods
public register($paymentKey, $paymentMethodServiceClass, $rebuildEventClassesList):void
Registers a payment method
Name |
Type |
Description |
|
The unique key of a payment plugin |
|
|
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. |
|
|
A list of events. It is checked again for the list of events whether the payment method is active. |
public isRegistered($paymentKey):bool
Checks registered payment method
Name |
Type |
Description |
|
PaymentMethodRepositoryContract
The PaymentMethodRepositoryContract is the interface for the payment method repository. List, get, create and update payment methods.
Namespace
Plenty\Modules\Payment\Method\Contracts
Methods
public all():array
Lists payment methods.
public allForPlugin($pluginKey):array
Lists payment methods for a plugin key. The plugin key must be specified.
Name |
Type |
Description |
|
The plugin key |
public allPluginPaymentMethods():array
Get all plugin payment methods.
public allOldPaymentMethods():array
Get all old payment methods.
public findByPaymentMethodId($paymentMethodId):Plenty\Modules\Payment\Method\Models\PaymentMethod
Return type: PaymentMethod
Gets a payment method. The ID of the payment method must be specified.
Name |
Type |
Description |
|
The ID of the payment method |
public findByPluginAndPaymentKey($pluginKey, $paymentKey):Plenty\Modules\Payment\Method\Models\PaymentMethod
Return type: PaymentMethod
Gets a payment method. The plugin and the payment key must be specified.
Name |
Type |
Description |
|
||
|
public getPreviewList($language = null):array
Get an array with all payment methods with the ID as key and the name as value.
Name |
Type |
Description |
|
The names will be returned in this language. |
public createPaymentMethod($paymentMethodData):Plenty\Modules\Payment\Method\Models\PaymentMethod
Return type: PaymentMethod
Creates a payment method.
Name |
Type |
Description |
|
public updateName($paymentMethodData):Plenty\Modules\Payment\Method\Models\PaymentMethod
Return type: PaymentMethod
Updates the payment method name.
Name |
Type |
Description |
|
public update($paymentMethodData):Plenty\Modules\Payment\Method\Models\PaymentMethod
Return type: PaymentMethod
Updates payment method name and isDocumentBuilderActive
Name |
Type |
Description |
|
public updateBulk($paymentMethods):void
Name |
Type |
Description |
|
public preparePaymentMethod($mop):array
Prepares a payment method. The ID of the payment method must be specified.
Name |
Type |
Description |
|
The ID of the payment method |
public executePayment($mop, $orderId):array
Executes a payment. The ID of the payment method and the ID of the order must be specified.
Name |
Type |
Description |
|
The ID of the payment method |
|
|
The ID of the order |
public listBackendSearchable($lang):array
List all payment methods which are searchable for the backend
Name |
Type |
Description |
|
public listBackendActive($lang):array
List all payment methods which are active for the backend
Name |
Type |
Description |
|
public listBackendIcon():array
List all payment methods backend icon
public listCanHandleSubscriptions($lang):array
List all payment methods which can handle subscriptions
Name |
Type |
Description |
|
public listAllActive($lang):array
List all payment methods which are active
Name |
Type |
Description |
|
public backendSearchablePaymentMethods():array
public backendActivePaymentMethods():array
public listDocumentBuilderActive($lang):array
List all payment methods which are active for DocumentBuilder
Name |
Type |
Description |
|
PaymentMethodService
Deprecated: The payment method service
Namespace
Plenty\Modules\Payment\Method\Contracts
Methods
public isBackendSearchable():bool
Is this payment method searchable in the backend?
public isBackendActive():bool
Is this payment method active in the backend?
public getBackendName($lang):string
Get the backend name of the payment method
Name |
Type |
Description |
|
public canHandleSubscriptions():bool
Can this payment method handle subscriptions?
Models
PaymentMethod
The payment method model
Namespace
Plenty\Modules\Payment\Method\Models
Name | Type | Description |
---|---|---|
id |
The ID of the payment method |
|
pluginKey |
The plugin key of the payment method |
|
paymentKey |
The payment key of the payment method |
|
name |
The name of the payment method |
|
isDocumentBuilderActive |
Flag that indicates if payment method is checked for document builder |
Methods
public toArray()
Returns this model as an array.
Services
PaymentMethodBaseService
The payment method service
Namespace
Plenty\Modules\Payment\Method\Services
Methods
public isActive():bool
Determine if the payment method is active for the frontend
public getName($lang = ""):string
Return the frontend name of the payment method according to the language
Name |
Type |
Description |
|
public getFee():float
Return an additional payment fee for the payment method
public getIcon($lang = ""):string
Return the frontend icon of the payment method according to the language
Name |
Type |
Description |
|
public getDescription($lang = ""):string
Return the frontend description of the payment method according to the language
Name |
Type |
Description |
|
public getSourceUrl($lang = ""):string
Return an url with additional information shown in the frontend about the payment method according to the language
Name |
Type |
Description |
|
public isSwitchableTo():bool
Check if it is allowed to switch to this payment method after the order is placed
public isSwitchableFrom():bool
Check if it is allowed to switch from this payment method after the order is placed
public isBackendSearchable():bool
Is this payment method searchable in the backend?
public isBackendActive():bool
Is this payment method active in the backend to used for existing orders?
public getBackendName($lang = ""):string
Get the backend name of the payment method according to the language
Name |
Type |
Description |
|
public canHandleSubscriptions():bool
Can this payment method handle subscriptions?
public getBackendIcon():string
Return the icon for the backend, shown in the payments ui