ynievespuntonetsurl / qvapay-sdk-php
This PHP library facilitates the integration of the Qvapay API
Fund package maintenance!
ynievespuntonetsurl
qvapay.com/payme/ynievespuntonet
Requires
- php: >=7.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.5
README
This PHP library facilitates the integration of the Qvapay API.
Sign up on QvaPay
Create your account to process payments through QvaPay at https://qvapay.com/register.
Requirements
- PHP version >= 7.3
- Composer
Installation
You can install the package via composer:
composer require ynievespuntonetsurl/qvapay-sdk-php
Usage
- First, import the Client class and create your QvaPay client using your app credentials.
require_once __DIR__ . '/vendor/autoload.php'; use YnievesPuntoNetSURL\QvaPay\Client; try { $qvapay = new Client([ 'app_id' => 'XXX', 'app_secret' => 'XXX', 'version' => '1' ]); } catch (\Exception $e) { echo $e->getMessage(); }
- Get your app info
try { print_r($qvapay->info()); } catch (\Exception $e) { echo $e->getMessage(); }
- Create an invoice
try { $invoice = $qvapay->create_invoice([ 'amount' => 10, 'description' => 'Ebook', 'remote_id' => 'EE-BOOk-123', 'signed' => 1 ]); print_r($invoice); } catch (\Exception $e) { echo $e->getMessage(); }
- Get transactions
try { print_r($qvapay->transactions()); } catch (\Exception $e) { echo $e->getMessage(); }
- Get transaction
try { print_r($qvapay->get_transaction($uuid)); } catch (\Exception $e) { echo $e->getMessage(); }
- Get your account balance
try { echo $qvapay->balance(); } catch (\Exception $e) { echo $e->getMessage(); }
You can also read the QvaPay API documentation: https://qvapay.com/docs.
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.