Download the PHP package pagantis/orders-api-client without Composer
On this page you can find all versions of the php package pagantis/orders-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pagantis/orders-api-client
More information about pagantis/orders-api-client
Files in pagantis/orders-api-client
Package orders-api-client
Short Description Pagantis Orders Api Client in PHP. Use the api with simple methods and using OOP.
License proprietary
Informations about the package orders-api-client
Orders Api Client
Orders API Client offers the merchants working with Pagantis a way to consume the API services without the effort of doing a complete development. The library provides stubs for each type of object withing the API and the method calls. Each Method supported by the API is implemented in this client and is documented within the code and here
All the code is tested and inspected by external services.
How to use
Install the library by:
- Downloading it from here
https://github.com/pagantis/orders-api-client/releases/latest
- Using Composer:
Finally, be sure to include the autoloader:
Once the library is ready and inside the project the stub objects will available and the ordersApiClient will also available.
Examples / DemoTool
Find examples in PHP and a demonstration tool with the complete integration here
Objects
The objects used inside the API are already defined as Classes with the desired properties. Each object has a setup of setters and getters for easy validation and OOP.
Inside src/Model
find defined the Order Object. Inside Order folder it is possible to see each element that the main
Order object has.
Use always the defined objects when using the API Client. For example when creating a refund:
API Methods
Create Order
To create a order using the API Client start from a empty Order object, create the sub-objects and set the mandatory information.
Then send the API Call to Pagantis using the API Client. The result is the same
order object with the rest of the fields completed. The status is CREATED
.
Store the relation between Pagantis order id and the merchant order id to be able to identify orders after creation.
Get Order
Use the method Get Order to retrieve the order again from Pagantis server. The order retrieved has updated status. Store the relation between Pagantis order id and the merchant order id to be able to identify orders after creation.
List Orders
Find the order, get all orders from yesterday, see online or instore orders, list Confirmed orders. Use this service to find orders in the system. Use query string for result filtering. See all the queryString parameters here
Confirm Order
When the order is AUTHORIZED confirm is the action of the merchant that informs the payment method that he validates and confirms that the user has paid the order. Confirmed orders are processed and the loan is created. Once a loan is confirmed it is able to have refunds.
Several callbacks can be added to the order for notification of orders authorized or rejected. Also it is possible to list all the orders that are pending confirmation.
Refund Order
Refund is a deduction of the order total_amount. Refund can only be requested over a confirmed order. The refund of an order is automatically decreasing the amount from the end of the installments.
A order can have several refunds, as long as they do not reach the order total_amount. Once the total_amount is refunded, the order status will keep to CONFIRMED.
Help us to improve
We are happy to accept suggestions or pull requests. If you are willing to help us develop better software please create a pull request here following the PSR-2 code style and we will use reviewable to check the code and if al test pass and no issues are detected by SensioLab Insights you could will be ready to merge.
All versions of orders-api-client with dependencies
nategood/httpful Version ^0.2
nayjest/str-case-converter Version ^1.0
ext-json Version *