10000 ecoPayz Merchant Integration Version 2.0.3 · dercoder/omnipay-ecopayz@f0d5b0f · GitHub
[go: up one dir, main page]

Skip to content

Commit f0d5b0f

Browse files
committed
ecoPayz Merchant Integration Version 2.0.3
1 parent 3d26aa5 commit f0d5b0f

37 files changed

+1925
-50
lines changed

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/omnipay-ecopayz.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/scopes/scope_settings.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,9 @@ php:
44
- 5.3
55
- 5.4
66
- 5.5
7+
- hhvm
78

8-
before_install:
9-
- composer self-update
9+
before_script:
10+
- composer install -n --dev --prefer-source
1011

11-
install:
12-
- composer install --no-interaction --dev --prefer-source
13-
- wget https://scrutinizer-ci.com/ocular.phar
14-
15-
script:
16-
- php vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
17-
- php vendor/bin/phpcs --standard=PSR2 src
18-
19-
after_script:
20-
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
21-
- php vendor/bin/coveralls -v
12+
script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text

CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@
33
* Fork the project.
44
* Make your feature addition or bug fix.
55
* Add tests for it. This is important so I don't break it in a future version unintentionally.
6-
* Commit just the modifications, do not mess with the composer.json or CHANGELOG.md files.
76
* 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)
87
style and that all tests pass.
9-
* Send the pull request.
10-
* Check that the Travis CI build passed. If not, rinse and repeat.

LICENSE

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
The MIT License (MIT)
1+
Copyright (c) 2014 Alexander Fedra
22

3-
Copyright (c) 2014 Cherry Ltd.
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
410

5-
Permission is hereby granted, free of charge, to any person obtaining a copy of
6-
this software and associated documentation files (the "Software"), to deal in
7-
the Software without restriction, including without limitation the rights to
8-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software is furnished to do so,
10-
subject to the following conditions:
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
1113

12-
The above copyright notice and this permission notice shall be included in all
13-
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, FITNESS
17-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,54 @@
1-
omnipay-ecopayz
2-
===============
1+
# Omnipay: Ecopayz
32

4-
ecoPayz driver for the Omnipay PHP payment processing library
3+
**Ecopayz driver for the Omnipay PHP payment processing library**
4+
5+
[![Build Status](https://travis-ci.org/dercoder/omnipay-ecopayz.png?branch=master)](https://travis-ci.org/dercoder/omnipay-ecopayz)
6+
[![Dependency Status](https://www.versioneye.com/user/projects/54366b4be993e89c45000137/badge.png)](https://www.versioneye.com/user/projects/54366b4be993e89c45000137)
7+
8+
[![Latest Stable Version](https://poser.pugx.org/dercoder/omnipay-ecopayz/v/stable.png)](https://packagist.org/packages/dercoder/omnipay-ecopayz)
9+
[![Total Downloads](https://poser.pugx.org/dercoder/omnipay-ecopayz/downloads.png)](https://packagist.org/packages/dercoder/omnipay-ecopayz)
10+
[![Latest Unstable Version](https://poser.pugx.org/dercoder/omnipay-ecopayz/v/unstable.png)](https://packagist.org/packages/dercoder/omnipay-ecopayz)
11+
[![License](https://poser.pugx.org/dercoder/omnipay-ecopayz/license.png)](https://packagist.org/packages/dercoder/omnipay-ecopayz)
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 [Eopayz](http://www.ecopayz.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-ecopayz": "~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+
* Eopayz
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-ecopayz/issues),
54+
or better yet, fork the library and submit a pull request.

composer.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,17 @@
33
"type": "library",
44
"description": "Ecopayz driver for the Omnipay payment processing library",
55
"keywords": [
6+
"ecopayz",
67
"gateway",
78
"merchant",
8-
"ukash",
9-
"ecopayz",
9+
"omnipay",
1010
"pay",
1111
"payment"
1212
],
1313
"homepage": "https://github.com/dercoder/omnipay-ecopayz",
1414
"license": "MIT",
15-
"authors": [
16-
{
17-
"name": "Alexander Fedra",
18-
"email": "contact@dercoder.at"
19-
}
20-
],
2115
"autoload": {
22-
"psr-0": {
23-
"Omnipay\\Ecopayz\\": "src/"
24-
}
16+
"psr-0": { "Omnipay\\Ecopayz\\" : "src/" }
2517
},
2618
"require": {
2719
"omnipay/common": "~2.0"
@@ -34,4 +26,4 @@
3426
"dev-master": "1.0.x-dev"
3527
}
3628
}
37-
}
29+
}

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
stopOnFailure="false"
1111
syntaxCheck="false">
1212
<testsuites>
13-
<testsuite name="Omnipay Test Suite">
13+
<testsuite name="Ecopayz Test Suite">
1414
<directory>./tests/</directory>
1515
</testsuite>
1616
</testsuites>
@@ -23,6 +23,6 @@
2323
</whitelist>
2424
</filter>
2525
<logging>
26-
<log type="coverage-clover" target="build/logs/clover.xml" />
26+
<log type="coverage-clover" target="./clover.xml" />
2727
</logging>
2828
</phpunit>

src/Omnipay/Ecopayz/Gateway.php

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<?php
2+
namespace Omnipay\Ecopayz;
3+
4+
use Omnipay\Common\AbstractGateway;
5+
6+
/**
7+
* Ecopayz Gateway
8+
*
9+
* @author Alexander Fedra <contact@dercoder.at>
10+
* @copyright 2014 DerCoder
11+
* @license http://opensource.org/licenses/mit-license.php MIT
12+
* @version 1.0.0
13+
*/
14+
class Gateway extends AbstractGateway
15+
{
16+
17+
/**
18+
* {@inheritdoc}
19+
*/
20+
public function getName()
21+
{
22+
return 'Ecopayz';
23+
}
24+
25+
/**
26+
* {@inheritdoc}
27+
*/
28+
public function getDefaultParameters()
29+
{
30+
return array(
31+
'merchantId' => '',
32+
'merchantPassword' => '',
33+
'merchantAccountNumber' => '',
34+
'testMode' => false
35+
);
36+
}
37+
38+
/**
39+
* Get the Merchant ID
40+
*
41+
* This is the merchant number and is a four digit numeric value, this is entered by EcoPayz staff at import time.
42+
* If this is known this can be entered on submission
43+
*
44+
* @return string merchant id
45+
*/
46+
public function getMerchantId()
47+
{
48+
return $this->getParameter('merchantId');
49+
}
50+
51+
/**
52+
* Set the Merchant ID
53+
*
54+
* This is the merchant number and is a four digit numeric value, this is entered by EcoPayz staff at import time.
55+
* If this is known this can be entered on submission
56+
*
57+
* @param string $value merchant id
58+
* @return self
59+
*/
60+
public function setMerchantId($value)
61+
{
62+
return $this->setParameter('merchantId', $value);
63+
}
64+
65+
/**
66+
* Get the Merchant Password
67+
*
68+
* Password provided by ecoPayz.
69+
* Please note: Merchant password is different parameter than PP password.
70+
*
71+
* @return string merchant password
72+
*/
73+
public function getMerchantPassword()
74+
{
75+
return $this->getParameter('merchantPassword');
76+
}
77+
78+
/**
79+
* Set the Merchant Password
80+
*
81+
* Password provided by ecoPayz.
82+
* Please note: Merchant password is different parameter than PP password.
83+
*
84+
* @param string $value merchant password
85+
* @return self
86+
*/
87+
public function setMerchantPassword($value)
88+
{
89+
return $this->setParameter('merchantPassword', $value);
90+
}
91+
92+
/**
93+
* Get the Merchant Account Number
94+
*
95+
* The merchant’s ecoPayz account number, which will be credited by the purchase transaction.
96+
* The number is provided by ecoPayz.
97+
*
98+
* @return string merchant account number
99+
*/
100+
public function getMerchantAccountNumber()
101+
{
102+
return $this->getParameter('merchantAccountNumber');
103+
}
104+
105+
/**
106+
* Set the Merchant Account Number
107+
*
108+
* The merchant’s ecoPayz account number, which will be credited by the purchase transaction.
109+
* The number is provided by ecoPayz.
110+
*
111+
* @param string $value merchant account number
112+
* @return self
113+
*/
114+
public function setMerchantAccountNumber($value)
115+
{
116+
return $this->setParameter('merchantAccountNumber', $value);
117+
}
118+
119+
/**
120+
* @param array $parameters
121+
* @return \Omnipay\Ecopayz\Message\PurchaseRequest
122+
*/
123+
public function purchase(array $parameters = array())
124+
{
125+
return $this->createRequest('\Omnipay\Ecopayz\Message\PurchaseRequest', $parameters);
126+
}
127+
128+
/**
129+
* @param array $parameters
130+
* @return \Omnipay\Ecopayz\Message\CompletePurchaseRequest
131+
*/
132+
public function completePurchase(array $parameters = array())
133+
{
134+
return $this->createRequest('\Omnipay\Ecopayz\Message\CompletePurchaseRequest', $parameters);
135+
}
136+
137+
/**
138+
* @param array $parameters
139+
* @return \Omnipay\Ecopayz\Message\PayoutRequest
140+
*/
141+
public function payout(array $parameters = array())
142+
{
143+
return $this->createRequest('\Omnipay\Ecopayz\Message\PayoutRequest', $parameters);
144+
}
145+
146+
/**
147+
* @param array $parameters
148+
* @return \Omnipay\Ecopayz\Message\FetchTransactionRequest
149+
*/
150+
public function fetchTransaction(array $parameters = array())
151+
{
152+
return $this->createRequest('\Omnipay\Ecopayz\Message\FetchTransactionRequest', $parameters);
153+
}
154+
}

0 commit comments

Comments
 (0)
0