PHP code example of litlife / enot-io-payments

1. Go to this page and download the library: Download litlife/enot-io-payments 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/ */

    

litlife / enot-io-payments example snippets

bash
use Litlife\EnotIoPayments\EnotIoApi;

$postArray = [
    'merchant' => 150,
    'amount' => 200.00,
    'credited' => 196.00,
    'intid' => 1545855,
    'merchant_id' => 99,
    'method' => 'cd',
    'sign' => 'cd1d6b67f3335038656d9009ab4ecfa9',
    'sign_2' => 'b86410d16a20bb57366d29b0d884bcb2',
    'currency' => 'RUB',
    'commission' => 0.00,
    'payer_details' => '539175******7523',
    'custom_field' => [
        'email' => '[email protected]',
        'id_user' => '125454'
    ]
];

$paymentStatus = (new EnotIoApi())
  ->setSecretKey2('secret key 2')
  // validate params with secret key 2
  ->paymentStatus($postArray);

print_r($request->getAmount());
print_r($request->getCredited());
print_r($request->getIntId());