mkorkmaz/msu-php-sdk

Unofficial PHP SDK of MerchantSafe Unipay API by tr.asseco.com

1.1 2018-07-04 07:34 UTC

This package is auto-updated.

Last update: 2024-11-04 12:14:30 UTC


README

Build Status Coverage Status Scrutinizer Code Quality Codacy Badge Latest Stable Version Total Downloads Latest Unstable Version License

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

  1. Financial Transactions
  2. Approve Actions
  3. Reject Actions
  4. Session
  5. Pay by Link Payment Actions
  6. Recurring Plan Actions
  7. Recurring Plan Card Actions
  8. Recurring Plan Actions
  9. Payment Type
  10. Payment Policy
  11. Message Content
  12. e-Wallet Actions
  13. Merchant Actions
  14. Merchant User Actions
  15. Dealer Actions
  16. Dealer Type Actions
  17. Dealer Payment System Type Actions
  18. 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