Skip to content

[WIP] new implementation #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
*.sublime-project
*.sublime-workspace
composer.lock
vendor
.puli
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Contributing
============

We welcome any contribution: issues, fixes, new features, or documentation.


Pull Requests
-------------

- 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)**

- 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.

- You **HAVE** to document any change in the documentation: especially the [README.md](README.md) file or any other relevant place.

- 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.

- You **HAVE** to create feature branches and open one pull request per branch.

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.


Running Tests
-------------

``` bash
phpunit
```


Thank you
---------

We love contributions :)
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2016 Paylike ApS

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Paylike PHP API Wrapper
=======================

This is a PHP wrapper around the [Paylike](https://paylike.io) API.


Warning
-------

This package is in very early stage of development, things are likely to break
in the future until a stable version is released. Use at your own risks.


Installation
------------

Install this package via Composer:

``` bash
$ composer require paylike/php-api
```

You then have to install an HTTP Client. We use HTTPlug as an HTTP Client agnostic adapter.
If you don't have one already installed or don't really know what to do at this point,
you can check the [HTTPlug documentation](http://docs.php-http.org/en/latest/httplug/users.html)
or just trust us with a default client:

``` bash
$ composer require php-http/guzzle6-adapter
```

This will install Guzzle 6 and everything you need to plug it with our package.


Usage
-----

```php
<?php

use Paylike\Paylike;
use Paylike\HttpClientFactory;

$apiKey = 'your-api-key';

$paylike = new Paylike(HttpClientFactory::create($apiKey));
$transaction = $paylike->transaction()->findOne($transactionId);
```


TODO
----

* Implements remainings API methods
* Tests and documentation


Credits
-------

* Paylike ApS - <https://paylike.io>
* Hubert Moutot - <[email protected]>


Contributing
------------

Please refer to the [CONTRIBUTING.MD](CONTRIBUTING.md) file.


License
-------

This package is released under the MIT License. See the bundled [LICENSE](LICENSE) file for details.
84 changes: 0 additions & 84 deletions client.php

This file was deleted.

46 changes: 46 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "paylike/php-api",
"type": "library",
"description": "A PHP client for Paylike API",
"keywords": [
"paylike",
"payment",
"client"
],
"homepage": "https://github.com/paylike/php-api",
"license": "MIT",
"authors": [
{
"name": "Paylike and contributors",
"homepage": "https://github.com/paylike/php-api/contributors"
}
],
"require": {
"php": "^5.6|7.*",
"ext-curl": "*",
"ext-json": "*",
"php-http/client-implementation": "^1.0",
"php-http/client-common": "^1.0",
"php-http/discovery": "^0.7",
"puli/composer-plugin": "^1.0@beta",
"php-http/message": "^1.0",
"php-http/plugins": "^1.0",
"symfony/options-resolver": "^2.8|^3.0",
"guzzlehttp/psr7": "^1.2"
},
"require-dev": {
"php-http/guzzle6-adapter": "^1.0"
},
"autoload": {
"psr-4": {
"Paylike\\": "src"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"prefer-stable": true,
"minimum-stability": "dev"
}
16 changes: 0 additions & 16 deletions examples.php

This file was deleted.

Loading