juliocapuano / pay-simple-sdk
This package is a simple implementation of the PaySimple Api for PHP
v1.3.5
2022-04-29 14:41 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- fzaninotto/faker: ^1.9
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- vimeo/psalm: ^4.3
README
This package is a simple implementation of the PaySimple Api for PHP
Installation
You can install the package via composer:
composer require juliocapuano/pay-simple-sdk
Usage
Init the client base
$user_id ='<< PaySimple User ID >>'; $api_key ='<< PaySimple API Key >>'; $is_sanbox = true; // sanbox API for testing (optional) $paysimple = new PaySimple\V4\PaySimple($user_id, $api_key,[$is_sanbox]);
Accessing to methods
// instance $paysimple = new PaySimple\V4\PaySimple($user_id, $api_key,[$is_sanbox]); // primary methods for specific instances $customerServiceInstance = $paysimple->customers(); $accountServiceInstance = $paysimple->accounts(); $paymentServiceInstance = $paysimple->payments(); $merchantServiceInstance = $paysimple->merchant(); $recurrentPaymentServiceInstance = $paysimple->recurrentPayments(); // creating customer instance $customer_data =[...]; // array data $new_customer = $paysimple->customers()->new($customer_data); // or $new_customer = $customerServiceInstance->new($customer_data);
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.