Download the PHP package mblsolutions/simfoni-php-laravel without Composer
On this page you can find all versions of the php package mblsolutions/simfoni-php-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mblsolutions/simfoni-php-laravel
More information about mblsolutions/simfoni-php-laravel
Files in mblsolutions/simfoni-php-laravel
Package simfoni-php-laravel
Short Description Official Simfoni interface for Laravel PHP applications.
License MIT
Informations about the package simfoni-php-laravel
Simfoni Laravel interface for PHP
The Simfoni Laravel Interface for PHP gives you an API interface into the Simfoni Platform for your Laravel applications.
Contents
- Installation
- Configuration
- Authentication
- Create Order
- Issued Info
- Decryption
- Responses
- Errors
- License
Installation
The recommended way to install Simfoni PHP Laravel is through Composer.
Laravel without auto-discovery
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
If you want to use the facade for authentication, add this to your facades in app.php
'SimfoniAuth' => \MBLSolutions\SinfoniLaravel\SimAuthFacade::class,
Configuration
To import the default Simfoni configuration file into laravel please run the following command
A new config file will be available in config/simfoni.php - Please ensure you update these configuration items with details provided by Redu Retail.
Authentication
Please Note: Your API credentials (Client ID, Client Secret and access_tokens) carry many permissions. Keep these credentials secure. Do not share this data in Github, client side code etc... If you believe any of your credentials have been compromised, within the Simfoni application interface revoke/reset user tokens, client secrets and encryption keys.
Authentication can be made by passing your Simfoni Application Client ID
, Client Secret
,
Users Email
and Users Password
to the authentication password method.
A successful authentication will return an OAuth response containing access, refresh and user information.
We recommend this information is stored and reused between requests (the authentication will expire '31622400' seconds from the moment the authentication is issued).
Use your access_token
by setting the token in the Simfoni Configuration. The PHP library will automatically
attach this token to each api request (within the current request, each PHP request would need to re-set this token).
Create Order
To create an order, certain parameters are required, many are optional depending on the nature of the order. For example, to request a single e-Code for a product with a value of £10.00, the following example would be the minimum required. Under these circumstances much of the order information is predetermined by the configuration of the Simfoni system.
The processing of orders is subject to certain rules applied to the product being ordered. One of these is a control over when the product can be ordered without manual intervention for payment. Orders will not be processed if the account does not have sufficient funds available either through a credit or debit facility (or the account is in aged debt). Similarly, the product may be subject to restrictions on when it can be ordered without manual intervention (Fast Track). Normally, this will be set to 24 X 7 processing. If for any reason there are restrictions on a product, an error message will be returned in the form:
A successful request will show information about the placed order.
Issued Info
To view details on encrypted PAN, Serial, Pin and Url information associated with the order you must request this using IssuedInfo
In order to call this end point, a Webhook must be set up to return the required parameter information when the order is complete.
An example successful response
Decryption
When utilising IssuedInfo
the data returned contains encrypted PAN, Serial, Pin and Url information associated with the order.
As this information is confidential, it is returned in an encrypted form. To decrypt the values, a secret key is required.
To decrypt the values, a secret key is required. This is specifically for the decryption of this information. This key will be provided by Redu Retail as part of the configuration.
Responses
All responses will be returned as an array. To make calls consistent, all will paginate their results, even if the response only contains one result, or no results at all.
There will be three top-level keys in a response
data
, which contains an array of results.links
, which contains links for pagination purposes.meta
, which contains additional pagination-related information.
Errors
Exceptions
For exception levels errors retrieving data from Simfoni an array will be returned with a single message
index.
Validation Failures
For methods that require specific parameters, if a parameter fails validation then you will receive the following response body:
The errors
key will contain an object where the keys are the name of the field that failed validation, and the value is an array of messages describing the validation failure so you can correct your input.
Field names use “dotted” notation to designate nested field names. For example, the field items[0][sku] would be represented as items.0.sku in the errors object.
License
Simfoni Interface for PHP is free software distributed under the terms of the MIT license.
A contract/subscription to Simfoni is required to make use of this package, for more information contact Redu Group Technical
All versions of simfoni-php-laravel with dependencies
illuminate/events Version ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/routing Version ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/support Version ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/session Version ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/pagination Version ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
mblsolutions/simfoni-php Version ^3.0