endpay / endpay-sdk
Endpay PHP SDK
1.2.0
2021-05-02 04:14 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.5
README
Requirements
- PHP >= 7.0
Install
Install package via composer
composer require endpay/endpay-sdk
Documentation
Usage
Instance and set configurations
use Endpay\Endpay; $endpay = new Endpay(); $endpay->setCommerceId('commerceId'); $endpay->setApiKey('apiKey');
Create a payment
Documentation: https://api-docs.endpay.cl/#crear-un-pago
$payment = $endpay->payments()->create([ 'subject' => 'Prueba desde SDK PHP', 'amount' => 1 ]);
Read a payment
Documentation: https://api-docs.endpay.cl/#ver-un-pago
$paymentData = $endpay->payments()->read($payment['id']);