-
Notifications
You must be signed in to change notification settings - Fork 3
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 de8a6b6
Showing
4 changed files
with
111 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,28 @@ | ||
# PayPal handling plugin for MyAdmin | ||
|
||
PayPal handling plugin for MyAdmin | ||
|
||
## Build Status and Code Analysis | ||
|
||
Site | Status | ||
--------------|--------------------------- | ||
Travis-CI | [![Build Status](https://travis-ci.org/detain/myadmin-paypal-payments.svg?branch=master)](https://travis-ci.org/detain/myadmin-paypal-payments) | ||
Code Climate | [![Code Climate](https://codeclimate.com/github/detain/myadmin-paypal-payments/badges/gpa.svg)](https://codeclimate.com/github/detain/myadmin-paypal-payments) [![Test Coverage](https://codeclimate.com/github/detain/myadmin-paypal-payments/badges/coverage.svg)](https://codeclimate.com/github/detain/myadmin-paypal-payments/coverage) [![Issue Count](https://codeclimate.com/github/detain/myadmin-paypal-payments/badges/issue_count.svg)](https://codeclimate.com/github/detain/myadmin-paypal-payments) | ||
Scrutinizer | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/detain/myadmin-paypal-payments/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/detain/myadmin-paypal-payments/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/detain/myadmin-paypal-payments/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/detain/myadmin-paypal-payments/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/detain/myadmin-paypal-payments/badges/build.png?b=master)](https://scrutinizer-ci.com/g/detain/myadmin-paypal-payments/build-status/master) | ||
Codacy | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/226251fc068f4fd5b4b4ef9a40011d06)](https://www.codacy.com/app/detain/myadmin-paypal-payments) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/25fa74eb74c947bf969602fcfe87e349)](https://www.codacy.com/app/detain/myadmin-paypal-payments?utm_source=github.com&utm_medium=referral&utm_content=detain/myadmin-paypal-payments&utm_campaign=Badge_Coverage) | ||
VersionEye | [![Reference Status](https://www.versioneye.com/php/detain:myadmin-paypal-payments/reference_badge.svg?style=flat)](https://www.versioneye.com/php/detain:myadmin-paypal-payments/references) [![Dependency Status](https://www.versioneye.com/user/projects/592f7318bafc5500414dfd2a/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/592f7318bafc5500414dfd2a) | ||
Packagist | [![Latest Stable Version](https://poser.pugx.org/detain/myadmin-paypal-payments/version)](https://packagist.org/packages/detain/myadmin-paypal-payments) [![Total Downloads](https://poser.pugx.org/detain/myadmin-paypal-payments/downloads)](https://packagist.org/packages/detain/myadmin-paypal-payments) [![Latest Unstable Version](https://poser.pugx.org/detain/myadmin-paypal-payments/v/unstable)](//packagist.org/packages/detain/myadmin-paypal-payments) [![Monthly Downloads](https://poser.pugx.org/detain/myadmin-paypal-payments/d/monthly)](https://packagist.org/packages/detain/myadmin-paypal-payments) [![Daily Downloads](https://poser.pugx.org/detain/myadmin-paypal-payments/d/daily)](https://packagist.org/packages/detain/myadmin-paypal-payments) [![License](https://poser.pugx.org/detain/myadmin-paypal-payments/license)](https://packagist.org/packages/detain/myadmin-paypal-payments) | ||
|
||
|
||
## Installation | ||
|
||
Install with composer like | ||
|
||
```sh | ||
composer require detain/myadmin-paypal-payments | ||
``` | ||
|
||
## License | ||
|
||
The PayPal handling plugin for MyAdmin class is licensed under the LGPL-v2 license. | ||
|
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,33 @@ | ||
{ | ||
"name": "detain/myadmin-paypal-payments", | ||
"type": "myadmin-plugin", | ||
"description": "PayPal handling plugin for MyAdmin", | ||
"keywords": ["abuse","administration","spam"], | ||
"license": "LGPL-2.1", | ||
"authors": [ | ||
{ | ||
"name": "Joe Huss", | ||
"homepage": "https://my.interserver.net/" | ||
} | ||
], | ||
"config": { | ||
"bin-dir": "vendor/bin", | ||
"minimum-stability": "dev" | ||
}, | ||
"require": { | ||
"php": ">=5.0.0", | ||
"ext-soap": "*", | ||
"symfony/event-dispatcher": "*", | ||
"detain/myadmin-plugin-installer": "dev-master" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "*", | ||
"vlucas/phpdotenv": "*", | ||
"codeclimate/php-test-reporter": "dev-master", | ||
"satooshi/php-coveralls": "*", | ||
"codacy/coverage": "dev-master" | ||
}, | ||
"autoload": { | ||
"psr-4": {"Detain\\MyAdminPayPal\\": "src/"} | ||
} | ||
} |
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,48 @@ | ||
<?php | ||
|
||
namespace Detain\MyAdminPayPal; | ||
|
||
use Symfony\Component\EventDispatcher\GenericEvent; | ||
|
||
class Plugin { | ||
|
||
public static $name = 'PayPal Plugin'; | ||
public static $description = 'Allows handling of PayPal emails and honeypots'; | ||
public static $help = ''; | ||
public static $type = 'plugin'; | ||
|
||
|
||
public function __construct() { | ||
} | ||
|
||
public static function getHooks() { | ||
return [ | ||
'system.settings' => [__CLASS__, 'getSettings'], | ||
'ui.menu' => [__CLASS__, 'getMenu'], | ||
]; | ||
} | ||
|
||
public static function getMenu(GenericEvent $event) { | ||
$menu = $event->getSubject(); | ||
if ($GLOBALS['tf']->ima == 'admin') { | ||
function_requirements('has_acl'); | ||
if (has_acl('client_billing')) | ||
$menu->add_link('admin', 'choice=none.abuse_admin', '//my.interserver.net/bower_components/webhostinghub-glyphs-icons/icons/development-16/Black/icon-spam.png', 'PayPal'); | ||
} | ||
} | ||
|
||
public static function getRequirements(GenericEvent $event) { | ||
$loader = $event->getSubject(); | ||
$loader->add_requirement('class.PayPal', '/../vendor/detain/myadmin-paypal-payments/src/PayPal.php'); | ||
$loader->add_requirement('deactivate_kcare', '/../vendor/detain/myadmin-paypal-payments/src/abuse.inc.php'); | ||
$loader->add_requirement('deactivate_abuse', '/../vendor/detain/myadmin-paypal-payments/src/abuse.inc.php'); | ||
$loader->add_requirement('get_abuse_licenses', '/../vendor/detain/myadmin-paypal-payments/src/abuse.inc.php'); | ||
} | ||
|
||
public static function getSettings(GenericEvent $event) { | ||
$settings = $event->getSubject(); | ||
$settings->add_text_setting('General', 'PayPal', 'abuse_imap_user', 'PayPal IMAP User:', 'PayPal IMAP Username', ABUSE_IMAP_USER); | ||
$settings->add_text_setting('General', 'PayPal', 'abuse_imap_pass', 'PayPal IMAP Pass:', 'PayPal IMAP Password', ABUSE_IMAP_PASS); | ||
} | ||
|
||
} |
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,2 @@ | ||
<?php | ||
require_once(__DIR__.'/../vendor/autoload.php'); |