Add README
This commit is contained in:
parent
e7b8fe2985
commit
b99de1bd80
47
README.md
Normal file
47
README.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Open your project or initialize a new one with this composer.json:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "acme/my-project",
|
||||||
|
"description": "My project",
|
||||||
|
"repositories":[
|
||||||
|
{
|
||||||
|
"type":"composer",
|
||||||
|
"url":"https://packages.destrier.tk",
|
||||||
|
"only": [
|
||||||
|
"oreolek/payeer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minimum-stability": "dev"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
(The `repositories` value is the key here.)
|
||||||
|
|
||||||
|
Type `composer require oreolek/payeer`
|
||||||
|
|
||||||
|
If you don't have a PSR-7 implementation in your project, composer will stop and give you a choice. You can repeat the command with your choice, like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
composer require oreolek/payeer php-http/guzzle7-adapter
|
||||||
|
```
|
||||||
|
|
||||||
|
Initialize the Payeer\Adapter with your ID and secret key:
|
||||||
|
|
||||||
|
```php
|
||||||
|
$adapter = new Adapter([
|
||||||
|
'id' => $_ENV['PAYEER_ID'],
|
||||||
|
'key' => $_ENV['SECRET'],
|
||||||
|
]);
|
||||||
|
```
|
||||||
|
|
||||||
|
(see `test/PayeerTest.php` for example)
|
||||||
|
|
||||||
|
You can use any method, it is transparently sent to the API as is:
|
||||||
|
|
||||||
|
```php
|
||||||
|
$response = $adapter->time();
|
||||||
|
```
|
Loading…
Reference in a new issue