mkorkmaz / msu-php-sdk
Unofficial PHP SDK of MerchantSafe Unipay API by tr.asseco.com
1.1
2018-07-04 07:34 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.2
- monolog/monolog: ^1.22
- zendframework/zend-validator: ^2.8
Requires (Dev)
- fzaninotto/faker: ~1.6
- phpunit/phpcov: ^4.0
- phpunit/phpunit: ~6.0
- satooshi/php-coveralls: ~1.0
README
MerchantSafe Unipay (MSU) is an online payment solution developed by Asseco SEE Turkey.
Installation
You need Composer to install MerchantSafe Unipay PHP SDK
This library requires PHP 7.0 or later.
composer require mkorkmaz/msu-php-sdk
Documentation
You can see detailed documentation at https://mkorkmaz.github.io/msu-php-sdk-doc/
Basic Usage
$env = 'https://test.merchantsafeunipay.com/msu/api/v2'; $merchant = 'COMPANYNAME'; // Given by Asseco $merchantUser = 'apiuser@companyname.com'; // Created on MSU Panel $merchantPassword = 'u+B56?mcjh23'; // Created on MSU Panel $client = MerchantSafeUnipay\SDK\ClientBuilder::create() ->setEnvironment($env, $merchant , $merchantUser, $merchantPassword) ->setLogger() ->build(); $args = [ 'MERCHANTPAYMENTID' => $orderPaymetId, 'CUSTOMER' => '1', 'AMOUNT' => 123.50, 'CURRENCY' => 'TRY', 'CUSTOMEREMAIL' => 'mehmet@github.com', 'CUSTOMERNAME' => 'Mehmet Korkmaz', 'CUSTOMERIP' => '127.0.0.1', 'CARDPAN' => '5406675406675403', // Test Card Number 'CARDEXPIRY' => '12.30', 'NAMEONCARD' => 'MEHMET KORKMAZ', 'CARDCVV' => '000' ]; $response = $client->financialTransactions('sale', $args); echo $response['data']['responseCode']; // prints '00' which means transaction has been done successfully.
Actions
- Financial Transactions
- Approve Actions
- Reject Actions
- Session
- Pay by Link Payment Actions
- Recurring Plan Actions
- Recurring Plan Card Actions
- Recurring Plan Actions
- Payment Type
- Payment Policy
- Message Content
- e-Wallet Actions
- Merchant Actions
- Merchant User Actions
- Dealer Actions
- Dealer Type Actions
- Dealer Payment System Type Actions
- Query
Disclaimer
- MerchantSafe Unipay (MSU) is trademark of Asseco SEE Turkey
- I am not affiliated with Asseco SEE Turkey
TODO
- Integration tests of Actions (At least %80 Code Coverage)
- Argument combinations for the actions will be implemented