Download the PHP package dvsa/mot-cpms-client without Composer
On this page you can find all versions of the php package dvsa/mot-cpms-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mot-cpms-client
CPMS Rest Client
Introduction
This a module designed to make restful API calls to CPMS backend API. It handles
- The generation of the required access token based on the scope
- Logging when a logger alias is provided
- Caching of access tokens when caching is setup and enabled.
Installation
The recommended way to install is through [Composer][composer].
Configuration
-
Modify the configuration in the client-config.global.php file as follows:
versionlogger_aliasidentity_providerCpmsClient\Authenticate\IdentityProviderInterfaceclient_idclient_secretuser_idcustomer_referenceenable_cachecache_storagefilesystemdomaincpms-clientcpms-clientPOSTGETPUT``` $requiredScope = 'DIRECT_DEBIT'; $endPoint = '/api/mandate/<mandate_reference>/status'; $params = [ 'status' => '<status code>' ]; $response = $this->getCpmsRestClient()->get($endPoint, $requiredScope, $params);
Specifying Required Fields
When querying CPMS for data e.g. payment details, it is recommended that you specify the fields you want returned in the request. If not specified, CMS would return the defaults fields which may change. The fields available are the column names as specified in the [database scheme] (https://wiki.i-env.net/display/EA/CPMS+Interface+Service+Definition#CPMSInterfaceServiceDefinition-DataModel).
Required field from main table e.g. Payment
$requiredFields = [
'created_on',
'receipt_reference',
'scope',
'total_amount',
'payment_details',
'payment_status',
'customer_reference',
'created_by'
]
Required fields from join tables e.g PaymentDetails. Payment has a (one-to-many) relationship with PaymentDetails.
Note that the field names are underscore separated while the entity names are camel cases.
$requiredFields = [
'payment' => [
'created_on',
'receipt_reference',
'scope',
'total_amount',
'payment_details',
'payment_status',
'customer_reference',
'created_by'
],
'paymentDetail' => [
'product_reference',
'sales_reference',
'payment_reference',
'amount'
],
]
Contributing
Please refer to our Contribution Guide.
All versions of mot-cpms-client with dependencies
dvsa/mot-cpms-notifications Version ^3.0.0
laminas/laminas-mvc Version ^3.3.0
laminas/laminas-cache Version ^3.12.0
laminas/laminas-log Version ^2.13
laminas/laminas-filter Version ^2.13
laminas/laminas-dependency-plugin Version ^2.6.0
laminas/laminas-cache-storage-adapter-filesystem Version ^2.0
laminas/laminas-cache-storage-adapter-memory Version ^2.0
laminas/laminas-cache-storage-adapter-apcu Version ^2.5.0