- PHP >= 7.0
Install package via composer
composer require endpay/endpay-sdk
use Endpay\Endpay;
$endpay = new Endpay();
$endpay->setCommerceId('commerceId');
$endpay->setApiKey('apiKey');
Documentation: https://api-docs.endpay.cl/#crear-un-pago
$payment = $endpay->payments()->create([
'subject' => 'Prueba desde SDK PHP',
'amount' => 1
]);
Documentation: https://api-docs.endpay.cl/#ver-un-pago
$paymentData = $endpay->payments()->read($payment['id']);