Skip to content

Commit 1769e76

Browse files
Initial Commit
0 parents  commit 1769e76

11 files changed

+288
-0
lines changed

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: php
2+
3+
php:
4+
- 5.5
5+
- 5.6
6+
- 7.0
7+
- hhvm
8+
9+
matrix:
10+
allow_failures:
11+
- php: hhvm
12+
13+
install: travis_retry composer install --no-interaction --prefer-source
14+
15+
script:
16+
- phpunit --coverage-text --coverage-clover=coverage.clover
17+
18+
after_script:
19+
- wget https://scrutinizer-ci.com/ocular.phar
20+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
21+
22+
notifications:
23+
slack: red-creek:5lI8ybvl6YTcCNPosh4TE13h

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
All Notable changes to `laravel-paystack` will be documented in this file
4+
5+
## 2015-11-04
6+
- Initial release

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/unicodeveloper/laravel-paystack).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ composer test
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

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

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# laravel-paystack
2+
3+
[![Latest Stable Version](https://poser.pugx.org/unicodeveloper/laravel-paystack/v/stable.svg)](https://packagist.org/packages/unicodeveloper/laravel-paystack)
4+
[![License](https://poser.pugx.org/unicodeveloper/laravel-paystack/license.svg)](LICENSE.md)
5+
[![Build Status](https://img.shields.io/travis/unicodeveloper/laravel-paystack.svg)](https://travis-ci.org/unicodeveloper/laravel-paystack)
6+
[![Quality Score](https://img.shields.io/scrutinizer/g/unicodeveloper/laravel-paystack.svg?style=flat-square)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-paystack)
7+
[![Total Downloads](https://img.shields.io/packagist/dt/unicodeveloper/laravel-paystack.svg?style=flat-square)](https://packagist.org/packages/unicodeveloper/laravel-paystack)
8+
9+
> A Laravel 5 Package for working with Paystack seamlessly
10+
11+
## Installation
12+
13+
[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.
14+
15+
To get the latest version of Laravel Paystack, simply add the following line to the require block of your `composer.json` file.
16+
17+
```
18+
"unicodeveloper/laravel-paystack": "1.0.*"
19+
```
20+
21+
You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
22+
23+
Once Laravel Paystack is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.
24+
25+
* `Unicodeveloper\Paystack\PaystackServiceProvider::class`
26+
27+
Also, register the Facade like so:
28+
29+
```php
30+
'aliases' => [
31+
...
32+
'Paystack' => Unicodeveloper\Paystack\Facades\PaystackFacade::class,
33+
...
34+
]
35+
```
36+
37+
## Configuration
38+
39+
To get started, you'll need to publish all vendor assets:
40+
41+
```bash
42+
$ php artisan vendor:publish --provider="Unicodeveloper\Paystack\PaystackServiceProvider"
43+
```
44+
45+
## Usage
46+
47+
## Contributing
48+
49+
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
50+
51+
## How can I thank you?
52+
53+
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!
54+
55+
Don't forget to [follow me on twitter](https://twitter.com/unicodeveloper)!
56+
57+
Thanks!
58+
Prosper Otemuyiwa.
59+
60+
## License
61+
62+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "unicodeveloper/laravel-paystack",
3+
"description": "A Laravel 5 Package for Paystack",
4+
"keywords": ["php","github", "laravel","Open Source","payments", "subscription", "paystack", "paystack.co","laravel 5"],
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "unicodeveloper",
9+
"email": "prosperotemuyiwa@gmail.com"
10+
}
11+
],
12+
"minimum-stability": "stable",
13+
"require": {
14+
"php": ">=5.5.9",
15+
"illuminate/support": "5.2.*",
16+
"guzzlehttp/guzzle": "~5.0"
17+
},
18+
"require-dev": {
19+
"phpunit/phpunit" : "4.*",
20+
"scrutinizer/ocular": "~1.1"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"Unicodeveloper\\Paystack\\": "src/"
25+
}
26+
},
27+
"autoload-dev": {
28+
"psr-4": {
29+
"Unicodeveloper\\Paystack\\Test\\": "tests"
30+
}
31+
},
32+
"scripts": {
33+
"test": "vendor/bin/phpunit"
34+
}
35+
}

phpunit.xml.dist

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="laravel-paystack Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="tap" target="build/report.tap"/>
24+
<log type="junit" target="build/report.junit.xml"/>
25+
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
26+
<log type="coverage-text" target="build/coverage.txt"/>
27+
<log type="coverage-clover" target="build/logs/clover.xml"/>
28+
</logging>
29+
</phpunit>

src/Facades/PaystackFacade.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Quotes\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
class QuotesFacade extends Facade {
8+
/**
9+
* Get the registered name of the component.
10+
*
11+
* @return string
12+
*/
13+
protected static function getFacadeAccessor()
14+
{
15+
return 'laravel-quotes';
16+
}
17+
}

src/Paystack.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Quotes;
4+
5+
use GuzzleHttp\Client;
6+
7+
class Quotes {
8+
9+
}

src/PaystackServiceProvider.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Paystack;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class PaystackServiceProvider extends ServiceProvider {
8+
9+
/*
10+
* Indicates if loading of the provider is deferred.
11+
*
12+
* @var bool
13+
*/
14+
protected $defer = false;
15+
16+
/**
17+
* Register the application services.
18+
*
19+
* @return void
20+
*/
21+
public function register()
22+
{
23+
$this->app->bind('laravel-paystack', function() {
24+
25+
return new Paystack;
26+
27+
});
28+
}
29+
30+
/**
31+
* Get the services provided by the provider
32+
* @return array
33+
*/
34+
public function provides()
35+
{
36+
return ['laravel-paystack'];
37+
}
38+
}

tests/PaystackTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Paystack\Test;
4+
5+
use PHPUnit_Framework_TestCase;
6+
7+
class PaystackTest extends PHPUnit_Framework_TestCase
8+
{
9+
/**
10+
* Test that true does in fact equal true
11+
*/
12+
public function testTrueIsTrue()
13+
{
14+
$this->assertTrue(true);
15+
}
16+
}

0 commit comments

Comments
 (0)