1. Home
  2. Docs
  3. Emlak Katılım Payment Gat...
  4. Client Libraries
  5. The PHP API Client

The PHP API Client

A PHP client can be downloaded at https://github.com/eticsoft/eticvpos-emlak-katilim-PHP for free opensource.

Using GitHub

# gh repo clone eticsoft/eticvpos-emlak-katilim-PHP

Using the Composer

# composer require eticsoft/eticvpos-emlak-katilim-PHP


Do not forget to edit the src/config.php file that contains the AUTH parameters and back-end addresses.

Simple usage examples: 

$api_call = (new EticVPosClient($public_key, $private_key, $merchant_id))
->call('transaction/refund', ['id' => 12345]);

if($api_call->getReponse()->head->result_code == 1){
  /* Successful  */}

Advanced example

$action = 'transaction/paycc';
$public_key = 'Public_abcdefgh...';
$private_key = 'Private_zyxw...';
$merchant_id = 123789;
$data = [
'amount' => 183.56,
'currency' => 'TRY',
'language' => 'tr',
'client_ip' => $_SERVER['REMOTE_ADDR'],
'payment_method' => 'creditcard',
'merchant_order_ref' => 123456789, // must be unique
'return_url' => 'https://dev.eticsoft.net/eticvpos/v1-0/3dv.php',
'client_firstname' => 'John',
'client_lastname' => 'DOE',
'client_email' => 'john@domain.com',
'client_phone' => '05000000011',
'creditcard' => [
'number' => '4355084355084358',
'holder' => 'Johnny Doe',
'expire_year' => 2026,
'expire_month' => 11,
'cvv' => '000',
'installment' => 2,
],
];

$api_call = (new EticVPosClient($public_key, $private_key, $merchant_id))->call($action, $data);
print_r($api_call->getReponse());