-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3b9b5bc
Showing
21 changed files
with
650 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore all test and documentation with "export-ignore". | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/tests export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: tests | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
build-test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [ '7.1','7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] | ||
|
||
name: PHP ${{ matrix.php }} | ||
|
||
env: | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, fileinfo | ||
key: cache-v1 # can be any string, change to clear the extension cache. | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ env.extensions }} | ||
key: ${{ env.key }} | ||
|
||
- name: Cache extensions | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.extcache.outputs.dir }} | ||
key: ${{ steps.extcache.outputs.key }} | ||
restore-keys: ${{ steps.extcache.outputs.key }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ env.extensions }} | ||
tools: composer:v2 | ||
coverage: xdebug | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Execute tests | ||
run: vendor/bin/phpunit --testdox --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
composer.lock | ||
vendor | ||
build | ||
.idea | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace PHPSTORM_META { | ||
|
||
/** @noinspection PhpIllegalArrayKeyTypeInspection */ | ||
/** @noinspection PhpUnusedLocalVariableInspection */ | ||
$STATIC_METHOD_TYPES = [ | ||
\Omnipay\Omnipay::create('') => [ | ||
'Gomypay' instanceof \Omnipay\Gomypay\SkeletonGateway, | ||
], | ||
\Omnipay\Common\GatewayFactory::create('') => [ | ||
'Gomypay' instanceof \Omnipay\Gomypay\SkeletonGateway, | ||
], | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
filter: | ||
excluded_paths: [tests/*] | ||
|
||
checks: | ||
php: | ||
remove_extra_empty_lines: true | ||
remove_php_closing_tag: true | ||
remove_trailing_whitespace: true | ||
fix_use_statements: | ||
remove_unused: true | ||
preserve_multiple: false | ||
preserve_blanklines: true | ||
order_alphabetically: true | ||
fix_php_opening_tag: true | ||
fix_linefeed: true | ||
fix_line_ending: true | ||
fix_identation_4spaces: true | ||
fix_doc_comments: true | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
runs: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
language: php | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
|
||
matrix: | ||
include: | ||
- php: 5.6 | ||
env: setup=lowest | ||
|
||
before_script: | ||
- travis_retry composer self-update | ||
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source | ||
|
||
script: | ||
- vendor/bin/phpcs --standard=PSR2 src/ | ||
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover | ||
|
||
after_script: | ||
- | | ||
if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover coverage.clover | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Changelog | ||
|
||
All Notable changes to `:package_name` will be documented in this file | ||
|
||
## NEXT - YYYY-MM-DD | ||
|
||
### Added | ||
- Nothing | ||
|
||
### Deprecated | ||
- Nothing | ||
|
||
### Fixed | ||
- Nothing | ||
|
||
### Removed | ||
- Nothing | ||
|
||
### Security | ||
- Nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
We accept contributions via Pull Requests on [Github](https://github.com/thephpleague/:package_name). | ||
|
||
|
||
## Pull Requests | ||
|
||
- **[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). | ||
|
||
- **Add tests!** - Your patch won't be accepted if it doesn't have tests. | ||
|
||
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. | ||
|
||
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. | ||
|
||
- **Create feature branches** - Don't ask us to pull from your master branch. | ||
|
||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. | ||
|
||
- **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. | ||
|
||
|
||
## Running Tests | ||
|
||
``` bash | ||
$ phpunit | ||
``` | ||
|
||
|
||
**Happy coding**! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# The MIT License (MIT) | ||
|
||
Copyright (c) 2015 recca0120 <recca0120@gmail.com> | ||
|
||
> 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Omnipay: :gateway | ||
|
||
**Gomypay gateway for the Omnipay PHP payment processing library** | ||
|
||
[![Latest Version on Packagist](https://img.shields.io/packagist/v/omnipay-taiwan/omnipay-:gateway.svg?style=flat-square)](https://packagist.org/packages/omnipay-taiwan/omnipay-:gateway) | ||
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) | ||
[![Build Status](https://img.shields.io/travis/omnipay-taiwan/omnipay-:gateway/master.svg?style=flat-square)](https://travis-ci.org/omnipay-taiwan/omnipay-:gateway) | ||
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/omnipay-taiwan/omnipay-:gateway.svg?style=flat-square)](https://scrutinizer-ci.com/g/omnipay-taiwan/omnipay-:gateway/code-structure) | ||
[![Quality Score](https://img.shields.io/scrutinizer/g/omnipay-taiwan/omnipay-:gateway.svg?style=flat-square)](https://scrutinizer-ci.com/g/omnipay-taiwan/omnipay-:gateway) | ||
[![Total Downloads](https://img.shields.io/packagist/dt/omnipay-taiwan/omnipay-:gateway.svg?style=flat-square)](https://packagist.org/packages/omnipay-taiwan/omnipay-:gateway) | ||
|
||
|
||
[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment | ||
processing library for PHP 5.3+. This package implements :gateway support for Omnipay. | ||
|
||
**Note:** Replace `omnipay-taiwan`, `recca0120`, `recca0120), [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE.md](LICENSE.md) and [composer.json](composer.json) files, then delete this line. | ||
|
||
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what | ||
PSRs you support to avoid any confusion with users and contributors. | ||
|
||
## Install | ||
|
||
Instal the gateway using require. Require the `league/omnipay` base package and this gateway. | ||
|
||
``` bash | ||
$ composer require league/omnipay omnipay-taiwan/omnipay-:gateway | ||
``` | ||
|
||
## Usage | ||
|
||
The following gateways are provided by this package: | ||
|
||
* :gateway | ||
|
||
For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay) repository. | ||
|
||
## Support | ||
|
||
If you are having general issues with Omnipay, we suggest posting on | ||
[Stack Overflow](http://stackoverflow.com/). Be sure to add the | ||
[omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found. | ||
|
||
If you want to keep up to date with release announcements, discuss ideas for the project, | ||
or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which | ||
you can subscribe to. | ||
|
||
If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/omnipay-taiwan/omnipay-:gateway/issues), | ||
or better yet, fork the library and submit a pull request. | ||
|
||
## Change log | ||
|
||
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. | ||
|
||
## Testing | ||
|
||
``` bash | ||
$ composer test | ||
``` | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | ||
|
||
## Security | ||
|
||
If you discover any security related issues, please email recca0120@gmail.com instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
- [recca0120](https://github.com/recca0120) | ||
- [All Contributors](../../contributors) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"name": "omnipay-taiwan/omnipay-gomypay", | ||
"description": "Gomypay driver for the Omnipay payment processing library", | ||
"keywords": [ | ||
"omnipay", | ||
"gomypay" | ||
], | ||
"homepage": "https://github.com/omnipay-taiwan/omnipay-gomypay", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "recca0120", | ||
"email": "recca0120@gmail.com", | ||
"homepage": "https://github.com/recca0120" | ||
} | ||
], | ||
"require": { | ||
"omnipay/common": "^3.0" | ||
}, | ||
"require-dev": { | ||
"roave/security-advisories": "dev-latest", | ||
"omnipay/tests": "^3.0|^4.0", | ||
"squizlabs/php_codesniffer": "^3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Omnipay\\Gomypay\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Omnipay\\Gomypay\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "phpunit", | ||
"check-style": "phpcs -p --standard=PSR2 src/", | ||
"fix-style": "phpcbf -p --standard=PSR2 src/" | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.0-dev" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"config": { | ||
"allow-plugins": { | ||
"php-http/discovery": false | ||
} | ||
} | ||
} |
Oops, something went wrong.