Skip to content

Commit 8a4fab1

Browse files
committed
First test release
1 parent 1ec10dd commit 8a4fab1

33 files changed

+1366
-2
lines changed

.coveralls.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage_clover: ./clover.xml
2+
json_path: ./coveralls-upload.json

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
/vendor
3+
composer.lock
4+
composer.phar
5+
phpunit.xml

.scrutinizer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tools:
2+
external_code_coverage: true

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
- 7.0
9+
- hhvm
10+
11+
before_script:
12+
- composer install -n --dev --prefer-source
13+
14+
script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text
15+
16+
after_script: vendor/bin/coveralls -v

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contributing Guidelines
2+
3+
* Fork the project.
4+
* Make your feature addition or bug fix.
5+
* Add tests for it. This is important so I don't break it in a future version unintentionally.
6+
* Ensure your code is nicely formatted in the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
7+
style and that all tests pass.

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
1-
# omnipay-neteller
2-
Neteller REST driver for the Omnipay PHP payment processing library
1+
# Omnipay: Neteller
2+
3+
**Neteller driver for the Omnipay PHP payment processing library**
4+
5+
[![Build Status](https://travis-ci.org/dercoder/omnipay-neteller.png?branch=master)](https://travis-ci.org/dercoder/omnipay-neteller)
6+
[![Coverage Status](https://coveralls.io/repos/dercoder/omnipay-neteller/badge.svg?branch=master&service=github)](https://coveralls.io/github/dercoder/omnipay-neteller?branch=master)
7+
8+
[![Latest Stable Version](https://poser.pugx.org/dercoder/omnipay-neteller/v/stable.png)](https://packagist.org/packages/dercoder/omnipay-neteller)
9+
[![Total Downloads](https://poser.pugx.org/dercoder/omnipay-neteller/downloads.png)](https://packagist.org/packages/dercoder/omnipay-neteller)
10+
[![Latest Unstable Version](https://poser.pugx.org/dercoder/omnipay-neteller/v/unstable.png)](https://packagist.org/packages/dercoder/omnipay-neteller)
11+
[![License](https://poser.pugx.org/dercoder/omnipay-neteller/license.png)](https://packagist.org/packages/dercoder/omnipay-neteller)
12+
13+
[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment
14+
processing library for PHP 5.3+. This package implements [Neteller](http://www.neteller.com) support for Omnipay.
15+
16+
## Installation
17+
18+
Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it
19+
to your `composer.json` file:
20+
21+
```json
22+
{
23+
"require": {
24+
"dercoder/omnipay-neteller": "~1.0"
25+
}
26+
}
27+
```
28+
29+
And run composer to update your dependencies:
30+
31+
$ curl -s http://getcomposer.org/installer | php
32+
$ php composer.phar update
33+
34+
## Basic Usage
35+
36+
The following gateways are provided by this package:
37+
38+
* Neteller
39+
40+
For general usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay)
41+
repository.
42+
43+
## Support
44+
45+
If you are having general issues with Omnipay, we suggest posting on
46+
[Stack Overflow](http://stackoverflow.com/). Be sure to add the
47+
[omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.
48+
49+
If you want to keep up to date with release anouncements, discuss ideas for the project,
50+
or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which
51+
you can subscribe to.
52+
53+
If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/dercoder/omnipay-neteller/issues),
54+
or better yet, fork the library and submit a pull request.

composer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "dercoder/omnipay-neteller",
3+
"type": "library",
4+
"description": "Neteller driver for the Omnipay payment processing library",
5+
"keywords": [
6+
"neteller",
7+
"gateway",
8+
"merchant",
9+
"omnipay",
10+
"pay",
11+
"payment"
12+
],
13+
"homepage": "https://github.com/dercoder/omnipay-neteller",
14+
"license": "MIT",
15+
"autoload": {
16+
"psr-4": {
17+
"Omnipay\\Neteller\\": "src/"
18+
}
19+
},
20+
"require": {
21+
"omnipay/common": "~2.5"
22+
},
23+
"require-dev": {
24+
"omnipay/tests": "~2.0",
25+
"satooshi/php-coveralls": "1.0.0"
26+
},
27+
"extra": {
28+
"branch-alias": {
29+
"dev-master": "1.0.x-dev"
30+
}
31+
}
32+
}

phpunit.xml.dist

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="tests/bootstrap.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false">
12+
<testsuites>
13+
<testsuite name="Neteller Test Suite">
14+
<directory>./tests/</directory>
15+
</testsuite>
16+
</testsuites>
17+
<listeners>
18+
<listener class="Mockery\Adapter\Phpunit\TestListener" file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php" />
19+
</listeners>
20+
<filter>
21+
<whitelist>
22+
<directory>./src</directory>
23+
</whitelist>
24+
</filter>
25+
<logging>
26+
<log type="coverage-clover" target="./clover.xml" />
27+
</logging>
28+
</phpunit>

src/Gateway.php

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?php
2+
3+
namespace Omnipay\Neteller;
4+
5+
use Omnipay\Common\AbstractGateway;
6+
use Omnipay\Neteller\Message\PurchaseRequest;
7+
use Omnipay\Neteller\Message\PayoutRequest;
8+
use Omnipay\Neteller\Message\FetchTransactionRequest;
9+
10+
class Gateway extends AbstractGateway
11+
{
12+
/**
13+
* {@inheritdoc}
14+
*/
15+
public function getName()
16+
{
17+
return 'Neteller';
18+
}
19+
20+
/**
21+
* {@inheritdoc}
22+
*/
23+
public function getDefaultParameters()
24+
{
25+
return array(
26+
'testMode' => false,
27+
'clientId' => '',
28+
'clientSecret' => ''
29+
);
30+
}
31+
32+
/**
33+
* Get Neteller client ID.
34+
*
35+
* @return string clientId
36+
*/
37+
public function getClientId()
38+
{
39+
return $this->getParameter('clientId');
40+
}
41+
42+
/**
43+
* Set Neteller client ID.
44+
*
45+
* @param string $value clientId
46+
*
47+
* @return self
48+
*/
49+
public function setClientId($value)
50+
{
51+
return $this->setParameter('clientId', $value);
52+
}
53+
54+
/**
55+
* Get Neteller client secret.
56+
*
57+
* @return string clientSecret
58+
*/
59+
public function getClientSecret()
60+
{
61+
return $this->getParameter('clientSecret');
62+
}
63+
64+
/**
65+
* Set Neteller client secret.
66+
*
67+
* @param string $value clientSecret
68+
*
69+
* @return self
70+
*/
71+
public function setClientSecret($value)
72+
{
73+
return $this->setParameter('clientSecret', $value);
74+
}
75+
76+
/**
77+
* @param array $options
78+
*
79+
* @return PurchaseRequest
80+
*/
81+
public function purchase(array $options = [])
82+
{
83+
return $this->createRequest('\Omnipay\Neteller\Message\PurchaseRequest', $options);
84+
}
85+
86+
/**
87+
* @param array $options
88+
*
89+
* @return PayoutRequest
90+
*/
91+
public function payout(array $options = [])
92+
{
93+
return $this->createRequest('\Omnipay\Neteller\Message\PayoutRequest', $options);
94+
}
95+
96+
/**
97+
* @param array $options
98+
*
99+
* @return FetchTransactionRequest
100+
*/
101+
public function fetchTransaction(array $options = [])
102+
{
103+
return $this->createRequest('\Omnipay\Neteller\Message\FetchTransactionRequest', $options);
104+
}
105+
}

0 commit comments

Comments
 (0)