1. Go to this page and download the library: Download mkorkmaz/msu-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mkorkmaz / msu-php-sdk example snippets
$env = 'https://test.merchantsafeunipay.com/msu/api/v2';
$merchant = 'COMPANYNAME'; // Given by Asseco
$merchantUser = '[email protected]'; // 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' => '[email protected]',
'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.
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.