Download the PHP package finergy/mia-pos-sdk without Composer
On this page you can find all versions of the php package finergy/mia-pos-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mia-pos-sdk
MIA POS PHP SDK
MIA POS, provided by Finergy Tech, allows secure payment processing using QR codes and direct payment requests.
This SDK allows merchants to integrate with the MIA POS ecommerce payment system. It simplifies the process of registering payments, retrieving payment statuses, and verifying signatures for callbacks. The SDK is designed to be lightweight and compatible with PHP applications.
Requirements
- PHP version: >= 5.6
- PHP Extensions:
curljson
Ensure that these extensions are enabled in your PHP configuration (php.ini).
Installation
Using Composer
-
Run the following command to add the SDK to your project:
- Include the Composer autoloader in your project:
Manual Installation
- Download or clone this repository.
- Add the
srcfolder to your project directory. - Include the SDK files manually:
Getting Started
Obtaining API Credentials
To use the MIA POS ecommerce system, you must obtain the following credentials from the bank:
baseUrl(API Endpoint)merchantId(Merchant Identifier)secretKey(Authentication Key)
All integrations must first be tested on the test environment provided by the bank.
Usage Flow
1. Registering a Payment
When a client chooses to pay via MIA POS on your website, you must register the payment with the MIA POS system.
- Input: Payment data (e.g., amount, currency, orderId).
- Output: A
paymentIdand acheckoutPageURL for redirecting the client to confirm the payment.
Example:
2. Handling Payment Failure (failUrl)
When the payment fails, the client will be redirected to the failUrl specified during payment registration. The request parameters will include the same data passed during the payment registration, such as the orderId.
Use the orderId to retrieve the corresponding paymentId from your database, and then use the SDK to check the payment status. Based on the status, display the appropriate message to the client.
Example:
3. Handling Payment Success (successUrl)
When the payment succeeds, the client will be redirected to the successUrl. The request parameters will include the same data passed during the payment registration, such as the orderId.
Use the orderId to retrieve the corresponding paymentId from your database, and then use the SDK to verify the payment status.
Example:
4. Handling Callbacks (callbackUrl)
After the payment is finalized, the MIA POS system will send a signed callback to the callbackUrl. Use the SDK to verify the signature and process the callback data.
Example:
Notes
- Always test your integration in the test environment before going live.
- Ensure secure storage of your API credentials (
merchantId,secretKey) and do not expose them in client-side code.
All versions of mia-pos-sdk with dependencies
ext-curl Version *
ext-json Version *