Skip to content

Commit 435a27f

Browse files
committed
initial implementation
1 parent 009b99d commit 435a27f

18 files changed

+954
-122
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.sublime-project
3+
*.sublime-workspace
4+
composer.lock
5+
vendor
6+
.puli

CONTRIBUTING.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Contributing
2+
============
3+
4+
We welcome any contribution: issues, fixes, new features, or documentation.
5+
6+
7+
Pull Requests
8+
-------------
9+
10+
- We follow **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - You can automate your code formatting with **[PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)**
11+
12+
- You **HAVE** to add tests, otherwise your contribution is unlikely to be accepted. If you don't know how to do it, please open a pull request anyway and ask us to guide you, we are happy to help.
13+
14+
- You **HAVE** to document any change in the documentation: especially the [README.md](README.md) file or any other relevant place.
15+
16+
- You **HAVE** to consider our release cycle: we follow [SemVer v2.0.0](http://semver.org/). You can't break any public API without previous discussion.
17+
18+
- You **HAVE** to create feature branches and open one pull request per branch.
19+
20+
If you have any questiion regarding those guidelines, feel free to open an issue, we'll be glad to help you in any way we can.
21+
22+
23+
Running Tests
24+
-------------
25+
26+
``` bash
27+
phpunit
28+
```
29+
30+
31+
Thank you
32+
---------
33+
34+
We love contributions :)

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2016 Paylike ApS
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

README.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Paylike PHP API Wrapper
2+
=======================
3+
4+
This is a PHP wrapper around the [Paylike](https://paylike.io) API.
5+
6+
7+
Warning
8+
-------
9+
10+
This package is in very early stage of development, things are likely to break
11+
in the future until a stable version is released. Use at your own risks.
12+
13+
14+
Installation
15+
------------
16+
17+
Install this package via Composer:
18+
19+
``` bash
20+
$ composer require paylike/php-api
21+
```
22+
23+
You then have to install an HTTP Client. We use HTTPlug as an HTTP Client agnostic adapter.
24+
If you don't have one already installed or don't really know what to do at this point,
25+
you can check the [HTTPlug documentation](http://docs.php-http.org/en/latest/httplug/users.html)
26+
or just trust us with a default client:
27+
28+
``` bash
29+
$ composer require php-http/guzzle6-adapter
30+
```
31+
32+
This will install Guzzle 6 and everything you need to plug it with our package.
33+
34+
35+
Usage
36+
-----
37+
38+
```php
39+
<?php
40+
41+
use Paylike\Paylike;
42+
use Paylike\HttpClientFactory;
43+
44+
$apiKey = 'your-api-key';
45+
46+
$paylike = new Paylike(HttpClientFactory::create($apiKey));
47+
$transaction = $paylike->transaction()->fetch($transactionId);
48+
```
49+
50+
51+
TODO
52+
----
53+
54+
* Implements remainings API methods
55+
* Tests and documentation
56+
57+
58+
Credits
59+
-------
60+
61+
* Paylike ApS - <https://paylike.io>
62+
* Hubert Moutot - <[email protected]>
63+
64+
65+
Contibuting
66+
-----------
67+
68+
Please refer to the [CONTIBUTING.MD](CONTRIBUTING.md) file.
69+
70+
71+
License
72+
-------
73+
74+
This package is released under the MIT License. See the bundled [LICENSE](LICENSE) file for details.

client.php

-84
This file was deleted.

composer.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "paylike/php-api",
3+
"type": "library",
4+
"description": "A PHP client for Paylike API",
5+
"keywords": [
6+
"paylike",
7+
"payment",
8+
"client"
9+
],
10+
"homepage": "https://github.com/paylike/php-api",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Paylike and contributors",
15+
"homepage": "https://github.com/paylike/php-api/contributors"
16+
}
17+
],
18+
"require": {
19+
"php": "^5.6|7.*",
20+
"ext-curl": "*",
21+
"ext-json": "*",
22+
"php-http/client-implementation": "^1.0",
23+
"php-http/client-common": "^1",
24+
"php-http/discovery": "^0.8",
25+
"puli/composer-plugin": "^1.0@beta",
26+
"php-http/message": "^1.2",
27+
"php-http/plugins": "^1.0",
28+
"symfony/options-resolver": "^2.8|^3.0",
29+
"guzzlehttp/psr7": "^1.3"
30+
},
31+
"require-dev": {
32+
"php-http/guzzle6-adapter": "^1.0"
33+
},
34+
"autoload": {
35+
"psr-4": {
36+
"Paylike\\": "src"
37+
}
38+
},
39+
"extra": {
40+
"branch-alias": {
41+
"dev-master": "1.0-dev"
42+
}
43+
},
44+
"prefer-stable": true,
45+
"minimum-stability": "dev"
46+
}

examples.php

-16
This file was deleted.

0 commit comments

Comments
 (0)