Download the PHP package dann95/g2a-sdk without Composer
On this page you can find all versions of the php package dann95/g2a-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package g2a-sdk
G2A PAY PHP-SDK
This SDK is an unofficial software with no warranties by G2A PAY ®, you can check more about G2A in: https://www.g2a.com/
Contents
- Requirements
- Installation
- Available resources
- Getting started
- Checkout sample
- IPN Verify sample
- Subscription sample
- Query payment sample
- Laravel integration
- Project goals/todo
- Contribute
Requirements
- PHP 7.0 and later.
- Guzzle 6
Composer
You can install the sdk via Composer. Run the following command:
To use the bindings, use Composer's autoload:
Available resources
Due some API limitations from G2A, this SDK is restricted to few operations, see the table below to know what this SDK can do. API means that this is available on this SDK
EMAIL means that is only available by e-mail contact
DASHBOARD means that is only available in merchant dashboard
Payments
create | query | refund |
---|---|---|
API | API |
Subscriptions
create | cancel | query | refund | list transactions |
---|---|---|---|---|
API | DASHBOARD | DASHBOARD | DASHBOARD |
Getting Started
Normal Integration
Setting up credentials be like:
Laravel integration (optional integration)
Insert the provider into providers array in config/app.php
Then run the following command:
Edit the file configs/g2a.php, you will have something like this
prefer use env() helper instead of strings to save your credentials
Now when you do, it will give you a fresh instance of SDK using settings on config/g2a.php:
Or, when inside a Controller/any part of Laravel where Auto Dependency Injection is available:
Goals/Todo
- [ ] 100% Unit coverage
- [ ] Use abstraction of HttpClient instead of Guzzle
- [ ] Do a Legacy version, for php 5.4+
- [ ] Full error detailed Exceptions and Entities
- [ ] Release first stable version (1.0.0)
Contribute
Feel free to contribute to this repository.