keinher / circle-php
PHP implementation of Cirlce's API as an SDK.
v0.0.1
2021-08-06 02:11 UTC
Requires
- php: >=7.3|^8.0
- ext-curl: *
- ext-json: *
- illuminate/support: ~5.0
- nimbly/shuttle: ^0.4
- ramsey/uuid: >=3.9.3
Requires (Dev)
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^9.0
- symfony/var-dumper: ^4.2
- vimeo/psalm: ^4.0
README
Circle php sdk support for laravel.
Supported circle apis
- Payments
- Payouts
Installation
Use the package manager composer to install the circle sdk.
composer require keinher/circle-php
Oficial circle documentation
Usage
Create a instance of circle sdk.
use Keinher\Circle; $circle = new Circle('sandbox',['payments' => $payments_api_key), 'payouts' => $payouts_api_key]);
- Payments api
use Keinher\Circle\Entities\User; use Keinher\Circle\Entities\Billing; $circle->payments->create( array $source, User $userMetadata, float $amount, string $currency = 'USD', string $verification = 'none', string $description = 'Payment description', ?array $data = null ); // Create payment $circle->payments->createCard( Billing $billing, string $encryptedData, string $keyId, User $userMetadata, string $expMonth, string $expYear ); // Create card $circle->payments->createAchBank( string $plaidToken, Billing $billing, User $userMetadata ); // Create Ach bank $circle->payments->get($id); // Get payment $circle->payments->getCard($id); // Get card $circle->payments->getBank($id); // Get bank $circle->payments->cancel($id); // Cancel/refund payment
- Payouts api
$circle->payouts->create( string $type = 'ach', float $amount, string $destination_id, string $beneficiary_email, string $currency = 'USD', ?array $source = null ); // Create payout $circle->payouts->get($id); // Get payout
Contributing
Pull requests are welcome.