PHP code example of endpay / endpay-sdk

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

    

endpay / endpay-sdk example snippets


use Endpay\Endpay;

$endpay = new Endpay();

$endpay->setCommerceId('commerceId');
$endpay->setApiKey('apiKey');

$payment = $endpay->payments()->create([
    'subject' => 'Prueba desde SDK PHP',
    'amount' => 1
]);

$paymentData = $endpay->payments()->read($payment['id']);