diff --git a/.gitignore b/.gitignore index 5d46ea4..2fd1586 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,15 @@ .idea/ .vs/ errors.log -_sakura/config/config.ini BingSiteAuth.xml google*.html -cache/* -!cache/.sakura -uploads/* -!uploads/.sakura +/config/config.ini +/cache/* +!/cache/.sakura +/uploads/* +!/uploads/.sakura +/vendor +!/vendor/.sakura [Tt]humbs.db ehthumbs.db Desktop.ini diff --git a/README.md b/README.md index d67b1d9..8b25856 100644 --- a/README.md +++ b/README.md @@ -3,21 +3,3 @@ _A backend that doesn't suck_ I'll write a more descriptive readme once it's in a stable state. - -## Apache 2.x Virtualhosts - -``` - - DocumentRoot [local path]/main - ServerName [site url] - ServerAlias www.[site url] - - - - DocumentRoot [local path]/api - ServerName api.[site url] - - Header unset Cookie - Header unset Set-Cookie - -``` diff --git a/_sakura/vendor/autoload.php b/_sakura/vendor/autoload.php deleted file mode 100644 index a649c47..0000000 --- a/_sakura/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - - private $classMapAuthoritative = false; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative) { - return false; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/_sakura/vendor/composer/LICENSE b/_sakura/vendor/composer/LICENSE deleted file mode 100644 index c8d57af..0000000 --- a/_sakura/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) 2015 Nils Adermann, Jordi Boggiano - -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. - diff --git a/_sakura/vendor/composer/autoload_classmap.php b/_sakura/vendor/composer/autoload_classmap.php deleted file mode 100644 index c692e9a..0000000 --- a/_sakura/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,17 +0,0 @@ - $vendorDir . '/phpmailer/phpmailer/extras/EasyPeasyICS.php', - 'PHPMailer' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php', - 'PHPMailerOAuth' => $vendorDir . '/phpmailer/phpmailer/class.phpmaileroauth.php', - 'PHPMailerOAuthGoogle' => $vendorDir . '/phpmailer/phpmailer/class.phpmaileroauthgoogle.php', - 'POP3' => $vendorDir . '/phpmailer/phpmailer/class.pop3.php', - 'SMTP' => $vendorDir . '/phpmailer/phpmailer/class.smtp.php', - 'ntlm_sasl_client_class' => $vendorDir . '/phpmailer/phpmailer/extras/ntlm_sasl_client.php', - 'phpmailerException' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php', -); diff --git a/_sakura/vendor/composer/autoload_namespaces.php b/_sakura/vendor/composer/autoload_namespaces.php deleted file mode 100644 index 954dfee..0000000 --- a/_sakura/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,13 +0,0 @@ - array($vendorDir . '/twig/twig/lib'), - 'PayPal' => array($vendorDir . '/paypal/rest-api-sdk-php/lib'), - 'Parsedown' => array($vendorDir . '/erusev/parsedown'), - 'JBBCode' => array($vendorDir . '/jbbcode/jbbcode'), -); diff --git a/_sakura/vendor/composer/autoload_psr4.php b/_sakura/vendor/composer/autoload_psr4.php deleted file mode 100644 index b265c64..0000000 --- a/_sakura/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,9 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - return $loader; - } -} diff --git a/_sakura/vendor/composer/installed.json b/_sakura/vendor/composer/installed.json deleted file mode 100644 index 90db05c..0000000 --- a/_sakura/vendor/composer/installed.json +++ /dev/null @@ -1,267 +0,0 @@ -[ - { - "name": "twig/twig", - "version": "v1.23.1", - "version_normalized": "1.23.1.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/d9b6333ae8dd2c8e3fd256e127548def0bc614c6", - "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6", - "shasum": "" - }, - "require": { - "php": ">=5.2.7" - }, - "require-dev": { - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~2.7" - }, - "time": "2015-11-05 12:49:06", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ] - }, - { - "name": "phpmailer/phpmailer", - "version": "v5.2.14", - "version_normalized": "5.2.14.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e774bc9152de85547336e22b8926189e582ece95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e774bc9152de85547336e22b8926189e582ece95", - "reference": "e774bc9152de85547336e22b8926189e582ece95", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpdocumentor/phpdocumentor": "*", - "phpunit/phpunit": "4.7.*" - }, - "suggest": { - "league/oauth2-client": "Needed for XOAUTH2 authentication", - "league/oauth2-google": "Needed for Gmail XOAUTH2" - }, - "time": "2015-11-01 10:15:28", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "class.phpmailer.php", - "class.phpmaileroauth.php", - "class.phpmaileroauthgoogle.php", - "class.smtp.php", - "class.pop3.php", - "extras/EasyPeasyICS.php", - "extras/ntlm_sasl_client.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1" - ], - "authors": [ - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP" - }, - { - "name": "erusev/parsedown", - "version": "1.6.0", - "version_normalized": "1.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "shasum": "" - }, - "time": "2015-10-04 16:44:32", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ] - }, - { - "name": "paypal/rest-api-sdk-php", - "version": "v1.6.2", - "version_normalized": "1.6.2.0", - "source": { - "type": "git", - "url": "https://github.com/paypal/PayPal-PHP-SDK.git", - "reference": "7493e7aa5e384e897636d6073493ef0a865695ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paypal/PayPal-PHP-SDK/zipball/7493e7aa5e384e897636d6073493ef0a865695ea", - "reference": "7493e7aa5e384e897636d6073493ef0a865695ea", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "time": "2015-11-16 19:40:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "PayPal": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "PayPal", - "homepage": "https://github.com/paypal/rest-api-sdk-php/contributors" - } - ], - "description": "PayPal's PHP SDK for REST APIs", - "homepage": "http://paypal.github.io/PayPal-PHP-SDK/", - "keywords": [ - "payments", - "paypal", - "rest", - "sdk" - ] - }, - { - "name": "jbbcode/jbbcode", - "version": "v1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/jbowens/jBBCode.git", - "reference": "645b6a1c0afa92b7d029d3417ebd8b60a5c578b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jbowens/jBBCode/zipball/645b6a1c0afa92b7d029d3417ebd8b60a5c578b3", - "reference": "645b6a1c0afa92b7d029d3417ebd8b60a5c578b3", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "time": "2014-07-06 05:48:20", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "JBBCode": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jackson Owens", - "email": "jackson_owens@alumni.brown.edu", - "homepage": "http://jbowens.org/", - "role": "Developer" - } - ], - "description": "A lightweight but extensible BBCode parser written in PHP 5.3.", - "homepage": "http://jbbcode.com/", - "keywords": [ - "BB", - "bbcode" - ] - } -] diff --git a/_sakura/vendor/erusev/parsedown/.travis.yml b/_sakura/vendor/erusev/parsedown/.travis.yml deleted file mode 100644 index 5df49dc..0000000 --- a/_sakura/vendor/erusev/parsedown/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -php: - - 7.0 - - 5.6 - - 5.5 - - 5.4 - - 5.3 - - hhvm - - hhvm-nightly - -matrix: - fast_finish: true - allow_failures: - - php: 7.0 - - php: hhvm-nightly diff --git a/_sakura/vendor/erusev/parsedown/LICENSE.txt b/_sakura/vendor/erusev/parsedown/LICENSE.txt deleted file mode 100644 index baca86f..0000000 --- a/_sakura/vendor/erusev/parsedown/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Emanuil Rusev, erusev.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. \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/Parsedown.php b/_sakura/vendor/erusev/parsedown/Parsedown.php deleted file mode 100644 index c8c92a3..0000000 --- a/_sakura/vendor/erusev/parsedown/Parsedown.php +++ /dev/null @@ -1,1528 +0,0 @@ -DefinitionData = array(); - - # standardize line breaks - $text = str_replace(array("\r\n", "\r"), "\n", $text); - - # remove surrounding line breaks - $text = trim($text, "\n"); - - # split text into lines - $lines = explode("\n", $text); - - # iterate through lines to identify blocks - $markup = $this->lines($lines); - - # trim line breaks - $markup = trim($markup, "\n"); - - return $markup; - } - - # - # Setters - # - - function setBreaksEnabled($breaksEnabled) - { - $this->breaksEnabled = $breaksEnabled; - - return $this; - } - - protected $breaksEnabled; - - function setMarkupEscaped($markupEscaped) - { - $this->markupEscaped = $markupEscaped; - - return $this; - } - - protected $markupEscaped; - - function setUrlsLinked($urlsLinked) - { - $this->urlsLinked = $urlsLinked; - - return $this; - } - - protected $urlsLinked = true; - - # - # Lines - # - - protected $BlockTypes = array( - '#' => array('Header'), - '*' => array('Rule', 'List'), - '+' => array('List'), - '-' => array('SetextHeader', 'Table', 'Rule', 'List'), - '0' => array('List'), - '1' => array('List'), - '2' => array('List'), - '3' => array('List'), - '4' => array('List'), - '5' => array('List'), - '6' => array('List'), - '7' => array('List'), - '8' => array('List'), - '9' => array('List'), - ':' => array('Table'), - '<' => array('Comment', 'Markup'), - '=' => array('SetextHeader'), - '>' => array('Quote'), - '[' => array('Reference'), - '_' => array('Rule'), - '`' => array('FencedCode'), - '|' => array('Table'), - '~' => array('FencedCode'), - ); - - # ~ - - protected $unmarkedBlockTypes = array( - 'Code', - ); - - # - # Blocks - # - - private function lines(array $lines) - { - $CurrentBlock = null; - - foreach ($lines as $line) - { - if (chop($line) === '') - { - if (isset($CurrentBlock)) - { - $CurrentBlock['interrupted'] = true; - } - - continue; - } - - if (strpos($line, "\t") !== false) - { - $parts = explode("\t", $line); - - $line = $parts[0]; - - unset($parts[0]); - - foreach ($parts as $part) - { - $shortage = 4 - mb_strlen($line, 'utf-8') % 4; - - $line .= str_repeat(' ', $shortage); - $line .= $part; - } - } - - $indent = 0; - - while (isset($line[$indent]) and $line[$indent] === ' ') - { - $indent ++; - } - - $text = $indent > 0 ? substr($line, $indent) : $line; - - # ~ - - $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); - - # ~ - - if (isset($CurrentBlock['continuable'])) - { - $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); - - if (isset($Block)) - { - $CurrentBlock = $Block; - - continue; - } - else - { - if (method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - } - } - - # ~ - - $marker = $text[0]; - - # ~ - - $blockTypes = $this->unmarkedBlockTypes; - - if (isset($this->BlockTypes[$marker])) - { - foreach ($this->BlockTypes[$marker] as $blockType) - { - $blockTypes []= $blockType; - } - } - - # - # ~ - - foreach ($blockTypes as $blockType) - { - $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); - - if (isset($Block)) - { - $Block['type'] = $blockType; - - if ( ! isset($Block['identified'])) - { - $Blocks []= $CurrentBlock; - - $Block['identified'] = true; - } - - if (method_exists($this, 'block'.$blockType.'Continue')) - { - $Block['continuable'] = true; - } - - $CurrentBlock = $Block; - - continue 2; - } - } - - # ~ - - if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) - { - $CurrentBlock['element']['text'] .= "\n".$text; - } - else - { - $Blocks []= $CurrentBlock; - - $CurrentBlock = $this->paragraph($Line); - - $CurrentBlock['identified'] = true; - } - } - - # ~ - - if (isset($CurrentBlock['continuable']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - - # ~ - - $Blocks []= $CurrentBlock; - - unset($Blocks[0]); - - # ~ - - $markup = ''; - - foreach ($Blocks as $Block) - { - if (isset($Block['hidden'])) - { - continue; - } - - $markup .= "\n"; - $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); - } - - $markup .= "\n"; - - # ~ - - return $markup; - } - - # - # Code - - protected function blockCode($Line, $Block = null) - { - if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) - { - return; - } - - if ($Line['indent'] >= 4) - { - $text = substr($Line['body'], 4); - - $Block = array( - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => array( - 'name' => 'code', - 'text' => $text, - ), - ), - ); - - return $Block; - } - } - - protected function blockCodeContinue($Line, $Block) - { - if ($Line['indent'] >= 4) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['element']['text']['text'] .= "\n"; - - $text = substr($Line['body'], 4); - - $Block['element']['text']['text'] .= $text; - - return $Block; - } - } - - protected function blockCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Comment - - protected function blockComment($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') - { - $Block = array( - 'markup' => $Line['body'], - ); - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - } - - protected function blockCommentContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - $Block['markup'] .= "\n" . $Line['body']; - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - - # - # Fenced Code - - protected function blockFencedCode($Line) - { - if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) - { - $Element = array( - 'name' => 'code', - 'text' => '', - ); - - if (isset($matches[1])) - { - $class = 'language-'.$matches[1]; - - $Element['attributes'] = array( - 'class' => $class, - ); - } - - $Block = array( - 'char' => $Line['text'][0], - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => $Element, - ), - ); - - return $Block; - } - } - - protected function blockFencedCodeContinue($Line, $Block) - { - if (isset($Block['complete'])) - { - return; - } - - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) - { - $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); - - $Block['complete'] = true; - - return $Block; - } - - $Block['element']['text']['text'] .= "\n".$Line['body'];; - - return $Block; - } - - protected function blockFencedCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Header - - protected function blockHeader($Line) - { - if (isset($Line['text'][1])) - { - $level = 1; - - while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') - { - $level ++; - } - - if ($level > 6) - { - return; - } - - $text = trim($Line['text'], '# '); - - $Block = array( - 'element' => array( - 'name' => 'h' . min(6, $level), - 'text' => $text, - 'handler' => 'line', - ), - ); - - return $Block; - } - } - - # - # List - - protected function blockList($Line) - { - list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); - - if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'indent' => $Line['indent'], - 'pattern' => $pattern, - 'element' => array( - 'name' => $name, - 'handler' => 'elements', - ), - ); - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $matches[2], - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - } - - protected function blockListContinue($Line, array $Block) - { - if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['li']['text'] []= ''; - - unset($Block['interrupted']); - } - - unset($Block['li']); - - $text = isset($matches[1]) ? $matches[1] : ''; - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $text, - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - - if ($Line['text'][0] === '[' and $this->blockReference($Line)) - { - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - return $Block; - } - - if ($Line['indent'] > 0) - { - $Block['li']['text'] []= ''; - - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - unset($Block['interrupted']); - - return $Block; - } - } - - # - # Quote - - protected function blockQuote($Line) - { - if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'element' => array( - 'name' => 'blockquote', - 'handler' => 'lines', - 'text' => (array) $matches[1], - ), - ); - - return $Block; - } - } - - protected function blockQuoteContinue($Line, array $Block) - { - if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text'] []= ''; - - unset($Block['interrupted']); - } - - $Block['element']['text'] []= $matches[1]; - - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $Block['element']['text'] []= $Line['text']; - - return $Block; - } - } - - # - # Rule - - protected function blockRule($Line) - { - if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) - { - $Block = array( - 'element' => array( - 'name' => 'hr' - ), - ); - - return $Block; - } - } - - # - # Setext - - protected function blockSetextHeader($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (chop($Line['text'], $Line['text'][0]) === '') - { - $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; - - return $Block; - } - } - - # - # Markup - - protected function blockMarkup($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) - { - $element = strtolower($matches[1]); - - if (in_array($element, $this->textLevelElements)) - { - return; - } - - $Block = array( - 'name' => $matches[1], - 'depth' => 0, - 'markup' => $Line['text'], - ); - - $length = strlen($matches[0]); - - $remainder = substr($Line['text'], $length); - - if (trim($remainder) === '') - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - $Block['closed'] = true; - - $Block['void'] = true; - } - } - else - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - return; - } - - if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) - { - $Block['closed'] = true; - } - } - - return $Block; - } - } - - protected function blockMarkupContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open - { - $Block['depth'] ++; - } - - if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close - { - if ($Block['depth'] > 0) - { - $Block['depth'] --; - } - else - { - $Block['closed'] = true; - } - } - - if (isset($Block['interrupted'])) - { - $Block['markup'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['markup'] .= "\n".$Line['body']; - - return $Block; - } - - # - # Reference - - protected function blockReference($Line) - { - if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) - { - $id = strtolower($matches[1]); - - $Data = array( - 'url' => $matches[2], - 'title' => null, - ); - - if (isset($matches[3])) - { - $Data['title'] = $matches[3]; - } - - $this->DefinitionData['Reference'][$id] = $Data; - - $Block = array( - 'hidden' => true, - ); - - return $Block; - } - } - - # - # Table - - protected function blockTable($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') - { - $alignments = array(); - - $divider = $Line['text']; - - $divider = trim($divider); - $divider = trim($divider, '|'); - - $dividerCells = explode('|', $divider); - - foreach ($dividerCells as $dividerCell) - { - $dividerCell = trim($dividerCell); - - if ($dividerCell === '') - { - continue; - } - - $alignment = null; - - if ($dividerCell[0] === ':') - { - $alignment = 'left'; - } - - if (substr($dividerCell, - 1) === ':') - { - $alignment = $alignment === 'left' ? 'center' : 'right'; - } - - $alignments []= $alignment; - } - - # ~ - - $HeaderElements = array(); - - $header = $Block['element']['text']; - - $header = trim($header); - $header = trim($header, '|'); - - $headerCells = explode('|', $header); - - foreach ($headerCells as $index => $headerCell) - { - $headerCell = trim($headerCell); - - $HeaderElement = array( - 'name' => 'th', - 'text' => $headerCell, - 'handler' => 'line', - ); - - if (isset($alignments[$index])) - { - $alignment = $alignments[$index]; - - $HeaderElement['attributes'] = array( - 'style' => 'text-align: '.$alignment.';', - ); - } - - $HeaderElements []= $HeaderElement; - } - - # ~ - - $Block = array( - 'alignments' => $alignments, - 'identified' => true, - 'element' => array( - 'name' => 'table', - 'handler' => 'elements', - ), - ); - - $Block['element']['text'] []= array( - 'name' => 'thead', - 'handler' => 'elements', - ); - - $Block['element']['text'] []= array( - 'name' => 'tbody', - 'handler' => 'elements', - 'text' => array(), - ); - - $Block['element']['text'][0]['text'] []= array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $HeaderElements, - ); - - return $Block; - } - } - - protected function blockTableContinue($Line, array $Block) - { - if (isset($Block['interrupted'])) - { - return; - } - - if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) - { - $Elements = array(); - - $row = $Line['text']; - - $row = trim($row); - $row = trim($row, '|'); - - preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); - - foreach ($matches[0] as $index => $cell) - { - $cell = trim($cell); - - $Element = array( - 'name' => 'td', - 'handler' => 'line', - 'text' => $cell, - ); - - if (isset($Block['alignments'][$index])) - { - $Element['attributes'] = array( - 'style' => 'text-align: '.$Block['alignments'][$index].';', - ); - } - - $Elements []= $Element; - } - - $Element = array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $Elements, - ); - - $Block['element']['text'][1]['text'] []= $Element; - - return $Block; - } - } - - # - # ~ - # - - protected function paragraph($Line) - { - $Block = array( - 'element' => array( - 'name' => 'p', - 'text' => $Line['text'], - 'handler' => 'line', - ), - ); - - return $Block; - } - - # - # Inline Elements - # - - protected $InlineTypes = array( - '"' => array('SpecialCharacter'), - '!' => array('Image'), - '&' => array('SpecialCharacter'), - '*' => array('Emphasis'), - ':' => array('Url'), - '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), - '>' => array('SpecialCharacter'), - '[' => array('Link'), - '_' => array('Emphasis'), - '`' => array('Code'), - '~' => array('Strikethrough'), - '\\' => array('EscapeSequence'), - ); - - # ~ - - protected $inlineMarkerList = '!"*_&[:<>`~\\'; - - # - # ~ - # - - public function line($text) - { - $markup = ''; - - # $excerpt is based on the first occurrence of a marker - - while ($excerpt = strpbrk($text, $this->inlineMarkerList)) - { - $marker = $excerpt[0]; - - $markerPosition = strpos($text, $marker); - - $Excerpt = array('text' => $excerpt, 'context' => $text); - - foreach ($this->InlineTypes[$marker] as $inlineType) - { - $Inline = $this->{'inline'.$inlineType}($Excerpt); - - if ( ! isset($Inline)) - { - continue; - } - - # makes sure that the inline belongs to "our" marker - - if (isset($Inline['position']) and $Inline['position'] > $markerPosition) - { - continue; - } - - # sets a default inline position - - if ( ! isset($Inline['position'])) - { - $Inline['position'] = $markerPosition; - } - - # the text that comes before the inline - $unmarkedText = substr($text, 0, $Inline['position']); - - # compile the unmarked text - $markup .= $this->unmarkedText($unmarkedText); - - # compile the inline - $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); - - # remove the examined text - $text = substr($text, $Inline['position'] + $Inline['extent']); - - continue 2; - } - - # the marker does not belong to an inline - - $unmarkedText = substr($text, 0, $markerPosition + 1); - - $markup .= $this->unmarkedText($unmarkedText); - - $text = substr($text, $markerPosition + 1); - } - - $markup .= $this->unmarkedText($text); - - return $markup; - } - - # - # ~ - # - - protected function inlineCode($Excerpt) - { - $marker = $Excerpt['text'][0]; - - if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), - 'element' => array( - 'name' => 'code', - 'text' => $text, - ), - ); - } - } - - protected function inlineEmailTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) - { - $url = $matches[1]; - - if ( ! isset($matches[2])) - { - $url = 'mailto:' . $url; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $matches[1], - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - protected function inlineEmphasis($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - $marker = $Excerpt['text'][0]; - - if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'strong'; - } - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'em'; - } - else - { - return; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => $emphasis, - 'handler' => 'line', - 'text' => $matches[1], - ), - ); - } - - protected function inlineEscapeSequence($Excerpt) - { - if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) - { - return array( - 'markup' => $Excerpt['text'][1], - 'extent' => 2, - ); - } - } - - protected function inlineImage($Excerpt) - { - if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') - { - return; - } - - $Excerpt['text']= substr($Excerpt['text'], 1); - - $Link = $this->inlineLink($Excerpt); - - if ($Link === null) - { - return; - } - - $Inline = array( - 'extent' => $Link['extent'] + 1, - 'element' => array( - 'name' => 'img', - 'attributes' => array( - 'src' => $Link['element']['attributes']['href'], - 'alt' => $Link['element']['text'], - ), - ), - ); - - $Inline['element']['attributes'] += $Link['element']['attributes']; - - unset($Inline['element']['attributes']['href']); - - return $Inline; - } - - protected function inlineLink($Excerpt) - { - $Element = array( - 'name' => 'a', - 'handler' => 'line', - 'text' => null, - 'attributes' => array( - 'href' => null, - 'title' => null, - ), - ); - - $extent = 0; - - $remainder = $Excerpt['text']; - - if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) - { - $Element['text'] = $matches[1]; - - $extent += strlen($matches[0]); - - $remainder = substr($remainder, $extent); - } - else - { - return; - } - - if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) - { - $Element['attributes']['href'] = $matches[1]; - - if (isset($matches[2])) - { - $Element['attributes']['title'] = substr($matches[2], 1, - 1); - } - - $extent += strlen($matches[0]); - } - else - { - if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) - { - $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; - $definition = strtolower($definition); - - $extent += strlen($matches[0]); - } - else - { - $definition = strtolower($Element['text']); - } - - if ( ! isset($this->DefinitionData['Reference'][$definition])) - { - return; - } - - $Definition = $this->DefinitionData['Reference'][$definition]; - - $Element['attributes']['href'] = $Definition['url']; - $Element['attributes']['title'] = $Definition['title']; - } - - $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); - - return array( - 'extent' => $extent, - 'element' => $Element, - ); - } - - protected function inlineMarkup($Excerpt) - { - if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) - { - return; - } - - if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - } - - protected function inlineSpecialCharacter($Excerpt) - { - if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) - { - return array( - 'markup' => '&', - 'extent' => 1, - ); - } - - $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); - - if (isset($SpecialCharacter[$Excerpt['text'][0]])) - { - return array( - 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', - 'extent' => 1, - ); - } - } - - protected function inlineStrikethrough($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) - { - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'del', - 'text' => $matches[1], - 'handler' => 'line', - ), - ); - } - } - - protected function inlineUrl($Excerpt) - { - if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') - { - return; - } - - if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) - { - $Inline = array( - 'extent' => strlen($matches[0][0]), - 'position' => $matches[0][1], - 'element' => array( - 'name' => 'a', - 'text' => $matches[0][0], - 'attributes' => array( - 'href' => $matches[0][0], - ), - ), - ); - - return $Inline; - } - } - - protected function inlineUrlTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) - { - $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $url, - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - # ~ - - protected function unmarkedText($text) - { - if ($this->breaksEnabled) - { - $text = preg_replace('/[ ]*\n/', "
\n", $text); - } - else - { - $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); - $text = str_replace(" \n", "\n", $text); - } - - return $text; - } - - # - # Handlers - # - - protected function element(array $Element) - { - $markup = '<'.$Element['name']; - - if (isset($Element['attributes'])) - { - foreach ($Element['attributes'] as $name => $value) - { - if ($value === null) - { - continue; - } - - $markup .= ' '.$name.'="'.$value.'"'; - } - } - - if (isset($Element['text'])) - { - $markup .= '>'; - - if (isset($Element['handler'])) - { - $markup .= $this->{$Element['handler']}($Element['text']); - } - else - { - $markup .= $Element['text']; - } - - $markup .= ''; - } - else - { - $markup .= ' />'; - } - - return $markup; - } - - protected function elements(array $Elements) - { - $markup = ''; - - foreach ($Elements as $Element) - { - $markup .= "\n" . $this->element($Element); - } - - $markup .= "\n"; - - return $markup; - } - - # ~ - - protected function li($lines) - { - $markup = $this->lines($lines); - - $trimmedMarkup = trim($markup); - - if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') - { - $markup = $trimmedMarkup; - $markup = substr($markup, 3); - - $position = strpos($markup, "

"); - - $markup = substr_replace($markup, '', $position, 4); - } - - return $markup; - } - - # - # Deprecated Methods - # - - function parse($text) - { - $markup = $this->text($text); - - return $markup; - } - - # - # Static Methods - # - - static function instance($name = 'default') - { - if (isset(self::$instances[$name])) - { - return self::$instances[$name]; - } - - $instance = new static(); - - self::$instances[$name] = $instance; - - return $instance; - } - - private static $instances = array(); - - # - # Fields - # - - protected $DefinitionData; - - # - # Read-Only - - protected $specialCharacters = array( - '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', - ); - - protected $StrongRegex = array( - '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', - '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', - ); - - protected $EmRegex = array( - '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', - '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', - ); - - protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; - - protected $voidElements = array( - 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', - ); - - protected $textLevelElements = array( - 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', - 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', - 'i', 'rp', 'del', 'code', 'strike', 'marquee', - 'q', 'rt', 'ins', 'font', 'strong', - 's', 'tt', 'sub', 'mark', - 'u', 'xm', 'sup', 'nobr', - 'var', 'ruby', - 'wbr', 'span', - 'time', - ); -} diff --git a/_sakura/vendor/erusev/parsedown/README.md b/_sakura/vendor/erusev/parsedown/README.md deleted file mode 100644 index 6f9f649..0000000 --- a/_sakura/vendor/erusev/parsedown/README.md +++ /dev/null @@ -1,57 +0,0 @@ -## Parsedown - -[![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown) - - -Better Markdown Parser in PHP - -[Demo](http://parsedown.org/demo) | -[Benchmarks](http://parsedown.org/speed) | -[Tests](http://parsedown.org/tests/) | -[Documentation](https://github.com/erusev/parsedown/wiki/) - -### Features - -* Super Fast -* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) -* Extensible -* Tested in 5.3 to 5.6 -* [Markdown Extra extension](https://github.com/erusev/parsedown-extra) - -### Installation - -Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). - -### Example - -``` php -$Parsedown = new Parsedown(); - -echo $Parsedown->text('Hello _Parsedown_!'); # prints:

Hello Parsedown!

-``` - -More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI). - -### Questions - -**How does Parsedown work?** - -It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line start with a `-` then it perhaps belong to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines). - -We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages. - -**Is it compliant with CommonMark?** - -It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve. - -**Who uses it?** - -[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). - -**How can I help?** - -Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2). - ---- - -You might also like [Caret](http://caret.io) - our Markdown editor for the desktop. diff --git a/_sakura/vendor/erusev/parsedown/composer.json b/_sakura/vendor/erusev/parsedown/composer.json deleted file mode 100644 index 1439b82..0000000 --- a/_sakura/vendor/erusev/parsedown/composer.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "erusev/parsedown", - "description": "Parser for Markdown.", - "keywords": ["markdown", "parser"], - "homepage": "http://parsedown.org", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "autoload": { - "psr-0": {"Parsedown": ""} - } -} \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/phpunit.xml.dist b/_sakura/vendor/erusev/parsedown/phpunit.xml.dist deleted file mode 100644 index b2d5e9d..0000000 --- a/_sakura/vendor/erusev/parsedown/phpunit.xml.dist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - test/ParsedownTest.php - - - \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/CommonMarkTest.php b/_sakura/vendor/erusev/parsedown/test/CommonMarkTest.php deleted file mode 100644 index 9b8d116..0000000 --- a/_sakura/vendor/erusev/parsedown/test/CommonMarkTest.php +++ /dev/null @@ -1,74 +0,0 @@ -setUrlsLinked(false); - - $actualHtml = $Parsedown->text($markdown); - $actualHtml = $this->normalizeMarkup($actualHtml); - - $this->assertEquals($expectedHtml, $actualHtml); - } - - function data() - { - $spec = file_get_contents(self::SPEC_URL); - $spec = strstr($spec, '', true); - - $tests = array(); - $currentSection = ''; - - preg_replace_callback( - '/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$|^#{1,6} *(.*)$/m', - function($matches) use ( & $tests, & $currentSection, & $testCount) { - if (isset($matches[3]) and $matches[3]) { - $currentSection = $matches[3]; - } else { - $testCount++; - $markdown = $matches[1]; - $markdown = preg_replace('/→/', "\t", $markdown); - $expectedHtml = $matches[2]; - $expectedHtml = $this->normalizeMarkup($expectedHtml); - $tests []= array( - $currentSection, # section - $markdown, # markdown - $expectedHtml, # html - ); - } - }, - $spec - ); - - return $tests; - } - - private function normalizeMarkup($markup) - { - $markup = preg_replace("/\n+/", "\n", $markup); - $markup = preg_replace('/^\s+/m', '', $markup); - $markup = preg_replace('/^((?:<[\w]+>)+)\n/m', '$1', $markup); - $markup = preg_replace('/\n((?:<\/[\w]+>)+)$/m', '$1', $markup); - $markup = trim($markup); - - return $markup; - } -} diff --git a/_sakura/vendor/erusev/parsedown/test/ParsedownTest.php b/_sakura/vendor/erusev/parsedown/test/ParsedownTest.php deleted file mode 100644 index c922ab1..0000000 --- a/_sakura/vendor/erusev/parsedown/test/ParsedownTest.php +++ /dev/null @@ -1,159 +0,0 @@ -dirs = $this->initDirs(); - $this->Parsedown = $this->initParsedown(); - - parent::__construct($name, $data, $dataName); - } - - private $dirs, $Parsedown; - - /** - * @return array - */ - protected function initDirs() - { - $dirs []= dirname(__FILE__).'/data/'; - - return $dirs; - } - - /** - * @return Parsedown - */ - protected function initParsedown() - { - $Parsedown = new Parsedown(); - - return $Parsedown; - } - - /** - * @dataProvider data - * @param $test - * @param $dir - */ - function test_($test, $dir) - { - $markdown = file_get_contents($dir . $test . '.md'); - - $expectedMarkup = file_get_contents($dir . $test . '.html'); - - $expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup); - $expectedMarkup = str_replace("\r", "\n", $expectedMarkup); - - $actualMarkup = $this->Parsedown->text($markdown); - - $this->assertEquals($expectedMarkup, $actualMarkup); - } - - function data() - { - $data = array(); - - foreach ($this->dirs as $dir) - { - $Folder = new DirectoryIterator($dir); - - foreach ($Folder as $File) - { - /** @var $File DirectoryIterator */ - - if ( ! $File->isFile()) - { - continue; - } - - $filename = $File->getFilename(); - - $extension = pathinfo($filename, PATHINFO_EXTENSION); - - if ($extension !== 'md') - { - continue; - } - - $basename = $File->getBasename('.md'); - - if (file_exists($dir . $basename . '.html')) - { - $data []= array($basename, $dir); - } - } - } - - return $data; - } - - public function test_no_markup() - { - $markdownWithHtml = <<_content_ - -sparse: - -
-
-_content_ -
-
- -paragraph - - - -comment - - -MARKDOWN_WITH_MARKUP; - - $expectedHtml = <<<div>content</div>

-

sparse:

-

<div> -<div class="inner"> -content -</div> -</div>

-

paragraph

-

<style type="text/css"> -p { -color: red; -} -</style>

-

comment

-

<!-- html comment -->

-EXPECTED_HTML; - $parsedownWithNoMarkup = new Parsedown(); - $parsedownWithNoMarkup->setMarkupEscaped(true); - $this->assertEquals($expectedHtml, $parsedownWithNoMarkup->text($markdownWithHtml)); - } - - public function testLateStaticBinding() - { - include 'test/TestParsedown.php'; - - $parsedown = Parsedown::instance(); - $this->assertInstanceOf('Parsedown', $parsedown); - - // After instance is already called on Parsedown - // subsequent calls with the same arguments return the same instance - $sameParsedown = TestParsedown::instance(); - $this->assertInstanceOf('Parsedown', $sameParsedown); - $this->assertSame($parsedown, $sameParsedown); - - $testParsedown = TestParsedown::instance('test late static binding'); - $this->assertInstanceOf('TestParsedown', $testParsedown); - - $sameInstanceAgain = TestParsedown::instance('test late static binding'); - $this->assertSame($testParsedown, $sameInstanceAgain); - } -} diff --git a/_sakura/vendor/erusev/parsedown/test/TestParsedown.php b/_sakura/vendor/erusev/parsedown/test/TestParsedown.php deleted file mode 100644 index 7024dfb..0000000 --- a/_sakura/vendor/erusev/parsedown/test/TestParsedown.php +++ /dev/null @@ -1,5 +0,0 @@ - - - -header 1 -header 2 - - - - -cell 1.1 -cell 1.2 - - -cell 2.1 -cell 2.2 - - - \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/aesthetic_table.md b/_sakura/vendor/erusev/parsedown/test/data/aesthetic_table.md deleted file mode 100644 index 5245e6c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/aesthetic_table.md +++ /dev/null @@ -1,4 +0,0 @@ -| header 1 | header 2 | -| -------- | -------- | -| cell 1.1 | cell 1.2 | -| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/aligned_table.html b/_sakura/vendor/erusev/parsedown/test/data/aligned_table.html deleted file mode 100644 index c4acfcb..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/aligned_table.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
header 1header 2header 2
cell 1.1cell 1.2cell 1.3
cell 2.1cell 2.2cell 2.3
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/aligned_table.md b/_sakura/vendor/erusev/parsedown/test/data/aligned_table.md deleted file mode 100644 index 69a45f9..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/aligned_table.md +++ /dev/null @@ -1,4 +0,0 @@ -| header 1 | header 2 | header 2 | -| :------- | :------: | -------: | -| cell 1.1 | cell 1.2 | cell 1.3 | -| cell 2.1 | cell 2.2 | cell 2.3 | \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/atx_heading.html b/_sakura/vendor/erusev/parsedown/test/data/atx_heading.html deleted file mode 100644 index 751f873..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/atx_heading.html +++ /dev/null @@ -1,9 +0,0 @@ -

h1

-

h2

-

h3

-

h4

-
h5
-
h6
-

####### not a heading

-

closed h1

-

#

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/atx_heading.md b/_sakura/vendor/erusev/parsedown/test/data/atx_heading.md deleted file mode 100644 index ad97b44..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/atx_heading.md +++ /dev/null @@ -1,17 +0,0 @@ -# h1 - -## h2 - -### h3 - -#### h4 - -##### h5 - -###### h6 - -####### not a heading - -# closed h1 # - -# \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/automatic_link.html b/_sakura/vendor/erusev/parsedown/test/data/automatic_link.html deleted file mode 100644 index 50a94ba..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/automatic_link.html +++ /dev/null @@ -1 +0,0 @@ -

http://example.com

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/automatic_link.md b/_sakura/vendor/erusev/parsedown/test/data/automatic_link.md deleted file mode 100644 index 08d3bf4..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/automatic_link.md +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/block-level_html.html b/_sakura/vendor/erusev/parsedown/test/data/block-level_html.html deleted file mode 100644 index 6443a4a..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/block-level_html.html +++ /dev/null @@ -1,12 +0,0 @@ -
_content_
-

paragraph

-
-
- _content_ -
-
- -
- home
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/block-level_html.md b/_sakura/vendor/erusev/parsedown/test/data/block-level_html.md deleted file mode 100644 index 17cbc22..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/block-level_html.md +++ /dev/null @@ -1,16 +0,0 @@ -
_content_
- -paragraph - -
-
- _content_ -
-
- - - -
- home
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/code_block.html b/_sakura/vendor/erusev/parsedown/test/data/code_block.html deleted file mode 100644 index 889b02d..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/code_block.html +++ /dev/null @@ -1,8 +0,0 @@ -
<?php
-
-$message = 'Hello World!';
-echo $message;
-
-
> not a quote
-- not a list item
-[not a reference]: http://foo.com
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/code_block.md b/_sakura/vendor/erusev/parsedown/test/data/code_block.md deleted file mode 100644 index 2cfc953..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/code_block.md +++ /dev/null @@ -1,10 +0,0 @@ - not a quote - - not a list item - [not a reference]: http://foo.com \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/code_span.html b/_sakura/vendor/erusev/parsedown/test/data/code_span.html deleted file mode 100644 index 5c4c231..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/code_span.html +++ /dev/null @@ -1,6 +0,0 @@ -

a code span

-

this is also a codespan trailing text

-

and look at this one!

-

single backtick in a code span: `

-

backtick-delimited string in a code span: `foo`

-

sth `` sth

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/code_span.md b/_sakura/vendor/erusev/parsedown/test/data/code_span.md deleted file mode 100644 index c2f1a74..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/code_span.md +++ /dev/null @@ -1,11 +0,0 @@ -a `code span` - -`this is also a codespan` trailing text - -`and look at this one!` - -single backtick in a code span: `` ` `` - -backtick-delimited string in a code span: `` `foo` `` - -`sth `` sth` \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/compound_blockquote.html b/_sakura/vendor/erusev/parsedown/test/data/compound_blockquote.html deleted file mode 100644 index 37afb57..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/compound_blockquote.html +++ /dev/null @@ -1,9 +0,0 @@ -
-

header

-

paragraph

-
    -
  • li
  • -
-
-

paragraph

-
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/compound_blockquote.md b/_sakura/vendor/erusev/parsedown/test/data/compound_blockquote.md deleted file mode 100644 index 80c4aed..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/compound_blockquote.md +++ /dev/null @@ -1,10 +0,0 @@ -> header -> ------ -> -> paragraph -> -> - li -> -> --- -> -> paragraph \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/compound_emphasis.html b/_sakura/vendor/erusev/parsedown/test/data/compound_emphasis.html deleted file mode 100644 index 178dd54..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/compound_emphasis.html +++ /dev/null @@ -1,2 +0,0 @@ -

code code

-

codecodecode

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/compound_emphasis.md b/_sakura/vendor/erusev/parsedown/test/data/compound_emphasis.md deleted file mode 100644 index 6fe07f2..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/compound_emphasis.md +++ /dev/null @@ -1,4 +0,0 @@ -_`code`_ __`code`__ - -*`code`**`code`**`code`* - diff --git a/_sakura/vendor/erusev/parsedown/test/data/compound_list.html b/_sakura/vendor/erusev/parsedown/test/data/compound_list.html deleted file mode 100644 index f5593c1..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/compound_list.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
  • -

    paragraph

    -

    paragraph

    -
  • -
  • -

    paragraph

    -
    -

    quote

    -
    -
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/compound_list.md b/_sakura/vendor/erusev/parsedown/test/data/compound_list.md deleted file mode 100644 index ed7f0c6..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/compound_list.md +++ /dev/null @@ -1,7 +0,0 @@ -- paragraph - - paragraph - -- paragraph - - > quote \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/deeply_nested_list.html b/_sakura/vendor/erusev/parsedown/test/data/deeply_nested_list.html deleted file mode 100644 index d2c7e5a..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/deeply_nested_list.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
  • li -
      -
    • li -
        -
      • li
      • -
      • li
      • -
    • -
    • li
    • -
  • -
  • li
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/deeply_nested_list.md b/_sakura/vendor/erusev/parsedown/test/data/deeply_nested_list.md deleted file mode 100644 index 76b7552..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/deeply_nested_list.md +++ /dev/null @@ -1,6 +0,0 @@ -- li - - li - - li - - li - - li -- li \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/em_strong.html b/_sakura/vendor/erusev/parsedown/test/data/em_strong.html deleted file mode 100644 index 323d60a..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/em_strong.html +++ /dev/null @@ -1,8 +0,0 @@ -

em strong

-

em strong strong

-

strong em strong

-

strong em strong strong

-

em strong

-

em strong strong

-

strong em strong

-

strong em strong strong

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/em_strong.md b/_sakura/vendor/erusev/parsedown/test/data/em_strong.md deleted file mode 100644 index 9abeb3f..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/em_strong.md +++ /dev/null @@ -1,15 +0,0 @@ -___em strong___ - -___em strong_ strong__ - -__strong _em strong___ - -__strong _em strong_ strong__ - -***em strong*** - -***em strong* strong** - -**strong *em strong*** - -**strong *em strong* strong** \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/email.html b/_sakura/vendor/erusev/parsedown/test/data/email.html deleted file mode 100644 index c40759c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/email.html +++ /dev/null @@ -1 +0,0 @@ -

my email is me@example.com

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/email.md b/_sakura/vendor/erusev/parsedown/test/data/email.md deleted file mode 100644 index 26b7b6c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/email.md +++ /dev/null @@ -1 +0,0 @@ -my email is \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/emphasis.html b/_sakura/vendor/erusev/parsedown/test/data/emphasis.html deleted file mode 100644 index 60ff4bd..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/emphasis.html +++ /dev/null @@ -1,8 +0,0 @@ -

underscore, asterisk, one two, three four, a, b

-

strong and em and strong and em

-

line -line -line

-

this_is_not_an_emphasis

-

an empty emphasis __ ** is not an emphasis

-

*mixed *double and single asterisk** spans

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/emphasis.md b/_sakura/vendor/erusev/parsedown/test/data/emphasis.md deleted file mode 100644 index 85b9d22..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/emphasis.md +++ /dev/null @@ -1,13 +0,0 @@ -_underscore_, *asterisk*, _one two_, *three four*, _a_, *b* - -**strong** and *em* and **strong** and *em* - -_line -line -line_ - -this_is_not_an_emphasis - -an empty emphasis __ ** is not an emphasis - -*mixed **double and* single asterisk** spans \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/escaping.html b/_sakura/vendor/erusev/parsedown/test/data/escaping.html deleted file mode 100644 index ab1c41f..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/escaping.html +++ /dev/null @@ -1,6 +0,0 @@ -

escaped *emphasis*.

-

escaped \*emphasis\* in a code span

-
escaped \*emphasis\* in a code block
-

\ ` * _ { } [ ] ( ) > # + - . !

-

one_two one_two

-

one*two one*two

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/escaping.md b/_sakura/vendor/erusev/parsedown/test/data/escaping.md deleted file mode 100644 index 9f174e9..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/escaping.md +++ /dev/null @@ -1,11 +0,0 @@ -escaped \*emphasis\*. - -`escaped \*emphasis\* in a code span` - - escaped \*emphasis\* in a code block - -\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \! - -_one\_two_ __one\_two__ - -*one\*two* **one\*two** \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/fenced_code_block.html b/_sakura/vendor/erusev/parsedown/test/data/fenced_code_block.html deleted file mode 100644 index 8bdabba..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/fenced_code_block.html +++ /dev/null @@ -1,6 +0,0 @@ -
<?php
-
-$message = 'fenced code block';
-echo $message;
-
tilde
-
echo 'language identifier';
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/fenced_code_block.md b/_sakura/vendor/erusev/parsedown/test/data/fenced_code_block.md deleted file mode 100644 index cbed8eb..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/fenced_code_block.md +++ /dev/null @@ -1,14 +0,0 @@ -``` - -
-
-
-
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/horizontal_rule.md b/_sakura/vendor/erusev/parsedown/test/data/horizontal_rule.md deleted file mode 100644 index bf461a9..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/horizontal_rule.md +++ /dev/null @@ -1,9 +0,0 @@ ---- - -- - - - - - - - - -*** - -___ \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/html_comment.html b/_sakura/vendor/erusev/parsedown/test/data/html_comment.html deleted file mode 100644 index 566dc3a..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/html_comment.html +++ /dev/null @@ -1,5 +0,0 @@ - -

paragraph

- -

paragraph

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/html_comment.md b/_sakura/vendor/erusev/parsedown/test/data/html_comment.md deleted file mode 100644 index 6ddfdb4..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/html_comment.md +++ /dev/null @@ -1,8 +0,0 @@ - - -paragraph - - - -paragraph \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/html_entity.html b/_sakura/vendor/erusev/parsedown/test/data/html_entity.html deleted file mode 100644 index 4d23e3c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/html_entity.html +++ /dev/null @@ -1 +0,0 @@ -

& © {

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/html_entity.md b/_sakura/vendor/erusev/parsedown/test/data/html_entity.md deleted file mode 100644 index ff545ea..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/html_entity.md +++ /dev/null @@ -1 +0,0 @@ -& © { \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/image_reference.html b/_sakura/vendor/erusev/parsedown/test/data/image_reference.html deleted file mode 100644 index 67fbd2c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/image_reference.html +++ /dev/null @@ -1,2 +0,0 @@ -

Markdown Logo

-

![missing reference]

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/image_reference.md b/_sakura/vendor/erusev/parsedown/test/data/image_reference.md deleted file mode 100644 index 1e11d94..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/image_reference.md +++ /dev/null @@ -1,5 +0,0 @@ -![Markdown Logo][image] - -[image]: /md.png - -![missing reference] \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/image_title.html b/_sakura/vendor/erusev/parsedown/test/data/image_title.html deleted file mode 100644 index 957c950..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/image_title.html +++ /dev/null @@ -1,2 +0,0 @@ -

alt

-

blank title

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/image_title.md b/_sakura/vendor/erusev/parsedown/test/data/image_title.md deleted file mode 100644 index 7ce2849..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/image_title.md +++ /dev/null @@ -1,3 +0,0 @@ -![alt](/md.png "title") - -![blank title](/md.png "") \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/implicit_reference.html b/_sakura/vendor/erusev/parsedown/test/data/implicit_reference.html deleted file mode 100644 index 24b51c1..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/implicit_reference.html +++ /dev/null @@ -1,4 +0,0 @@ -

an implicit reference link

-

an implicit reference link with an empty link definition

-

an implicit reference link followed by another

-

an explicit reference link with a title

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/implicit_reference.md b/_sakura/vendor/erusev/parsedown/test/data/implicit_reference.md deleted file mode 100644 index f850df9..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/implicit_reference.md +++ /dev/null @@ -1,13 +0,0 @@ -an [implicit] reference link - -[implicit]: http://example.com - -an [implicit][] reference link with an empty link definition - -an [implicit][] reference link followed by [another][] - -[another]: http://cnn.com - -an [explicit][example] reference link with a title - -[example]: http://example.com "Example" \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/inline_link.html b/_sakura/vendor/erusev/parsedown/test/data/inline_link.html deleted file mode 100644 index 5ad564a..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/inline_link.html +++ /dev/null @@ -1,6 +0,0 @@ -

link

-

link with parentheses in URL

-

(link) in parentheses

-

link

-

MD Logo

-

MD Logo and text

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/inline_link.md b/_sakura/vendor/erusev/parsedown/test/data/inline_link.md deleted file mode 100644 index 6bac0b3..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/inline_link.md +++ /dev/null @@ -1,11 +0,0 @@ -[link](http://example.com) - -[link](/url-(parentheses)) with parentheses in URL - -([link](/index.php)) in parentheses - -[`link`](http://example.com) - -[![MD Logo](http://parsedown.org/md.png)](http://example.com) - -[![MD Logo](http://parsedown.org/md.png) and text](http://example.com) \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/inline_link_title.html b/_sakura/vendor/erusev/parsedown/test/data/inline_link_title.html deleted file mode 100644 index ecdfd03..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/inline_link_title.html +++ /dev/null @@ -1,6 +0,0 @@ -

single quotes

-

double quotes

-

single quotes blank

-

double quotes blank

-

space

-

parentheses

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/inline_link_title.md b/_sakura/vendor/erusev/parsedown/test/data/inline_link_title.md deleted file mode 100644 index 6e1c5af..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/inline_link_title.md +++ /dev/null @@ -1,11 +0,0 @@ -[single quotes](http://example.com 'Title') - -[double quotes](http://example.com "Title") - -[single quotes blank](http://example.com '') - -[double quotes blank](http://example.com "") - -[space](http://example.com "2 Words") - -[parentheses](http://example.com/url-(parentheses) "Title") \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/inline_title.html b/_sakura/vendor/erusev/parsedown/test/data/inline_title.html deleted file mode 100644 index bbab93b..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/inline_title.html +++ /dev/null @@ -1 +0,0 @@ -

single quotes and double quotes

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/inline_title.md b/_sakura/vendor/erusev/parsedown/test/data/inline_title.md deleted file mode 100644 index cb09344..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/inline_title.md +++ /dev/null @@ -1 +0,0 @@ -[single quotes](http://example.com 'Example') and [double quotes](http://example.com "Example") \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/lazy_blockquote.html b/_sakura/vendor/erusev/parsedown/test/data/lazy_blockquote.html deleted file mode 100644 index 0a2a2aa..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/lazy_blockquote.html +++ /dev/null @@ -1,6 +0,0 @@ -
-

quote -the rest of it

-

another paragraph -the rest of it

-
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/lazy_blockquote.md b/_sakura/vendor/erusev/parsedown/test/data/lazy_blockquote.md deleted file mode 100644 index 48f645f..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/lazy_blockquote.md +++ /dev/null @@ -1,5 +0,0 @@ -> quote -the rest of it - -> another paragraph -the rest of it \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/lazy_list.html b/_sakura/vendor/erusev/parsedown/test/data/lazy_list.html deleted file mode 100644 index 1a51992..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/lazy_list.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
  • li -the rest of it
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/lazy_list.md b/_sakura/vendor/erusev/parsedown/test/data/lazy_list.md deleted file mode 100644 index 62ad9d7..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/lazy_list.md +++ /dev/null @@ -1,2 +0,0 @@ -- li -the rest of it \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/line_break.html b/_sakura/vendor/erusev/parsedown/test/data/line_break.html deleted file mode 100644 index 5f37d85..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/line_break.html +++ /dev/null @@ -1,2 +0,0 @@ -

line
-line

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/line_break.md b/_sakura/vendor/erusev/parsedown/test/data/line_break.md deleted file mode 100644 index 04dff43..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/line_break.md +++ /dev/null @@ -1,2 +0,0 @@ -line -line \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html b/_sakura/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html deleted file mode 100644 index 3247bd2..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -
  • -

    li

    -

    line -line

    -
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md b/_sakura/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md deleted file mode 100644 index f5b4272..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md +++ /dev/null @@ -1,4 +0,0 @@ -- li - - line - line \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/nested_block-level_html.html b/_sakura/vendor/erusev/parsedown/test/data/nested_block-level_html.html deleted file mode 100644 index bfbef54..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/nested_block-level_html.html +++ /dev/null @@ -1,10 +0,0 @@ -
-_parent_ -
-_child_ -
-
-_adopted child_
-
-
-

outside

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/nested_block-level_html.md b/_sakura/vendor/erusev/parsedown/test/data/nested_block-level_html.md deleted file mode 100644 index 5e01e10..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/nested_block-level_html.md +++ /dev/null @@ -1,11 +0,0 @@ -
-_parent_ -
-_child_ -
-
-_adopted child_
-
-
- -_outside_ \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/ordered_list.html b/_sakura/vendor/erusev/parsedown/test/data/ordered_list.html deleted file mode 100644 index b6c5216..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/ordered_list.html +++ /dev/null @@ -1,13 +0,0 @@ -
    -
  1. one
  2. -
  3. two
  4. -
-

repeating numbers:

-
    -
  1. one
  2. -
  3. two
  4. -
-

large numbers:

-
    -
  1. one
  2. -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/ordered_list.md b/_sakura/vendor/erusev/parsedown/test/data/ordered_list.md deleted file mode 100644 index b307032..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/ordered_list.md +++ /dev/null @@ -1,11 +0,0 @@ -1. one -2. two - -repeating numbers: - -1. one -1. two - -large numbers: - -123. one \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/paragraph_list.html b/_sakura/vendor/erusev/parsedown/test/data/paragraph_list.html deleted file mode 100644 index ced1c43..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/paragraph_list.html +++ /dev/null @@ -1,12 +0,0 @@ -

paragraph

-
    -
  • li
  • -
  • li
  • -
-

paragraph

-
    -
  • -

    li

    -
  • -
  • li
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/paragraph_list.md b/_sakura/vendor/erusev/parsedown/test/data/paragraph_list.md deleted file mode 100644 index b973908..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/paragraph_list.md +++ /dev/null @@ -1,9 +0,0 @@ -paragraph -- li -- li - -paragraph - - * li - - * li \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/reference_title.html b/_sakura/vendor/erusev/parsedown/test/data/reference_title.html deleted file mode 100644 index 8f2be94..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/reference_title.html +++ /dev/null @@ -1,2 +0,0 @@ -

double quotes and single quotes and parentheses

-

[invalid title]: http://example.com example title

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/reference_title.md b/_sakura/vendor/erusev/parsedown/test/data/reference_title.md deleted file mode 100644 index 43cb217..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/reference_title.md +++ /dev/null @@ -1,6 +0,0 @@ -[double quotes] and [single quotes] and [parentheses] - -[double quotes]: http://example.com "example title" -[single quotes]: http://example.com 'example title' -[parentheses]: http://example.com (example title) -[invalid title]: http://example.com example title \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/self-closing_html.html b/_sakura/vendor/erusev/parsedown/test/data/self-closing_html.html deleted file mode 100644 index 4d072b4..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/self-closing_html.html +++ /dev/null @@ -1,12 +0,0 @@ -
-

paragraph

-
-

paragraph

-
-

paragraph

-
-

paragraph

-
-

paragraph

-
-

paragraph

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/self-closing_html.md b/_sakura/vendor/erusev/parsedown/test/data/self-closing_html.md deleted file mode 100644 index acb2032..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/self-closing_html.md +++ /dev/null @@ -1,12 +0,0 @@ -
-paragraph -
-paragraph -
-paragraph -
-paragraph -
-paragraph -
-paragraph \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/separated_nested_list.html b/_sakura/vendor/erusev/parsedown/test/data/separated_nested_list.html deleted file mode 100644 index 80a5cae..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/separated_nested_list.html +++ /dev/null @@ -1,9 +0,0 @@ -
    -
  • -

    li

    -
      -
    • li
    • -
    • li
    • -
    -
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/separated_nested_list.md b/_sakura/vendor/erusev/parsedown/test/data/separated_nested_list.md deleted file mode 100644 index d7cd1af..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/separated_nested_list.md +++ /dev/null @@ -1,4 +0,0 @@ -- li - - - li - - li \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/setext_header.html b/_sakura/vendor/erusev/parsedown/test/data/setext_header.html deleted file mode 100644 index 60aac08..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/setext_header.html +++ /dev/null @@ -1,5 +0,0 @@ -

h1

-

h2

-

single character

-

not a header

-
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/setext_header.md b/_sakura/vendor/erusev/parsedown/test/data/setext_header.md deleted file mode 100644 index c43b52c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/setext_header.md +++ /dev/null @@ -1,12 +0,0 @@ -h1 -== - -h2 --- - -single character -- - -not a header - ------------- \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/simple_blockquote.html b/_sakura/vendor/erusev/parsedown/test/data/simple_blockquote.html deleted file mode 100644 index 8225d57..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/simple_blockquote.html +++ /dev/null @@ -1,11 +0,0 @@ -
-

quote

-
-

indented:

-
-

quote

-
-

no space after >:

-
-

quote

-
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/simple_blockquote.md b/_sakura/vendor/erusev/parsedown/test/data/simple_blockquote.md deleted file mode 100644 index 22b6b11..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/simple_blockquote.md +++ /dev/null @@ -1,7 +0,0 @@ -> quote - -indented: - > quote - -no space after `>`: ->quote \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/simple_table.html b/_sakura/vendor/erusev/parsedown/test/data/simple_table.html deleted file mode 100644 index 237d7ef..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/simple_table.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - -
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
-
- - - - - - - - - - - - - - - - - -
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/simple_table.md b/_sakura/vendor/erusev/parsedown/test/data/simple_table.md deleted file mode 100644 index 466d140..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/simple_table.md +++ /dev/null @@ -1,11 +0,0 @@ -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 - ---- - -header 1 | header 2 -:------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/span-level_html.html b/_sakura/vendor/erusev/parsedown/test/data/span-level_html.html deleted file mode 100644 index f852a25..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/span-level_html.html +++ /dev/null @@ -1,5 +0,0 @@ -

an important link

-

broken
-line

-

inline tag at the beginning

-

http://example.com

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/span-level_html.md b/_sakura/vendor/erusev/parsedown/test/data/span-level_html.md deleted file mode 100644 index f221965..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/span-level_html.md +++ /dev/null @@ -1,8 +0,0 @@ -an important link - -broken
-line - -inline tag at the beginning - -http://example.com \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/sparse_dense_list.html b/_sakura/vendor/erusev/parsedown/test/data/sparse_dense_list.html deleted file mode 100644 index 095bc73..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/sparse_dense_list.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -
  • -

    li

    -
  • -
  • li
  • -
  • li
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/sparse_dense_list.md b/_sakura/vendor/erusev/parsedown/test/data/sparse_dense_list.md deleted file mode 100644 index 5768422..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/sparse_dense_list.md +++ /dev/null @@ -1,4 +0,0 @@ -- li - -- li -- li \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/sparse_html.html b/_sakura/vendor/erusev/parsedown/test/data/sparse_html.html deleted file mode 100644 index 9e89627..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/sparse_html.html +++ /dev/null @@ -1,8 +0,0 @@ -
-line 1 - -line 2 -line 3 - -line 4 -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/sparse_html.md b/_sakura/vendor/erusev/parsedown/test/data/sparse_html.md deleted file mode 100644 index 9e89627..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/sparse_html.md +++ /dev/null @@ -1,8 +0,0 @@ -
-line 1 - -line 2 -line 3 - -line 4 -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/sparse_list.html b/_sakura/vendor/erusev/parsedown/test/data/sparse_list.html deleted file mode 100644 index 452b2b8..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/sparse_list.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
  • -

    li

    -
  • -
  • li
  • -
-
-
    -
  • -

    li

    -
      -
    • indented li
    • -
    -
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/sparse_list.md b/_sakura/vendor/erusev/parsedown/test/data/sparse_list.md deleted file mode 100644 index 362a35f..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/sparse_list.md +++ /dev/null @@ -1,9 +0,0 @@ -- li - -- li - ---- - -- li - - - indented li \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/special_characters.html b/_sakura/vendor/erusev/parsedown/test/data/special_characters.html deleted file mode 100644 index 3b652c3..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/special_characters.html +++ /dev/null @@ -1,6 +0,0 @@ -

AT&T has an ampersand in their name

-

this & that

-

4 < 5 and 6 > 5

-

http://example.com/autolink?a=1&b=2

-

inline link

-

reference link

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/special_characters.md b/_sakura/vendor/erusev/parsedown/test/data/special_characters.md deleted file mode 100644 index 111b03b..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/special_characters.md +++ /dev/null @@ -1,13 +0,0 @@ -AT&T has an ampersand in their name - -this & that - -4 < 5 and 6 > 5 - - - -[inline link](/script?a=1&b=2) - -[reference link][1] - -[1]: http://example.com/?a=1&b=2 \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/strikethrough.html b/_sakura/vendor/erusev/parsedown/test/data/strikethrough.html deleted file mode 100644 index 2a9da98..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/strikethrough.html +++ /dev/null @@ -1,3 +0,0 @@ -

strikethrough

-

here's one followed by another one

-

~~ this ~~ is not one neither is ~this~

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/strikethrough.md b/_sakura/vendor/erusev/parsedown/test/data/strikethrough.md deleted file mode 100644 index d169144..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/strikethrough.md +++ /dev/null @@ -1,5 +0,0 @@ -~~strikethrough~~ - -here's ~~one~~ followed by ~~another one~~ - -~~ this ~~ is not one neither is ~this~ \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/strong_em.html b/_sakura/vendor/erusev/parsedown/test/data/strong_em.html deleted file mode 100644 index b709c99..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/strong_em.html +++ /dev/null @@ -1,6 +0,0 @@ -

em strong em

-

strong em em

-

em strong em em

-

em strong em

-

strong em em

-

em strong em em

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/strong_em.md b/_sakura/vendor/erusev/parsedown/test/data/strong_em.md deleted file mode 100644 index f2aa3c7..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/strong_em.md +++ /dev/null @@ -1,11 +0,0 @@ -*em **strong em*** - -***strong em** em* - -*em **strong em** em* - -_em __strong em___ - -___strong em__ em_ - -_em __strong em__ em_ \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/tab-indented_code_block.html b/_sakura/vendor/erusev/parsedown/test/data/tab-indented_code_block.html deleted file mode 100644 index 7c140de..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/tab-indented_code_block.html +++ /dev/null @@ -1,6 +0,0 @@ -
<?php
-
-$message = 'Hello World!';
-echo $message;
-
-echo "following a blank line";
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/tab-indented_code_block.md b/_sakura/vendor/erusev/parsedown/test/data/tab-indented_code_block.md deleted file mode 100644 index a405a16..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/tab-indented_code_block.md +++ /dev/null @@ -1,6 +0,0 @@ - - - -header 1 -header 2 - - - - -cell 1.1 -cell 1.2 - - -| 2.1 -| 2.2 - - -\| 2.1 -link - - - \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/table_inline_markdown.md b/_sakura/vendor/erusev/parsedown/test/data/table_inline_markdown.md deleted file mode 100644 index 2f3c620..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/table_inline_markdown.md +++ /dev/null @@ -1,5 +0,0 @@ -| _header_ 1 | header 2 | -| ------------ | ------------ | -| _cell_ 1.1 | ~~cell~~ 1.2 | -| `|` 2.1 | \| 2.2 | -| `\|` 2.1 | [link](/) | \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/text_reference.html b/_sakura/vendor/erusev/parsedown/test/data/text_reference.html deleted file mode 100644 index 11e4d37..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/text_reference.html +++ /dev/null @@ -1,8 +0,0 @@ -

reference link

-

one with a semantic name

-

[one][404] with no definition

-

multiline -one defined on 2 lines

-

one with a mixed case label and an upper case definition

-

one with the a label on the next line

-

link

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/text_reference.md b/_sakura/vendor/erusev/parsedown/test/data/text_reference.md deleted file mode 100644 index 1a66a5c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/text_reference.md +++ /dev/null @@ -1,21 +0,0 @@ -[reference link][1] - -[1]: http://example.com - -[one][website] with a semantic name - -[website]: http://example.com - -[one][404] with no definition - -[multiline -one][website] defined on 2 lines - -[one][Label] with a mixed case label and an upper case definition - -[LABEL]: http://example.com - -[one] -[1] with the a label on the next line - -[`link`][website] \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/unordered_list.html b/_sakura/vendor/erusev/parsedown/test/data/unordered_list.html deleted file mode 100644 index cd95567..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/unordered_list.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -
  • li
  • -
  • li
  • -
-

mixed markers:

-
    -
  • li
  • -
  • li
  • -
  • li
  • -
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/unordered_list.md b/_sakura/vendor/erusev/parsedown/test/data/unordered_list.md deleted file mode 100644 index cf62c99..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/unordered_list.md +++ /dev/null @@ -1,8 +0,0 @@ -- li -- li - -mixed markers: - -* li -+ li -- li \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/untidy_table.html b/_sakura/vendor/erusev/parsedown/test/data/untidy_table.html deleted file mode 100644 index 88e1c2b..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/untidy_table.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - -
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/untidy_table.md b/_sakura/vendor/erusev/parsedown/test/data/untidy_table.md deleted file mode 100644 index 8524eb1..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/untidy_table.md +++ /dev/null @@ -1,4 +0,0 @@ -| header 1 | header 2 | -| ------------- | ----------- | -| cell 1.1 | cell 1.2 | -| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/url_autolinking.html b/_sakura/vendor/erusev/parsedown/test/data/url_autolinking.html deleted file mode 100644 index 58ca94c..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/url_autolinking.html +++ /dev/null @@ -1,3 +0,0 @@ -

an autolink http://example.com

-

inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)

-

trailing slash http://example.com/ and http://example.com/path/

\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/url_autolinking.md b/_sakura/vendor/erusev/parsedown/test/data/url_autolinking.md deleted file mode 100644 index 840f354..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/url_autolinking.md +++ /dev/null @@ -1,5 +0,0 @@ -an autolink http://example.com - -inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com) - -trailing slash http://example.com/ and http://example.com/path/ \ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/whitespace.html b/_sakura/vendor/erusev/parsedown/test/data/whitespace.html deleted file mode 100644 index f2dd7a0..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/whitespace.html +++ /dev/null @@ -1 +0,0 @@ -
code
\ No newline at end of file diff --git a/_sakura/vendor/erusev/parsedown/test/data/whitespace.md b/_sakura/vendor/erusev/parsedown/test/data/whitespace.md deleted file mode 100644 index 4cf926a..0000000 --- a/_sakura/vendor/erusev/parsedown/test/data/whitespace.md +++ /dev/null @@ -1,5 +0,0 @@ - - - code - - \ No newline at end of file diff --git a/_sakura/vendor/jbbcode/jbbcode/.gitignore b/_sakura/vendor/jbbcode/jbbcode/.gitignore deleted file mode 100644 index 987e2a2..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -composer.lock -vendor diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinition.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinition.php deleted file mode 100644 index f7a07f7..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinition.php +++ /dev/null @@ -1,328 +0,0 @@ -elCounter = 0; - $def->setTagName($tagName); - $def->setReplacementText($replacementText); - $def->useOption = $useOption; - $def->parseContent = $parseContent; - $def->nestLimit = $nestLimit; - $def->optionValidator = $optionValidator; - $def->bodyValidator = $bodyValidator; - return $def; - } - - /** - * Constructs a new CodeDefinition. - * - * This constructor is deprecated. You should use the static construct() method or the - * CodeDefinitionBuilder class to construct a new CodeDefiniton. - * - * @deprecated - */ - public function __construct() - { - /* WARNING: This function is deprecated and will be made protected in a future - * version of jBBCode. */ - $this->parseContent = true; - $this->useOption = false; - $this->nestLimit = -1; - $this->elCounter = 0; - $this->optionValidator = array(); - $this->bodyValidator = null; - } - - /** - * Determines if the arguments to the given element are valid based on - * any validators attached to this CodeDefinition. - * - * @param $el the ElementNode to validate - * @return true if the ElementNode's {option} and {param} are OK, false if they're not - */ - public function hasValidInputs(ElementNode $el) - { - if ($this->usesOption() && $this->optionValidator) { - $att = $el->getAttribute(); - - foreach($att as $name => $value){ - if(isset($this->optionValidator[$name]) && !$this->optionValidator[$name]->validate($value)){ - return false; - } - } - } - - if (!$this->parseContent() && $this->bodyValidator) { - /* We only evaluate the content if we're not parsing the content. */ - $content = ""; - foreach ($el->getChildren() as $child) { - $content .= $child->getAsBBCode(); - } - if (!$this->bodyValidator->validate($content)) { - /* The content of the element is not valid. */ - return false; - } - } - - return true; - } - - /** - * Accepts an ElementNode that is defined by this CodeDefinition and returns the HTML - * markup of the element. This is a commonly overridden class for custom CodeDefinitions - * so that the content can be directly manipulated. - * - * @param $el the element to return an html representation of - * - * @return the parsed html of this element (INCLUDING ITS CHILDREN) - */ - public function asHtml(ElementNode $el) - { - if (!$this->hasValidInputs($el)) { - return $el->getAsBBCode(); - } - - $html = $this->getReplacementText(); - - if ($this->usesOption()) { - $options = $el->getAttribute(); - if(count($options)==1){ - $vals = array_values($options); - $html = str_ireplace('{option}', reset($vals), $html); - } - else{ - foreach($options as $key => $val){ - $html = str_ireplace('{' . $key . '}', $val, $html); - } - } - } - - $content = $this->getContent($el); - - $html = str_ireplace('{param}', $content, $html); - - return $html; - } - - protected function getContent(ElementNode $el){ - if ($this->parseContent()) { - $content = ""; - foreach ($el->getChildren() as $child) - $content .= $child->getAsHTML(); - } else { - $content = ""; - foreach ($el->getChildren() as $child) - $content .= $child->getAsBBCode(); - } - return $content; - } - - /** - * Accepts an ElementNode that is defined by this CodeDefinition and returns the text - * representation of the element. This may be overridden by a custom CodeDefinition. - * - * @param $el the element to return a text representation of - * - * @return the text representation of $el - */ - public function asText(ElementNode $el) - { - if (!$this->hasValidInputs($el)) { - return $el->getAsBBCode(); - } - - $s = ""; - foreach ($el->getChildren() as $child) - $s .= $child->getAsText(); - return $s; - } - - /** - * Returns the tag name of this code definition - * - * @return this definition's associated tag name - */ - public function getTagName() - { - return $this->tagName; - } - - /** - * Returns the replacement text of this code definition. This usually has little, if any meaning if the - * CodeDefinition class was extended. For default, html replacement CodeDefinitions this returns the html - * markup for the definition. - * - * @return the replacement text of this CodeDefinition - */ - public function getReplacementText() - { - return $this->replacementText; - } - - /** - * Returns whether or not this CodeDefinition uses the optional {option} - * - * @return true if this CodeDefinition uses the option, false otherwise - */ - public function usesOption() - { - return $this->useOption; - } - - /** - * Returns whether or not this CodeDefnition parses elements contained within it, - * or just treats its children as text. - * - * @return true if this CodeDefinition parses elements contained within itself - */ - public function parseContent() - { - return $this->parseContent; - } - - /** - * Returns the limit of how many elements defined by this CodeDefinition may be - * nested together. If after parsing elements are nested beyond this limit, the - * subtrees formed by those nodes will be removed from the parse tree. A nest - * limit of -1 signifies no limit. - */ - public function getNestLimit() - { - return $this->nestLimit; - } - - /** - * Sets the tag name of this CodeDefinition - * - * @deprecated - * - * @param the new tag name of this definition - */ - public function setTagName($tagName) - { - $this->tagName = strtolower($tagName); - } - - /** - * Sets the html replacement text of this CodeDefinition - * - * @deprecated - * - * @param the new replacement text - */ - public function setReplacementText($txt) - { - $this->replacementText = $txt; - } - - /** - * Sets whether or not this CodeDefinition uses the {option} - * - * @deprecated - * - * @param boolean $bool - */ - public function setUseOption($bool) - { - $this->useOption = $bool; - } - - /** - * Sets whether or not this CodeDefinition allows its children to be parsed as html - * - * @deprecated - * - * @param boolean $bool - */ - public function setParseContent($bool) - { - $this->parseContent = $bool; - } - - /** - * Increments the element counter. This is used for tracking depth of elements of the same type for next limits. - * - * @deprecated - * - * @return void - */ - public function incrementCounter() - { - $this->elCounter++; - } - - /** - * Decrements the element counter. - * - * @deprecated - * - * @return void - */ - public function decrementCounter() - { - $this->elCounter--; - } - - /** - * Resets the element counter. - * - * @deprecated - */ - public function resetCounter() - { - $this->elCounter = 0; - } - - /** - * Returns the current value of the element counter. - * - * @deprecated - * - * @return int - */ - public function getCounter() - { - return $this->elCounter; - } -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinitionBuilder.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinitionBuilder.php deleted file mode 100644 index 6e8bbc1..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinitionBuilder.php +++ /dev/null @@ -1,160 +0,0 @@ -tagName = $tagName; - $this->replacementText = $replacementText; - } - - /** - * Sets the tag name the CodeDefinition should be built with. - * - * @param $tagName the tag name for the new CodeDefinition - */ - public function setTagName($tagName) - { - $this->tagName = $tagName; - return $this; - } - - /** - * Sets the replacement text that the new CodeDefinition should be - * built with. - * - * @param $replacementText the replacement text for the new CodeDefinition - */ - public function setReplacementText($replacementText) - { - $this->replacementText = $replacementText; - return $this; - } - - /** - * Set whether or not the built CodeDefinition should use the {option} bbcode - * argument. - * - * @param $option ture iff the definition includes an option - */ - public function setUseOption($option) - { - $this->useOption = $option; - return $this; - } - - /** - * Set whether or not the built CodeDefinition should allow its content - * to be parsed and evaluated as bbcode. - * - * @param $parseContent true iff the content should be parsed - */ - public function setParseContent($parseContent) - { - $this->parseContent = $parseContent; - return $this; - } - - /** - * Sets the nest limit for this code definition. - * - * @param $nestLimit a positive integer, or -1 if there is no limit. - * @throws \InvalidArgumentException if the nest limit is invalid - */ - public function setNestLimit($limit) - { - if(!is_int($limit) || ($limit <= 0 && -1 != $limit)) { - throw new \InvalidArgumentException("A nest limit must be a positive integer " . - "or -1."); - } - $this->nestLimit = $limit; - return $this; - } - - /** - * Sets the InputValidator that option arguments should be validated with. - * - * @param $validator the InputValidator instance to use - */ - public function setOptionValidator(\JBBCode\InputValidator $validator, $option=null) - { - if(empty($option)){ - $option = $this->tagName; - } - $this->optionValidator[$option] = $validator; - return $this; - } - - /** - * Sets the InputValidator that body ({param}) text should be validated with. - * - * @param $validator the InputValidator instance to use - */ - public function setBodyValidator(\JBBCode\InputValidator $validator) - { - $this->bodyValidator = $validator; - return $this; - } - - /** - * Removes the attached option validator if one is attached. - */ - public function removeOptionValidator() - { - $this->optionValidator = array(); - return $this; - } - - /** - * Removes the attached body validator if one is attached. - */ - public function removeBodyValidator() - { - $this->bodyValidator = null; - return $this; - } - - /** - * Builds a CodeDefinition with the current state of the builder. - * - * @return a new CodeDefinition instance - */ - public function build() - { - $definition = CodeDefinition::construct($this->tagName, - $this->replacementText, - $this->useOption, - $this->parseContent, - $this->nestLimit, - $this->optionValidator, - $this->bodyValidator); - return $definition; - } - - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinitionSet.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinitionSet.php deleted file mode 100644 index 1b16650..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/CodeDefinitionSet.php +++ /dev/null @@ -1,22 +0,0 @@ -{param}'); - array_push($this->definitions, $builder->build()); - - /* [i] italics tag */ - $builder = new CodeDefinitionBuilder('i', '{param}'); - array_push($this->definitions, $builder->build()); - - /* [u] underline tag */ - $builder = new CodeDefinitionBuilder('u', '{param}'); - array_push($this->definitions, $builder->build()); - - $urlValidator = new \JBBCode\validators\UrlValidator(); - - /* [url] link tag */ - $builder = new CodeDefinitionBuilder('url', '{param}'); - $builder->setParseContent(false)->setBodyValidator($urlValidator); - array_push($this->definitions, $builder->build()); - - /* [url=http://example.com] link tag */ - $builder = new CodeDefinitionBuilder('url', '{param}'); - $builder->setUseOption(true)->setParseContent(true)->setOptionValidator($urlValidator); - array_push($this->definitions, $builder->build()); - - /* [img] image tag */ - $builder = new CodeDefinitionBuilder('img', ''); - $builder->setUseOption(false)->setParseContent(false)->setBodyValidator($urlValidator); - array_push($this->definitions, $builder->build()); - - /* [img=alt text] image tag */ - $builder = new CodeDefinitionBuilder('img', '{option}'); - $builder->setUseOption(true)->setParseContent(false)->setBodyValidator($urlValidator); - array_push($this->definitions, $builder->build()); - - /* [color] color tag */ - $builder = new CodeDefinitionBuilder('color', '{param}'); - $builder->setUseOption(true)->setOptionValidator(new \JBBCode\validators\CssColorValidator()); - array_push($this->definitions, $builder->build()); - } - - /** - * Returns an array of the default code definitions. - */ - public function getCodeDefinitions() - { - return $this->definitions; - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/DocumentElement.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/DocumentElement.php deleted file mode 100644 index 54b40c6..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/DocumentElement.php +++ /dev/null @@ -1,67 +0,0 @@ -setTagName("Document"); - $this->setNodeId(0); - } - - /** - * (non-PHPdoc) - * @see JBBCode.ElementNode::getAsBBCode() - * - * Returns the BBCode representation of this document - * - * @return this document's bbcode representation - */ - public function getAsBBCode() - { - $s = ""; - foreach($this->getChildren() as $child){ - $s .= $child->getAsBBCode(); - } - - return $s; - } - - /** - * (non-PHPdoc) - * @see JBBCode.ElementNode::getAsHTML() - * - * Documents don't add any html. They only exist as a container for their - * children, so getAsHTML() simply iterates through the document's children, - * returning their html. - * - * @return the HTML representation of this document - */ - public function getAsHTML() - { - $s = ""; - foreach($this->getChildren() as $child) - $s .= $child->getAsHTML(); - - return $s; - } - - public function accept(NodeVisitor $visitor) - { - $visitor->visitDocumentElement($this); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/ElementNode.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/ElementNode.php deleted file mode 100644 index 5393bb1..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/ElementNode.php +++ /dev/null @@ -1,241 +0,0 @@ -children = array(); - $this->nestDepth = 0; - } - - /** - * Accepts the given NodeVisitor. This is part of an implementation - * of the Visitor pattern. - * - * @param $nodeVisitor the visitor attempting to visit this node - */ - public function accept(NodeVisitor $nodeVisitor) - { - $nodeVisitor->visitElementNode($this); - } - - /** - * Gets the CodeDefinition that defines this element. - * - * @return this element's code definition - */ - public function getCodeDefinition() - { - return $this->codeDefinition; - } - - /** - * Sets the CodeDefinition that defines this element. - * - * @param codeDef the code definition that defines this element node - */ - public function setCodeDefinition(CodeDefinition $codeDef) - { - $this->codeDefinition = $codeDef; - $this->setTagName($codeDef->getTagName()); - } - - /** - * Returns the tag name of this element. - * - * @return the element's tag name - */ - public function getTagName() - { - return $this->tagName; - } - - /** - * Returns the attribute (used as the option in bbcode definitions) of this element. - * - * @return the attribute of this element - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * Returns all the children of this element. - * - * @return an array of this node's child nodes - */ - public function getChildren() - { - return $this->children; - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::getAsText() - * - * Returns the element as text (not including any bbcode markup) - * - * @return the plain text representation of this node - */ - public function getAsText() - { - if ($this->codeDefinition) { - return $this->codeDefinition->asText($this); - } else { - $s = ""; - foreach ($this->getChildren() as $child) - $s .= $child->getAsText(); - return $s; - } - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::getAsBBCode() - * - * Returns the element as bbcode (with all unclosed tags closed) - * - * @return the bbcode representation of this element - */ - public function getAsBBCode() - { - $str = "[".$this->tagName; - if (!empty($this->attribute)) { - - foreach($this->attribute as $key => $value){ - if($key == $this->tagName){ - $str .= "=".$value; - } - else{ - $str .= " ".$key."=" . $value; - } - } - } - $str .= "]"; - foreach ($this->getChildren() as $child) { - $str .= $child->getAsBBCode(); - } - $str .= "[/".$this->tagName."]"; - - return $str; - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::getAsHTML() - * - * Returns the element as html with all replacements made - * - * @return the html representation of this node - */ - public function getAsHTML() - { - if($this->codeDefinition) { - return $this->codeDefinition->asHtml($this); - } else { - return ""; - } - } - - /** - * Adds a child to this node's content. A child may be a TextNode, or - * another ElementNode... or anything else that may extend the - * abstract Node class. - * - * @param child the node to add as a child - */ - public function addChild(Node $child) - { - array_push($this->children, $child); - $child->setParent($this); - } - - /** - * Removes a child from this node's contnet. - * - * @param child the child node to remove - */ - public function removeChild(Node $child) - { - foreach ($this->children as $key => $value) { - if ($value == $child) - unset($this->children[$key]); - } - } - - /** - * Sets the tag name of this element node. - * - * @param tagName the element's new tag name - */ - public function setTagName($tagName) - { - $this->tagName = $tagName; - } - - /** - * Sets the attribute (option) of this element node. - * - * @param attribute the attribute of this element node - */ - public function setAttribute($attribute) - { - $this->attribute = $attribute; - } - - /** - * Traverses the parse tree upwards, going from parent to parent, until it finds a - * parent who has the given tag name. Returns the parent with the matching tag name - * if it exists, otherwise returns null. - * - * @param str the tag name to search for - * - * @return the closest parent with the given tag name - */ - public function closestParentOfType($str) - { - $str = strtolower($str); - $currentEl = $this; - - while (strtolower($currentEl->getTagName()) != $str && $currentEl->hasParent()) { - $currentEl = $currentEl->getParent(); - } - - if (strtolower($currentEl->getTagName()) != $str) { - return null; - } else { - return $currentEl; - } - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/InputValidator.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/InputValidator.php deleted file mode 100644 index 6774709..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/InputValidator.php +++ /dev/null @@ -1,20 +0,0 @@ -nodeid; - } - - /** - * Returns this node's immediate parent. - * - * @return the node's parent - */ - public function getParent() - { - return $this->parent; - } - - /** - * Determines if this node has a parent. - * - * @return true if this node has a parent, false otherwise - */ - public function hasParent() - { - return $this->parent != null; - } - - /** - * Returns true if this is a text node. Returns false otherwise. - * (Overridden by TextNode to return true) - * - * @return true if this node is a text node - */ - public function isTextNode() - { - return false; - } - - /** - * Accepts a NodeVisitor - * - * @param nodeVisitor the NodeVisitor traversing the graph - */ - abstract public function accept(NodeVisitor $nodeVisitor); - - /** - * Returns this node as text (without any bbcode markup) - * - * @return the plain text representation of this node - */ - abstract public function getAsText(); - - /** - * Returns this node as bbcode - * - * @return the bbcode representation of this node - */ - abstract public function getAsBBCode(); - - /** - * Returns this node as HTML - * - * @return the html representation of this node - */ - abstract public function getAsHTML(); - - /** - * Sets this node's parent to be the given node. - * - * @param parent the node to set as this node's parent - */ - public function setParent(Node $parent) - { - $this->parent = $parent; - } - - /** - * Sets this node's nodeid - * - * @param nodeid this node's node id - */ - public function setNodeId($nodeid) - { - $this->nodeid = $nodeid; - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/NodeVisitor.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/NodeVisitor.php deleted file mode 100644 index 1dd228a..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/NodeVisitor.php +++ /dev/null @@ -1,20 +0,0 @@ -reset(); - $this->bbcodes = array(); - } - - /** - * Adds a simple (text-replacement only) bbcode definition - * - * @param string $tagName the tag name of the code (for example the b in [b]) - * @param string $replace the html to use, with {param} and optionally {option} for replacements - * @param boolean $useOption whether or not this bbcode uses the secondary {option} replacement - * @param boolean $parseContent whether or not to parse the content within these elements - * @param integer $nestLimit an optional limit of the number of elements of this kind that can be nested within - * each other before the parser stops parsing them. - * @param InputValidator $optionValidator the validator to run {option} through - * @param BodyValidator $bodyValidator the validator to run {param} through (only used if $parseContent == false) - * - * @return Parser - */ - public function addBBCode($tagName, $replace, $useOption = false, $parseContent = true, $nestLimit = -1, - InputValidator $optionValidator = null, InputValidator $bodyValidator = null) - { - $builder = new CodeDefinitionBuilder($tagName, $replace); - - $builder->setUseOption($useOption); - $builder->setParseContent($parseContent); - $builder->setNestLimit($nestLimit); - - if ($optionValidator) { - $builder->setOptionValidator($optionValidator); - } - - if ($bodyValidator) { - $builder->setBodyValidator($bodyValidator); - } - - $this->addCodeDefinition($builder->build()); - - return $this; - } - - /** - * Adds a complex bbcode definition. You may subclass the CodeDefinition class, instantiate a definition of your new - * class and add it to the parser through this method. - * - * @param CodeDefinition $definition the bbcode definition to add - * - * @return Parser - */ - public function addCodeDefinition(CodeDefinition $definition) - { - array_push($this->bbcodes, $definition); - - return $this; - } - - /** - * Adds a set of CodeDefinitions. - * - * @param CodeDefinitionSet $set the set of definitions to add - * - * @return Parser - */ - public function addCodeDefinitionSet(CodeDefinitionSet $set) { - foreach ($set->getCodeDefinitions() as $def) { - $this->addCodeDefinition($def); - } - - return $this; - } - - /** - * Returns the entire parse tree as text. Only {param} content is returned. BBCode markup will be ignored. - * - * @return string a text representation of the parse tree - */ - public function getAsText() - { - return $this->treeRoot->getAsText(); - } - - /** - * Returns the entire parse tree as bbcode. This will be identical to the inputted string, except unclosed tags - * will be closed. - * - * @return string a bbcode representation of the parse tree - */ - public function getAsBBCode() - { - return $this->treeRoot->getAsBBCode(); - } - - /** - * Returns the entire parse tree as HTML. All BBCode replacements will be made. This is generally the method - * you will want to use to retrieve the parsed bbcode. - * - * @return string a parsed html string - */ - public function getAsHTML() - { - return $this->treeRoot->getAsHTML(); - } - - /** - * Accepts the given NodeVisitor at the root. - * - * @param NodeVisitor a NodeVisitor - * - * @return Parser - */ - public function accept(NodeVisitor $nodeVisitor) - { - $this->treeRoot->accept($nodeVisitor); - - return $this; - } - /** - * Constructs the parse tree from a string of bbcode markup. - * - * @param string $str the bbcode markup to parse - * - * @return Parser - */ - public function parse($str) - { - /* Set the tree root back to a fresh DocumentElement. */ - $this->reset(); - - $parent = $this->treeRoot; - $tokenizer = new Tokenizer($str); - - while ($tokenizer->hasNext()) { - $parent = $this->parseStartState($parent, $tokenizer); - if ($parent->getCodeDefinition() && false === - $parent->getCodeDefinition()->parseContent()) { - /* We're inside an element that does not allow its contents to be parseable. */ - $this->parseAsTextUntilClose($parent, $tokenizer); - $parent = $parent->getParent(); - } - } - - /* We parsed ignoring nest limits. Do an O(n) traversal to remove any elements that - * are nested beyond their CodeDefinition's nest limit. */ - $this->removeOverNestedElements(); - - return $this; - } - - /** - * Removes any elements that are nested beyond their nest limit from the parse tree. This - * method is now deprecated. In a future release its access privileges will be made - * protected. - * - * @deprecated - */ - public function removeOverNestedElements() - { - $nestLimitVisitor = new \JBBCode\visitors\NestLimitVisitor(); - $this->accept($nestLimitVisitor); - } - - /** - * Removes the old parse tree if one exists. - */ - protected function reset() - { - // remove any old tree information - $this->treeRoot = new DocumentElement(); - /* The document element is created with nodeid 0. */ - $this->nextNodeid = 1; - } - - /** - * Determines whether a bbcode exists based on its tag name and whether or not it uses an option - * - * @param string $tagName the bbcode tag name to check - * @param boolean $usesOption whether or not the bbcode accepts an option - * - * @return bool true if the code exists, false otherwise - */ - public function codeExists($tagName, $usesOption = false) - { - foreach ($this->bbcodes as $code) { - if (strtolower($tagName) == $code->getTagName() && $usesOption == $code->usesOption()) { - return true; - } - } - - return false; - } - - /** - * Returns the CodeDefinition of a bbcode with the matching tag name and usesOption parameter - * - * @param string $tagName the tag name of the bbcode being searched for - * @param boolean $usesOption whether or not the bbcode accepts an option - * - * @return CodeDefinition if the bbcode exists, null otherwise - */ - public function getCode($tagName, $usesOption = false) - { - foreach ($this->bbcodes as $code) { - if (strtolower($tagName) == $code->getTagName() && $code->usesOption() == $usesOption) { - return $code; - } - } - - return null; - } - - /** - * Adds a set of default, standard bbcode definitions commonly used across the web. - * - * This method is now deprecated. Please use DefaultCodeDefinitionSet and - * addCodeDefinitionSet() instead. - * - * @deprecated - */ - public function loadDefaultCodes() - { - $defaultSet = new DefaultCodeDefinitionSet(); - $this->addCodeDefinitionSet($defaultSet); - } - - /** - * Creates a new text node with the given parent and text string. - * - * @param $parent the parent of the text node - * @param $string the text of the text node - * - * @return TextNode the newly created TextNode - */ - protected function createTextNode(ElementNode $parent, $string) - { - if (count($parent->getChildren())) { - $children = $parent->getChildren(); - $lastElement = end($children); - reset($children); - - if ($lastElement->isTextNode()) { - $lastElement->setValue($lastElement->getValue() . $string); - return $lastElement; - } - } - - $textNode = new TextNode($string); - $textNode->setNodeId(++$this->nextNodeid); - $parent->addChild($textNode); - return $textNode; - } - - /** - * jBBCode parsing logic is loosely modelled after a FSM. While not every function maps - * to a unique DFSM state, each function handles the logic of one or more FSM states. - * This function handles the beginning parse state when we're not currently in a tag - * name. - * - * @param ElementNode $parent the current parent node we're under - * @param Tokenizer $tokenizer the tokenizer we're using - * - * @return ElementNode the new parent we should use for the next iteration. - */ - protected function parseStartState(ElementNode $parent, Tokenizer $tokenizer) - { - $next = $tokenizer->next(); - - if ('[' == $next) { - return $this->parseTagOpen($parent, $tokenizer); - } - else { - $this->createTextNode($parent, $next); - /* Drop back into the main parse loop which will call this - * same method again. */ - return $parent; - } - } - - /** - * This function handles parsing the beginnings of an open tag. When we see a [ - * at an appropriate time, this function is entered. - * - * @param ElementNode $parent the current parent node - * @param Tokenizer $tokenizer the tokenizer we're using - * - * @return ElementNode the new parent node - */ - protected function parseTagOpen(ElementNode $parent, Tokenizer $tokenizer) - { - - if (!$tokenizer->hasNext()) { - /* The [ that sent us to this state was just a trailing [, not the - * opening for a new tag. Treat it as such. */ - $this->createTextNode($parent, '['); - return $parent; - } - - $next = $tokenizer->next(); - - /* This while loop could be replaced by a recursive call to this same method, - * which would likely be a lot clearer but I decided to use a while loop to - * prevent stack overflow with a string like [[[[[[[[[...[[[. - */ - while ('[' == $next) { - /* The previous [ was just a random bracket that should be treated as text. - * Continue until we get a non open bracket. */ - $this->createTextNode($parent, '['); - if (!$tokenizer->hasNext()) { - $this->createTextNode($parent, '['); - return $parent; - } - $next = $tokenizer->next(); - } - - if (!$tokenizer->hasNext()) { - $this->createTextNode($parent, '['.$next); - return $parent; - } - - $after_next = $tokenizer->next(); - $tokenizer->stepBack(); - - if ($after_next != ']') - { - $this->createTextNode($parent, '['.$next); - return $parent; - } - - /* At this point $next is either ']' or plain text. */ - if (']' == $next) { - $this->createTextNode($parent, '['); - $this->createTextNode($parent, ']'); - return $parent; - } else { - /* $next is plain text... likely a tag name. */ - return $this->parseTag($parent, $tokenizer, $next); - } - } - - protected function parseOptions($tagContent) - { - $buffer = ""; - $tagName = ""; - $state = static::OPTION_STATE_TAGNAME; - $keys = array(); - $values = array(); - $options = array(); - - $len = strlen($tagContent); - $done = false; - $idx = 0; - - try{ - while(!$done){ - $char = $idx < $len ? $tagContent[$idx]:null; - switch($state){ - case static::OPTION_STATE_TAGNAME: - switch($char){ - case '=': - $state = static::OPTION_STATE_VALUE; - $tagName = $buffer; - $keys[] = $tagName; - $buffer = ""; - break; - case ' ': - $state = static::OPTION_STATE_DEFAULT; - $tagName = $buffer; - $buffer = ''; - $keys[] = $tagName; - break; - - case null: - $tagName = $buffer; - $buffer = ''; - $keys[] = $tagName; - break; - default: - $buffer .= $char; - } - break; - - case static::OPTION_STATE_DEFAULT: - switch($char){ - case ' ': - // do nothing - default: - $state = static::OPTION_STATE_KEY; - $buffer .= $char; - } - break; - - case static::OPTION_STATE_VALUE: - switch($char){ - case '"': - $state = static::OPTION_STATE_QUOTED_VALUE; - break; - case null: // intentional fall-through - case ' ': // key=value delimits to next key - $values[] = $buffer; - $buffer = ""; - $state = static::OPTION_STATE_KEY; - break; - case ":": - if($buffer=="javascript"){ - $state = static::OPTION_STATE_JAVASCRIPT; - } - $buffer .= $char; - break; - default: - $buffer .= $char; - - } - break; - - case static::OPTION_STATE_JAVASCRIPT: - switch($char){ - case ";": - $buffer .= $char; - $values[] = $buffer; - $buffer = ""; - $state = static::OPTION_STATE_KEY; - - break; - default: - $buffer .= $char; - } - break; - - case static::OPTION_STATE_KEY: - switch($char){ - case '=': - $state = static::OPTION_STATE_VALUE; - $keys[] = $buffer; - $buffer = ''; - break; - case ' ': // ignore key=value - break; - default: - $buffer .= $char; - break; - } - break; - - case static::OPTION_STATE_QUOTED_VALUE: - switch($char){ - case null: - case '"': - $state = static::OPTION_STATE_KEY; - $values[] = $buffer; - $buffer = ''; - - // peek ahead. If the next character is not a space or a closing brace, we have a bad tag and need to abort - if(isset($tagContent[$idx+1]) && $tagContent[$idx+1]!=" " && $tagContent[$idx+1]!="]" ){ - throw new ParserException("Badly formed attribute: $tagContent"); - } - break; - default: - $buffer .= $char; - break; - } - break; - default: - if(!empty($char)){ - $state = static::OPTION_STATE_KEY; - } - - } - if($idx >= $len){ - $done = true; - } - $idx++; - } - - if(count($keys) && count($values)){ - if(count($keys)==(count($values)+1)){ - array_unshift($values, ""); - } - - $options = array_combine($keys, $values); - } - } - catch(ParserException $e){ - // if we're in this state, then something evidently went wrong. We'll consider everything that came after the tagname to be the attribute for that keyname - $options[$tagName]= substr($tagContent, strpos($tagContent, "=")+1); - } - return array($tagName, $options); - } - - /** - * This is the next step in parsing a tag. It's possible for it to still be invalid at this - * point but many of the basic invalid tag name conditions have already been handled. - * - * @param ElementNode $parent the current parent element - * @param Tokenizer $tokenizer the tokenizer we're using - * @param string $tagContent the text between the [ and the ], assuming there is actually a ] - * - * @return ElementNode the new parent element - */ - protected function parseTag(ElementNode $parent, Tokenizer $tokenizer, $tagContent) - { - - $next; - if (!$tokenizer->hasNext() || ($next = $tokenizer->next()) != ']') { - /* This is a malformed tag. Both the previous [ and the tagContent - * is really just plain text. */ - $this->createTextNode($parent, '['); - $this->createTextNode($parent, $tagContent); - return $parent; - } - - /* This is a well-formed tag consisting of [something] or [/something], but - * we still need to ensure that 'something' is a valid tag name. Additionally, - * if it's a closing tag, we need to ensure that there was a previous matching - * opening tag. - */ - /* There could be attributes. */ - list($tmpTagName, $options) = $this->parseOptions($tagContent); - - // $tagPieces = explode('=', $tagContent); - // $tmpTagName = $tagPieces[0]; - - $actualTagName; - if ('' != $tmpTagName && '/' == $tmpTagName[0]) { - /* This is a closing tag name. */ - $actualTagName = substr($tmpTagName, 1); - } else { - $actualTagName = $tmpTagName; - } - - if ('' != $tmpTagName && '/' == $tmpTagName[0]) { - /* This is attempting to close an open tag. We must verify that there exists an - * open tag of the same type and that there is no option (options on closing - * tags don't make any sense). */ - $elToClose = $parent->closestParentOfType($actualTagName); - if (null == $elToClose || count($options) > 1) { - /* Closing an unopened tag or has an option. Treat everything as plain text. */ - $this->createTextNode($parent, '['); - $this->createTextNode($parent, $tagContent); - $this->createTextNode($parent, ']'); - return $parent; - } else { - /* We're closing $elToClose. In order to do that, we just need to return - * $elToClose's parent, since that will change our effective parent to be - * elToClose's parent. */ - return $elToClose->getParent(); - } - } - - /* Verify that this is a known bbcode tag name. */ - if ('' == $actualTagName || !$this->codeExists($actualTagName, !empty($options))) { - /* This is an invalid tag name! Treat everything we've seen as plain text. */ - $this->createTextNode($parent, '['); - $this->createTextNode($parent, $tagContent); - $this->createTextNode($parent, ']'); - return $parent; - } - - /* If we're here, this is a valid opening tag. Let's make a new node for it. */ - $el = new ElementNode(); - $el->setNodeId(++$this->nextNodeid); - $code = $this->getCode($actualTagName, !empty($options)); - $el->setCodeDefinition($code); - if (!empty($options)) { - /* We have an attribute we should save. */ - $el->setAttribute($options); - } - $parent->addChild($el); - return $el; - } - - /** - * Handles parsing elements whose CodeDefinitions disable parsing of element - * contents. This function uses a rolling window of 3 tokens until it finds the - * appropriate closing tag or reaches the end of the token stream. - * - * @param ElementNode $parent the current parent element - * @param Tokenizer $tokenizer the tokenizer we're using - * - * @return ElementNode the new parent element - */ - protected function parseAsTextUntilClose(ElementNode $parent, Tokenizer $tokenizer) - { - /* $parent's code definition doesn't allow its contents to be parsed. Here we use - * a sliding window of three tokens until we find [ /tagname ], signifying the - * end of the parent. */ - if (!$tokenizer->hasNext()) { - return $parent; - } - $prevPrev = $tokenizer->next(); - if (!$tokenizer->hasNext()) { - $this->createTextNode($parent, $prevPrev); - return $parent; - } - $prev = $tokenizer->next(); - if (!$tokenizer->hasNext()) { - $this->createTextNode($parent, $prevPrev); - $this->createTextNode($parent, $prev); - return $parent; - } - $curr = $tokenizer->next(); - while ('[' != $prevPrev || '/'.$parent->getTagName() != strtolower($prev) || - ']' != $curr) { - $this->createTextNode($parent, $prevPrev); - $prevPrev = $prev; - $prev = $curr; - if (!$tokenizer->hasNext()) { - $this->createTextNode($parent, $prevPrev); - $this->createTextNode($parent, $prev); - return $parent; - } - $curr = $tokenizer->next(); - } - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/ParserException.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/ParserException.php deleted file mode 100644 index 89501cf..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/ParserException.php +++ /dev/null @@ -1,7 +0,0 @@ -value = $val; - } - - public function accept(NodeVisitor $visitor) - { - $visitor->visitTextNode($this); - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::isTextNode() - * - * returns true - */ - public function isTextNode() - { - return true; - } - - /** - * Returns the text string value of this text node. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::getAsText() - * - * Returns the text representation of this node. - * - * @return this node represented as text - */ - public function getAsText() - { - return $this->getValue(); - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::getAsBBCode() - * - * Returns the bbcode representation of this node. (Just its value) - * - * @return this node represented as bbcode - */ - public function getAsBBCode() - { - return $this->getValue(); - } - - /** - * (non-PHPdoc) - * @see JBBCode.Node::getAsHTML() - * - * Returns the html representation of this node. (Just its value) - * - * @return this node represented as HTML - */ - public function getAsHTML() - { - return $this->getValue(); - } - - /** - * Edits the text value contained within this text node. - * - * @param newValue the new text value of the text node - */ - public function setValue($newValue) - { - $this->value = $newValue; - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/Tokenizer.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/Tokenizer.php deleted file mode 100644 index 6d47c44..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/Tokenizer.php +++ /dev/null @@ -1,105 +0,0 @@ -tokens, substr($str, $strStart, $index - $strStart)); - $strStart = $index; - } - - /* Add the [ or ] to the tokens array. */ - array_push($this->tokens, $str[$index]); - $strStart = $index+1; - } - } - - if ($strStart < strlen($str)) { - /* There are still characters in the buffer. Add them to the tokens. */ - array_push($this->tokens, substr($str, $strStart, strlen($str) - $strStart)); - } - } - - /** - * Returns true if there is another token in the token stream. - */ - public function hasNext() - { - return count($this->tokens) > 1 + $this->i; - } - - /** - * Advances the token stream to the next token and returns the new token. - */ - public function next() - { - if (!$this->hasNext()) { - return null; - } else { - return $this->tokens[++$this->i]; - } - } - - /** - * Retrieves the current token. - */ - public function current() - { - if ($this->i < 0) { - return null; - } else { - return $this->tokens[$this->i]; - } - } - - /** - * Moves the token stream back a token. - */ - public function stepBack() - { - if ($this->i > -1) { - $this->i--; - } - } - - /** - * Restarts the tokenizer, returning to the beginning of the token stream. - */ - public function restart() - { - $this->i = -1; - } - - /** - * toString method that returns the entire string from the current index on. - */ - public function toString() - { - return implode('', array_slice($this->tokens, $this->i + 1)); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/1-GettingStarted.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/1-GettingStarted.php deleted file mode 100644 index dd0c174..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/1-GettingStarted.php +++ /dev/null @@ -1,12 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - -$text = "The default codes include: [b]bold[/b], [i]italics[/i], [u]underlining[/u], "; -$text .= "[url=http://jbbcode.com]links[/url], [color=red]color![/color] and more."; - -$parser->parse($text); - -print $parser->getAsHtml(); diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/2-ClosingUnclosedTags.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/2-ClosingUnclosedTags.php deleted file mode 100644 index 35ee7fd..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/2-ClosingUnclosedTags.php +++ /dev/null @@ -1,10 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - -$text = "The bbcode in here [b]is never closed!"; -$parser->parse($text); - -print $parser->getAsBBCode(); diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/3-MarkuplessText.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/3-MarkuplessText.php deleted file mode 100644 index 47f20a3..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/3-MarkuplessText.php +++ /dev/null @@ -1,11 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - -$text = "[b][u]There is [i]a lot[/i] of [url=http://en.wikipedia.org/wiki/Markup_language]markup[/url] in this"; -$text .= "[color=#333333]text[/color]![/u][/b]"; -$parser->parse($text); - -print $parser->getAsText(); diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/4-CreatingNewCodes.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/4-CreatingNewCodes.php deleted file mode 100644 index e8335b0..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/4-CreatingNewCodes.php +++ /dev/null @@ -1,7 +0,0 @@ -addBBCode("quote", '
{param}
'); -$parser->addBBCode("code", '
{param}
', false, false, 1); diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/SmileyVisitorTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/SmileyVisitorTest.php deleted file mode 100644 index cfea90f..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/SmileyVisitorTest.php +++ /dev/null @@ -1,22 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - -if (count($argv) < 2) { - die("Usage: " . $argv[0] . " \"bbcode string\"\n"); -} - -$inputText = $argv[1]; - -$parser->parse($inputText); - -$smileyVisitor = new \JBBCode\visitors\SmileyVisitor(); -$parser->accept($smileyVisitor); - -echo $parser->getAsHTML() . "\n"; diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/TagCountingVisitorTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/TagCountingVisitorTest.php deleted file mode 100644 index 8ce5d99..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/examples/TagCountingVisitorTest.php +++ /dev/null @@ -1,23 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - -if (count($argv) < 3) { - die("Usage: " . $argv[0] . " \"bbcode string\" \n"); -} - -$inputText = $argv[1]; -$tagName = $argv[2]; - -$parser->parse($inputText); - -$tagCountingVisitor = new \JBBCode\visitors\TagCountingVisitor(); -$parser->accept($tagCountingVisitor); - -echo $tagCountingVisitor->getFrequency($tagName) . "\n"; diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/BBCodeToBBCodeTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/BBCodeToBBCodeTest.php deleted file mode 100644 index c832fcc..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/BBCodeToBBCodeTest.php +++ /dev/null @@ -1,85 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse($bbcode); - return $parser->getAsBBCode(); - } - - /** - * Asserts that the given bbcode matches the given text when - * the bbcode is run through defaultBBCodeParse - */ - private function assertBBCodeOutput($bbcode, $text) - { - $this->assertEquals($this->defaultBBCodeParse($bbcode), $text); - } - - public function testEmptyString() - { - $this->assertBBCodeOutput('', ''); - } - - public function testOneTag() - { - $this->assertBBCodeOutput('[b]this is bold[/b]', '[b]this is bold[/b]'); - } - - public function testOneTagWithSurroundingText() - { - $this->assertBBCodeOutput('buffer text [b]this is bold[/b] buffer text', - 'buffer text [b]this is bold[/b] buffer text'); - } - - public function testMultipleTags() - { - $bbcode = 'this is some text with [b]bold tags[/b] and [i]italics[/i] and ' . - 'things like [u]that[/u].'; - $bbcodeOutput = 'this is some text with [b]bold tags[/b] and [i]italics[/i] and ' . - 'things like [u]that[/u].'; - $this->assertBBCodeOutput($bbcode, $bbcodeOutput); - } - - public function testCodeOptions() - { - $code = 'This contains a [url=http://jbbcode.com]url[/url] which uses an option.'; - $codeOutput = 'This contains a [url=http://jbbcode.com]url[/url] which uses an option.'; - $this->assertBBCodeOutput($code, $codeOutput); - } - - /** - * @depends testCodeOptions - */ - public function testOmittedOption() - { - $code = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; - $codeOutput = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; - $this->assertBBCodeOutput($code, $codeOutput); - } - - public function testUnclosedTags() - { - $code = '[b]bold'; - $codeOutput = '[b]bold[/b]'; - $this->assertBBCodeOutput($code, $codeOutput); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/BBCodeToTextTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/BBCodeToTextTest.php deleted file mode 100644 index 193fc7c..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/BBCodeToTextTest.php +++ /dev/null @@ -1,78 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse($bbcode); - return $parser->getAsText(); - } - - /** - * Asserts that the given bbcode matches the given text when - * the bbcode is run through defaultTextParse - */ - private function assertTextOutput($bbcode, $text) - { - $this->assertEquals($text, $this->defaultTextParse($bbcode)); - } - - public function testEmptyString() - { - $this->assertTextOutput('', ''); - } - - public function testOneTag() - { - $this->assertTextOutput('[b]this is bold[/b]', 'this is bold'); - } - - public function testOneTagWithSurroundingText() - { - $this->assertTextOutput('buffer text [b]this is bold[/b] buffer text', - 'buffer text this is bold buffer text'); - } - - public function testMultipleTags() - { - $bbcode = 'this is some text with [b]bold tags[/b] and [i]italics[/i] and ' . - 'things like [u]that[/u].'; - $text = 'this is some text with bold tags and italics and things like that.'; - $this->assertTextOutput($bbcode, $text); - } - - public function testCodeOptions() - { - $code = 'This contains a [url=http://jbbcode.com]url[/url] which uses an option.'; - $text = 'This contains a url which uses an option.'; - $this->assertTextOutput($code, $text); - } - - /** - * @depends testCodeOptions - */ - public function testOmittedOption() - { - $code = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; - $text = 'This doesn\'t use the url option http://jbbcode.com.'; - $this->assertTextOutput($code, $text); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/DefaultCodesTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/DefaultCodesTest.php deleted file mode 100644 index e933992..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/DefaultCodesTest.php +++ /dev/null @@ -1,54 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse($bbcode); - $this->assertEquals($html, $parser->getAsHtml()); - } - - /** - * Tests the [b] bbcode. - */ - public function testBold() - { - $this->assertProduces('[b]this should be bold[/b]', 'this should be bold'); - } - - /** - * Tests the [color] bbcode. - */ - public function testColor() - { - $this->assertProduces('[color=red]red[/color]', 'red'); - } - - /** - * Tests the example from the documentation. - */ - public function testExample() - { - $text = "The default codes include: [b]bold[/b], [i]italics[/i], [u]underlining[/u], "; - $text .= "[url=http://jbbcode.com]links[/url], [color=red]color![/color] and more."; - $html = 'The default codes include: bold, italics, underlining, '; - $html .= 'links, color! and more.'; - $this->assertProduces($text, $html); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/HTMLSafeTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/HTMLSafeTest.php deleted file mode 100644 index bd9391b..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/HTMLSafeTest.php +++ /dev/null @@ -1,77 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse($bbcode); - - $htmlsafer = new JBBCode\visitors\HTMLSafeVisitor(); - $parser->accept($htmlsafer); - - $this->assertEquals($html, $parser->getAsHtml()); - } - - /** - * Tests escaping quotes and ampersands in simple text - */ - public function testQuoteAndAmp() - { - $this->assertProduces('te"xt te&xt', 'te"xt te&xt'); - } - - /** - * Tests escaping quotes and ampersands inside a BBCode tag - */ - public function testQuoteAndAmpInTag() - { - $this->assertProduces('[b]te"xt te&xt[/b]', 'te"xt te&xt'); - } - - /** - * Tests escaping HTML tags - */ - public function testHtmlTag() - { - $this->assertProduces('not bold', '<b>not bold</b>'); - $this->assertProduces('[b]bold[/b]
', '<b>bold</b> <hr>'); - } - - /** - * Tests escaping ampersands in URL using [url]...[/url] - */ - public function testUrlParam() - { - $this->assertProduces('text [url]http://example.com/?a=b&c=d[/url] more text', 'text http://example.com/?a=b&c=d more text'); - } - - /** - * Tests escaping ampersands in URL using [url=...] tag - */ - public function testUrlOption() - { - $this->assertProduces('text [url=http://example.com/?a=b&c=d]this is a "link"[/url]', 'text this is a "link"'); - } - - /** - * Tests escaping ampersands in URL using [url=...] tag when URL is in quotes - */ - public function testUrlOptionQuotes() - { - $this->assertProduces('text [url="http://example.com/?a=b&c=d"]this is a "link"[/url]', 'text this is a "link"'); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/NestLimitTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/NestLimitTest.php deleted file mode 100644 index d826fef..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/NestLimitTest.php +++ /dev/null @@ -1,46 +0,0 @@ -addBBCode('b', '{param}', false, true, -1); - $parser->parse('[b][b][b][b][b][b][b][b]bold text[/b][/b][/b][/b][/b][/b][/b][/b]'); - $this->assertEquals('' . - 'bold text' . - '', - $parser->getAsHtml()); - } - - /** - * Test over nesting. - */ - public function testOverNesting() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->addBBCode('quote', '
{param}
', false, true, 2); - $bbcode = '[quote][quote][quote]wut[/quote] huh?[/quote] i don\'t know[/quote]'; - $parser->parse($bbcode); - $expectedBbcode = '[quote][quote] huh?[/quote] i don\'t know[/quote]'; - $expectedHtml = '
huh?
i don\'t know
'; - $this->assertEquals($expectedBbcode, $parser->getAsBBCode()); - $this->assertEquals($expectedHtml, $parser->getAsHtml()); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ParseContentTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ParseContentTest.php deleted file mode 100644 index 1ea2c78..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ParseContentTest.php +++ /dev/null @@ -1,97 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->addBBCode('verbatim', '{param}', false, false); - - $parser->parse('[verbatim]plain text[/verbatim]'); - $this->assertEquals('plain text', $parser->getAsHtml()); - - $parser->parse('[verbatim][b]bold[/b][/verbatim]'); - $this->assertEquals('[b]bold[/b]', $parser->getAsHtml()); - - } - - public function testNoParsingWithBufferText() - { - - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->addBBCode('verbatim', '{param}', false, false); - - $parser->parse('buffer text[verbatim]buffer text[b]bold[/b]buffer text[/verbatim]buffer text'); - $this->assertEquals('buffer textbuffer text[b]bold[/b]buffer textbuffer text', $parser->getAsHtml()); - } - - /** - * Tests that when a tag is not closed within an unparseable tag, - * the BBCode output does not automatically close that tag (because - * the contents were not parsed). - */ - public function testUnclosedTag() - { - - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->addBBCode('verbatim', '{param}', false, false); - - $parser->parse('[verbatim]i wonder [b]what will happen[/verbatim]'); - $this->assertEquals('i wonder [b]what will happen', $parser->getAsHtml()); - $this->assertEquals('[verbatim]i wonder [b]what will happen[/verbatim]', $parser->getAsBBCode()); - } - - /** - * Tests that an unclosed tag with parseContent = false ends cleanly. - */ - public function testUnclosedVerbatimTag() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->addBBCode('verbatim', '{param}', false, false); - - $parser->parse('[verbatim]yo this [b]text should not be bold[/b]'); - $this->assertEquals('yo this [b]text should not be bold[/b]', $parser->getAsHtml()); - } - - /** - * Tests a malformed closing tag for a verbatim block. - */ - public function testMalformedVerbatimClosingTag() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->addBBCode('verbatim', '{param}', false, false); - $parser->parse('[verbatim]yo this [b]text should not be bold[/b][/verbatim'); - $this->assertEquals('yo this [b]text should not be bold[/b][/verbatim', $parser->getAsHtml()); - } - - /** - * Tests an immediate end after a verbatim. - */ - public function testVerbatimThenEof() - { - $parser = new JBBCode\Parser(); - $parser->addBBCode('verbatim', '{param}', false, false); - $parser->parse('[verbatim]'); - $this->assertEquals('', $parser->getAsHtml()); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ParsingEdgeCaseTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ParsingEdgeCaseTest.php deleted file mode 100644 index a08f713..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ParsingEdgeCaseTest.php +++ /dev/null @@ -1,130 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse($bbcode); - return $parser->getAsHtml(); - } - - /** - * Asserts that the given bbcode matches the given html when - * the bbcode is run through defaultParse. - */ - private function assertProduces($bbcode, $html) - { - $this->assertEquals($html, $this->defaultParse($bbcode)); - } - - /** - * Tests attempting to use a code that doesn't exist. - */ - public function testNonexistentCodeMalformed() - { - $this->assertProduces('[wat]', '[wat]'); - } - - /** - * Tests attempting to use a code that doesn't exist, but this - * time in a well-formed fashion. - * - * @depends testNonexistentCodeMalformed - */ - public function testNonexistentCodeWellformed() - { - $this->assertProduces('[wat]something[/wat]', '[wat]something[/wat]'); - } - - /** - * Tests a whole bunch of meaningless left brackets. - */ - public function testAllLeftBrackets() - { - $this->assertProduces('[[[[[[[[', '[[[[[[[['); - } - - /** - * Tests a whole bunch of meaningless right brackets. - */ - public function testAllRightBrackets() - { - $this->assertProduces(']]]]]', ']]]]]'); - } - - /** - * Intermixes well-formed, meaningful tags with meaningless brackets. - */ - public function testRandomBracketsInWellformedCode() - { - $this->assertProduces('[b][[][[i]heh[/i][/b]', - '[[][heh'); - } - - /** - * Tests an unclosed tag within a closed tag. - */ - public function testUnclosedWithinClosed() - { - $this->assertProduces('[url=http://jbbcode.com][b]oh yeah[/url]', - 'oh yeah'); - } - - /** - * Tests half completed opening tag. - */ - public function testHalfOpenTag() - { - $this->assertProduces('[b', '[b'); - $this->assertProduces('wut [url=http://jbbcode.com', - 'wut [url=http://jbbcode.com'); - } - - /** - * Tests half completed closing tag. - */ - public function testHalfClosingTag() - { - $this->assertProduces('[b]this should be bold[/b', - 'this should be bold[/b'); - } - - /** - * Tests lots of left brackets before the actual tag. For example: - * [[[[[[[[b]bold![/b] - */ - public function testLeftBracketsThenTag() - { - $this->assertProduces('[[[[[b]bold![/b]', - '[[[[bold!'); - } - - /** - * Tests a whitespace after left bracket. - */ - public function testWhitespaceAfterLeftBracketWhithoutTag() - { - $this->assertProduces('[ ABC ] ', - '[ ABC ] '); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/SimpleEvaluationTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/SimpleEvaluationTest.php deleted file mode 100644 index 65fb236..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/SimpleEvaluationTest.php +++ /dev/null @@ -1,131 +0,0 @@ -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse($bbcode); - return $parser->getAsHtml(); - } - - /** - * Asserts that the given bbcode matches the given html when - * the bbcode is run through defaultParse. - */ - private function assertProduces($bbcode, $html) - { - $this->assertEquals($html, $this->defaultParse($bbcode)); - } - - - public function testEmptyString() - { - $this->assertProduces('', ''); - } - - public function testOneTag() - { - $this->assertProduces('[b]this is bold[/b]', 'this is bold'); - } - - public function testOneTagWithSurroundingText() - { - $this->assertProduces('buffer text [b]this is bold[/b] buffer text', - 'buffer text this is bold buffer text'); - } - - public function testMultipleTags() - { - $bbcode = <<bold tags and italics and -things like that. -EOD; - $this->assertProduces($bbcode, $html); - } - - public function testCodeOptions() - { - $code = 'This contains a [url=http://jbbcode.com/?b=2]url[/url] which uses an option.'; - $html = 'This contains a url which uses an option.'; - $this->assertProduces($code, $html); - } - - public function testAttributes() - { - $parser = new JBBCode\Parser(); - $builder = new JBBCode\CodeDefinitionBuilder('img', '{alt}'); - $parser->addCodeDefinition($builder->setUseOption(true)->setParseContent(false)->build()); - - $expected = 'Multiple alt text options.'; - - $code = 'Multiple [img height="50" alt="alt text"]http://jbbcode.com/img.png[/img] options.'; - $parser->parse($code); - $result = $parser->getAsHTML(); - $this->assertEquals($expected, $result); - - $code = 'Multiple [img height=50 alt="alt text"]http://jbbcode.com/img.png[/img] options.'; - $parser->parse($code); - $result = $parser->getAsHTML(); - $this->assertEquals($expected, $result); - } - - /** - * @depends testCodeOptions - */ - public function testOmittedOption() - { - $code = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; - $html = 'This doesn\'t use the url option http://jbbcode.com.'; - $this->assertProduces($code, $html); - } - - public function testUnclosedTag() - { - $code = 'hello [b]world'; - $html = 'hello world'; - $this->assertProduces($code, $html); - } - - public function testNestingTags() - { - $code = '[url=http://jbbcode.com][b]hello [u]world[/u][/b][/url]'; - $html = 'hello world'; - $this->assertProduces($code, $html); - } - - public function testBracketInTag() - { - $this->assertProduces('[b]:-[[/b]', ':-['); - } - - public function testBracketWithSpaceInTag() - { - $this->assertProduces('[b]:-[ [/b]', ':-[ '); - } - - public function testBracketWithTextInTag() - { - $this->assertProduces('[b]:-[ foobar[/b]', ':-[ foobar'); - } - - public function testMultibleBracketsWithTextInTag() - { - $this->assertProduces('[b]:-[ [fo[o[bar[/b]', ':-[ [fo[o[bar'); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/TokenizerTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/TokenizerTest.php deleted file mode 100644 index a5431d3..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/TokenizerTest.php +++ /dev/null @@ -1,74 +0,0 @@ -assertFalse($tokenizer->hasNext()); - } - - public function testPlainTextOnly() - { - $tokenizer = new JBBCode\Tokenizer('this is some plain text.'); - $this->assertEquals('this is some plain text.', $tokenizer->next()); - $this->assertEquals('this is some plain text.', $tokenizer->current()); - $this->assertFalse($tokenizer->hasNext()); - } - - public function testStartingBracket() - { - $tokenizer = new JBBCode\Tokenizer('[this has a starting bracket.'); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals('[', $tokenizer->current()); - $this->assertEquals('this has a starting bracket.', $tokenizer->next()); - $this->assertEquals('this has a starting bracket.', $tokenizer->current()); - $this->assertFalse($tokenizer->hasNext()); - $this->assertEquals(null, $tokenizer->next()); - } - - public function testOneTag() - { - $tokenizer = new JBBCode\Tokenizer('[b]'); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals('b', $tokenizer->next()); - $this->assertEquals(']', $tokenizer->next()); - $this->assertFalse($tokenizer->hasNext()); - } - - public function testMatchingTags() - { - $tokenizer = new JBBCode\Tokenizer('[url]http://jbbcode.com[/url]'); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals('url', $tokenizer->next()); - $this->assertEquals(']', $tokenizer->next()); - $this->assertEquals('http://jbbcode.com', $tokenizer->next()); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals('/url', $tokenizer->next()); - $this->assertEquals(']', $tokenizer->next()); - $this->assertFalse($tokenizer->hasNext()); - } - - public function testLotsOfBrackets() - { - $tokenizer = new JBBCode\Tokenizer('[[][]]['); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals(']', $tokenizer->next()); - $this->assertEquals('[', $tokenizer->next()); - $this->assertEquals(']', $tokenizer->next()); - $this->assertEquals(']', $tokenizer->next()); - $this->assertEquals('[', $tokenizer->next()); - $this->assertFalse($tokenizer->hasNext()); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ValidatorTest.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ValidatorTest.php deleted file mode 100644 index e7dacb0..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/tests/ValidatorTest.php +++ /dev/null @@ -1,151 +0,0 @@ -assertFalse($urlValidator->validate('#yolo#swag')); - $this->assertFalse($urlValidator->validate('giehtiehwtaw352353%3')); - } - - /** - * Tests a valid url directly on the UrlValidator. - */ - public function testValidUrl() - { - $urlValidator = new \JBBCode\validators\UrlValidator(); - $this->assertTrue($urlValidator->validate('http://google.com')); - $this->assertTrue($urlValidator->validate('http://jbbcode.com/docs')); - $this->assertTrue($urlValidator->validate('https://www.maps.google.com')); - } - - /** - * Tests an invalid url as an option to a url bbcode. - * - * @depends testInvalidUrl - */ - public function testInvalidOptionUrlBBCode() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse('[url=javascript:alert("HACKED!");]click me[/url]'); - $this->assertEquals('[url=javascript:alert("HACKED!");]click me[/url]', - $parser->getAsHtml()); - } - - /** - * Tests an invalid url as the body to a url bbcode. - * - * @depends testInvalidUrl - */ - public function testInvalidBodyUrlBBCode() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse('[url]javascript:alert("HACKED!");[/url]'); - $this->assertEquals('[url]javascript:alert("HACKED!");[/url]', $parser->getAsHtml()); - } - - /** - * Tests a valid url as the body to a url bbcode. - * - * @depends testValidUrl - */ - public function testValidUrlBBCode() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse('[url]http://jbbcode.com[/url]'); - $this->assertEquals('http://jbbcode.com', - $parser->getAsHtml()); - } - - /** - * Tests valid english CSS color descriptions on the CssColorValidator. - */ - public function testCssColorEnglish() - { - $colorValidator = new JBBCode\validators\CssColorValidator(); - $this->assertTrue($colorValidator->validate('red')); - $this->assertTrue($colorValidator->validate('yellow')); - $this->assertTrue($colorValidator->validate('LightGoldenRodYellow')); - } - - /** - * Tests valid hexadecimal CSS color values on the CssColorValidator. - */ - public function testCssColorHex() - { - $colorValidator = new JBBCode\validators\CssColorValidator(); - $this->assertTrue($colorValidator->validate('#000')); - $this->assertTrue($colorValidator->validate('#ff0000')); - $this->assertTrue($colorValidator->validate('#aaaaaa')); - } - - /** - * Tests valid rgba CSS color values on the CssColorValidator. - */ - public function testCssColorRgba() - { - $colorValidator = new JBBCode\validators\CssColorValidator(); - $this->assertTrue($colorValidator->validate('rgba(255, 0, 0, 0.5)')); - $this->assertTrue($colorValidator->validate('rgba(50, 50, 50, 0.0)')); - } - - /** - * Tests invalid CSS color values on the CssColorValidator. - */ - public function testInvalidCssColor() - { - $colorValidator = new JBBCode\validators\CssColorValidator(); - $this->assertFalse($colorValidator->validate('" onclick="javascript: alert(\"gotcha!\");')); - $this->assertFalse($colorValidator->validate('">colorful text', - $parser->getAsHtml()); - $parser->parse('[color=#00ff00]green[/color]'); - $this->assertEquals('green', $parser->getAsHtml()); - } - - /** - * Tests invalid css colors in a color bbcode. - * - * @depends testInvalidCssColor - */ - public function testInvalidColorBBCode() - { - $parser = new JBBCode\Parser(); - $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - $parser->parse('[color=" onclick="alert(\'hey ya!\');]click me[/color]'); - $this->assertEquals('[color=" onclick="alert(\'hey ya!\');]click me[/color]', - $parser->getAsHtml()); - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/validators/CssColorValidator.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/validators/CssColorValidator.php deleted file mode 100644 index ce51fa4..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/validators/CssColorValidator.php +++ /dev/null @@ -1,30 +0,0 @@ -getChildren() as $child) { - $child->accept($this); - } - } - - public function visitTextNode(\JBBCode\TextNode $textNode) - { - $textNode->setValue($this->htmlSafe($textNode->getValue())); - } - - public function visitElementNode(\JBBCode\ElementNode $elementNode) - { - $attrs = $elementNode->getAttribute(); - if (is_array($attrs)) - { - foreach ($attrs as &$el) - $el = $this->htmlSafe($el); - - $elementNode->setAttribute($attrs); - } - - foreach ($elementNode->getChildren() as $child) { - $child->accept($this); - } - } - - protected function htmlSafe($str, $options = null) - { - if (is_null($options)) - { - if (defined('ENT_DISALLOWED')) - $options = ENT_QUOTES | ENT_DISALLOWED | ENT_HTML401; // PHP 5.4+ - else - $options = ENT_QUOTES; // PHP 5.3 - } - - return htmlspecialchars($str, $options, 'UTF-8'); - } -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/NestLimitVisitor.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/NestLimitVisitor.php deleted file mode 100644 index f550dd0..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/NestLimitVisitor.php +++ /dev/null @@ -1,65 +0,0 @@ -getChildren() as $child) { - $child->accept($this); - } - } - - public function visitTextNode(\JBBCode\TextNode $textNode) - { - /* Nothing to do. Text nodes don't have tag names or children. */ - } - - public function visitElementNode(\JBBCode\ElementNode $elementNode) - { - $tagName = strtolower($elementNode->getTagName()); - - /* Update the current depth for this tag name. */ - if (isset($this->depth[$tagName])) { - $this->depth[$tagName]++; - } else { - $this->depth[$tagName] = 1; - } - - /* Check if $elementNode is nested too deeply. */ - if ($elementNode->getCodeDefinition()->getNestLimit() != -1 && - $elementNode->getCodeDefinition()->getNestLimit() < $this->depth[$tagName]) { - /* This element is nested too deeply. We need to remove it and not visit any - * of its children. */ - $elementNode->getParent()->removeChild($elementNode); - } else { - /* This element is not nested too deeply. Visit all of its children. */ - foreach ($elementNode->getChildren() as $child) { - $child->accept($this); - } - } - - /* Now that we're done visiting this node, decrement the depth. */ - $this->depth[$tagName]--; - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/SmileyVisitor.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/SmileyVisitor.php deleted file mode 100644 index 16fb22a..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/SmileyVisitor.php +++ /dev/null @@ -1,42 +0,0 @@ -getChildren() as $child) { - $child->accept($this); - } - } - - function visitTextNode(\JBBCode\TextNode $textNode) - { - /* Convert :) into an image tag. */ - $textNode->setValue(str_replace(':)', - ':)', - $textNode->getValue())); - } - - function visitElementNode(\JBBCode\ElementNode $elementNode) - { - /* We only want to visit text nodes within elements if the element's - * code definition allows for its content to be parsed. - */ - if ($elementNode->getCodeDefinition()->parseContent()) { - foreach ($elementNode->getChildren() as $child) { - $child->accept($this); - } - } - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/TagCountingVisitor.php b/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/TagCountingVisitor.php deleted file mode 100644 index 3e52b43..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/JBBCode/visitors/TagCountingVisitor.php +++ /dev/null @@ -1,60 +0,0 @@ -getChildren() as $child) { - $child->accept($this); - } - } - - public function visitTextNode(\JBBCode\TextNode $textNode) - { - // Nothing to do here, text nodes do not have tag names or children - } - - public function visitElementNode(\JBBCode\ElementNode $elementNode) - { - $tagName = strtolower($elementNode->getTagName()); - - // Update this tag name's frequency - if (isset($this->frequencies[$tagName])) { - $this->frequencies[$tagName]++; - } else { - $this->frequencies[$tagName] = 1; - } - - // Visit all the node's childrens - foreach ($elementNode->getChildren() as $child) { - $child->accept($this); - } - - } - - /** - * Retrieves the frequency of the given tag name. - * - * @param $tagName the tag name to look up - */ - public function getFrequency($tagName) - { - if (!isset($this->frequencies[$tagName])) { - return 0; - } else { - return $this->frequencies[$tagName]; - } - } - -} diff --git a/_sakura/vendor/jbbcode/jbbcode/README.md b/_sakura/vendor/jbbcode/jbbcode/README.md deleted file mode 100644 index 718bcf1..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/README.md +++ /dev/null @@ -1,78 +0,0 @@ -jBBCode -======= - -jBBCode is a bbcode parser written in php 5.3. It's relatively lightweight and parses -bbcodes without resorting to expensive regular expressions. - -Documentation -------------- - -For complete documentation and examples visit [jbbcode.com](http://jbbcode.com). - -###A basic example - -jBBCode includes a few optional, default bbcode definitions that may be loaded through the -`DefaultCodeDefinitionSet` class. Below is a simple example of using these codes to convert -a bbcode string to html. - -```php -addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); - -$text = "The default codes include: [b]bold[/b], [i]italics[/i], [u]underlining[/u], "; -$text .= "[url=http://jbbcode.com]links[/url], [color=red]color![/color] and more."; - -$parser->parse($text); - -print $parser->getAsHtml(); -``` - -Contribute ----------- - -I would love help maintaining jBBCode. Look at [open issues](http://github.com/jbowens/jBBCode/issues) for ideas on -what needs to be done. Before submitting a pull request, verify that all unit tests still pass. - -#### Running unit tests -To run the unit tests, -ensure that [phpunit](http://github.com/sebastianbergmann/phpunit) is installed, or install it through the composer -dev dependencies. Then run `phpunit ./tests` from the project directory. If you're adding new functionality, writing -additional unit tests is a great idea. - -Author ------- - -jBBCode was written by Jackson Owens. You may reach him at [jackson_owens@brown.edu](mailto:jackson_owens@brown.edu). - -Other languages ---------------- - -This library is in the process of being ported to java. For more information, see [jBBCode-java](https://github.com/jbowens/jBBCode-java). - -License -------- - - The MIT License - - Copyright (c) 2011 Jackson Owens - - 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. diff --git a/_sakura/vendor/jbbcode/jbbcode/composer.json b/_sakura/vendor/jbbcode/jbbcode/composer.json deleted file mode 100644 index e64dab5..0000000 --- a/_sakura/vendor/jbbcode/jbbcode/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "jbbcode/jbbcode", - "type": "library", - "description": "A lightweight but extensible BBCode parser written in PHP 5.3.", - "keywords": ["BBCode", "BB"], - "homepage": "http://jbbcode.com/", - "license": "MIT", - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "config": { - "bin-dir": "/usr/local/bin" - }, - "authors": [ - { - "name": "Jackson Owens", - "email": "jackson_owens@brown.edu", - "homepage": "http://jbowens.org/", - "role": "Developer" - } - ], - "autoload": { - "psr-0": { - "JBBCode": "." - } - }, - "minimum-stability": "stable" -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/.coveralls.yml b/_sakura/vendor/paypal/rest-api-sdk-php/.coveralls.yml deleted file mode 100644 index 90f55b5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/.coveralls.yml +++ /dev/null @@ -1,6 +0,0 @@ -# .coveralls.yml configuration - -# for php-coveralls -src_dir: lib -coverage_clover: build/coverage/clover.xml -json_path: build/coverage/coveralls-upload.json \ No newline at end of file diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/.editorconfig b/_sakura/vendor/paypal/rest-api-sdk-php/.editorconfig deleted file mode 100644 index 4b3c2b7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/.editorconfig +++ /dev/null @@ -1,11 +0,0 @@ -# EditorConfig: Manage project indentation rules. http://EditorConfig.org - -root = true - -[*] -end_of_line = lf -insert_final_newline = true - -[*.php] -indent_style = space -indent_size = 4 \ No newline at end of file diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/.gitignore b/_sakura/vendor/paypal/rest-api-sdk-php/.gitignore deleted file mode 100644 index 108b372..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ - -build -.DS_Store -phpunit.local.xml -*.log - -# IDE -.idea -.project -.settings -.buildpath -atlassian-ide-plugin.xml -*.bak - -# Composer -vendor -composer.lock - -# Project -var -tools diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/.travis.yml b/_sakura/vendor/paypal/rest-api-sdk-php/.travis.yml deleted file mode 100644 index fb6a6ae..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -sudo: false -language: php -php: -- 5.3 -- 5.4 -- 5.5 -- 5.6 -- hhvm -matrix: - allow_failures: - - php: hhvm - fast_finish: true -before_script: -- composer self-update -- composer install --dev -- composer require satooshi/php-coveralls:* --dev -script: -- mkdir build -- mkdir build/coverage -- phpunit -after_success: -- php vendor/bin/coveralls -v -c .coveralls.yml -- if [ $TRAVIS_PHP_VERSION = '5.6' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then sh generate-api.sh; fi -notifications: - email: - recipients: - - DL-PP-PHP-SDK@paypal.com - on_success: change -env: - global: - secure: UazgSLMJmrhmO+Do9TDiu8EKop06Xc2Ghi9F/8rx/CLz2FDZ5UDdzDD8uetjfdOnmMV7oadq13FGxJb9YCqTiJPZFpKsGtEr/IcCdpkO2krluLuWw5Veh8YxRG4rcZ+UWS0JpfQ72L9Zp4dMqPRo8SzcfiZV3HMG1uKYKpTSKnM= diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/LICENSE.txt b/_sakura/vendor/paypal/rest-api-sdk-php/LICENSE.txt deleted file mode 100644 index ad030e5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/LICENSE.txt +++ /dev/null @@ -1,41 +0,0 @@ -PAYPAL, INC. - -SDK LICENSE - -NOTICE TO USER: PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement. Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement. - -As used in this Agreement, "PayPal" means PayPal, Inc. "Software" means the software code accompanying this agreement. "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software. - -1. LICENSE GRANT Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software. - -Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose. You may not modify the Documentation. - -No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement. You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement. - -If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution. You may distribute the Software in object code form under your own license, provided that your license agreement: - -(a) complies with the terms and conditions of this license agreement; - -(b) effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal; - -(c) effectively excludes all liability for damages on behalf of PayPal; - -(d) states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and - -(e) states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -2. DISCLAIMER OF WARRANTY -PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE. Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations. Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance. Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you. To the extent permissible, any implied warranties are limited to ninety (90) days. - - -3. LIMITATION OF LIABILITY -PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION. IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION. - -4. TRADEMARK USAGE -PayPal is a trademark PayPal, Inc. in the United States and other countries. Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal. - -5. TERM -Your rights under this Agreement shall terminate if you fail to comply with any of the material terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable. - -6. GOVERNING LAW AND JURISDICTION. This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA. - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/README.md b/_sakura/vendor/paypal/rest-api-sdk-php/README.md deleted file mode 100644 index 5fe66d8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# REST API SDK for PHP - -![Home Image](https://raw.githubusercontent.com/wiki/paypal/PayPal-PHP-SDK/images/homepage.jpg) - -[![Build Status](https://travis-ci.org/paypal/PayPal-PHP-SDK.png?branch=master)](https://travis-ci.org/paypal/PayPal-PHP-SDK) -[![Coverage Status](https://coveralls.io/repos/paypal/PayPal-PHP-SDK/badge.svg?branch=master)](https://coveralls.io/r/paypal/PayPal-PHP-SDK?branch=master) - -__Welcome to PayPal PHP SDK__. This repository contains PayPal's PHP SDK and samples for REST API. - -> **Before starting to use the sdk, please be aware of the [existing issues and currently unavailable or upcoming features](https://github.com/paypal/rest-api-sdk-python/wiki/Existing-Issues-and-Unavailable%5CUpcoming-features) for the REST APIs. (which the sdks are based on)** - -## Please Note -> **The [PCIv3.1 DSS (PDF)](https://www.pcisecuritystandards.org/documents/PCI_DSS_v3-1.pdf) mandates (p.46) that TLSv1.0 be retired from service by June 30, 2016. All organizations that handle credit card information are required to comply with this standard. As part of this obligation, PayPal is updating it's services to require TLSv1.2 for all HTTPS connections. [Click here](https://github.paypal.com/SDK-R/tls-update) for more information** - -> **If you have the SDK v1.6.2 or higher installed, you can easily test this by running the [TLSCheck sample](sample/tls/TlsCheck.php).** - -## SDK Documentation - -[ Our PayPal-PHP-SDK Page ](http://paypal.github.io/PayPal-PHP-SDK/) includes all the documentation related to PHP SDK. Everything from SDK Wiki, to Sample Codes, to Releases. Here are few quick links to get you there faster. - -* [ PayPal-PHP-SDK Home Page ](http://paypal.github.io/PayPal-PHP-SDK/) -* [ Wiki ](https://github.com/paypal/PayPal-PHP-SDK/wiki) -* [ Samples ](http://paypal.github.io/PayPal-PHP-SDK/sample/) -* [ Installation ](https://github.com/paypal/PayPal-PHP-SDK/wiki/Installation) -* [ Make your First SDK Call](https://github.com/paypal/PayPal-PHP-SDK/wiki/Making-First-Call) -* [ PayPal Developer Docs] (https://developer.paypal.com/docs/) - -## Latest Updates - -- Checkout the latest 1.0.0 release. Here are all the [ breaking Changes in v1.0.0 ](https://github.com/paypal/PayPal-PHP-SDK/wiki/Breaking-Changes---1.0.0) if you are migrating from older versions. -- Now we have a [Github Page](http://paypal.github.io/PayPal-PHP-SDK/), that helps you find all helpful resources building applications using PayPal-PHP-SDK. - - -## Prerequisites - - - PHP 5.3 or above - - [curl](http://php.net/manual/en/book.curl.php), [json](http://php.net/manual/en/book.json.php) & [openssl](http://php.net/manual/en/book.openssl.php) extensions must be enabled - - -## More help - * [Going Live](https://github.com/paypal/PayPal-PHP-SDK/wiki/Going-Live) - * [PayPal-PHP-SDK Home Page](http://paypal.github.io/PayPal-PHP-SDK/) - * [SDK Documentation](https://github.com/paypal/PayPal-PHP-SDK/wiki) - * [Sample Source Code](http://paypal.github.io/PayPal-PHP-SDK/sample/) - * [API Reference](https://developer.paypal.com/webapps/developer/docs/api/) - * [Reporting Issues / Feature Requests] (https://github.com/paypal/PayPal-PHP-SDK/issues) - * [Pizza App Using Paypal REST API] (https://github.com/paypal/rest-api-sample-app-php) diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/composer.json b/_sakura/vendor/paypal/rest-api-sdk-php/composer.json deleted file mode 100644 index 1c2ab95..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "paypal/rest-api-sdk-php", - "description": "PayPal's PHP SDK for REST APIs", - "keywords": ["paypal", "payments", "rest", "sdk"], - "type": "library", - "license": "Apache2", - "homepage": "http://paypal.github.io/PayPal-PHP-SDK/", - "authors": [ - { - "name": "PayPal", - "homepage": "https://github.com/paypal/rest-api-sdk-php/contributors" - } - ], - "require": { - "php": ">=5.3.0", - "ext-curl": "*", - "ext-json": "*" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "autoload": { - "psr-0": { - "PayPal": "lib/" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/docs/cover.css b/_sakura/vendor/paypal/rest-api-sdk-php/docs/cover.css deleted file mode 100644 index be4b20f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/docs/cover.css +++ /dev/null @@ -1,122 +0,0 @@ -/* Sticky footer styles --------------------------------------------------- */ -html { - position: relative; - min-height: 100%; -} - -body { - /* Margin bottom by footer height */ - margin-bottom: 60px; -} - -.footer { - position: absolute; - bottom: 0; - width: 100%; - /* Set the fixed height of the footer here */ - height: 60px; - background-color: #f5f5f5; -} - -/* Footer ---------------------------------------------------- */ -.footer-links, .footer-links li { - display: inline-block; - font-size: 110%; - padding-left: 0; - padding-right: 0; -} - -.footer-links li { - padding-top: 5px; - padding-left: 5px; -} - -.footer-links a { - color: #428bca; -} - -/* Custom CSS ---------------------------------------------------- */ -.body-content { - margin: 0; - padding: 0; -} - -body { - font-family: Menlo,Monaco,Consolas,"Courier New",monospace; - background: #fff url("https://www.paypalobjects.com/webstatic/developer/banners/Braintree_desktop_BG_2X.jpg") repeat-y top right; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; -} - -.content { - margin-top: 30px; -} - -.content .lead { - color: #666; -} - -.content .col-md-4 .well { - min-height: 175px; - background-color: #FDFDFD; - border: 1px solid; -} - -.content .col-md-4 .sprite { - width: 60px; - height: 70px; -} -.content .col-md-4 .sprite { - float: left; - margin: 0 5px 0 0; -} - -.content .col-md-4 .box { - float: left; - width: 75%; -} -.content .col-md-4 .box h3 { - color: #428bca; - font-size: 24px; - margin: 5px; -} - -.content a:hover .col-md-4 .box h3{ - color: #23527c; -} - -.content a:hover .col-md-4 .well{ - background-color: #f5f5f5; -} - -.content .col-md-4 .box hr { - margin: 0; -} - - -.content a:hover { - text-decoration: none -} - -.content a:hover .mobile { - background-position: -90px -124px -} - -.content a:hover .api { - background-position: -90px -234px -} - -.content a:hover .sandbox { - background-position: -90px -344px -} - -.content .col-md-4 .box p { - margin: 5px; - color: #666; - display: block; -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/docs/index.html b/_sakura/vendor/paypal/rest-api-sdk-php/docs/index.html deleted file mode 100644 index 8fe74cb..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/docs/index.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - PayPal PHP SDK - Welcome - - - - - - - - - - - - - - - - - - - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/generate-api.sh b/_sakura/vendor/paypal/rest-api-sdk-php/generate-api.sh deleted file mode 100644 index be8c358..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/generate-api.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Get ApiGen.phar -wget http://www.apigen.org/apigen.phar - -# Generate SDK Docs -php apigen.phar generate --template-theme="bootstrap" -s lib -d ../gh-pages/docs - -# Copy Home Page from Master Branch to Gh-Pages folder -cp -r docs/* ../gh-pages/ - -# Copy samples -cp -r sample ../gh-pages/sample -# As PHP is not allowed in Github -cp sample/index.php ../gh-pages/sample/index.html - -cd ../gh-pages - -# Set identity -git config --global user.email "travis@travis-ci.org" -git config --global user.name "Travis" - -# Add branch -git init -git remote add origin https://${GH_TOKEN}@github.com/paypal/PayPal-PHP-SDK.git > /dev/null -git checkout -B gh-pages - -# Push generated files -git add . -git commit -m "Docs updated by Travis" -git push origin gh-pages -fq > /dev/null diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Address.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Address.php deleted file mode 100644 index 39a0c86..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Address.php +++ /dev/null @@ -1,39 +0,0 @@ -phone = $phone; - return $this; - } - - /** - * Phone number in E.123 format. - * - * @return string - */ - public function getPhone() - { - return $this->phone; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Agreement.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Agreement.php deleted file mode 100644 index 810dde2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Agreement.php +++ /dev/null @@ -1,647 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the agreement. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * State of the agreement. - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the agreement. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Name of the agreement. - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the agreement. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Description of the agreement. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of the agreement. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Start date of the agreement. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $start_date - * - * @return $this - */ - public function setStartDate($start_date) - { - $this->start_date = $start_date; - return $this; - } - - /** - * Start date of the agreement. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getStartDate() - { - return $this->start_date; - } - - /** - * Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL. - * - * @param \PayPal\Api\Payer $payer - * - * @return $this - */ - public function setPayer($payer) - { - $this->payer = $payer; - return $this; - } - - /** - * Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL. - * - * @return \PayPal\Api\Payer - */ - public function getPayer() - { - return $this->payer; - } - - /** - * Shipping address object of the agreement, which should be provided if it is different from the default address. - * - * @param \PayPal\Api\Address $shipping_address - * - * @return $this - */ - public function setShippingAddress($shipping_address) - { - $this->shipping_address = $shipping_address; - return $this; - } - - /** - * Shipping address object of the agreement, which should be provided if it is different from the default address. - * - * @return \PayPal\Api\Address - */ - public function getShippingAddress() - { - return $this->shipping_address; - } - - /** - * Default merchant preferences from the billing plan are used, unless override preferences are provided here. - * - * @param \PayPal\Api\MerchantPreferences $override_merchant_preferences - * - * @return $this - */ - public function setOverrideMerchantPreferences($override_merchant_preferences) - { - $this->override_merchant_preferences = $override_merchant_preferences; - return $this; - } - - /** - * Default merchant preferences from the billing plan are used, unless override preferences are provided here. - * - * @return \PayPal\Api\MerchantPreferences - */ - public function getOverrideMerchantPreferences() - { - return $this->override_merchant_preferences; - } - - /** - * Array of override_charge_model for this agreement if needed to change the default models from the billing plan. - * - * @param \PayPal\Api\OverrideChargeModel[] $override_charge_models - * - * @return $this - */ - public function setOverrideChargeModels($override_charge_models) - { - $this->override_charge_models = $override_charge_models; - return $this; - } - - /** - * Array of override_charge_model for this agreement if needed to change the default models from the billing plan. - * - * @return \PayPal\Api\OverrideChargeModel[] - */ - public function getOverrideChargeModels() - { - return $this->override_charge_models; - } - - /** - * Append OverrideChargeModels to the list. - * - * @param \PayPal\Api\OverrideChargeModel $overrideChargeModel - * @return $this - */ - public function addOverrideChargeModel($overrideChargeModel) - { - if (!$this->getOverrideChargeModels()) { - return $this->setOverrideChargeModels(array($overrideChargeModel)); - } else { - return $this->setOverrideChargeModels( - array_merge($this->getOverrideChargeModels(), array($overrideChargeModel)) - ); - } - } - - /** - * Remove OverrideChargeModels from the list. - * - * @param \PayPal\Api\OverrideChargeModel $overrideChargeModel - * @return $this - */ - public function removeOverrideChargeModel($overrideChargeModel) - { - return $this->setOverrideChargeModels( - array_diff($this->getOverrideChargeModels(), array($overrideChargeModel)) - ); - } - - /** - * Plan details for this agreement. - * - * @param \PayPal\Api\Plan $plan - * - * @return $this - */ - public function setPlan($plan) - { - $this->plan = $plan; - return $this; - } - - /** - * Plan details for this agreement. - * - * @return \PayPal\Api\Plan - */ - public function getPlan() - { - return $this->plan; - } - - /** - * Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Agreement Details - * - * @param \PayPal\Api\AgreementDetails $agreement_details - * - * @return $this - */ - public function setAgreementDetails($agreement_details) - { - $this->agreement_details = $agreement_details; - return $this; - } - - /** - * Agreement Details - * - * @return \PayPal\Api\AgreementDetails - */ - public function getAgreementDetails() - { - return $this->agreement_details; - } - - /** - * Get Approval Link - * - * @return null|string - */ - public function getApprovalLink() - { - return $this->getLink(PayPalConstants::APPROVAL_URL); - } - - /** - * Create a new billing agreement by passing the details for the agreement, including the name, description, start date, payer, and billing plan in the request JSON. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Agreement - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/payments/billing-agreements/", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Execute a billing agreement after buyer approval by passing the payment token to the request URI. - * - * @param $paymentToken - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Agreement - */ - public function execute($paymentToken, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($paymentToken, 'paymentToken'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/billing-agreements/$paymentToken/agreement-execute", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI. - * - * @param string $agreementId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Agreement - */ - public static function get($agreementId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($agreementId, 'agreementId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/billing-agreements/$agreementId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Agreement(); - $ret->fromJson($json); - return $ret; - } - - /** - * Update details of a billing agreement, such as the description, shipping address, and start date, by passing the ID of the agreement to the request URI. - * - * @param PatchRequest $patchRequest - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function update($patchRequest, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($patchRequest, 'patchRequest'); - $payLoad = $patchRequest->toJSON(); - self::executeCall( - "/v1/payments/billing-agreements/{$this->getId()}", - "PATCH", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Suspend a particular billing agreement by passing the ID of the agreement to the request URI. - * - * @param AgreementStateDescriptor $agreementStateDescriptor - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function suspend($agreementStateDescriptor, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); - $payLoad = $agreementStateDescriptor->toJSON(); - self::executeCall( - "/v1/payments/billing-agreements/{$this->getId()}/suspend", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Reactivate a suspended billing agreement by passing the ID of the agreement to the appropriate URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement. - * - * @param AgreementStateDescriptor $agreementStateDescriptor - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function reActivate($agreementStateDescriptor, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); - $payLoad = $agreementStateDescriptor->toJSON(); - self::executeCall( - "/v1/payments/billing-agreements/{$this->getId()}/re-activate", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Cancel a billing agreement by passing the ID of the agreement to the request URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement. - * - * @param AgreementStateDescriptor $agreementStateDescriptor - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function cancel($agreementStateDescriptor, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); - $payLoad = $agreementStateDescriptor->toJSON(); - self::executeCall( - "/v1/payments/billing-agreements/{$this->getId()}/cancel", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Bill an outstanding amount for an agreement by passing the ID of the agreement to the request URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement. - * - * @param AgreementStateDescriptor $agreementStateDescriptor - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function billBalance($agreementStateDescriptor, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); - $payLoad = $agreementStateDescriptor->toJSON(); - self::executeCall( - "/v1/payments/billing-agreements/{$this->getId()}/bill-balance", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Set the balance for an agreement by passing the ID of the agreement to the request URI. In addition, pass a common_currency object in the request JSON that specifies the currency type and value of the balance. - * - * @param Currency $currency - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function setBalance($currency, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($currency, 'currency'); - $payLoad = $currency->toJSON(); - self::executeCall( - "/v1/payments/billing-agreements/{$this->getId()}/set-balance", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI. - * - * @deprecated Please use searchTransactions Instead - * @param string $agreementId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return AgreementTransactions - */ - public static function transactions($agreementId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($agreementId, 'agreementId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/billing-agreements/$agreementId/transactions", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new AgreementTransactions(); - $ret->fromJson($json); - return $ret; - } - - /** - * List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI. - * - * @param string $agreementId - * @param array $params Parameters for search string. Options: start_date, and end_date - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return AgreementTransactions - */ - public static function searchTransactions($agreementId, $params = array(), $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($agreementId, 'agreementId'); - ArgumentValidator::validate($params, 'params'); - - $allowedParams = array( - 'start_date' => 1, - 'end_date' => 1, - ); - - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/billing-agreements/$agreementId/transactions?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new AgreementTransactions(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementDetails.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementDetails.php deleted file mode 100644 index 94e90cd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementDetails.php +++ /dev/null @@ -1,209 +0,0 @@ -outstanding_balance = $outstanding_balance; - return $this; - } - - /** - * The outstanding balance for this agreement. - * - * @return \PayPal\Api\Currency - */ - public function getOutstandingBalance() - { - return $this->outstanding_balance; - } - - /** - * Number of cycles remaining for this agreement. - * - * @param string $cycles_remaining - * - * @return $this - */ - public function setCyclesRemaining($cycles_remaining) - { - $this->cycles_remaining = $cycles_remaining; - return $this; - } - - /** - * Number of cycles remaining for this agreement. - * - * @return string - */ - public function getCyclesRemaining() - { - return $this->cycles_remaining; - } - - /** - * Number of cycles completed for this agreement. - * - * @param string $cycles_completed - * - * @return $this - */ - public function setCyclesCompleted($cycles_completed) - { - $this->cycles_completed = $cycles_completed; - return $this; - } - - /** - * Number of cycles completed for this agreement. - * - * @return string - */ - public function getCyclesCompleted() - { - return $this->cycles_completed; - } - - /** - * The next billing date for this agreement, represented as 2014-02-19T10:00:00Z format. - * - * @param string $next_billing_date - * - * @return $this - */ - public function setNextBillingDate($next_billing_date) - { - $this->next_billing_date = $next_billing_date; - return $this; - } - - /** - * The next billing date for this agreement, represented as 2014-02-19T10:00:00Z format. - * - * @return string - */ - public function getNextBillingDate() - { - return $this->next_billing_date; - } - - /** - * Last payment date for this agreement, represented as 2014-06-09T09:42:31Z format. - * - * @param string $last_payment_date - * - * @return $this - */ - public function setLastPaymentDate($last_payment_date) - { - $this->last_payment_date = $last_payment_date; - return $this; - } - - /** - * Last payment date for this agreement, represented as 2014-06-09T09:42:31Z format. - * - * @return string - */ - public function getLastPaymentDate() - { - return $this->last_payment_date; - } - - /** - * Last payment amount for this agreement. - * - * @param \PayPal\Api\Currency $last_payment_amount - * - * @return $this - */ - public function setLastPaymentAmount($last_payment_amount) - { - $this->last_payment_amount = $last_payment_amount; - return $this; - } - - /** - * Last payment amount for this agreement. - * - * @return \PayPal\Api\Currency - */ - public function getLastPaymentAmount() - { - return $this->last_payment_amount; - } - - /** - * Last payment date for this agreement, represented as 2015-02-19T10:00:00Z format. - * - * @param string $final_payment_date - * - * @return $this - */ - public function setFinalPaymentDate($final_payment_date) - { - $this->final_payment_date = $final_payment_date; - return $this; - } - - /** - * Last payment date for this agreement, represented as 2015-02-19T10:00:00Z format. - * - * @return string - */ - public function getFinalPaymentDate() - { - return $this->final_payment_date; - } - - /** - * Total number of failed payments for this agreement. - * - * @param string $failed_payment_count - * - * @return $this - */ - public function setFailedPaymentCount($failed_payment_count) - { - $this->failed_payment_count = $failed_payment_count; - return $this; - } - - /** - * Total number of failed payments for this agreement. - * - * @return string - */ - public function getFailedPaymentCount() - { - return $this->failed_payment_count; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementStateDescriptor.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementStateDescriptor.php deleted file mode 100644 index 619da31..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementStateDescriptor.php +++ /dev/null @@ -1,65 +0,0 @@ -note = $note; - return $this; - } - - /** - * Reason for changing the state of the agreement. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * The amount and currency of the agreement. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * The amount and currency of the agreement. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementTransaction.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementTransaction.php deleted file mode 100644 index 12cad0e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementTransaction.php +++ /dev/null @@ -1,257 +0,0 @@ -transaction_id = $transaction_id; - return $this; - } - - /** - * Id corresponding to this transaction. - * - * @return string - */ - public function getTransactionId() - { - return $this->transaction_id; - } - - /** - * State of the subscription at this time. - * - * @param string $status - * - * @return $this - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * State of the subscription at this time. - * - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Type of transaction, usually Recurring Payment. - * - * @param string $transaction_type - * - * @return $this - */ - public function setTransactionType($transaction_type) - { - $this->transaction_type = $transaction_type; - return $this; - } - - /** - * Type of transaction, usually Recurring Payment. - * - * @return string - */ - public function getTransactionType() - { - return $this->transaction_type; - } - - /** - * Amount for this transaction. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount for this transaction. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Fee amount for this transaction. - * - * @param \PayPal\Api\Currency $fee_amount - * - * @return $this - */ - public function setFeeAmount($fee_amount) - { - $this->fee_amount = $fee_amount; - return $this; - } - - /** - * Fee amount for this transaction. - * - * @return \PayPal\Api\Currency - */ - public function getFeeAmount() - { - return $this->fee_amount; - } - - /** - * Net amount for this transaction. - * - * @param \PayPal\Api\Currency $net_amount - * - * @return $this - */ - public function setNetAmount($net_amount) - { - $this->net_amount = $net_amount; - return $this; - } - - /** - * Net amount for this transaction. - * - * @return \PayPal\Api\Currency - */ - public function getNetAmount() - { - return $this->net_amount; - } - - /** - * Email id of payer. - * - * @param string $payer_email - * - * @return $this - */ - public function setPayerEmail($payer_email) - { - $this->payer_email = $payer_email; - return $this; - } - - /** - * Email id of payer. - * - * @return string - */ - public function getPayerEmail() - { - return $this->payer_email; - } - - /** - * Business name of payer. - * - * @param string $payer_name - * - * @return $this - */ - public function setPayerName($payer_name) - { - $this->payer_name = $payer_name; - return $this; - } - - /** - * Business name of payer. - * - * @return string - */ - public function getPayerName() - { - return $this->payer_name; - } - - /** - * Time at which this transaction happened. - * - * @param string $time_stamp - * - * @return $this - */ - public function setTimeStamp($time_stamp) - { - $this->time_stamp = $time_stamp; - return $this; - } - - /** - * Time at which this transaction happened. - * - * @return string - */ - public function getTimeStamp() - { - return $this->time_stamp; - } - - /** - * Time zone of time_updated field. - * - * @param string $time_zone - * - * @return $this - */ - public function setTimeZone($time_zone) - { - $this->time_zone = $time_zone; - return $this; - } - - /** - * Time zone of time_updated field. - * - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementTransactions.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementTransactions.php deleted file mode 100644 index 30d4527..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AgreementTransactions.php +++ /dev/null @@ -1,71 +0,0 @@ -agreement_transaction_list = $agreement_transaction_list; - return $this; - } - - /** - * Array of agreement_transaction object. - * - * @return \PayPal\Api\AgreementTransaction[] - */ - public function getAgreementTransactionList() - { - return $this->agreement_transaction_list; - } - - /** - * Append AgreementTransactionList to the list. - * - * @param \PayPal\Api\AgreementTransaction $agreementTransaction - * @return $this - */ - public function addAgreementTransactionList($agreementTransaction) - { - if (!$this->getAgreementTransactionList()) { - return $this->setAgreementTransactionList(array($agreementTransaction)); - } else { - return $this->setAgreementTransactionList( - array_merge($this->getAgreementTransactionList(), array($agreementTransaction)) - ); - } - } - - /** - * Remove AgreementTransactionList from the list. - * - * @param \PayPal\Api\AgreementTransaction $agreementTransaction - * @return $this - */ - public function removeAgreementTransactionList($agreementTransaction) - { - return $this->setAgreementTransactionList( - array_diff($this->getAgreementTransactionList(), array($agreementTransaction)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AlternatePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AlternatePayment.php deleted file mode 100644 index 0af3226..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/AlternatePayment.php +++ /dev/null @@ -1,89 +0,0 @@ -alternate_payment_account_id = $alternate_payment_account_id; - return $this; - } - - /** - * The unique identifier of the alternate payment account. - * - * @return string - */ - public function getAlternatePaymentAccountId() - { - return $this->alternate_payment_account_id; - } - - /** - * The unique identifier of the payer - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * The unique identifier of the payer - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * Alternate Payment provider id. This is an optional attribute needed only for certain alternate providers e.g Ideal - * - * @param string $alternate_payment_provider_id - * - * @return $this - */ - public function setAlternatePaymentProviderId($alternate_payment_provider_id) - { - $this->alternate_payment_provider_id = $alternate_payment_provider_id; - return $this; - } - - /** - * Alternate Payment provider id. This is an optional attribute needed only for certain alternate providers e.g Ideal - * - * @return string - */ - public function getAlternatePaymentProviderId() - { - return $this->alternate_payment_provider_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Amount.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Amount.php deleted file mode 100644 index 7221730..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Amount.php +++ /dev/null @@ -1,93 +0,0 @@ -currency = $currency; - return $this; - } - - /** - * 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/). PayPal does not support all currencies. - * - * @return string - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * Total amount charged from the payer to the payee. In case of a refund, this is the refunded amount to the original payer from the payee. 10 characters max with support for 2 decimal places. - * - * @param string|double $total - * - * @return $this - */ - public function setTotal($total) - { - NumericValidator::validate($total, "Total"); - $total = FormatConverter::formatToPrice($total, $this->getCurrency()); - $this->total = $total; - return $this; - } - - /** - * Total amount charged from the payer to the payee. In case of a refund, this is the refunded amount to the original payer from the payee. 10 characters max with support for 2 decimal places. - * - * @return string - */ - public function getTotal() - { - return $this->total; - } - - /** - * Additional details of the payment amount. - * - * @param \PayPal\Api\Details $details - * - * @return $this - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - - /** - * Additional details of the payment amount. - * - * @return \PayPal\Api\Details - */ - public function getDetails() - { - return $this->details; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Authorization.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Authorization.php deleted file mode 100644 index 142d060..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Authorization.php +++ /dev/null @@ -1,459 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the authorization transaction. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Amount being authorized. - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount being authorized. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Specifies the payment mode of the transaction. - * Valid Values: ["INSTANT_TRANSFER"] - * - * @param string $payment_mode - * - * @return $this - */ - public function setPaymentMode($payment_mode) - { - $this->payment_mode = $payment_mode; - return $this; - } - - /** - * Specifies the payment mode of the transaction. - * - * @return string - */ - public function getPaymentMode() - { - return $this->payment_mode; - } - - /** - * State of the authorization. - * Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the authorization. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Reason code, `AUTHORIZATION`, for a transaction state of `pending`. - * Valid Values: ["AUTHORIZATION"] - * - * @param string $reason_code - * - * @return $this - */ - public function setReasonCode($reason_code) - { - $this->reason_code = $reason_code; - return $this; - } - - /** - * Reason code, `AUTHORIZATION`, for a transaction state of `pending`. - * - * @return string - */ - public function getReasonCode() - { - return $this->reason_code; - } - - /** - * [DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead. - * Valid Values: ["AUTHORIZATION"] - * - * @param string $pending_reason - * - * @return $this - */ - public function setPendingReason($pending_reason) - { - $this->pending_reason = $pending_reason; - return $this; - } - - /** - * @deprecated [DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead. - * - * @return string - */ - public function getPendingReason() - { - return $this->pending_reason; - } - - /** - * The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`. Allowed values:
`ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.
`PARTIALLY_ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to `protection_eligibility_type` for specifics.
`INELIGIBLE`- Merchant is not protected under the Seller Protection Policy. - * Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"] - * - * @param string $protection_eligibility - * - * @return $this - */ - public function setProtectionEligibility($protection_eligibility) - { - $this->protection_eligibility = $protection_eligibility; - return $this; - } - - /** - * The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`. Allowed values:
`ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.
`PARTIALLY_ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to `protection_eligibility_type` for specifics.
`INELIGIBLE`- Merchant is not protected under the Seller Protection Policy. - * - * @return string - */ - public function getProtectionEligibility() - { - return $this->protection_eligibility; - } - - /** - * The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:
`ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.
`UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned. - * Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"] - * - * @param string $protection_eligibility_type - * - * @return $this - */ - public function setProtectionEligibilityType($protection_eligibility_type) - { - $this->protection_eligibility_type = $protection_eligibility_type; - return $this; - } - - /** - * The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:
`ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.
`UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned. - * - * @return string - */ - public function getProtectionEligibilityType() - { - return $this->protection_eligibility_type; - } - - /** - * Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](https://developer.paypal.com/docs/classic/fmf/integration-guide/FMFSummary/) for more information. - * - * @param \PayPal\Api\FmfDetails $fmf_details - * - * @return $this - */ - public function setFmfDetails($fmf_details) - { - $this->fmf_details = $fmf_details; - return $this; - } - - /** - * Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](https://developer.paypal.com/docs/classic/fmf/integration-guide/FMFSummary/) for more information. - * - * @return \PayPal\Api\FmfDetails - */ - public function getFmfDetails() - { - return $this->fmf_details; - } - - /** - * ID of the Payment resource that this transaction is based on. - * - * @param string $parent_payment - * - * @return $this - */ - public function setParentPayment($parent_payment) - { - $this->parent_payment = $parent_payment; - return $this; - } - - /** - * ID of the Payment resource that this transaction is based on. - * - * @return string - */ - public function getParentPayment() - { - return $this->parent_payment; - } - - /** - * Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`. - * - * @param \PayPal\Api\ProcessorResponse $processor_response - * - * @return $this - */ - public function setProcessorResponse($processor_response) - { - $this->processor_response = $processor_response; - return $this; - } - - /** - * Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`. - * - * @return \PayPal\Api\ProcessorResponse - */ - public function getProcessorResponse() - { - return $this->processor_response; - } - - /** - * Authorization expiration time and date as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $valid_until - * - * @return $this - */ - public function setValidUntil($valid_until) - { - $this->valid_until = $valid_until; - return $this; - } - - /** - * Authorization expiration time and date as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getValidUntil() - { - return $this->valid_until; - } - - /** - * Time of authorization as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time of authorization as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time that the resource was last updated. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time that the resource was last updated. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Retrieve details about a previously created authorization by passing the authorization_id in the request URI. - * - * @param string $authorizationId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Authorization - */ - public static function get($authorizationId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($authorizationId, 'authorizationId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/authorization/$authorizationId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Authorization(); - $ret->fromJson($json); - return $ret; - } - - /** - * Capture and process a previously created authorization by passing the authorization_id in the request URI. To use this request, the original payment call must have the intent set to authorize. - * - * @param Capture $capture - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Capture - */ - public function capture($capture, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($capture, 'capture'); - $payLoad = $capture->toJSON(); - $json = self::executeCall( - "/v1/payments/authorization/{$this->getId()}/capture", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Capture(); - $ret->fromJson($json); - return $ret; - } - - /** - * Void (cancel) a previously authorized payment by passing the authorization_id in the request URI. Note that a fully captured authorization cannot be voided. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Authorization - */ - public function void($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/authorization/{$this->getId()}/void", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Reauthorize a PayPal account payment by passing the authorization_id in the request URI. You should reauthorize a payment after the initial 3-day honor period to ensure that funds are still available. Request supports only amount field - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Authorization - */ - public function reauthorize($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/payments/authorization/{$this->getId()}/reauthorize", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankAccount.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankAccount.php deleted file mode 100644 index 4a45f8d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankAccount.php +++ /dev/null @@ -1,630 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the bank account being saved for later use. - * - * @deprecated Not publicly available - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Account number in either IBAN (max length 34) or BBAN (max length 17) format. - * - * @param string $account_number - * - * @return $this - */ - public function setAccountNumber($account_number) - { - $this->account_number = $account_number; - return $this; - } - - /** - * Account number in either IBAN (max length 34) or BBAN (max length 17) format. - * - * @return string - */ - public function getAccountNumber() - { - return $this->account_number; - } - - /** - * Type of the bank account number (International or Basic Bank Account Number). For more information refer to http://en.wikipedia.org/wiki/International_Bank_Account_Number. - * Valid Values: ["BBAN", "IBAN"] - * - * @param string $account_number_type - * - * @return $this - */ - public function setAccountNumberType($account_number_type) - { - $this->account_number_type = $account_number_type; - return $this; - } - - /** - * Type of the bank account number (International or Basic Bank Account Number). For more information refer to http://en.wikipedia.org/wiki/International_Bank_Account_Number. - * - * @return string - */ - public function getAccountNumberType() - { - return $this->account_number_type; - } - - /** - * Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code. - * - * @param string $routing_number - * - * @return $this - */ - public function setRoutingNumber($routing_number) - { - $this->routing_number = $routing_number; - return $this; - } - - /** - * Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code. - * - * @return string - */ - public function getRoutingNumber() - { - return $this->routing_number; - } - - /** - * Type of the bank account. - * Valid Values: ["CHECKING", "SAVINGS"] - * - * @param string $account_type - * - * @return $this - */ - public function setAccountType($account_type) - { - $this->account_type = $account_type; - return $this; - } - - /** - * Type of the bank account. - * - * @return string - */ - public function getAccountType() - { - return $this->account_type; - } - - /** - * A customer designated name. - * - * @param string $account_name - * - * @return $this - */ - public function setAccountName($account_name) - { - $this->account_name = $account_name; - return $this; - } - - /** - * A customer designated name. - * - * @return string - */ - public function getAccountName() - { - return $this->account_name; - } - - /** - * Type of the check when this information was obtained through a check by the facilitator or merchant. - * Valid Values: ["PERSONAL", "COMPANY"] - * - * @param string $check_type - * - * @return $this - */ - public function setCheckType($check_type) - { - $this->check_type = $check_type; - return $this; - } - - /** - * Type of the check when this information was obtained through a check by the facilitator or merchant. - * - * @return string - */ - public function getCheckType() - { - return $this->check_type; - } - - /** - * How the check was obtained from the customer, if check was the source of the information provided. - * Valid Values: ["CCD", "PPD", "TEL", "POP", "ARC", "RCK", "WEB"] - * - * @param string $auth_type - * - * @return $this - */ - public function setAuthType($auth_type) - { - $this->auth_type = $auth_type; - return $this; - } - - /** - * How the check was obtained from the customer, if check was the source of the information provided. - * - * @return string - */ - public function getAuthType() - { - return $this->auth_type; - } - - /** - * Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements. - * - * @param string $auth_capture_timestamp - * - * @return $this - */ - public function setAuthCaptureTimestamp($auth_capture_timestamp) - { - $this->auth_capture_timestamp = $auth_capture_timestamp; - return $this; - } - - /** - * Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements. - * - * @return string - */ - public function getAuthCaptureTimestamp() - { - return $this->auth_capture_timestamp; - } - - /** - * Name of the bank. - * - * @param string $bank_name - * - * @return $this - */ - public function setBankName($bank_name) - { - $this->bank_name = $bank_name; - return $this; - } - - /** - * Name of the bank. - * - * @return string - */ - public function getBankName() - { - return $this->bank_name; - } - - /** - * 2 letter country code of the Bank. - * - * @param string $country_code - * - * @return $this - */ - public function setCountryCode($country_code) - { - $this->country_code = $country_code; - return $this; - } - - /** - * 2 letter country code of the Bank. - * - * @return string - */ - public function getCountryCode() - { - return $this->country_code; - } - - /** - * Account holder's first name. - * - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * Account holder's first name. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Account holder's last name. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Account holder's last name. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Birth date of the bank account holder. - * - * @param string $birth_date - * - * @return $this - */ - public function setBirthDate($birth_date) - { - $this->birth_date = $birth_date; - return $this; - } - - /** - * Birth date of the bank account holder. - * - * @return string - */ - public function getBirthDate() - { - return $this->birth_date; - } - - /** - * Billing address. - * - * @param \PayPal\Api\Address $billing_address - * - * @return $this - */ - public function setBillingAddress($billing_address) - { - $this->billing_address = $billing_address; - return $this; - } - - /** - * Billing address. - * - * @return \PayPal\Api\Address - */ - public function getBillingAddress() - { - return $this->billing_address; - } - - /** - * State of this funding instrument. - * Valid Values: ["ACTIVE", "INACTIVE", "DELETED"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of this funding instrument. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Confirmation status of a bank account. - * Valid Values: ["UNCONFIRMED", "CONFIRMED"] - * - * @param string $confirmation_status - * - * @return $this - */ - public function setConfirmationStatus($confirmation_status) - { - $this->confirmation_status = $confirmation_status; - return $this; - } - - /** - * Confirmation status of a bank account. - * - * @return string - */ - public function getConfirmationStatus() - { - return $this->confirmation_status; - } - - /** - * [DEPRECATED] Use external_customer_id instead. - * - * @param string $payer_id - * - * @return $this - */ - public function setPayerId($payer_id) - { - $this->payer_id = $payer_id; - return $this; - } - - /** - * @deprecated [DEPRECATED] Use external_customer_id instead. - * - * @return string - */ - public function getPayerId() - { - return $this->payer_id; - } - - /** - * A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault. - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault. - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt. - * - * @param string $merchant_id - * - * @return $this - */ - public function setMerchantId($merchant_id) - { - $this->merchant_id = $merchant_id; - return $this; - } - - /** - * A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt. - * - * @return string - */ - public function getMerchantId() - { - return $this->merchant_id; - } - - /** - * Time the resource was created. - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time the resource was created. - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time the resource was last updated. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time the resource was last updated. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Date/Time until this resource can be used to fund a payment. - * - * @param string $valid_until - * - * @return $this - */ - public function setValidUntil($valid_until) - { - $this->valid_until = $valid_until; - return $this; - } - - /** - * Date/Time until this resource can be used to fund a payment. - * - * @return string - */ - public function getValidUntil() - { - return $this->valid_until; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankAccountsList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankAccountsList.php deleted file mode 100644 index 9120941..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankAccountsList.php +++ /dev/null @@ -1,119 +0,0 @@ -{"bank-accounts"} = $bank_accounts; - return $this; - } - - /** - * A list of bank account resources - * - * @return \PayPal\Api\BankAccount[] - */ - public function getBankAccounts() - { - return $this->{"bank-accounts"}; - } - - /** - * Append BankAccounts to the list. - * - * @param \PayPal\Api\BankAccount $bankAccount - * @return $this - */ - public function addBankAccount($bankAccount) - { - if (!$this->getBankAccounts()) { - return $this->setBankAccounts(array($bankAccount)); - } else { - return $this->setBankAccounts( - array_merge($this->getBankAccounts(), array($bankAccount)) - ); - } - } - - /** - * Remove BankAccounts from the list. - * - * @param \PayPal\Api\BankAccount $bankAccount - * @return $this - */ - public function removeBankAccount($bankAccount) - { - return $this->setBankAccounts( - array_diff($this->getBankAccounts(), array($bankAccount)) - ); - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @param int $count - * - * @return $this - */ - public function setCount($count) - { - $this->count = $count; - return $this; - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Identifier of the next element to get the next range of results. - * - * @param string $next_id - * - * @return $this - */ - public function setNextId($next_id) - { - $this->next_id = $next_id; - return $this; - } - - /** - * Identifier of the next element to get the next range of results. - * - * @return string - */ - public function getNextId() - { - return $this->next_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankToken.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankToken.php deleted file mode 100644 index 6cbee49..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BankToken.php +++ /dev/null @@ -1,89 +0,0 @@ -bank_id = $bank_id; - return $this; - } - - /** - * ID of a previously saved Bank resource using /vault/bank API. - * - * @return string - */ - public function getBankId() - { - return $this->bank_id; - } - - /** - * The unique identifier of the payer used when saving this bank using /vault/bank API. - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * The unique identifier of the payer used when saving this bank using /vault/bank API. - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA). - * - * @param string $mandate_reference_number - * - * @return $this - */ - public function setMandateReferenceNumber($mandate_reference_number) - { - $this->mandate_reference_number = $mandate_reference_number; - return $this; - } - - /** - * Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA). - * - * @return string - */ - public function getMandateReferenceNumber() - { - return $this->mandate_reference_number; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BaseAddress.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BaseAddress.php deleted file mode 100644 index 41900f6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BaseAddress.php +++ /dev/null @@ -1,211 +0,0 @@ -line1 = $line1; - return $this; - } - - /** - * Line 1 of the Address (eg. number, street, etc). - * - * @return string - */ - public function getLine1() - { - return $this->line1; - } - - /** - * Optional line 2 of the Address (eg. suite, apt #, etc.). - * - * @param string $line2 - * - * @return $this - */ - public function setLine2($line2) - { - $this->line2 = $line2; - return $this; - } - - /** - * Optional line 2 of the Address (eg. suite, apt #, etc.). - * - * @return string - */ - public function getLine2() - { - return $this->line2; - } - - /** - * City name. - * - * @param string $city - * - * @return $this - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * City name. - * - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * 2 letter country code. - * - * @param string $country_code - * - * @return $this - */ - public function setCountryCode($country_code) - { - $this->country_code = $country_code; - return $this; - } - - /** - * 2 letter country code. - * - * @return string - */ - public function getCountryCode() - { - return $this->country_code; - } - - /** - * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code. - * - * @param string $postal_code - * - * @return $this - */ - public function setPostalCode($postal_code) - { - $this->postal_code = $postal_code; - return $this; - } - - /** - * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code. - * - * @return string - */ - public function getPostalCode() - { - return $this->postal_code; - } - - /** - * 2 letter code for US states, and the equivalent for other countries. - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * 2 letter code for US states, and the equivalent for other countries. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Address normalization status - * Valid Values: ["UNKNOWN", "UNNORMALIZED_USER_PREFERRED", "NORMALIZED", "UNNORMALIZED"] - * - * @param string $normalization_status - * - * @return $this - */ - public function setNormalizationStatus($normalization_status) - { - $this->normalization_status = $normalization_status; - return $this; - } - - /** - * Address normalization status - * - * @return string - */ - public function getNormalizationStatus() - { - return $this->normalization_status; - } - - /** - * Address status - * Valid Values: ["CONFIRMED", "UNCONFIRMED"] - * - * @param string $status - * - * @return $this - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * Address status - * - * @return string - */ - public function getStatus() - { - return $this->status; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Billing.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Billing.php deleted file mode 100644 index 7b1bad6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Billing.php +++ /dev/null @@ -1,41 +0,0 @@ -billing_agreement_id = $billing_agreement_id; - return $this; - } - - /** - * Identifier of the instrument in PayPal Wallet - * - * @return string - */ - public function getBillingAgreementId() - { - return $this->billing_agreement_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BillingAgreementToken.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BillingAgreementToken.php deleted file mode 100644 index ca5ef6b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/BillingAgreementToken.php +++ /dev/null @@ -1,17 +0,0 @@ -email = $email; - return $this; - } - - /** - * Email address of the invoice recipient. 260 characters max. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * First name of the invoice recipient. 30 characters max. - * - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * First name of the invoice recipient. 30 characters max. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Last name of the invoice recipient. 30 characters max. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Last name of the invoice recipient. 30 characters max. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Company business name of the invoice recipient. 100 characters max. - * - * @param string $business_name - * - * @return $this - */ - public function setBusinessName($business_name) - { - $this->business_name = $business_name; - return $this; - } - - /** - * Company business name of the invoice recipient. 100 characters max. - * - * @return string - */ - public function getBusinessName() - { - return $this->business_name; - } - - /** - * Address of the invoice recipient. - * - * @param \PayPal\Api\InvoiceAddress $address - * - * @return $this - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * Address of the invoice recipient. - * - * @return \PayPal\Api\InvoiceAddress - */ - public function getAddress() - { - return $this->address; - } - - /** - * Language of the email sent to the payer. Will only be used if payer doesn't have a PayPal account. - * Valid Values: ["da_DK", "de_DE", "en_AU", "en_GB", "en_US", "es_ES", "es_XC", "fr_CA", "fr_FR", "fr_XC", "he_IL", "id_ID", "it_IT", "ja_JP", "nl_NL", "no_NO", "pl_PL", "pt_BR", "pt_PT", "ru_RU", "sv_SE", "th_TH", "tr_TR", "zh_CN", "zh_HK", "zh_TW", "zh_XC"] - * - * @param string $language - * - * @return $this - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * Language of the email sent to the payer. Will only be used if payer doesn't have a PayPal account. - * - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * Option to display additional information such as business hours. 40 characters max. - * - * @param string $additional_info - * - * @return $this - */ - public function setAdditionalInfo($additional_info) - { - $this->additional_info = $additional_info; - return $this; - } - - /** - * Option to display additional information such as business hours. 40 characters max. - * - * @return string - */ - public function getAdditionalInfo() - { - return $this->additional_info; - } - - /** - * Preferred notification channel of the payer. Email by default. - * Valid Values: ["SMS", "EMAIL"] - * - * @param string $notification_channel - * - * @return $this - */ - public function setNotificationChannel($notification_channel) - { - $this->notification_channel = $notification_channel; - return $this; - } - - /** - * Preferred notification channel of the payer. Email by default. - * - * @return string - */ - public function getNotificationChannel() - { - return $this->notification_channel; - } - - /** - * Mobile Phone number of the recipient to which SMS will be sent if notification_channel is SMS. - * - * @param \PayPal\Api\Phone $phone - * - * @return $this - */ - public function setPhone($phone) - { - $this->phone = $phone; - return $this; - } - - /** - * Mobile Phone number of the recipient to which SMS will be sent if notification_channel is SMS. - * - * @return \PayPal\Api\Phone - */ - public function getPhone() - { - return $this->phone; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CancelNotification.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CancelNotification.php deleted file mode 100644 index 612b302..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CancelNotification.php +++ /dev/null @@ -1,113 +0,0 @@ -subject = $subject; - return $this; - } - - /** - * Subject of the notification. - * - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Note to the payer. - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Note to the payer. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * A flag indicating whether a copy of the email has to be sent to the merchant. - * - * @param bool $send_to_merchant - * - * @return $this - */ - public function setSendToMerchant($send_to_merchant) - { - $this->send_to_merchant = $send_to_merchant; - return $this; - } - - /** - * A flag indicating whether a copy of the email has to be sent to the merchant. - * - * @return bool - */ - public function getSendToMerchant() - { - return $this->send_to_merchant; - } - - /** - * A flag indicating whether a copy of the email has to be sent to the payer. - * - * @param bool $send_to_payer - * - * @return $this - */ - public function setSendToPayer($send_to_payer) - { - $this->send_to_payer = $send_to_payer; - return $this; - } - - /** - * A flag indicating whether a copy of the email has to be sent to the payer. - * - * @return bool - */ - public function getSendToPayer() - { - return $this->send_to_payer; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Capture.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Capture.php deleted file mode 100644 index b3580a7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Capture.php +++ /dev/null @@ -1,264 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the capture transaction. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Amount being captured. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`. - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount being captured. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - - /** - * If set to `true`, all remaining funds held by the authorization will be released in the funding instrument. - * - * @param bool $is_final_capture - * - * @return $this - */ - public function setIsFinalCapture($is_final_capture) - { - $this->is_final_capture = $is_final_capture; - return $this; - } - - /** - * If set to `true`, all remaining funds held by the authorization will be released in the funding instrument. - * - * @return bool - */ - public function getIsFinalCapture() - { - return $this->is_final_capture; - } - - /** - * State of the capture. - * Valid Values: ["pending", "completed", "refunded", "partially_refunded"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the capture. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * ID of the payment resource on which this transaction is based. - * - * @param string $parent_payment - * - * @return $this - */ - public function setParentPayment($parent_payment) - { - $this->parent_payment = $parent_payment; - return $this; - } - - /** - * ID of the payment resource on which this transaction is based. - * - * @return string - */ - public function getParentPayment() - { - return $this->parent_payment; - } - - /** - * Transaction fee applicable for this payment. - * - * @param \PayPal\Api\Currency $transaction_fee - * - * @return $this - */ - public function setTransactionFee($transaction_fee) - { - $this->transaction_fee = $transaction_fee; - return $this; - } - - /** - * Transaction fee applicable for this payment. - * - * @return \PayPal\Api\Currency - */ - public function getTransactionFee() - { - return $this->transaction_fee; - } - - /** - * Time of capture as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time of capture as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time that the resource was last updated. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time that the resource was last updated. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Retrieve details about a captured payment by passing the capture_id in the request URI. - * - * @param string $captureId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Capture - */ - public static function get($captureId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($captureId, 'captureId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/capture/$captureId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Capture(); - $ret->fromJson($json); - return $ret; - } - - /** - * Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON. - * - * @param Refund $refund - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Refund - */ - public function refund($refund, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($refund, 'refund'); - $payLoad = $refund->toJSON(); - $json = self::executeCall( - "/v1/payments/capture/{$this->getId()}/refund", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Refund(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccount.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccount.php deleted file mode 100644 index 2e7c8d7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccount.php +++ /dev/null @@ -1,138 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID that identifies the payer�s carrier account. Can be used in subsequent REST API calls, e.g. for making payments. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The payer�s phone number in E.164 format. - * - * @param string $phone_number - * - * @return $this - */ - public function setPhoneNumber($phone_number) - { - $this->phone_number = $phone_number; - return $this; - } - - /** - * The payer�s phone number in E.164 format. - * - * @return string - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - /** - * User identifier as created by the merchant. - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * User identifier as created by the merchant. - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * The method of obtaining the phone number (USER_PROVIDED or READ_FROM_DEVICE). - * Valid Values: ["READ_FROM_DEVICE", "USER_PROVIDED"] - * - * @param string $phone_source - * - * @return $this - */ - public function setPhoneSource($phone_source) - { - $this->phone_source = $phone_source; - return $this; - } - - /** - * The method of obtaining the phone number (USER_PROVIDED or READ_FROM_DEVICE). - * - * @return string - */ - public function getPhoneSource() - { - return $this->phone_source; - } - - /** - * The country where the phone number is registered. Specified in 2-character IS0-3166-1 format. - * - * @param \PayPal\Api\CountryCode $country_code - * - * @return $this - */ - public function setCountryCode($country_code) - { - $this->country_code = $country_code; - return $this; - } - - /** - * The country where the phone number is registered. Specified in 2-character IS0-3166-1 format. - * - * @return \PayPal\Api\CountryCode - */ - public function getCountryCode() - { - return $this->country_code; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccountToken.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccountToken.php deleted file mode 100644 index 1313f65..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccountToken.php +++ /dev/null @@ -1,65 +0,0 @@ -carrier_account_id = $carrier_account_id; - return $this; - } - - /** - * ID of a previously saved carrier account resource. - * - * @return string - */ - public function getCarrierAccountId() - { - return $this->carrier_account_id; - } - - /** - * The unique identifier of the payer used when saving this carrier account instrument. - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * The unique identifier of the payer used when saving this carrier account instrument. - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CartBase.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CartBase.php deleted file mode 100644 index 32aa8a5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CartBase.php +++ /dev/null @@ -1,391 +0,0 @@ -reference_id = $reference_id; - return $this; - } - - /** - * Merchant identifier to the purchase unit. Optional parameter - * - * @return string - */ - public function getReferenceId() - { - return $this->reference_id; - } - - /** - * Amount being collected. - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount being collected. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Recipient of the funds in this transaction. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Payee $payee - * - * @return $this - */ - public function setPayee($payee) - { - $this->payee = $payee; - return $this; - } - - /** - * Recipient of the funds in this transaction. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Payee - */ - public function getPayee() - { - return $this->payee; - } - - /** - * Description of transaction. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of transaction. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Note to the recipient of the funds in this transaction. - * - * @param string $note_to_payee - * - * @return $this - */ - public function setNoteToPayee($note_to_payee) - { - $this->note_to_payee = $note_to_payee; - return $this; - } - - /** - * Note to the recipient of the funds in this transaction. - * - * @return string - */ - public function getNoteToPayee() - { - return $this->note_to_payee; - } - - /** - * Free-form field for the use of clients. Only supported when the `payment_method` is set to `paypal`. - * - * @param string $custom - * - * @return $this - */ - public function setCustom($custom) - { - $this->custom = $custom; - return $this; - } - - /** - * Free-form field for the use of clients. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getCustom() - { - return $this->custom; - } - - /** - * Invoice number used to track the payment. Only supported when the `payment_method` is set to `paypal`. - * - * @param string $invoice_number - * - * @return $this - */ - public function setInvoiceNumber($invoice_number) - { - $this->invoice_number = $invoice_number; - return $this; - } - - /** - * Invoice number used to track the payment. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getInvoiceNumber() - { - return $this->invoice_number; - } - - /** - * Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated - * - * @param string $soft_descriptor - * - * @return $this - */ - public function setSoftDescriptor($soft_descriptor) - { - $this->soft_descriptor = $soft_descriptor; - return $this; - } - - /** - * Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated - * - * @return string - */ - public function getSoftDescriptor() - { - return $this->soft_descriptor; - } - - /** - * Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @param string $soft_descriptor_city - * - * @return $this - */ - public function setSoftDescriptorCity($soft_descriptor_city) - { - $this->soft_descriptor_city = $soft_descriptor_city; - return $this; - } - - /** - * Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @return string - */ - public function getSoftDescriptorCity() - { - return $this->soft_descriptor_city; - } - - /** - * Payment options requested for this purchase unit - * - * @param \PayPal\Api\PaymentOptions $payment_options - * - * @return $this - */ - public function setPaymentOptions($payment_options) - { - $this->payment_options = $payment_options; - return $this; - } - - /** - * Payment options requested for this purchase unit - * - * @return \PayPal\Api\PaymentOptions - */ - public function getPaymentOptions() - { - return $this->payment_options; - } - - /** - * Items and related shipping address within a transaction. - * - * @param \PayPal\Api\ItemList $item_list - * - * @return $this - */ - public function setItemList($item_list) - { - $this->item_list = $item_list; - return $this; - } - - /** - * Items and related shipping address within a transaction. - * - * @return \PayPal\Api\ItemList - */ - public function getItemList() - { - return $this->item_list; - } - - /** - * URL to send payment notifications - * - * @param string $notify_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setNotifyUrl($notify_url) - { - UrlValidator::validate($notify_url, "NotifyUrl"); - $this->notify_url = $notify_url; - return $this; - } - - /** - * URL to send payment notifications - * - * @return string - */ - public function getNotifyUrl() - { - return $this->notify_url; - } - - /** - * Url on merchant site pertaining to this payment. - * - * @param string $order_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setOrderUrl($order_url) - { - UrlValidator::validate($order_url, "OrderUrl"); - $this->order_url = $order_url; - return $this; - } - - /** - * Url on merchant site pertaining to this payment. - * - * @return string - */ - public function getOrderUrl() - { - return $this->order_url; - } - - /** - * List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id - * - * @deprecated Not publicly available - * @param \PayPal\Api\ExternalFunding[] $external_funding - * - * @return $this - */ - public function setExternalFunding($external_funding) - { - $this->external_funding = $external_funding; - return $this; - } - - /** - * List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id - * - * @deprecated Not publicly available - * @return \PayPal\Api\ExternalFunding[] - */ - public function getExternalFunding() - { - return $this->external_funding; - } - - /** - * Append ExternalFunding to the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\ExternalFunding $externalFunding - * @return $this - */ - public function addExternalFunding($externalFunding) - { - if (!$this->getExternalFunding()) { - return $this->setExternalFunding(array($externalFunding)); - } else { - return $this->setExternalFunding( - array_merge($this->getExternalFunding(), array($externalFunding)) - ); - } - } - - /** - * Remove ExternalFunding from the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\ExternalFunding $externalFunding - * @return $this - */ - public function removeExternalFunding($externalFunding) - { - return $this->setExternalFunding( - array_diff($this->getExternalFunding(), array($externalFunding)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ChargeModel.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ChargeModel.php deleted file mode 100644 index de486fe..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ChargeModel.php +++ /dev/null @@ -1,89 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the charge model. 128 characters max. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Type of charge model. Allowed values: `SHIPPING`, `TAX`. - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Type of charge model. Allowed values: `SHIPPING`, `TAX`. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Specific amount for this charge model. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Specific amount for this charge model. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Cost.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Cost.php deleted file mode 100644 index b8fa4ec..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Cost.php +++ /dev/null @@ -1,69 +0,0 @@ -percent = $percent; - return $this; - } - - /** - * Cost in percent. Range of 0 to 100. - * - * @return string - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Cost in amount. Range of 0 to 999999.99. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Cost in amount. Range of 0 to 999999.99. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CountryCode.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CountryCode.php deleted file mode 100644 index 18b45ac..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CountryCode.php +++ /dev/null @@ -1,41 +0,0 @@ -country_code = $country_code; - return $this; - } - - /** - * ISO country code based on 2-character IS0-3166-1 codes. - * - * @return string - */ - public function getCountryCode() - { - return $this->country_code; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreateProfileResponse.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreateProfileResponse.php deleted file mode 100644 index 1b36faf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreateProfileResponse.php +++ /dev/null @@ -1,40 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the payment web experience profile. - * - * @return string - */ - public function getId() - { - return $this->id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Credit.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Credit.php deleted file mode 100644 index a37370d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Credit.php +++ /dev/null @@ -1,66 +0,0 @@ -id = $id; - return $this; - } - - /** - * Unique identifier of credit resource. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * specifies type of credit - * Valid Values: ["BILL_ME_LATER", "PAYPAL_EXTRAS_MASTERCARD", "EBAY_MASTERCARD", "PAYPAL_SMART_CONNECT"] - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * specifies type of credit - * - * @return string - */ - public function getType() - { - return $this->type; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php deleted file mode 100644 index 07af13a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php +++ /dev/null @@ -1,559 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.** - * - * @deprecated Not publicly available - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type. *Redacted in responses.* - * - * @param string $number - * - * @return $this - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type. *Redacted in responses.* - * - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex` - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex` - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Expiration month with no leading zero. Acceptable values are 1 through 12. - * - * @param int $expire_month - * - * @return $this - */ - public function setExpireMonth($expire_month) - { - $this->expire_month = $expire_month; - return $this; - } - - /** - * Expiration month with no leading zero. Acceptable values are 1 through 12. - * - * @return int - */ - public function getExpireMonth() - { - return $this->expire_month; - } - - /** - * 4-digit expiration year. - * - * @param int $expire_year - * - * @return $this - */ - public function setExpireYear($expire_year) - { - $this->expire_year = $expire_year; - return $this; - } - - /** - * 4-digit expiration year. - * - * @return int - */ - public function getExpireYear() - { - return $this->expire_year; - } - - /** - * 3-4 digit card validation code. - * - * @param string $cvv2 - * - * @return $this - */ - public function setCvv2($cvv2) - { - $this->cvv2 = $cvv2; - return $this; - } - - /** - * 3-4 digit card validation code. - * - * @return string - */ - public function getCvv2() - { - return $this->cvv2; - } - - /** - * Cardholder's first name. - * - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * Cardholder's first name. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Cardholder's last name. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Cardholder's last name. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Billing Address associated with this card. - * - * @param \PayPal\Api\Address $billing_address - * - * @return $this - */ - public function setBillingAddress($billing_address) - { - $this->billing_address = $billing_address; - return $this; - } - - /** - * Billing Address associated with this card. - * - * @return \PayPal\Api\Address - */ - public function getBillingAddress() - { - return $this->billing_address; - } - - /** - * A unique identifier of the customer to whom this bank account belongs. Generated and provided by the facilitator. **This is now used in favor of `payer_id` when creating or using a stored funding instrument in the vault.** - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * A unique identifier of the customer to whom this bank account belongs. Generated and provided by the facilitator. **This is now used in favor of `payer_id` when creating or using a stored funding instrument in the vault.** - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * A user provided, optional convenvience field that functions as a unique identifier for the merchant on behalf of whom this credit card is being stored for. Note that this has no relation to PayPal merchant id - * - * @param string $merchant_id - * - * @return $this - */ - public function setMerchantId($merchant_id) - { - $this->merchant_id = $merchant_id; - return $this; - } - - /** - * A user provided, optional convenvience field that functions as a unique identifier for the merchant on behalf of whom this credit card is being stored for. Note that this has no relation to PayPal merchant id - * - * @return string - */ - public function getMerchantId() - { - return $this->merchant_id; - } - - /** - * A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault. - * - * @deprecated This is being deprecated in favor of the `external_customer_id` property. - * @param string $payer_id - * - * @return $this - */ - public function setPayerId($payer_id) - { - $this->payer_id = $payer_id; - return $this; - } - - /** - * A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault. - * - * @deprecated This is being deprecated in favor of the `external_customer_id` property. - * @return string - */ - public function getPayerId() - { - return $this->payer_id; - } - - /** - * A unique identifier of the bank account resource. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant. - * - * @param string $external_card_id - * - * @return $this - */ - public function setExternalCardId($external_card_id) - { - $this->external_card_id = $external_card_id; - return $this; - } - - /** - * A unique identifier of the bank account resource. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant. - * - * @return string - */ - public function getExternalCardId() - { - return $this->external_card_id; - } - - /** - * State of the funding instrument. - * Valid Values: ["expired", "ok"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the credit card funding instrument. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Funding instrument expiration date. - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates creation time. - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Date/Time until this resource can be used fund a payment. - * - * @param string $valid_until - * - * @return $this - */ - public function setValidUntil($valid_until) - { - $this->valid_until = $valid_until; - return $this; - } - - /** - * Funding instrument expiration date. - * - * @return string - */ - public function getValidUntil() - { - return $this->valid_until; - } - - /** - * Creates a new Credit Card Resource (aka Tokenize). - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return CreditCard - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/vault/credit-cards", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Obtain the Credit Card resource for the given identifier. - * - * @param string $creditCardId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return CreditCard - */ - public static function get($creditCardId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($creditCardId, 'creditCardId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/vault/credit-cards/$creditCardId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new CreditCard(); - $ret->fromJson($json); - return $ret; - } - - /** - * Delete the Credit Card resource for the given identifier. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function delete($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - self::executeCall( - "/v1/vault/credit-cards/{$this->getId()}", - "DELETE", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Update information in a previously saved card. Only the modified fields need to be passed in the request. - * - * @param PatchRequest $patchRequest - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return CreditCard - */ - public function update($patchRequest, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($patchRequest, 'patch'); - $payload = $patchRequest->toJSON(); - $json = self::executeCall( - "/v1/vault/credit-cards/{$this->getId()}", - "PATCH", - $payload, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Retrieves a list of Credit Card resources. - * - * @param array $params - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return CreditCardList - */ - public static function all($params, $apiContext = null, $restCall = null) - { - if (is_null($params)) { - $params = array(); - } - ArgumentValidator::validate($params, 'params'); - $payLoad = ""; - $allowedParams = array( - 'page_size' => 1, - 'page' => 1, - 'start_time' => 1, - 'end_time' => 1, - 'sort_order' => 1, - 'sort_by' => 1, - 'merchant_id' => 1, - 'external_card_id' => 1, - 'external_customer_id' => 1, - ); - $json = self::executeCall( - "/v1/vault/credit-cards" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new CreditCardList(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php deleted file mode 100644 index f8d0a94..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php +++ /dev/null @@ -1,91 +0,0 @@ -{"credit-cards"} = $credit_cards; - return $this; - } - - /** - * A list of credit card resources - * - * @return \PayPal\Api\CreditCard - */ - public function getCreditCards() - { - return $this->{"credit-cards"}; - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * - * @param int $count - * - * @return $this - */ - public function setCount($count) - { - $this->count = $count; - return $this; - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Identifier of the next element to get the next range of results. - * - * - * @param string $next_id - * - * @return $this - */ - public function setNextId($next_id) - { - $this->next_id = $next_id; - return $this; - } - - /** - * Identifier of the next element to get the next range of results. - * - * @return string - */ - public function getNextId() - { - return $this->next_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardList.php deleted file mode 100644 index 97ba6aa..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardList.php +++ /dev/null @@ -1,120 +0,0 @@ -items = $items; - return $this; - } - - /** - * A list of credit card resources - * - * @return \PayPal\Api\CreditCard[] - */ - public function getItems() - { - return $this->items; - } - - /** - * Append Items to the list. - * - * @param \PayPal\Api\CreditCard $creditCard - * @return $this - */ - public function addItem($creditCard) - { - if (!$this->getItems()) { - return $this->setItems(array($creditCard)); - } else { - return $this->setItems( - array_merge($this->getItems(), array($creditCard)) - ); - } - } - - /** - * Remove Items from the list. - * - * @param \PayPal\Api\CreditCard $creditCard - * @return $this - */ - public function removeItem($creditCard) - { - return $this->setItems( - array_diff($this->getItems(), array($creditCard)) - ); - } - - /** - * Total number of items present in the given list. Note that the number of items might be larger than the records in the current page. - * - * @param int $total_items - * - * @return $this - */ - public function setTotalItems($total_items) - { - $this->total_items = $total_items; - return $this; - } - - /** - * Total number of items present in the given list. Note that the number of items might be larger than the records in the current page. - * - * @return int - */ - public function getTotalItems() - { - return $this->total_items; - } - - /** - * Total number of pages that exist, for the total number of items, with the given page size. - * - * @param int $total_pages - * - * @return $this - */ - public function setTotalPages($total_pages) - { - $this->total_pages = $total_pages; - return $this; - } - - /** - * Total number of pages that exist, for the total number of items, with the given page size. - * - * @return int - */ - public function getTotalPages() - { - return $this->total_pages; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php deleted file mode 100644 index b43e196..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php +++ /dev/null @@ -1,161 +0,0 @@ -credit_card_id = $credit_card_id; - return $this; - } - - /** - * ID of credit card previously stored using `/vault/credit-card`. - * - * @return string - */ - public function getCreditCardId() - { - return $this->credit_card_id; - } - - /** - * A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. **Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.** - * - * @param string $payer_id - * - * @return $this - */ - public function setPayerId($payer_id) - { - $this->payer_id = $payer_id; - return $this; - } - - /** - * A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. **Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.** - * - * @return string - */ - public function getPayerId() - { - return $this->payer_id; - } - - /** - * Last four digits of the stored credit card number. - * - * @param string $last4 - * - * @return $this - */ - public function setLast4($last4) - { - $this->last4 = $last4; - return $this; - } - - /** - * Last four digits of the stored credit card number. - * - * @return string - */ - public function getLast4() - { - return $this->last4; - } - - /** - * Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex`. Values are presented in lowercase and not should not be used for display. - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex`. Values are presented in lowercase and not should not be used for display. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Expiration month with no leading zero. Acceptable values are 1 through 12. - * - * @param int $expire_month - * - * @return $this - */ - public function setExpireMonth($expire_month) - { - $this->expire_month = $expire_month; - return $this; - } - - /** - * Expiration month with no leading zero. Acceptable values are 1 through 12. - * - * @return int - */ - public function getExpireMonth() - { - return $this->expire_month; - } - - /** - * 4-digit expiration year. - * - * @param int $expire_year - * - * @return $this - */ - public function setExpireYear($expire_year) - { - $this->expire_year = $expire_year; - return $this; - } - - /** - * 4-digit expiration year. - * - * @return int - */ - public function getExpireYear() - { - return $this->expire_year; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditFinancingOffered.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditFinancingOffered.php deleted file mode 100644 index bb24617..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CreditFinancingOffered.php +++ /dev/null @@ -1,161 +0,0 @@ -total_cost = $total_cost; - return $this; - } - - /** - * This is the estimated total payment amount including interest and fees the user will pay during the lifetime of the loan. - * - * @return \PayPal\Api\Currency - */ - public function getTotalCost() - { - return $this->total_cost; - } - - /** - * Length of financing terms in month - * - * @param \PayPal\Api\number $term - * - * @return $this - */ - public function setTerm($term) - { - $this->term = $term; - return $this; - } - - /** - * Length of financing terms in month - * - * @return \PayPal\Api\number - */ - public function getTerm() - { - return $this->term; - } - - /** - * This is the estimated amount per month that the customer will need to pay including fees and interest. - * - * @param \PayPal\Api\Currency $monthly_payment - * - * @return $this - */ - public function setMonthlyPayment($monthly_payment) - { - $this->monthly_payment = $monthly_payment; - return $this; - } - - /** - * This is the estimated amount per month that the customer will need to pay including fees and interest. - * - * @return \PayPal\Api\Currency - */ - public function getMonthlyPayment() - { - return $this->monthly_payment; - } - - /** - * Estimated interest or fees amount the payer will have to pay during the lifetime of the loan. - * - * @param \PayPal\Api\Currency $total_interest - * - * @return $this - */ - public function setTotalInterest($total_interest) - { - $this->total_interest = $total_interest; - return $this; - } - - /** - * Estimated interest or fees amount the payer will have to pay during the lifetime of the loan. - * - * @return \PayPal\Api\Currency - */ - public function getTotalInterest() - { - return $this->total_interest; - } - - /** - * Status on whether the customer ultimately was approved for and chose to make the payment using the approved installment credit. - * - * @param bool $payer_acceptance - * - * @return $this - */ - public function setPayerAcceptance($payer_acceptance) - { - $this->payer_acceptance = $payer_acceptance; - return $this; - } - - /** - * Status on whether the customer ultimately was approved for and chose to make the payment using the approved installment credit. - * - * @return bool - */ - public function getPayerAcceptance() - { - return $this->payer_acceptance; - } - - /** - * Indicates whether the cart amount is editable after payer's acceptance on PayPal side - * - * @param bool $cart_amount_immutable - * - * @return $this - */ - public function setCartAmountImmutable($cart_amount_immutable) - { - $this->cart_amount_immutable = $cart_amount_immutable; - return $this; - } - - /** - * Indicates whether the cart amount is editable after payer's acceptance on PayPal side - * - * @return bool - */ - public function getCartAmountImmutable() - { - return $this->cart_amount_immutable; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Currency.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Currency.php deleted file mode 100644 index eb53eb9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Currency.php +++ /dev/null @@ -1,69 +0,0 @@ -currency = $currency; - return $this; - } - - /** - * 3 letter currency code as defined by ISO 4217. - * - * @return string - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code. - * - * @param string|double $value - * - * @return $this - */ - public function setValue($value) - { - NumericValidator::validate($value, "Value"); - $value = FormatConverter::formatToPrice($value, $this->getCurrency()); - $this->value = $value; - return $this; - } - - /** - * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CurrencyConversion.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CurrencyConversion.php deleted file mode 100644 index 3811277..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CurrencyConversion.php +++ /dev/null @@ -1,268 +0,0 @@ -conversion_date = $conversion_date; - return $this; - } - - /** - * Date of validity for the conversion rate. - * - * @return string - */ - public function getConversionDate() - { - return $this->conversion_date; - } - - /** - * 3 letter currency code - * - * @param string $from_currency - * - * @return $this - */ - public function setFromCurrency($from_currency) - { - $this->from_currency = $from_currency; - return $this; - } - - /** - * 3 letter currency code - * - * @return string - */ - public function getFromCurrency() - { - return $this->from_currency; - } - - /** - * Amount participating in currency conversion, set to 1 as default - * - * @param string $from_amount - * - * @return $this - */ - public function setFromAmount($from_amount) - { - $this->from_amount = $from_amount; - return $this; - } - - /** - * Amount participating in currency conversion, set to 1 as default - * - * @return string - */ - public function getFromAmount() - { - return $this->from_amount; - } - - /** - * 3 letter currency code - * - * @param string $to_currency - * - * @return $this - */ - public function setToCurrency($to_currency) - { - $this->to_currency = $to_currency; - return $this; - } - - /** - * 3 letter currency code - * - * @return string - */ - public function getToCurrency() - { - return $this->to_currency; - } - - /** - * Amount resulting from currency conversion. - * - * @param string $to_amount - * - * @return $this - */ - public function setToAmount($to_amount) - { - $this->to_amount = $to_amount; - return $this; - } - - /** - * Amount resulting from currency conversion. - * - * @return string - */ - public function getToAmount() - { - return $this->to_amount; - } - - /** - * Field indicating conversion type applied. - * Valid Values: ["PAYPAL", "VENDOR"] - * - * @param string $conversion_type - * - * @return $this - */ - public function setConversionType($conversion_type) - { - $this->conversion_type = $conversion_type; - return $this; - } - - /** - * Field indicating conversion type applied. - * - * @return string - */ - public function getConversionType() - { - return $this->conversion_type; - } - - /** - * Allow Payer to change conversion type. - * - * @param bool $conversion_type_changeable - * - * @return $this - */ - public function setConversionTypeChangeable($conversion_type_changeable) - { - $this->conversion_type_changeable = $conversion_type_changeable; - return $this; - } - - /** - * Allow Payer to change conversion type. - * - * @return bool - */ - public function getConversionTypeChangeable() - { - return $this->conversion_type_changeable; - } - - /** - * Base URL to web applications endpoint - * Valid Values: ["https://www.paypal.com/{country_code}/webapps/xocspartaweb/webflow/sparta/proxwebflow", "https://www.paypal.com/{country_code}/proxflow"] - * - * @deprecated Not publicly available - * @param string $web_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setWebUrl($web_url) - { - UrlValidator::validate($web_url, "WebUrl"); - $this->web_url = $web_url; - return $this; - } - - /** - * Base URL to web applications endpoint - * - * @deprecated Not publicly available - * @return string - */ - public function getWebUrl() - { - return $this->web_url; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CustomAmount.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CustomAmount.php deleted file mode 100644 index 47f9d75..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CustomAmount.php +++ /dev/null @@ -1,65 +0,0 @@ -label = $label; - return $this; - } - - /** - * Custom amount label. 25 characters max. - * - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Custom amount value. Range of 0 to 999999.99. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Custom amount value. Range of 0 to 999999.99. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Details.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Details.php deleted file mode 100644 index a196416..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Details.php +++ /dev/null @@ -1,227 +0,0 @@ -subtotal = $subtotal; - return $this; - } - - /** - * Amount of the subtotal of the items. **Required** if line items are specified. 10 characters max, with support for 2 decimal places. - * - * @return string - */ - public function getSubtotal() - { - return $this->subtotal; - } - - /** - * Amount charged for shipping. 10 characters max with support for 2 decimal places. - * - * @param string|double $shipping - * - * @return $this - */ - public function setShipping($shipping) - { - NumericValidator::validate($shipping, "Shipping"); - $shipping = FormatConverter::formatToPrice($shipping); - $this->shipping = $shipping; - return $this; - } - - /** - * Amount charged for shipping. 10 characters max with support for 2 decimal places. - * - * @return string - */ - public function getShipping() - { - return $this->shipping; - } - - /** - * Amount charged for tax. 10 characters max with support for 2 decimal places. - * - * @param string|double $tax - * - * @return $this - */ - public function setTax($tax) - { - NumericValidator::validate($tax, "Tax"); - $tax = FormatConverter::formatToPrice($tax); - $this->tax = $tax; - return $this; - } - - /** - * Amount charged for tax. 10 characters max with support for 2 decimal places. - * - * @return string - */ - public function getTax() - { - return $this->tax; - } - - /** - * Amount being charged for the handling fee. Only supported when the `payment_method` is set to `paypal`. - * - * @param string|double $handling_fee - * - * @return $this - */ - public function setHandlingFee($handling_fee) - { - NumericValidator::validate($handling_fee, "Handling Fee"); - $handling_fee = FormatConverter::formatToPrice($handling_fee); - $this->handling_fee = $handling_fee; - return $this; - } - - /** - * Amount being charged for the handling fee. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getHandlingFee() - { - return $this->handling_fee; - } - - /** - * Amount being discounted for the shipping fee. Only supported when the `payment_method` is set to `paypal`. - * - * @param string|double $shipping_discount - * - * @return $this - */ - public function setShippingDiscount($shipping_discount) - { - NumericValidator::validate($shipping_discount, "Shipping Discount"); - $shipping_discount = FormatConverter::formatToPrice($shipping_discount); - $this->shipping_discount = $shipping_discount; - return $this; - } - - /** - * Amount being discounted for the shipping fee. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getShippingDiscount() - { - return $this->shipping_discount; - } - - /** - * Amount being charged for the insurance fee. Only supported when the `payment_method` is set to `paypal`. - * - * @param string|double $insurance - * - * @return $this - */ - public function setInsurance($insurance) - { - NumericValidator::validate($insurance, "Insurance"); - $insurance = FormatConverter::formatToPrice($insurance); - $this->insurance = $insurance; - return $this; - } - - /** - * Amount being charged for the insurance fee. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getInsurance() - { - return $this->insurance; - } - - /** - * Amount being charged as gift wrap fee. - * - * @param string|double $gift_wrap - * - * @return $this - */ - public function setGiftWrap($gift_wrap) - { - NumericValidator::validate($gift_wrap, "Gift Wrap"); - $gift_wrap = FormatConverter::formatToPrice($gift_wrap); - $this->gift_wrap = $gift_wrap; - return $this; - } - - /** - * Amount being charged as gift wrap fee. - * - * @return string - */ - public function getGiftWrap() - { - return $this->gift_wrap; - } - - /** - * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment. - * - * @param string|double $fee - * - * @return $this - */ - public function setFee($fee) - { - NumericValidator::validate($fee, "Fee"); - $fee = FormatConverter::formatToPrice($fee); - $this->fee = $fee; - return $this; - } - - /** - * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment. - * - * @return string - */ - public function getFee() - { - return $this->fee; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Error.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Error.php deleted file mode 100644 index 1ad013d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Error.php +++ /dev/null @@ -1,321 +0,0 @@ -name = $name; - return $this; - } - - /** - * Human readable, unique name of the error. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Reference ID of the purchase_unit associated with this error - * - * @deprecated Not publicly available - * @param string $purchase_unit_reference_id - * - * @return $this - */ - public function setPurchaseUnitReferenceId($purchase_unit_reference_id) - { - $this->purchase_unit_reference_id = $purchase_unit_reference_id; - return $this; - } - - /** - * Reference ID of the purchase_unit associated with this error - * - * @deprecated Not publicly available - * @return string - */ - public function getPurchaseUnitReferenceId() - { - return $this->purchase_unit_reference_id; - } - - /** - * Message describing the error. - * - * @param string $message - * - * @return $this - */ - public function setMessage($message) - { - $this->message = $message; - return $this; - } - - /** - * Message describing the error. - * - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * PayPal internal error code. - * - * @deprecated Not publicly available - * @param string $code - * - * @return $this - */ - public function setCode($code) - { - $this->code = $code; - return $this; - } - - /** - * PayPal internal error code. - * - * @deprecated Not publicly available - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Additional details of the error - * - * @param \PayPal\Api\ErrorDetails[] $details - * - * @return $this - */ - public function setDetails($details) - { - $this->details = $details; - return $this; - } - - /** - * Additional details of the error - * - * @return \PayPal\Api\ErrorDetails[] - */ - public function getDetails() - { - return $this->details; - } - - /** - * Append Details to the list. - * - * @param \PayPal\Api\ErrorDetails $errorDetails - * @return $this - */ - public function addDetail($errorDetails) - { - if (!$this->getDetails()) { - return $this->setDetails(array($errorDetails)); - } else { - return $this->setDetails( - array_merge($this->getDetails(), array($errorDetails)) - ); - } - } - - /** - * Remove Details from the list. - * - * @param \PayPal\Api\ErrorDetails $errorDetails - * @return $this - */ - public function removeDetail($errorDetails) - { - return $this->setDetails( - array_diff($this->getDetails(), array($errorDetails)) - ); - } - - /** - * response codes returned from a payment processor such as avs, cvv, etc. Only supported when the `payment_method` is set to `credit_card`. - * - * @deprecated Not publicly available - * @param \PayPal\Api\ProcessorResponse $processor_response - * - * @return $this - */ - public function setProcessorResponse($processor_response) - { - $this->processor_response = $processor_response; - return $this; - } - - /** - * response codes returned from a payment processor such as avs, cvv, etc. Only supported when the `payment_method` is set to `credit_card`. - * - * @deprecated Not publicly available - * @return \PayPal\Api\ProcessorResponse - */ - public function getProcessorResponse() - { - return $this->processor_response; - } - - /** - * Fraud filter details. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @param \PayPal\Api\FmfDetails $fmf_details - * - * @return $this - */ - public function setFmfDetails($fmf_details) - { - $this->fmf_details = $fmf_details; - return $this; - } - - /** - * Fraud filter details. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @return \PayPal\Api\FmfDetails - */ - public function getFmfDetails() - { - return $this->fmf_details; - } - - /** - * URI for detailed information related to this error for the developer. - * - * @param string $information_link - * - * @return $this - */ - public function setInformationLink($information_link) - { - $this->information_link = $information_link; - return $this; - } - - /** - * URI for detailed information related to this error for the developer. - * - * @return string - */ - public function getInformationLink() - { - return $this->information_link; - } - - /** - * PayPal internal identifier used for correlation purposes. - * - * @param string $debug_id - * - * @return $this - */ - public function setDebugId($debug_id) - { - $this->debug_id = $debug_id; - return $this; - } - - /** - * PayPal internal identifier used for correlation purposes. - * - * @return string - */ - public function getDebugId() - { - return $this->debug_id; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ErrorDetails.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ErrorDetails.php deleted file mode 100644 index 2885a2e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ErrorDetails.php +++ /dev/null @@ -1,115 +0,0 @@ -field = $field; - return $this; - } - - /** - * Name of the field that caused the error. - * - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * Reason for the error. - * - * @param string $issue - * - * @return $this - */ - public function setIssue($issue) - { - $this->issue = $issue; - return $this; - } - - /** - * Reason for the error. - * - * @return string - */ - public function getIssue() - { - return $this->issue; - } - - /** - * Reference ID of the purchase_unit associated with this error - * - * @deprecated Not publicly available - * @param string $purchase_unit_reference_id - * - * @return $this - */ - public function setPurchaseUnitReferenceId($purchase_unit_reference_id) - { - $this->purchase_unit_reference_id = $purchase_unit_reference_id; - return $this; - } - - /** - * Reference ID of the purchase_unit associated with this error - * - * @deprecated Not publicly available - * @return string - */ - public function getPurchaseUnitReferenceId() - { - return $this->purchase_unit_reference_id; - } - - /** - * PayPal internal error code. - * - * @deprecated Not publicly available - * @param string $code - * - * @return $this - */ - public function setCode($code) - { - $this->code = $code; - return $this; - } - - /** - * PayPal internal error code. - * - * @deprecated Not publicly available - * @return string - */ - public function getCode() - { - return $this->code; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExtendedBankAccount.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExtendedBankAccount.php deleted file mode 100644 index ce771b2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExtendedBankAccount.php +++ /dev/null @@ -1,40 +0,0 @@ -mandate_reference_number = $mandate_reference_number; - return $this; - } - - /** - * Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA). - * - * @deprecated Not publicly available - * @return string - */ - public function getMandateReferenceNumber() - { - return $this->mandate_reference_number; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExternalFunding.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExternalFunding.php deleted file mode 100644 index 67eb2b9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExternalFunding.php +++ /dev/null @@ -1,137 +0,0 @@ -reference_id = $reference_id; - return $this; - } - - /** - * Unique identifier for the external funding - * - * @return string - */ - public function getReferenceId() - { - return $this->reference_id; - } - - /** - * Generic identifier for the external funding - * - * @param string $code - * - * @return $this - */ - public function setCode($code) - { - $this->code = $code; - return $this; - } - - /** - * Generic identifier for the external funding - * - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Encrypted PayPal Account identifier for the funding account - * - * @param string $funding_account_id - * - * @return $this - */ - public function setFundingAccountId($funding_account_id) - { - $this->funding_account_id = $funding_account_id; - return $this; - } - - /** - * Encrypted PayPal Account identifier for the funding account - * - * @return string - */ - public function getFundingAccountId() - { - return $this->funding_account_id; - } - - /** - * Description of the external funding being applied - * - * @param string $display_text - * - * @return $this - */ - public function setDisplayText($display_text) - { - $this->display_text = $display_text; - return $this; - } - - /** - * Description of the external funding being applied - * - * @return string - */ - public function getDisplayText() - { - return $this->display_text; - } - - /** - * Amount being funded by the external funding account - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount being funded by the external funding account - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FlowConfig.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FlowConfig.php deleted file mode 100644 index a8ae332..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FlowConfig.php +++ /dev/null @@ -1,69 +0,0 @@ -landing_page_type = $landing_page_type; - return $this; - } - - /** - * Type of PayPal page to be displayed when a user lands on the PayPal site for checkout. Allowed values: `Billing` or `Login`. When set to `Billing`, the Non-PayPal account landing page is used. When set to `Login`, the PayPal account login landing page is used. - * - * @return string - */ - public function getLandingPageType() - { - return $this->landing_page_type; - } - - /** - * The URL on the merchant site for transferring to after a bank transfer payment. - * - * - * @param string $bank_txn_pending_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setBankTxnPendingUrl($bank_txn_pending_url) - { - UrlValidator::validate($bank_txn_pending_url, "BankTxnPendingUrl"); - $this->bank_txn_pending_url = $bank_txn_pending_url; - return $this; - } - - /** - * The URL on the merchant site for transferring to after a bank transfer payment. - * - * @return string - */ - public function getBankTxnPendingUrl() - { - return $this->bank_txn_pending_url; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FmfDetails.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FmfDetails.php deleted file mode 100644 index 0d58cef..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FmfDetails.php +++ /dev/null @@ -1,115 +0,0 @@ -filter_type = $filter_type; - return $this; - } - - /** - * Type of filter. - * - * @return string - */ - public function getFilterType() - { - return $this->filter_type; - } - - /** - * Filter Identifier. - * Valid Values: ["AVS_NO_MATCH", "AVS_PARTIAL_MATCH", "AVS_UNAVAILABLE_OR_UNSUPPORTED", "CARD_SECURITY_CODE_MISMATCH", "MAXIMUM_TRANSACTION_AMOUNT", "UNCONFIRMED_ADDRESS", "COUNTRY_MONITOR", "LARGE_ORDER_NUMBER", "BILLING_OR_SHIPPING_ADDRESS_MISMATCH", "RISKY_ZIP_CODE", "SUSPECTED_FREIGHT_FORWARDER_CHECK", "TOTAL_PURCHASE_PRICE_MINIMUM", "IP_ADDRESS_VELOCITY", "RISKY_EMAIL_ADDRESS_DOMAIN_CHECK", "RISKY_BANK_IDENTIFICATION_NUMBER_CHECK", "RISKY_IP_ADDRESS_RANGE", "PAYPAL_FRAUD_MODEL"] - * - * @param string $filter_id - * - * @return $this - */ - public function setFilterId($filter_id) - { - $this->filter_id = $filter_id; - return $this; - } - - /** - * Filter Identifier. - * - * @return string - */ - public function getFilterId() - { - return $this->filter_id; - } - - /** - * Name of the filter - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the filter - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Description of the filter. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of the filter. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingDetail.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingDetail.php deleted file mode 100644 index 00bad31..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingDetail.php +++ /dev/null @@ -1,114 +0,0 @@ -clearing_time = $clearing_time; - return $this; - } - - /** - * Expected clearing time - * - * @return string - */ - public function getClearingTime() - { - return $this->clearing_time; - } - - /** - * [DEPRECATED] Hold-off duration of the payment. payment_debit_date should be used instead. - * - * @param string $payment_hold_date - * - * @return $this - */ - public function setPaymentHoldDate($payment_hold_date) - { - $this->payment_hold_date = $payment_hold_date; - return $this; - } - - /** - * @deprecated [DEPRECATED] Hold-off duration of the payment. payment_debit_date should be used instead. - * - * @return string - */ - public function getPaymentHoldDate() - { - return $this->payment_hold_date; - } - - /** - * Date when funds will be debited from the payer's account - * - * @param string $payment_debit_date - * - * @return $this - */ - public function setPaymentDebitDate($payment_debit_date) - { - $this->payment_debit_date = $payment_debit_date; - return $this; - } - - /** - * Date when funds will be debited from the payer's account - * - * @return string - */ - public function getPaymentDebitDate() - { - return $this->payment_debit_date; - } - - /** - * Processing type of the payment card - * Valid Values: ["PINLESS_DEBIT"] - * - * @param string $processing_type - * - * @return $this - */ - public function setProcessingType($processing_type) - { - $this->processing_type = $processing_type; - return $this; - } - - /** - * Processing type of the payment card - * - * @return string - */ - public function getProcessingType() - { - return $this->processing_type; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php deleted file mode 100644 index 1890730..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php +++ /dev/null @@ -1,339 +0,0 @@ -credit_card = $credit_card; - return $this; - } - - /** - * Credit Card instrument. - * - * @return \PayPal\Api\CreditCard - */ - public function getCreditCard() - { - return $this->credit_card; - } - - /** - * PayPal vaulted credit Card instrument. - * - * @param \PayPal\Api\CreditCardToken $credit_card_token - * - * @return $this - */ - public function setCreditCardToken($credit_card_token) - { - $this->credit_card_token = $credit_card_token; - return $this; - } - - /** - * PayPal vaulted credit Card instrument. - * - * @return \PayPal\Api\CreditCardToken - */ - public function getCreditCardToken() - { - return $this->credit_card_token; - } - - /** - * Payment Card information. - * - * @deprecated Not publicly available - * @param \PayPal\Api\PaymentCard $payment_card - * - * @return $this - */ - public function setPaymentCard($payment_card) - { - $this->payment_card = $payment_card; - return $this; - } - - /** - * Payment Card information. - * - * @deprecated Not publicly available - * @return \PayPal\Api\PaymentCard - */ - public function getPaymentCard() - { - return $this->payment_card; - } - - /** - * Bank Account information. - * - * @deprecated Not publicly available - * @param \PayPal\Api\ExtendedBankAccount $bank_account - * - * @return $this - */ - public function setBankAccount($bank_account) - { - $this->bank_account = $bank_account; - return $this; - } - - /** - * Bank Account information. - * - * @deprecated Not publicly available - * @return \PayPal\Api\ExtendedBankAccount - */ - public function getBankAccount() - { - return $this->bank_account; - } - - /** - * Vaulted bank account instrument. - * - * @deprecated Not publicly available - * @param \PayPal\Api\BankToken $bank_account_token - * - * @return $this - */ - public function setBankAccountToken($bank_account_token) - { - $this->bank_account_token = $bank_account_token; - return $this; - } - - /** - * Vaulted bank account instrument. - * - * @deprecated Not publicly available - * @return \PayPal\Api\BankToken - */ - public function getBankAccountToken() - { - return $this->bank_account_token; - } - - /** - * PayPal credit funding instrument. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Credit $credit - * - * @return $this - */ - public function setCredit($credit) - { - $this->credit = $credit; - return $this; - } - - /** - * PayPal credit funding instrument. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Credit - */ - public function getCredit() - { - return $this->credit; - } - - /** - * Incentive funding instrument. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Incentive $incentive - * - * @return $this - */ - public function setIncentive($incentive) - { - $this->incentive = $incentive; - return $this; - } - - /** - * Incentive funding instrument. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Incentive - */ - public function getIncentive() - { - return $this->incentive; - } - - /** - * External funding instrument. - * - * @deprecated Not publicly available - * @param \PayPal\Api\ExternalFunding $external_funding - * - * @return $this - */ - public function setExternalFunding($external_funding) - { - $this->external_funding = $external_funding; - return $this; - } - - /** - * External funding instrument. - * - * @deprecated Not publicly available - * @return \PayPal\Api\ExternalFunding - */ - public function getExternalFunding() - { - return $this->external_funding; - } - - /** - * Carrier account token instrument. - * - * @deprecated Not publicly available - * @param \PayPal\Api\CarrierAccountToken $carrier_account_token - * - * @return $this - */ - public function setCarrierAccountToken($carrier_account_token) - { - $this->carrier_account_token = $carrier_account_token; - return $this; - } - - /** - * Carrier account token instrument. - * - * @deprecated Not publicly available - * @return \PayPal\Api\CarrierAccountToken - */ - public function getCarrierAccountToken() - { - return $this->carrier_account_token; - } - - /** - * Carrier account instrument - * - * @deprecated Not publicly available - * @param \PayPal\Api\CarrierAccount $carrier_account - * - * @return $this - */ - public function setCarrierAccount($carrier_account) - { - $this->carrier_account = $carrier_account; - return $this; - } - - /** - * Carrier account instrument - * - * @deprecated Not publicly available - * @return \PayPal\Api\CarrierAccount - */ - public function getCarrierAccount() - { - return $this->carrier_account; - } - - /** - * Private Label Card funding instrument. These are store cards provided by merchants to drive business with value to customer with convenience and rewards. - * - * @deprecated Not publicly available - * @param \PayPal\Api\PrivateLabelCard $private_label_card - * - * @return $this - */ - public function setPrivateLabelCard($private_label_card) - { - $this->private_label_card = $private_label_card; - return $this; - } - - /** - * Private Label Card funding instrument. These are store cards provided by merchants to drive business with value to customer with convenience and rewards. - * - * @deprecated Not publicly available - * @return \PayPal\Api\PrivateLabelCard - */ - public function getPrivateLabelCard() - { - return $this->private_label_card; - } - - /** - * Billing instrument that references pre-approval information for the payment - * - * @param \PayPal\Api\Billing $billing - * - * @return $this - */ - public function setBilling($billing) - { - $this->billing = $billing; - return $this; - } - - /** - * Billing instrument that references pre-approval information for the payment - * - * @return \PayPal\Api\Billing - */ - public function getBilling() - { - return $this->billing; - } - - /** - * Alternate Payment information - Mostly regional payment providers. For e.g iDEAL in Netherlands - * - * @deprecated Not publicly available - * @param \PayPal\Api\AlternatePayment $alternate_payment - * - * @return $this - */ - public function setAlternatePayment($alternate_payment) - { - $this->alternate_payment = $alternate_payment; - return $this; - } - - /** - * Alternate Payment information - Mostly regional payment providers. For e.g iDEAL in Netherlands - * - * @deprecated Not publicly available - * @return \PayPal\Api\AlternatePayment - */ - public function getAlternatePayment() - { - return $this->alternate_payment; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingOption.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingOption.php deleted file mode 100644 index 9848a0c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingOption.php +++ /dev/null @@ -1,221 +0,0 @@ -id = $id; - return $this; - } - - /** - * id of the funding option. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * List of funding sources that contributes to a payment. - * - * @param \PayPal\Api\FundingSource[] $funding_sources - * - * @return $this - */ - public function setFundingSources($funding_sources) - { - $this->funding_sources = $funding_sources; - return $this; - } - - /** - * List of funding sources that contributes to a payment. - * - * @return \PayPal\Api\FundingSource[] - */ - public function getFundingSources() - { - return $this->funding_sources; - } - - /** - * Append FundingSources to the list. - * - * @param \PayPal\Api\FundingSource $fundingSource - * @return $this - */ - public function addFundingSource($fundingSource) - { - if (!$this->getFundingSources()) { - return $this->setFundingSources(array($fundingSource)); - } else { - return $this->setFundingSources( - array_merge($this->getFundingSources(), array($fundingSource)) - ); - } - } - - /** - * Remove FundingSources from the list. - * - * @param \PayPal\Api\FundingSource $fundingSource - * @return $this - */ - public function removeFundingSource($fundingSource) - { - return $this->setFundingSources( - array_diff($this->getFundingSources(), array($fundingSource)) - ); - } - - /** - * Backup funding instrument which will be used for payment if primary fails. - * - * @param \PayPal\Api\FundingInstrument $backup_funding_instrument - * - * @return $this - */ - public function setBackupFundingInstrument($backup_funding_instrument) - { - $this->backup_funding_instrument = $backup_funding_instrument; - return $this; - } - - /** - * Backup funding instrument which will be used for payment if primary fails. - * - * @return \PayPal\Api\FundingInstrument - */ - public function getBackupFundingInstrument() - { - return $this->backup_funding_instrument; - } - - /** - * Currency conversion applicable to this funding option. - * - * @param \PayPal\Api\CurrencyConversion $currency_conversion - * - * @return $this - */ - public function setCurrencyConversion($currency_conversion) - { - $this->currency_conversion = $currency_conversion; - return $this; - } - - /** - * Currency conversion applicable to this funding option. - * - * @return \PayPal\Api\CurrencyConversion - */ - public function getCurrencyConversion() - { - return $this->currency_conversion; - } - - /** - * Installment options available for a funding option. - * - * @param \PayPal\Api\InstallmentInfo $installment_info - * - * @return $this - */ - public function setInstallmentInfo($installment_info) - { - $this->installment_info = $installment_info; - return $this; - } - - /** - * Installment options available for a funding option. - * - * @return \PayPal\Api\InstallmentInfo - */ - public function getInstallmentInfo() - { - return $this->installment_info; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingSource.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingSource.php deleted file mode 100644 index 5b39be6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FundingSource.php +++ /dev/null @@ -1,289 +0,0 @@ -funding_mode = $funding_mode; - return $this; - } - - /** - * specifies funding mode of the instrument - * - * @return string - */ - public function getFundingMode() - { - return $this->funding_mode; - } - - /** - * Instrument type for this funding source - * Valid Values: ["BALANCE", "PAYMENT_CARD", "BANK_ACCOUNT", "CREDIT", "INCENTIVE"] - * - * @param string $funding_instrument_type - * - * @return $this - */ - public function setFundingInstrumentType($funding_instrument_type) - { - $this->funding_instrument_type = $funding_instrument_type; - return $this; - } - - /** - * Instrument type for this funding source - * - * @return string - */ - public function getFundingInstrumentType() - { - return $this->funding_instrument_type; - } - - /** - * Soft descriptor used when charging this funding source. - * - * @param string $soft_descriptor - * - * @return $this - */ - public function setSoftDescriptor($soft_descriptor) - { - $this->soft_descriptor = $soft_descriptor; - return $this; - } - - /** - * Soft descriptor used when charging this funding source. - * - * @return string - */ - public function getSoftDescriptor() - { - return $this->soft_descriptor; - } - - /** - * Total anticipated amount of money to be pulled from instrument. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Total anticipated amount of money to be pulled from instrument. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Additional amount to be pulled from the instrument to recover a negative balance on the buyer - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setNegativeBalanceAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Additional amount to be pulled from the instrument to recover a negative balance on the buyer - * - * @return \PayPal\Api\Currency - */ - public function getNegativeBalanceAmount() - { - return $this->amount; - } - - /** - * Localized legal text relevant to funding source. - * - * @param string $legal_text - * - * @return $this - */ - public function setLegalText($legal_text) - { - $this->legal_text = $legal_text; - return $this; - } - - /** - * Localized legal text relevant to funding source. - * - * @return string - */ - public function getLegalText() - { - return $this->legal_text; - } - - /** - * Additional detail of the funding. - * - * @param \PayPal\Api\FundingDetail $funding_detail - * - * @return $this - */ - public function setFundingDetail($funding_detail) - { - $this->funding_detail = $funding_detail; - return $this; - } - - /** - * Additional detail of the funding. - * - * @return \PayPal\Api\FundingDetail - */ - public function getFundingDetail() - { - return $this->funding_detail; - } - - /** - * Additional text relevant to funding source. - * - * @param string $additional_text - * - * @return $this - */ - public function setAdditionalText($additional_text) - { - $this->additional_text = $additional_text; - return $this; - } - - /** - * Additional text relevant to funding source. - * - * @return string - */ - public function getAdditionalText() - { - return $this->additional_text; - } - - /** - * Sets Extends - * - * @param \PayPal\Api\FundingInstrument $extends - * - * @return $this - */ - public function setExtends($extends) - { - $this->extends = $extends; - return $this; - } - - /** - * Gets Extends - * - * @return \PayPal\Api\FundingInstrument - */ - public function getExtends() - { - return $this->extends; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FuturePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FuturePayment.php deleted file mode 100644 index 7e49a37..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FuturePayment.php +++ /dev/null @@ -1,75 +0,0 @@ - $clientMetadataId - ); - } - $payLoad = $this->toJSON(); - $call = new PayPalRestCall($apiContext); - $json = $call->execute( - array('PayPal\Handler\RestHandler'), - "/v1/payments/payment", - "POST", - $payLoad, - $headers - ); - $this->fromJson($json); - - return $this; - - } - - /** - * Get a Refresh Token from Authorization Code - * - * @param $authorizationCode - * @param ApiContext $apiContext - * @return string|null refresh token - */ - public static function getRefreshToken($authorizationCode, $apiContext = null) - { - $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential); - $credential = $apiContext->getCredential(); - return $credential->getRefreshToken($apiContext->getConfig(), $authorizationCode); - } - - /** - * Updates Access Token using long lived refresh token - * - * @param string|null $refreshToken - * @param ApiContext $apiContext - * @return void - */ - public function updateAccessToken($refreshToken, $apiContext) - { - $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential); - $apiContext->getCredential()->updateAccessToken($apiContext->getConfig(), $refreshToken); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php deleted file mode 100644 index 7ef5dbb..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php +++ /dev/null @@ -1,191 +0,0 @@ -links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - - /** - * Sets FragmentResolution - * - * @param string $fragmentResolution - * - * @return $this - */ - public function setFragmentResolution($fragmentResolution) - { - $this->fragmentResolution = $fragmentResolution; - return $this; - } - - /** - * Gets FragmentResolution - * - * @return string - */ - public function getFragmentResolution() - { - return $this->fragmentResolution; - } - - /** - * Sets Readonly - * - * @param bool $readonly - * - * @return $this - */ - public function setReadonly($readonly) - { - $this->readonly = $readonly; - return $this; - } - - /** - * Gets Readonly - * - * @return bool - */ - public function getReadonly() - { - return $this->readonly; - } - - /** - * Sets ContentEncoding - * - * @param string $contentEncoding - * - * @return $this - */ - public function setContentEncoding($contentEncoding) - { - $this->contentEncoding = $contentEncoding; - return $this; - } - - /** - * Gets ContentEncoding - * - * @return string - */ - public function getContentEncoding() - { - return $this->contentEncoding; - } - - /** - * Sets PathStart - * - * @param string $pathStart - * - * @return $this - */ - public function setPathStart($pathStart) - { - $this->pathStart = $pathStart; - return $this; - } - - /** - * Gets PathStart - * - * @return string - */ - public function getPathStart() - { - return $this->pathStart; - } - - /** - * Sets MediaType - * - * @param string $mediaType - * - * @return $this - */ - public function setMediaType($mediaType) - { - $this->mediaType = $mediaType; - return $this; - } - - /** - * Gets MediaType - * - * @return string - */ - public function getMediaType() - { - return $this->mediaType; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Image.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Image.php deleted file mode 100644 index 71c7d15..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Image.php +++ /dev/null @@ -1,56 +0,0 @@ -image = $imageBase64String; - return $this; - } - - /** - * Get Image as Base-64 encoded String - * - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * Stores the Image to file - * - * @param string $name File Name - * @return string File name - */ - public function saveToFile($name = null) - { - // Self Generate File Location - if (!$name) { - $name = uniqid() . '.png'; - } - // Save to File - file_put_contents($name, base64_decode($this->getImage())); - return $name; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Incentive.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Incentive.php deleted file mode 100644 index 017a34d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Incentive.php +++ /dev/null @@ -1,236 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the instrument in PayPal Wallet - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Code that identifies the incentive. - * - * @param string $code - * - * @return $this - */ - public function setCode($code) - { - $this->code = $code; - return $this; - } - - /** - * Code that identifies the incentive. - * - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Name of the incentive. - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the incentive. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Description of the incentive. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of the incentive. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Indicates incentive is applicable for this minimum purchase amount. - * - * @param \PayPal\Api\Currency $minimum_purchase_amount - * - * @return $this - */ - public function setMinimumPurchaseAmount($minimum_purchase_amount) - { - $this->minimum_purchase_amount = $minimum_purchase_amount; - return $this; - } - - /** - * Indicates incentive is applicable for this minimum purchase amount. - * - * @return \PayPal\Api\Currency - */ - public function getMinimumPurchaseAmount() - { - return $this->minimum_purchase_amount; - } - - /** - * Logo image url for the incentive. - * - * @param string $logo_image_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setLogoImageUrl($logo_image_url) - { - UrlValidator::validate($logo_image_url, "LogoImageUrl"); - $this->logo_image_url = $logo_image_url; - return $this; - } - - /** - * Logo image url for the incentive. - * - * @return string - */ - public function getLogoImageUrl() - { - return $this->logo_image_url; - } - - /** - * expiry date of the incentive. - * - * @param string $expiry_date - * - * @return $this - */ - public function setExpiryDate($expiry_date) - { - $this->expiry_date = $expiry_date; - return $this; - } - - /** - * expiry date of the incentive. - * - * @return string - */ - public function getExpiryDate() - { - return $this->expiry_date; - } - - /** - * Specifies type of incentive - * Valid Values: ["COUPON", "GIFT_CARD", "MERCHANT_SPECIFIC_BALANCE", "VOUCHER"] - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Specifies type of incentive - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * URI to the associated terms - * - * @param string $terms - * - * @return $this - */ - public function setTerms($terms) - { - $this->terms = $terms; - return $this; - } - - /** - * URI to the associated terms - * - * @return string - */ - public function getTerms() - { - return $this->terms; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InputFields.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InputFields.php deleted file mode 100644 index 0bcf805..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InputFields.php +++ /dev/null @@ -1,92 +0,0 @@ -allow_note = $allow_note; - return $this; - } - - /** - * Enables the buyer to enter a note to the merchant on the PayPal page during checkout. - * - * @return bool - */ - public function getAllowNote() - { - return $this->allow_note; - } - - /** - * Determines whether or not PayPal displays shipping address fields on the experience pages. Allowed values: `0`, `1`, or `2`. When set to `0`, PayPal displays the shipping address on the PayPal pages. When set to `1`, PayPal does not display shipping address fields whatsoever. When set to `2`, if you do not pass the shipping address, PayPal obtains it from the buyer's account profile. For digital goods, this field is required, and you must set it to `1`. - * - * - * @param int $no_shipping - * - * @return $this - */ - public function setNoShipping($no_shipping) - { - $this->no_shipping = $no_shipping; - return $this; - } - - /** - * Determines whether or not PayPal displays shipping address fields on the experience pages. Allowed values: `0`, `1`, or `2`. When set to `0`, PayPal displays the shipping address on the PayPal pages. When set to `1`, PayPal does not display shipping address fields whatsoever. When set to `2`, if you do not pass the shipping address, PayPal obtains it from the buyer's account profile. For digital goods, this field is required, and you must set it to `1`. - * - * @return int - */ - public function getNoShipping() - { - return $this->no_shipping; - } - - /** - * Determines whether or not the PayPal pages should display the shipping address and not the shipping address on file with PayPal for this buyer. Displaying the PayPal street address on file does not allow the buyer to edit that address. Allowed values: `0` or `1`. When set to `0`, the PayPal pages should not display the shipping address. When set to `1`, the PayPal pages should display the shipping address. - * - * - * @param int $address_override - * - * @return $this - */ - public function setAddressOverride($address_override) - { - $this->address_override = $address_override; - return $this; - } - - /** - * Determines whether or not the PayPal pages should display the shipping address and not the shipping address on file with PayPal for this buyer. Displaying the PayPal street address on file does not allow the buyer to edit that address. Allowed values: `0` or `1`. When set to `0`, the PayPal pages should not display the shipping address. When set to `1`, the PayPal pages should display the shipping address. - * - * @return int - */ - public function getAddressOverride() - { - return $this->address_override; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InstallmentInfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InstallmentInfo.php deleted file mode 100644 index d0cbc51..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InstallmentInfo.php +++ /dev/null @@ -1,144 +0,0 @@ -installment_id = $installment_id; - return $this; - } - - /** - * Installment id. - * - * @return string - */ - public function getInstallmentId() - { - return $this->installment_id; - } - - /** - * Credit card network. - * Valid Values: ["VISA", "MASTERCARD"] - * - * @param string $network - * - * @return $this - */ - public function setNetwork($network) - { - $this->network = $network; - return $this; - } - - /** - * Credit card network. - * - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Credit card issuer. - * - * @param string $issuer - * - * @return $this - */ - public function setIssuer($issuer) - { - $this->issuer = $issuer; - return $this; - } - - /** - * Credit card issuer. - * - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * List of available installment options and the cost associated with each one. - * - * @param \PayPal\Api\InstallmentOption[] $installment_options - * - * @return $this - */ - public function setInstallmentOptions($installment_options) - { - $this->installment_options = $installment_options; - return $this; - } - - /** - * List of available installment options and the cost associated with each one. - * - * @return \PayPal\Api\InstallmentOption[] - */ - public function getInstallmentOptions() - { - return $this->installment_options; - } - - /** - * Append InstallmentOptions to the list. - * - * @param \PayPal\Api\InstallmentOption $installmentOption - * @return $this - */ - public function addInstallmentOption($installmentOption) - { - if (!$this->getInstallmentOptions()) { - return $this->setInstallmentOptions(array($installmentOption)); - } else { - return $this->setInstallmentOptions( - array_merge($this->getInstallmentOptions(), array($installmentOption)) - ); - } - } - - /** - * Remove InstallmentOptions from the list. - * - * @param \PayPal\Api\InstallmentOption $installmentOption - * @return $this - */ - public function removeInstallmentOption($installmentOption) - { - return $this->setInstallmentOptions( - array_diff($this->getInstallmentOptions(), array($installmentOption)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InstallmentOption.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InstallmentOption.php deleted file mode 100644 index 43342b7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InstallmentOption.php +++ /dev/null @@ -1,113 +0,0 @@ -term = $term; - return $this; - } - - /** - * Number of installments - * - * @return int - */ - public function getTerm() - { - return $this->term; - } - - /** - * Monthly payment - * - * @param \PayPal\Api\Currency $monthly_payment - * - * @return $this - */ - public function setMonthlyPayment($monthly_payment) - { - $this->monthly_payment = $monthly_payment; - return $this; - } - - /** - * Monthly payment - * - * @return \PayPal\Api\Currency - */ - public function getMonthlyPayment() - { - return $this->monthly_payment; - } - - /** - * Discount amount applied to the payment, if any - * - * @param \PayPal\Api\Currency $discount_amount - * - * @return $this - */ - public function setDiscountAmount($discount_amount) - { - $this->discount_amount = $discount_amount; - return $this; - } - - /** - * Discount amount applied to the payment, if any - * - * @return \PayPal\Api\Currency - */ - public function getDiscountAmount() - { - return $this->discount_amount; - } - - /** - * Discount percentage applied to the payment, if any - * - * @param string $discount_percentage - * - * @return $this - */ - public function setDiscountPercentage($discount_percentage) - { - $this->discount_percentage = $discount_percentage; - return $this; - } - - /** - * Discount percentage applied to the payment, if any - * - * @return string - */ - public function getDiscountPercentage() - { - return $this->discount_percentage; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Invoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Invoice.php deleted file mode 100644 index df82c6e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Invoice.php +++ /dev/null @@ -1,1020 +0,0 @@ -id = $id; - return $this; - } - - /** - * Unique invoice resource identifier. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Unique number that appears on the invoice. If left blank will be auto-incremented from the last number. 25 characters max. - * - * @param string $number - * - * @return $this - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * Unique number that appears on the invoice. If left blank will be auto-incremented from the last number. 25 characters max. - * - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * URI of the invoice resource. - * - * @param string $uri - * - * @return $this - */ - public function setUri($uri) - { - $this->uri = $uri; - return $this; - } - - /** - * URI of the invoice resource. - * - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Status of the invoice. - * Valid Values: ["DRAFT", "SENT", "PAID", "MARKED_AS_PAID", "CANCELLED", "REFUNDED", "PARTIALLY_REFUNDED", "MARKED_AS_REFUNDED"] - * - * @param string $status - * - * @return $this - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * Status of the invoice. - * - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Information about the merchant who is sending the invoice. - * - * @param \PayPal\Api\MerchantInfo $merchant_info - * - * @return $this - */ - public function setMerchantInfo($merchant_info) - { - $this->merchant_info = $merchant_info; - return $this; - } - - /** - * Information about the merchant who is sending the invoice. - * - * @return \PayPal\Api\MerchantInfo - */ - public function getMerchantInfo() - { - return $this->merchant_info; - } - - /** - * Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient). - * - * @param \PayPal\Api\BillingInfo[] $billing_info - * - * @return $this - */ - public function setBillingInfo($billing_info) - { - $this->billing_info = $billing_info; - return $this; - } - - /** - * Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient). - * - * @return \PayPal\Api\BillingInfo[] - */ - public function getBillingInfo() - { - return $this->billing_info; - } - - /** - * Append BillingInfo to the list. - * - * @param \PayPal\Api\BillingInfo $billingInfo - * @return $this - */ - public function addBillingInfo($billingInfo) - { - if (!$this->getBillingInfo()) { - return $this->setBillingInfo(array($billingInfo)); - } else { - return $this->setBillingInfo( - array_merge($this->getBillingInfo(), array($billingInfo)) - ); - } - } - - /** - * Remove BillingInfo from the list. - * - * @param \PayPal\Api\BillingInfo $billingInfo - * @return $this - */ - public function removeBillingInfo($billingInfo) - { - return $this->setBillingInfo( - array_diff($this->getBillingInfo(), array($billingInfo)) - ); - } - - /** - * Shipping information for entities to whom items are being shipped. - * - * @param \PayPal\Api\ShippingInfo $shipping_info - * - * @return $this - */ - public function setShippingInfo($shipping_info) - { - $this->shipping_info = $shipping_info; - return $this; - } - - /** - * Shipping information for entities to whom items are being shipped. - * - * @return \PayPal\Api\ShippingInfo - */ - public function getShippingInfo() - { - return $this->shipping_info; - } - - /** - * List of items included in the invoice. 100 items max per invoice. - * - * @param \PayPal\Api\InvoiceItem[] $items - * - * @return $this - */ - public function setItems($items) - { - $this->items = $items; - return $this; - } - - /** - * List of items included in the invoice. 100 items max per invoice. - * - * @return \PayPal\Api\InvoiceItem[] - */ - public function getItems() - { - return $this->items; - } - - /** - * Append Items to the list. - * - * @param \PayPal\Api\InvoiceItem $invoiceItem - * @return $this - */ - public function addItem($invoiceItem) - { - if (!$this->getItems()) { - return $this->setItems(array($invoiceItem)); - } else { - return $this->setItems( - array_merge($this->getItems(), array($invoiceItem)) - ); - } - } - - /** - * Remove Items from the list. - * - * @param \PayPal\Api\InvoiceItem $invoiceItem - * @return $this - */ - public function removeItem($invoiceItem) - { - return $this->setItems( - array_diff($this->getItems(), array($invoiceItem)) - ); - } - - /** - * Date on which the invoice was enabled. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $invoice_date - * - * @return $this - */ - public function setInvoiceDate($invoice_date) - { - $this->invoice_date = $invoice_date; - return $this; - } - - /** - * Date on which the invoice was enabled. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getInvoiceDate() - { - return $this->invoice_date; - } - - /** - * Optional field to pass payment deadline for the invoice. Either term_type or due_date can be passed, but not both. - * - * @param \PayPal\Api\PaymentTerm $payment_term - * - * @return $this - */ - public function setPaymentTerm($payment_term) - { - $this->payment_term = $payment_term; - return $this; - } - - /** - * Optional field to pass payment deadline for the invoice. Either term_type or due_date can be passed, but not both. - * - * @return \PayPal\Api\PaymentTerm - */ - public function getPaymentTerm() - { - return $this->payment_term; - } - - /** - * Invoice level discount in percent or amount. - * - * @param \PayPal\Api\Cost $discount - * - * @return $this - */ - public function setDiscount($discount) - { - $this->discount = $discount; - return $this; - } - - /** - * Invoice level discount in percent or amount. - * - * @return \PayPal\Api\Cost - */ - public function getDiscount() - { - return $this->discount; - } - - /** - * Shipping cost in percent or amount. - * - * @param \PayPal\Api\ShippingCost $shipping_cost - * - * @return $this - */ - public function setShippingCost($shipping_cost) - { - $this->shipping_cost = $shipping_cost; - return $this; - } - - /** - * Shipping cost in percent or amount. - * - * @return \PayPal\Api\ShippingCost - */ - public function getShippingCost() - { - return $this->shipping_cost; - } - - /** - * Custom amount applied on an invoice. If a label is included then the amount cannot be empty. - * - * @param \PayPal\Api\CustomAmount $custom - * - * @return $this - */ - public function setCustom($custom) - { - $this->custom = $custom; - return $this; - } - - /** - * Custom amount applied on an invoice. If a label is included then the amount cannot be empty. - * - * @return \PayPal\Api\CustomAmount - */ - public function getCustom() - { - return $this->custom; - } - - /** - * Indicates whether tax is calculated before or after a discount. If false (the default), the tax is calculated before a discount. If true, the tax is calculated after a discount. - * - * @param bool $tax_calculated_after_discount - * - * @return $this - */ - public function setTaxCalculatedAfterDiscount($tax_calculated_after_discount) - { - $this->tax_calculated_after_discount = $tax_calculated_after_discount; - return $this; - } - - /** - * Indicates whether tax is calculated before or after a discount. If false (the default), the tax is calculated before a discount. If true, the tax is calculated after a discount. - * - * @return bool - */ - public function getTaxCalculatedAfterDiscount() - { - return $this->tax_calculated_after_discount; - } - - /** - * A flag indicating whether the unit price includes tax. Default is false - * - * @param bool $tax_inclusive - * - * @return $this - */ - public function setTaxInclusive($tax_inclusive) - { - $this->tax_inclusive = $tax_inclusive; - return $this; - } - - /** - * A flag indicating whether the unit price includes tax. Default is false - * - * @return bool - */ - public function getTaxInclusive() - { - return $this->tax_inclusive; - } - - /** - * General terms of the invoice. 4000 characters max. - * - * @param string $terms - * - * @return $this - */ - public function setTerms($terms) - { - $this->terms = $terms; - return $this; - } - - /** - * General terms of the invoice. 4000 characters max. - * - * @return string - */ - public function getTerms() - { - return $this->terms; - } - - /** - * Note to the payer. 4000 characters max. - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Note to the payer. 4000 characters max. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * Bookkeeping memo that is private to the merchant. 150 characters max. - * - * @param string $merchant_memo - * - * @return $this - */ - public function setMerchantMemo($merchant_memo) - { - $this->merchant_memo = $merchant_memo; - return $this; - } - - /** - * Bookkeeping memo that is private to the merchant. 150 characters max. - * - * @return string - */ - public function getMerchantMemo() - { - return $this->merchant_memo; - } - - /** - * Full URL of an external image to use as the logo. 4000 characters max. - * - * @param string $logo_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setLogoUrl($logo_url) - { - UrlValidator::validate($logo_url, "LogoUrl"); - $this->logo_url = $logo_url; - return $this; - } - - /** - * Full URL of an external image to use as the logo. 4000 characters max. - * - * @return string - */ - public function getLogoUrl() - { - return $this->logo_url; - } - - /** - * The total amount of the invoice. - * - * @param \PayPal\Api\Currency $total_amount - * - * @return $this - */ - public function setTotalAmount($total_amount) - { - $this->total_amount = $total_amount; - return $this; - } - - /** - * The total amount of the invoice. - * - * @return \PayPal\Api\Currency - */ - public function getTotalAmount() - { - return $this->total_amount; - } - - /** - * List of payment details for the invoice. - * - * @param \PayPal\Api\PaymentDetail[] $payments - * - * @return $this - */ - public function setPayments($payments) - { - $this->payments = $payments; - return $this; - } - - /** - * List of payment details for the invoice. - * - * @return \PayPal\Api\PaymentDetail[] - */ - public function getPayments() - { - return $this->payments; - } - - /** - * Append PaymentDetails to the list. - * - * @param \PayPal\Api\PaymentDetail $paymentDetail - * @return $this - */ - public function addPaymentDetail($paymentDetail) - { - if (!$this->getPayments()) { - return $this->setPayments(array($paymentDetail)); - } else { - return $this->setPayments( - array_merge($this->getPayments(), array($paymentDetail)) - ); - } - } - - /** - * Remove PaymentDetails from the list. - * - * @param \PayPal\Api\PaymentDetail $paymentDetail - * @return $this - */ - public function removePaymentDetail($paymentDetail) - { - return $this->setPayments( - array_diff($this->getPayments(), array($paymentDetail)) - ); - } - - /** - * List of refund details for the invoice. - * - * @param \PayPal\Api\RefundDetail[] $refunds - * - * @return $this - */ - public function setRefunds($refunds) - { - $this->refunds = $refunds; - return $this; - } - - /** - * List of refund details for the invoice. - * - * @return \PayPal\Api\RefundDetail[] - */ - public function getRefunds() - { - return $this->refunds; - } - - /** - * Append RefundDetails to the list. - * - * @param \PayPal\Api\RefundDetail $refundDetail - * @return $this - */ - public function addRefundDetail($refundDetail) - { - if (!$this->getRefunds()) { - return $this->setRefunds(array($refundDetail)); - } else { - return $this->setRefunds( - array_merge($this->getRefunds(), array($refundDetail)) - ); - } - } - - /** - * Remove RefundDetails from the list. - * - * @param \PayPal\Api\RefundDetail $refundDetail - * @return $this - */ - public function removeRefundDetail($refundDetail) - { - return $this->setRefunds( - array_diff($this->getRefunds(), array($refundDetail)) - ); - } - - /** - * Audit information for the invoice. - * - * @param \PayPal\Api\Metadata $metadata - * - * @return $this - */ - public function setMetadata($metadata) - { - $this->metadata = $metadata; - return $this; - } - - /** - * Audit information for the invoice. - * - * @return \PayPal\Api\Metadata - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Any miscellaneous invoice data. 4000 characters max. - * - * @param string $additional_data - * - * @return $this - */ - public function setAdditionalData($additional_data) - { - $this->additional_data = $additional_data; - return $this; - } - - /** - * Any miscellaneous invoice data. 4000 characters max. - * - * @return string - */ - public function getAdditionalData() - { - return $this->additional_data; - } - - /** - * Create a new invoice by passing the details for the invoice, including the merchant_info, to the request URI. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Invoice - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/invoicing/invoices", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Search for a specific invoice or invoices by passing a search object that specifies your search criteria to the request URI. - * - * @param Search $search - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return InvoiceSearchResponse - */ - public static function search($search, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($search, 'search'); - $payLoad = $search->toJSON(); - $json = self::executeCall( - "/v1/invoicing/search", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new InvoiceSearchResponse(); - $ret->fromJson($json); - return $ret; - } - - /** - * Send a specific invoice to its intended recipient by passing the invoice ID to the request URI. Optionally, you can specify whether to send the merchant an invoice update notification by using the notify_merchant query parameter. By default, notify_merchant is true. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function send($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}/send", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Send a reminder about a specific invoice to its intended recipient by providing the ID of the invoice in the request URI. In addition, pass a notification object that specifies the subject of the reminder and other details in the request JSON. - * - * @param Notification $notification - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function remind($notification, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($notification, 'notification'); - $payLoad = $notification->toJSON(); - self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}/remind", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Cancel an invoice by passing the invoice ID to the request URI. - * - * @param CancelNotification $cancelNotification - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function cancel($cancelNotification, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($cancelNotification, 'cancelNotification'); - $payLoad = $cancelNotification->toJSON(); - self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}/cancel", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Mark the status of an invoice as paid by passing the invoice ID to the request URI. In addition, pass a payment detail object that specifies the payment method and other details in the request JSON. - * - * @param PaymentDetail $paymentDetail - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function recordPayment($paymentDetail, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($paymentDetail, 'paymentDetail'); - $payLoad = $paymentDetail->toJSON(); - self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}/record-payment", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Mark the status of an invoice as refunded by passing the invoice ID to the request URI. In addition, pass a refund-detail object that specifies the type of refund and other details in the request JSON. - * - * @param RefundDetail $refundDetail - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function recordRefund($refundDetail, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($refundDetail, 'refundDetail'); - $payLoad = $refundDetail->toJSON(); - self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}/record-refund", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Retrieve the details for a particular invoice by passing the invoice ID to the request URI. - * - * @param string $invoiceId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Invoice - */ - public static function get($invoiceId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($invoiceId, 'invoiceId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/invoicing/invoices/$invoiceId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Invoice(); - $ret->fromJson($json); - return $ret; - } - - /** - * List some or all invoices for a merchant according to optional query string parameters specified. - * - * @param array $params - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return InvoiceSearchResponse - */ - public static function getAll($params = array(), $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($params, 'params'); - - $allowedParams = array( - 'page' => 1, - 'page_size' => 1, - 'total_count_required' => 1 - ); - - $payLoad = ""; - $json = self::executeCall( - "/v1/invoicing/invoices/?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new InvoiceSearchResponse(); - $ret->fromJson($json); - return $ret; - } - - /** - * Fully update an invoice by passing the invoice ID to the request URI. In addition, pass a complete invoice object in the request JSON. Partial updates are not supported. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Invoice - */ - public function update($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}", - "PUT", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Delete a particular invoice by passing the invoice ID to the request URI. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function delete($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - self::executeCall( - "/v1/invoicing/invoices/{$this->getId()}", - "DELETE", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Generate a QR code for an invoice by passing the invoice ID to the request URI. The request generates a QR code that is 500 pixels in width and height. You can change the dimensions of the returned code by specifying optional query parameters. - * - * @param array $params - * @param string $invoiceId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Image - */ - public static function qrCode($invoiceId, $params = array(), $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($invoiceId, 'invoiceId'); - ArgumentValidator::validate($params, 'params'); - - $allowedParams = array( - 'width' => 1, - 'height' => 1, - 'action' => 1 - ); - - $payLoad = ""; - $json = self::executeCall( - "/v1/invoicing/invoices/$invoiceId/qr-code?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Image(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceAddress.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceAddress.php deleted file mode 100644 index 7e8786a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceAddress.php +++ /dev/null @@ -1,39 +0,0 @@ -phone = $phone; - return $this; - } - - /** - * Phone number in E.123 format. - * - * @return \PayPal\Api\Phone - */ - public function getPhone() - { - return $this->phone; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceItem.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceItem.php deleted file mode 100644 index 3375762..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceItem.php +++ /dev/null @@ -1,189 +0,0 @@ -name = $name; - return $this; - } - - /** - * Name of the item. 60 characters max. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Description of the item. 1000 characters max. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of the item. 1000 characters max. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Quantity of the item. Range of 0 to 9999.999. - * - * @param string|double $quantity - * - * @return $this - */ - public function setQuantity($quantity) - { - NumericValidator::validate($quantity, "Percent"); - $quantity = FormatConverter::formatToPrice($quantity); - $this->quantity = $quantity; - return $this; - } - - /** - * Quantity of the item. Range of 0 to 9999.999. - * - * @return string - */ - public function getQuantity() - { - return $this->quantity; - } - - /** - * Unit price of the item. Range of -999999.99 to 999999.99. - * - * @param \PayPal\Api\Currency $unit_price - * - * @return $this - */ - public function setUnitPrice($unit_price) - { - $this->unit_price = $unit_price; - return $this; - } - - /** - * Unit price of the item. Range of -999999.99 to 999999.99. - * - * @return \PayPal\Api\Currency - */ - public function getUnitPrice() - { - return $this->unit_price; - } - - /** - * Tax associated with the item. - * - * @param \PayPal\Api\Tax $tax - * - * @return $this - */ - public function setTax($tax) - { - $this->tax = $tax; - return $this; - } - - /** - * Tax associated with the item. - * - * @return \PayPal\Api\Tax - */ - public function getTax() - { - return $this->tax; - } - - /** - * Date on which the item or service was provided. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $date - * - * @return $this - */ - public function setDate($date) - { - $this->date = $date; - return $this; - } - - /** - * Date on which the item or service was provided. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getDate() - { - return $this->date; - } - - /** - * Item discount in percent or amount. - * - * @param \PayPal\Api\Cost $discount - * - * @return $this - */ - public function setDiscount($discount) - { - $this->discount = $discount; - return $this; - } - - /** - * Item discount in percent or amount. - * - * @return \PayPal\Api\Cost - */ - public function getDiscount() - { - return $this->discount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceSearchResponse.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceSearchResponse.php deleted file mode 100644 index 0634eb6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceSearchResponse.php +++ /dev/null @@ -1,95 +0,0 @@ -total_count = $total_count; - return $this; - } - - /** - * Total number of invoices. - * - * @return int - */ - public function getTotalCount() - { - return $this->total_count; - } - - /** - * List of invoices belonging to a merchant. - * - * @param \PayPal\Api\Invoice[] $invoices - * - * @return $this - */ - public function setInvoices($invoices) - { - $this->invoices = $invoices; - return $this; - } - - /** - * List of invoices belonging to a merchant. - * - * @return \PayPal\Api\Invoice[] - */ - public function getInvoices() - { - return $this->invoices; - } - - /** - * Append Invoices to the list. - * - * @param \PayPal\Api\Invoice $invoice - * @return $this - */ - public function addInvoice($invoice) - { - if (!$this->getInvoices()) { - return $this->setInvoices(array($invoice)); - } else { - return $this->setInvoices( - array_merge($this->getInvoices(), array($invoice)) - ); - } - } - - /** - * Remove Invoices from the list. - * - * @param \PayPal\Api\Invoice $invoice - * @return $this - */ - public function removeInvoice($invoice) - { - return $this->setInvoices( - array_diff($this->getInvoices(), array($invoice)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Item.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Item.php deleted file mode 100644 index 4c647ab..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Item.php +++ /dev/null @@ -1,456 +0,0 @@ -sku = $sku; - return $this; - } - - /** - * Stock keeping unit corresponding (SKU) to item. - * - * @return string - */ - public function getSku() - { - return $this->sku; - } - - /** - * Item name. 127 characters max. - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Item name. 127 characters max. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Description of the item. Only supported when the `payment_method` is set to `paypal`. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of the item. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Number of a particular item. 10 characters max. - * - * @param string $quantity - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->quantity = $quantity; - return $this; - } - - /** - * Number of a particular item. 10 characters max. - * - * @return string - */ - public function getQuantity() - { - return $this->quantity; - } - - /** - * Item cost. 10 characters max. - * - * @param string|double $price - * - * @return $this - */ - public function setPrice($price) - { - NumericValidator::validate($price, "Price"); - $price = FormatConverter::formatToPrice($price, $this->getCurrency()); - $this->price = $price; - return $this; - } - - /** - * Item cost. 10 characters max. - * - * @return string - */ - public function getPrice() - { - return $this->price; - } - - /** - * 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/). - * - * @param string $currency - * - * @return $this - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/). - * - * @return string - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * Tax of the item. Only supported when the `payment_method` is set to `paypal`. - * - * @param string|double $tax - * - * @return $this - */ - public function setTax($tax) - { - NumericValidator::validate($tax, "Tax"); - $tax = FormatConverter::formatToPrice($tax, $this->getCurrency()); - $this->tax = $tax; - return $this; - } - - /** - * Tax of the item. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getTax() - { - return $this->tax; - } - - /** - * URL linking to item information. Available to payer in transaction history. - * - * @param string $url - * @throws \InvalidArgumentException - * @return $this - */ - public function setUrl($url) - { - UrlValidator::validate($url, "Url"); - $this->url = $url; - return $this; - } - - /** - * URL linking to item information. Available to payer in transaction history. - * - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Category type of the item. - * Valid Values: ["DIGITAL", "PHYSICAL"] - * - * @param string $category - * - * @return $this - */ - public function setCategory($category) - { - $this->category = $category; - return $this; - } - - /** - * Category type of the item. - * - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Weight of the item. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Measurement $weight - * - * @return $this - */ - public function setWeight($weight) - { - $this->weight = $weight; - return $this; - } - - /** - * Weight of the item. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Measurement - */ - public function getWeight() - { - return $this->weight; - } - - /** - * Length of the item. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Measurement $length - * - * @return $this - */ - public function setLength($length) - { - $this->length = $length; - return $this; - } - - /** - * Length of the item. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Measurement - */ - public function getLength() - { - return $this->length; - } - - /** - * Height of the item. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Measurement $height - * - * @return $this - */ - public function setHeight($height) - { - $this->height = $height; - return $this; - } - - /** - * Height of the item. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Measurement - */ - public function getHeight() - { - return $this->height; - } - - /** - * Width of the item. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Measurement $width - * - * @return $this - */ - public function setWidth($width) - { - $this->width = $width; - return $this; - } - - /** - * Width of the item. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Measurement - */ - public function getWidth() - { - return $this->width; - } - - /** - * Set of optional data used for PayPal risk determination. - * - * @deprecated Not publicly available - * @param \PayPal\Api\NameValuePair[] $supplementary_data - * - * @return $this - */ - public function setSupplementaryData($supplementary_data) - { - $this->supplementary_data = $supplementary_data; - return $this; - } - - /** - * Set of optional data used for PayPal risk determination. - * - * @deprecated Not publicly available - * @return \PayPal\Api\NameValuePair[] - */ - public function getSupplementaryData() - { - return $this->supplementary_data; - } - - /** - * Append SupplementaryData to the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\NameValuePair $nameValuePair - * @return $this - */ - public function addSupplementaryData($nameValuePair) - { - if (!$this->getSupplementaryData()) { - return $this->setSupplementaryData(array($nameValuePair)); - } else { - return $this->setSupplementaryData( - array_merge($this->getSupplementaryData(), array($nameValuePair)) - ); - } - } - - /** - * Remove SupplementaryData from the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\NameValuePair $nameValuePair - * @return $this - */ - public function removeSupplementaryData($nameValuePair) - { - return $this->setSupplementaryData( - array_diff($this->getSupplementaryData(), array($nameValuePair)) - ); - } - - /** - * Set of optional data used for PayPal post-transaction notifications. - * - * @deprecated Not publicly available - * @param \PayPal\Api\NameValuePair[] $postback_data - * - * @return $this - */ - public function setPostbackData($postback_data) - { - $this->postback_data = $postback_data; - return $this; - } - - /** - * Set of optional data used for PayPal post-transaction notifications. - * - * @deprecated Not publicly available - * @return \PayPal\Api\NameValuePair[] - */ - public function getPostbackData() - { - return $this->postback_data; - } - - /** - * Append PostbackData to the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\NameValuePair $nameValuePair - * @return $this - */ - public function addPostbackData($nameValuePair) - { - if (!$this->getPostbackData()) { - return $this->setPostbackData(array($nameValuePair)); - } else { - return $this->setPostbackData( - array_merge($this->getPostbackData(), array($nameValuePair)) - ); - } - } - - /** - * Remove PostbackData from the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\NameValuePair $nameValuePair - * @return $this - */ - public function removePostbackData($nameValuePair) - { - return $this->setPostbackData( - array_diff($this->getPostbackData(), array($nameValuePair)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ItemList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ItemList.php deleted file mode 100644 index 3b674ad..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ItemList.php +++ /dev/null @@ -1,143 +0,0 @@ -items = $items; - return $this; - } - - /** - * List of items. - * - * @return \PayPal\Api\Item[] - */ - public function getItems() - { - return $this->items; - } - - /** - * Append Items to the list. - * - * @param \PayPal\Api\Item $item - * @return $this - */ - public function addItem($item) - { - if (!$this->getItems()) { - return $this->setItems(array($item)); - } else { - return $this->setItems( - array_merge($this->getItems(), array($item)) - ); - } - } - - /** - * Remove Items from the list. - * - * @param \PayPal\Api\Item $item - * @return $this - */ - public function removeItem($item) - { - return $this->setItems( - array_diff($this->getItems(), array($item)) - ); - } - - /** - * Shipping address, if different than the payer address. - * - * @param \PayPal\Api\ShippingAddress $shipping_address - * - * @return $this - */ - public function setShippingAddress($shipping_address) - { - $this->shipping_address = $shipping_address; - return $this; - } - - /** - * Shipping address, if different than the payer address. - * - * @return \PayPal\Api\ShippingAddress - */ - public function getShippingAddress() - { - return $this->shipping_address; - } - - /** - * Shipping method used for this payment like USPSParcel etc. - * - * @param string $shipping_method - * - * @return $this - */ - public function setShippingMethod($shipping_method) - { - $this->shipping_method = $shipping_method; - return $this; - } - - /** - * Shipping method used for this payment like USPSParcel etc. - * - * @return string - */ - public function getShippingMethod() - { - return $this->shipping_method; - } - - /** - * Allows merchant's to share payer’s contact number with PayPal for the current payment. Final contact number of payer associated with the transaction might be same as shipping_phone_number or different based on Payer’s action on PayPal. The phone number must be represented in its canonical international format, as defined by the E.164 numbering plan - * - * @param string $shipping_phone_number - * - * @return $this - */ - public function setShippingPhoneNumber($shipping_phone_number) - { - $this->shipping_phone_number = $shipping_phone_number; - return $this; - } - - /** - * Allows merchant's to share payer’s contact number with PayPal for the current payment. Final contact number of payer associated with the transaction might be same as shipping_phone_number or different based on Payer’s action on PayPal. The phone number must be represented in its canonical international format, as defined by the E.164 numbering plan - * - * @return string - */ - public function getShippingPhoneNumber() - { - return $this->shipping_phone_number; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Links.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Links.php deleted file mode 100644 index 7e00880..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Links.php +++ /dev/null @@ -1,161 +0,0 @@ -href = $href; - return $this; - } - - /** - * Gets Href - * - * @return string - */ - public function getHref() - { - return $this->href; - } - - /** - * Sets Rel - * - * @param string $rel - * - * @return $this - */ - public function setRel($rel) - { - $this->rel = $rel; - return $this; - } - - /** - * Gets Rel - * - * @return string - */ - public function getRel() - { - return $this->rel; - } - - /** - * Sets TargetSchema - * - * @param \PayPal\Api\HyperSchema $targetSchema - * - * @return $this - */ - public function setTargetSchema($targetSchema) - { - $this->targetSchema = $targetSchema; - return $this; - } - - /** - * Gets TargetSchema - * - * @return \PayPal\Api\HyperSchema - */ - public function getTargetSchema() - { - return $this->targetSchema; - } - - /** - * Sets Method - * - * @param string $method - * - * @return $this - */ - public function setMethod($method) - { - $this->method = $method; - return $this; - } - - /** - * Gets Method - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Sets Enctype - * - * @param string $enctype - * - * @return $this - */ - public function setEnctype($enctype) - { - $this->enctype = $enctype; - return $this; - } - - /** - * Gets Enctype - * - * @return string - */ - public function getEnctype() - { - return $this->enctype; - } - - /** - * Sets Schema - * - * @param \PayPal\Api\HyperSchema $schema - * - * @return $this - */ - public function setSchema($schema) - { - $this->schema = $schema; - return $this; - } - - /** - * Gets Schema - * - * @return \PayPal\Api\HyperSchema - */ - public function getSchema() - { - return $this->schema; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Measurement.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Measurement.php deleted file mode 100644 index 5ae9ace..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Measurement.php +++ /dev/null @@ -1,65 +0,0 @@ -value = $value; - return $this; - } - - /** - * Value this measurement represents. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Unit in which the value is represented. - * - * @param string $unit - * - * @return $this - */ - public function setUnit($unit) - { - $this->unit = $unit; - return $this; - } - - /** - * Unit in which the value is represented. - * - * @return string - */ - public function getUnit() - { - return $this->unit; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantInfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantInfo.php deleted file mode 100644 index 4d97d8c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantInfo.php +++ /dev/null @@ -1,257 +0,0 @@ -email = $email; - return $this; - } - - /** - * Email address of the merchant. 260 characters max. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * First name of the merchant. 30 characters max. - * - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * First name of the merchant. 30 characters max. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Last name of the merchant. 30 characters max. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Last name of the merchant. 30 characters max. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Address of the merchant. - * - * @param \PayPal\Api\InvoiceAddress $address - * - * @return $this - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * Address of the merchant. - * - * @return \PayPal\Api\InvoiceAddress - */ - public function getAddress() - { - return $this->address; - } - - /** - * Company business name of the merchant. 100 characters max. - * - * @param string $business_name - * - * @return $this - */ - public function setBusinessName($business_name) - { - $this->business_name = $business_name; - return $this; - } - - /** - * Company business name of the merchant. 100 characters max. - * - * @return string - */ - public function getBusinessName() - { - return $this->business_name; - } - - /** - * Phone number of the merchant. - * - * @param \PayPal\Api\Phone $phone - * - * @return $this - */ - public function setPhone($phone) - { - $this->phone = $phone; - return $this; - } - - /** - * Phone number of the merchant. - * - * @return \PayPal\Api\Phone - */ - public function getPhone() - { - return $this->phone; - } - - /** - * Fax number of the merchant. - * - * @param \PayPal\Api\Phone $fax - * - * @return $this - */ - public function setFax($fax) - { - $this->fax = $fax; - return $this; - } - - /** - * Fax number of the merchant. - * - * @return \PayPal\Api\Phone - */ - public function getFax() - { - return $this->fax; - } - - /** - * Website of the merchant. 2048 characters max. - * - * @param string $website - * - * @return $this - */ - public function setWebsite($website) - { - $this->website = $website; - return $this; - } - - /** - * Website of the merchant. 2048 characters max. - * - * @return string - */ - public function getWebsite() - { - return $this->website; - } - - /** - * Tax ID of the merchant. 100 characters max. - * - * @param string $tax_id - * - * @return $this - */ - public function setTaxId($tax_id) - { - $this->tax_id = $tax_id; - return $this; - } - - /** - * Tax ID of the merchant. 100 characters max. - * - * @return string - */ - public function getTaxId() - { - return $this->tax_id; - } - - /** - * Option to display additional information such as business hours. 40 characters max. - * - * @param string $additional_info - * - * @return $this - */ - public function setAdditionalInfo($additional_info) - { - $this->additional_info = $additional_info; - return $this; - } - - /** - * Option to display additional information such as business hours. 40 characters max. - * - * @return string - */ - public function getAdditionalInfo() - { - return $this->additional_info; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantPreferences.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantPreferences.php deleted file mode 100644 index b51d604..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantPreferences.php +++ /dev/null @@ -1,261 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the merchant_preferences. 128 characters max. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Setup fee amount. Default is 0. - * - * @param \PayPal\Api\Currency $setup_fee - * - * @return $this - */ - public function setSetupFee($setup_fee) - { - $this->setup_fee = $setup_fee; - return $this; - } - - /** - * Setup fee amount. Default is 0. - * - * @return \PayPal\Api\Currency - */ - public function getSetupFee() - { - return $this->setup_fee; - } - - /** - * Redirect URL on cancellation of agreement request. 1000 characters max. - * - * @param string $cancel_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setCancelUrl($cancel_url) - { - UrlValidator::validate($cancel_url, "CancelUrl"); - $this->cancel_url = $cancel_url; - return $this; - } - - /** - * Redirect URL on cancellation of agreement request. 1000 characters max. - * - * @return string - */ - public function getCancelUrl() - { - return $this->cancel_url; - } - - /** - * Redirect URL on creation of agreement request. 1000 characters max. - * - * @param string $return_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setReturnUrl($return_url) - { - UrlValidator::validate($return_url, "ReturnUrl"); - $this->return_url = $return_url; - return $this; - } - - /** - * Redirect URL on creation of agreement request. 1000 characters max. - * - * @return string - */ - public function getReturnUrl() - { - return $this->return_url; - } - - /** - * Notify URL on agreement creation. 1000 characters max. - * - * @param string $notify_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setNotifyUrl($notify_url) - { - UrlValidator::validate($notify_url, "NotifyUrl"); - $this->notify_url = $notify_url; - return $this; - } - - /** - * Notify URL on agreement creation. 1000 characters max. - * - * @return string - */ - public function getNotifyUrl() - { - return $this->notify_url; - } - - /** - * Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts. - * - * @param string $max_fail_attempts - * - * @return $this - */ - public function setMaxFailAttempts($max_fail_attempts) - { - $this->max_fail_attempts = $max_fail_attempts; - return $this; - } - - /** - * Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts. - * - * @return string - */ - public function getMaxFailAttempts() - { - return $this->max_fail_attempts; - } - - /** - * Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`. - * - * @param string $auto_bill_amount - * - * @return $this - */ - public function setAutoBillAmount($auto_bill_amount) - { - $this->auto_bill_amount = $auto_bill_amount; - return $this; - } - - /** - * Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`. - * - * @return string - */ - public function getAutoBillAmount() - { - return $this->auto_bill_amount; - } - - /** - * Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue. - * - * @param string $initial_fail_amount_action - * - * @return $this - */ - public function setInitialFailAmountAction($initial_fail_amount_action) - { - $this->initial_fail_amount_action = $initial_fail_amount_action; - return $this; - } - - /** - * Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue. - * - * @return string - */ - public function getInitialFailAmountAction() - { - return $this->initial_fail_amount_action; - } - - /** - * Payment types that are accepted for this plan. - * - * @param string $accepted_payment_type - * - * @return $this - */ - public function setAcceptedPaymentType($accepted_payment_type) - { - $this->accepted_payment_type = $accepted_payment_type; - return $this; - } - - /** - * Payment types that are accepted for this plan. - * - * @return string - */ - public function getAcceptedPaymentType() - { - return $this->accepted_payment_type; - } - - /** - * char_set for this plan. - * - * @param string $char_set - * - * @return $this - */ - public function setCharSet($char_set) - { - $this->char_set = $char_set; - return $this; - } - - /** - * char_set for this plan. - * - * @return string - */ - public function getCharSet() - { - return $this->char_set; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Metadata.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Metadata.php deleted file mode 100644 index d4f3eaf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Metadata.php +++ /dev/null @@ -1,259 +0,0 @@ -created_date = $created_date; - return $this; - } - - /** - * Date when the resource was created. - * - * @return string - */ - public function getCreatedDate() - { - return $this->created_date; - } - - /** - * Email address of the account that created the resource. - * - * @param string $created_by - * - * @return $this - */ - public function setCreatedBy($created_by) - { - $this->created_by = $created_by; - return $this; - } - - /** - * Email address of the account that created the resource. - * - * @return string - */ - public function getCreatedBy() - { - return $this->created_by; - } - - /** - * Date when the resource was cancelled. - * - * @param string $cancelled_date - * - * @return $this - */ - public function setCancelledDate($cancelled_date) - { - $this->cancelled_date = $cancelled_date; - return $this; - } - - /** - * Date when the resource was cancelled. - * - * @return string - */ - public function getCancelledDate() - { - return $this->cancelled_date; - } - - /** - * Actor who cancelled the resource. - * - * @param string $cancelled_by - * - * @return $this - */ - public function setCancelledBy($cancelled_by) - { - $this->cancelled_by = $cancelled_by; - return $this; - } - - /** - * Actor who cancelled the resource. - * - * @return string - */ - public function getCancelledBy() - { - return $this->cancelled_by; - } - - /** - * Date when the resource was last edited. - * - * @param string $last_updated_date - * - * @return $this - */ - public function setLastUpdatedDate($last_updated_date) - { - $this->last_updated_date = $last_updated_date; - return $this; - } - - /** - * Date when the resource was last edited. - * - * @return string - */ - public function getLastUpdatedDate() - { - return $this->last_updated_date; - } - - /** - * Email address of the account that last edited the resource. - * - * @param string $last_updated_by - * - * @return $this - */ - public function setLastUpdatedBy($last_updated_by) - { - $this->last_updated_by = $last_updated_by; - return $this; - } - - /** - * Email address of the account that last edited the resource. - * - * @return string - */ - public function getLastUpdatedBy() - { - return $this->last_updated_by; - } - - /** - * Date when the resource was first sent. - * - * @param string $first_sent_date - * - * @return $this - */ - public function setFirstSentDate($first_sent_date) - { - $this->first_sent_date = $first_sent_date; - return $this; - } - - /** - * Date when the resource was first sent. - * - * @return string - */ - public function getFirstSentDate() - { - return $this->first_sent_date; - } - - /** - * Date when the resource was last sent. - * - * @param string $last_sent_date - * - * @return $this - */ - public function setLastSentDate($last_sent_date) - { - $this->last_sent_date = $last_sent_date; - return $this; - } - - /** - * Date when the resource was last sent. - * - * @return string - */ - public function getLastSentDate() - { - return $this->last_sent_date; - } - - /** - * Email address of the account that last sent the resource. - * - * @param string $last_sent_by - * - * @return $this - */ - public function setLastSentBy($last_sent_by) - { - $this->last_sent_by = $last_sent_by; - return $this; - } - - /** - * Email address of the account that last sent the resource. - * - * @return string - */ - public function getLastSentBy() - { - return $this->last_sent_by; - } - - /** - * URL representing the payer's view of the invoice. - * - * @param string $payer_view_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setPayerViewUrl($payer_view_url) - { - UrlValidator::validate($payer_view_url, "PayerViewUrl"); - $this->payer_view_url = $payer_view_url; - return $this; - } - - /** - * URL representing the payer's view of the invoice. - * - * @return string - */ - public function getPayerViewUrl() - { - return $this->payer_view_url; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/NameValuePair.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/NameValuePair.php deleted file mode 100644 index 4e32720..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/NameValuePair.php +++ /dev/null @@ -1,65 +0,0 @@ -name = $name; - return $this; - } - - /** - * Key for the name value pair. The value name types should be correlated - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Value for the name value pair. - * - * @param string $value - * - * @return $this - */ - public function setValue($value) - { - $this->value = $value; - return $this; - } - - /** - * Value for the name value pair. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Notification.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Notification.php deleted file mode 100644 index 743f001..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Notification.php +++ /dev/null @@ -1,89 +0,0 @@ -subject = $subject; - return $this; - } - - /** - * Subject of the notification. - * - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Note to the payer. - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Note to the payer. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * A flag indicating whether a copy of the email has to be sent to the merchant. - * - * @param bool $send_to_merchant - * - * @return $this - */ - public function setSendToMerchant($send_to_merchant) - { - $this->send_to_merchant = $send_to_merchant; - return $this; - } - - /** - * A flag indicating whether a copy of the email has to be sent to the merchant. - * - * @return bool - */ - public function getSendToMerchant() - { - return $this->send_to_merchant; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdAddress.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdAddress.php deleted file mode 100644 index 306abf6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdAddress.php +++ /dev/null @@ -1,133 +0,0 @@ -street_address = $street_address; - return $this; - } - - /** - * Full street address component, which may include house number, street name. - * - * @return string - */ - public function getStreetAddress() - { - return $this->street_address; - } - - /** - * City or locality component. - * - * @param string $locality - * @return self - */ - public function setLocality($locality) - { - $this->locality = $locality; - return $this; - } - - /** - * City or locality component. - * - * @return string - */ - public function getLocality() - { - return $this->locality; - } - - /** - * State, province, prefecture or region component. - * - * @param string $region - * @return self - */ - public function setRegion($region) - { - $this->region = $region; - return $this; - } - - /** - * State, province, prefecture or region component. - * - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Zip code or postal code component. - * - * @param string $postal_code - * @return self - */ - public function setPostalCode($postal_code) - { - $this->postal_code = $postal_code; - return $this; - } - - /** - * Zip code or postal code component. - * - * @return string - */ - public function getPostalCode() - { - return $this->postal_code; - } - - /** - * Country name component. - * - * @param string $country - * @return self - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * Country name component. - * - * @return string - */ - public function getCountry() - { - return $this->country; - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdError.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdError.php deleted file mode 100644 index 4b9b956..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdError.php +++ /dev/null @@ -1,85 +0,0 @@ -error = $error; - return $this; - } - - /** - * A single ASCII error code from the following enum. - * - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * A resource ID that indicates the starting resource in the returned results. - * - * @param string $error_description - * @return self - */ - public function setErrorDescription($error_description) - { - $this->error_description = $error_description; - return $this; - } - - /** - * A resource ID that indicates the starting resource in the returned results. - * - * @return string - */ - public function getErrorDescription() - { - return $this->error_description; - } - - /** - * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. - * - * @param string $error_uri - * @return self - */ - public function setErrorUri($error_uri) - { - $this->error_uri = $error_uri; - return $this; - } - - /** - * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. - * - * @return string - */ - public function getErrorUri() - { - return $this->error_uri; - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdSession.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdSession.php deleted file mode 100644 index 088026d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdSession.php +++ /dev/null @@ -1,107 +0,0 @@ -getConfig(); - - if ($apiContext->get($clientId)) { - $clientId = $apiContext->get($clientId); - } - - $clientId = $clientId ? $clientId : $apiContext->getCredential()->getClientId(); - - $scope = count($scope) != 0 ? $scope : array('openid', 'profile', 'address', 'email', 'phone', - 'https://uri.paypal.com/services/paypalattributes', 'https://uri.paypal.com/services/expresscheckout'); - if (!in_array('openid', $scope)) { - $scope[] = 'openid'; - } - - $params = array( - 'client_id' => $clientId, - 'response_type' => 'code', - 'scope' => implode(" ", $scope), - 'redirect_uri' => $redirectUri - ); - - if ($nonce) { - $params['nonce'] = $nonce; - } - if ($state) { - $params['state'] = $state; - } - return sprintf("%s/v1/authorize?%s", self::getBaseUrl($config), http_build_query($params)); - } - - - /** - * Returns the URL to which the user must be redirected to - * logout from the OpenID provider (i.e. PayPal) - * - * @param string $redirectUri Uri on merchant website to where - * the user must be redirected to post logout - * @param string $idToken id_token from the TokenInfo object - * @param ApiContext $apiContext Optional API Context - * @return string logout URL - */ - public static function getLogoutUrl($redirectUri, $idToken, $apiContext = null) - { - - if (is_null($apiContext)) { - $apiContext = new ApiContext(); - } - $config = $apiContext->getConfig(); - - $params = array( - 'id_token' => $idToken, - 'redirect_uri' => $redirectUri, - 'logout' => 'true' - ); - return sprintf("%s/v1/endsession?%s", self::getBaseUrl($config), http_build_query($params)); - } - - /** - * Gets the base URL for the Redirect URI - * - * @param $config - * @return null|string - */ - private static function getBaseUrl($config) - { - - if (array_key_exists('openid.RedirectUri', $config)) { - return $config['openid.RedirectUri']; - } else if (array_key_exists('mode', $config)) { - switch (strtoupper($config['mode'])) { - case 'SANDBOX': - return PayPalConstants::OPENID_REDIRECT_SANDBOX_URL; - case 'LIVE': - return PayPalConstants::OPENID_REDIRECT_LIVE_URL; - } - } - return null; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdTokeninfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdTokeninfo.php deleted file mode 100644 index 7d9cc97..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdTokeninfo.php +++ /dev/null @@ -1,253 +0,0 @@ -scope = $scope; - return $this; - } - - /** - * OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. - * - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * The access token issued by the authorization server. - * - * @param string $access_token - * @return self - */ - public function setAccessToken($access_token) - { - $this->access_token = $access_token; - return $this; - } - - /** - * The access token issued by the authorization server. - * - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6. - * - * @param string $refresh_token - * @return self - */ - public function setRefreshToken($refresh_token) - { - $this->refresh_token = $refresh_token; - return $this; - } - - /** - * The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6. - * - * @return string - */ - public function getRefreshToken() - { - return $this->refresh_token; - } - - /** - * The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive. - * - * @param string $token_type - * @return self - */ - public function setTokenType($token_type) - { - $this->token_type = $token_type; - return $this; - } - - /** - * The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive. - * - * @return string - */ - public function getTokenType() - { - return $this->token_type; - } - - /** - * The id_token is a session token assertion that denotes the user's authentication status - * - * @param string $id_token - * @return self - */ - public function setIdToken($id_token) - { - $this->id_token = $id_token; - return $this; - } - - /** - * The id_token is a session token assertion that denotes the user's authentication status - * - * @return string - */ - public function getIdToken() - { - return $this->id_token; - } - - /** - * The lifetime in seconds of the access token. - * - * @param integer $expires_in - * @return self - */ - public function setExpiresIn($expires_in) - { - $this->expires_in = $expires_in; - return $this; - } - - /** - * The lifetime in seconds of the access token. - * - * @return integer - */ - public function getExpiresIn() - { - return $this->expires_in; - } - - - /** - * Creates an Access Token from an Authorization Code. - * - * @path /v1/identity/openidconnect/tokenservice - * @method POST - * @param array $params (allowed values are client_id, client_secret, grant_type, code and redirect_uri) - * (required) client_id from developer portal - * (required) client_secret from developer portal - * (required) code is Authorization code previously received from the authorization server - * (required) redirect_uri Redirection endpoint that must match the one provided during the - * authorization request that ended in receiving the authorization code. - * (optional) grant_type is the Token grant type. Defaults to authorization_code - * @param string $clientId - * @param string $clientSecret - * @param ApiContext $apiContext Optional API Context - * @param PayPalRestCall $restCall - * @return OpenIdTokeninfo - */ - public static function createFromAuthorizationCode($params, $clientId = null, $clientSecret = null, $apiContext = null, $restCall = null) - { - static $allowedParams = array('grant_type' => 1, 'code' => 1, 'redirect_uri' => 1); - - if (!array_key_exists('grant_type', $params)) { - $params['grant_type'] = 'authorization_code'; - } - $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential); - - if (sizeof($apiContext->get($clientId)) > 0) { - $clientId = $apiContext->get($clientId); - } - - if (sizeof($apiContext->get($clientSecret)) > 0) { - $clientSecret = $apiContext->get($clientSecret); - } - - $clientId = $clientId ? $clientId : $apiContext->getCredential()->getClientId(); - $clientSecret = $clientSecret ? $clientSecret : $apiContext->getCredential()->getClientSecret(); - - $json = self::executeCall( - "/v1/identity/openidconnect/tokenservice", - "POST", - http_build_query(array_intersect_key($params, $allowedParams)), - array( - 'Content-Type' => 'application/x-www-form-urlencoded', - 'Authorization' => 'Basic ' . base64_encode($clientId . ":" . $clientSecret) - ), - $apiContext, - $restCall - ); - $token = new OpenIdTokeninfo(); - $token->fromJson($json); - return $token; - } - - /** - * Creates an Access Token from an Refresh Token. - * - * @path /v1/identity/openidconnect/tokenservice - * @method POST - * @param array $params (allowed values are grant_type and scope) - * (required) client_id from developer portal - * (required) client_secret from developer portal - * (optional) refresh_token refresh token. If one is not passed, refresh token from the current object is used. - * (optional) grant_type is the Token grant type. Defaults to refresh_token - * (optional) scope is an array that either the same or a subset of the scope passed to the authorization request - * @param APIContext $apiContext Optional API Context - * @return OpenIdTokeninfo - */ - public function createFromRefreshToken($params, $apiContext = null) - { - static $allowedParams = array('grant_type' => 1, 'refresh_token' => 1, 'scope' => 1); - $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential); - - if (!array_key_exists('grant_type', $params)) { - $params['grant_type'] = 'refresh_token'; - } - if (!array_key_exists('refresh_token', $params)) { - $params['refresh_token'] = $this->getRefreshToken(); - } - - $clientId = isset($params['client_id']) ? $params['client_id'] : $apiContext->getCredential()->getClientId(); - $clientSecret = isset($params['client_secret']) ? $params['client_secret'] : $apiContext->getCredential()->getClientSecret(); - - $json = self::executeCall( - "/v1/identity/openidconnect/tokenservice", - "POST", - http_build_query(array_intersect_key($params, $allowedParams)), - array( - 'Content-Type' => 'application/x-www-form-urlencoded', - 'Authorization' => 'Basic ' . base64_encode($clientId . ":" . $clientSecret) - ), - $apiContext - ); - - $this->fromJson($json); - return $this; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdUserinfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdUserinfo.php deleted file mode 100644 index 46c00b8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OpenIdUserinfo.php +++ /dev/null @@ -1,538 +0,0 @@ -user_id = $user_id; - return $this; - } - - /** - * Subject - Identifier for the End-User at the Issuer. - * - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Subject - Identifier for the End-User at the Issuer. - * - * @param string $sub - * @return self - */ - public function setSub($sub) - { - $this->sub = $sub; - return $this; - } - - /** - * Subject - Identifier for the End-User at the Issuer. - * - * @return string - */ - public function getSub() - { - return $this->sub; - } - - /** - * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - * - * @param string $name - * @return self - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Given name(s) or first name(s) of the End-User - * - * @param string $given_name - * @return self - */ - public function setGivenName($given_name) - { - $this->given_name = $given_name; - return $this; - } - - /** - * Given name(s) or first name(s) of the End-User - * - * @return string - */ - public function getGivenName() - { - return $this->given_name; - } - - /** - * Surname(s) or last name(s) of the End-User. - * - * @param string $family_name - * @return self - */ - public function setFamilyName($family_name) - { - $this->family_name = $family_name; - return $this; - } - - /** - * Surname(s) or last name(s) of the End-User. - * - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * Middle name(s) of the End-User. - * - * @param string $middle_name - * @return self - */ - public function setMiddleName($middle_name) - { - $this->middle_name = $middle_name; - return $this; - } - - /** - * Middle name(s) of the End-User. - * - * @return string - */ - public function getMiddleName() - { - return $this->middle_name; - } - - /** - * URL of the End-User's profile picture. - * - * @param string $picture - * @return self - */ - public function setPicture($picture) - { - $this->picture = $picture; - return $this; - } - - /** - * URL of the End-User's profile picture. - * - * @return string - */ - public function getPicture() - { - return $this->picture; - } - - /** - * End-User's preferred e-mail address. - * - * @param string $email - * @return self - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * End-User's preferred e-mail address. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * True if the End-User's e-mail address has been verified; otherwise false. - * - * @param boolean $email_verified - * @return self - */ - public function setEmailVerified($email_verified) - { - $this->email_verified = $email_verified; - return $this; - } - - /** - * True if the End-User's e-mail address has been verified; otherwise false. - * - * @return boolean - */ - public function getEmailVerified() - { - return $this->email_verified; - } - - /** - * End-User's gender. - * - * @param string $gender - * @return self - */ - public function setGender($gender) - { - $this->gender = $gender; - return $this; - } - - /** - * End-User's gender. - * - * @return string - */ - public function getGender() - { - return $this->gender; - } - - /** - * End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used. - * - * @param string $birthday - * @return self - */ - public function setBirthday($birthday) - { - $this->birthday = $birthday; - return $this; - } - - /** - * End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used. - * - * @return string - */ - public function getBirthday() - { - return $this->birthday; - } - - /** - * Time zone database representing the End-User's time zone - * - * @param string $zoneinfo - * @return self - */ - public function setZoneinfo($zoneinfo) - { - $this->zoneinfo = $zoneinfo; - return $this; - } - - /** - * Time zone database representing the End-User's time zone - * - * @return string - */ - public function getZoneinfo() - { - return $this->zoneinfo; - } - - /** - * End-User's locale. - * - * @param string $locale - * @return self - */ - public function setLocale($locale) - { - $this->locale = $locale; - return $this; - } - - /** - * End-User's locale. - * - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * End-User's language. - * - * @param string $language - * @return self - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * End-User's language. - * - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * End-User's verified status. - * - * @param boolean $verified - * @return self - */ - public function setVerified($verified) - { - $this->verified = $verified; - return $this; - } - - /** - * End-User's verified status. - * - * @return boolean - */ - public function getVerified() - { - return $this->verified; - } - - /** - * End-User's preferred telephone number. - * - * @param string $phone_number - * @return self - */ - public function setPhoneNumber($phone_number) - { - $this->phone_number = $phone_number; - return $this; - } - - /** - * End-User's preferred telephone number. - * - * @return string - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - /** - * End-User's preferred address. - * - * @param \PayPal\Api\OpenIdAddress $address - * @return self - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * End-User's preferred address. - * - * @return \PayPal\Api\OpenIdAddress - */ - public function getAddress() - { - return $this->address; - } - - /** - * Verified account status. - * - * @param boolean $verified_account - * @return self - */ - public function setVerifiedAccount($verified_account) - { - $this->verified_account = $verified_account; - return $this; - } - - /** - * Verified account status. - * - * @return boolean - */ - public function getVerifiedAccount() - { - return $this->verified_account; - } - - /** - * Account type. - * - * @param string $account_type - * @return self - */ - public function setAccountType($account_type) - { - $this->account_type = $account_type; - return $this; - } - - /** - * Account type. - * - * @return string - */ - public function getAccountType() - { - return $this->account_type; - } - - /** - * Account holder age range. - * - * @param string $age_range - * @return self - */ - public function setAgeRange($age_range) - { - $this->age_range = $age_range; - return $this; - } - - /** - * Account holder age range. - * - * @return string - */ - public function getAgeRange() - { - return $this->age_range; - } - - /** - * Account payer identifier. - * - * @param string $payer_id - * @return self - */ - public function setPayerId($payer_id) - { - $this->payer_id = $payer_id; - return $this; - } - - /** - * Account payer identifier. - * - * @return string - */ - public function getPayerId() - { - return $this->payer_id; - } - - - /** - * returns user details - * - * @path /v1/identity/openidconnect/userinfo - * @method GET - * @param array $params (allowed values are access_token) - * access_token - access token from the createFromAuthorizationCode / createFromRefreshToken calls - * @param ApiContext $apiContext Optional API Context - * @return OpenIdUserinfo - */ - public static function getUserinfo($params, $apiContext = null) - { - static $allowedParams = array('schema' => 1); - - $params = is_array($params) ? $params : array(); - - if (!array_key_exists('schema', $params)) { - $params['schema'] = 'openid'; - } - $requestUrl = "/v1/identity/openidconnect/userinfo?" - . http_build_query(array_intersect_key($params, $allowedParams)); - - $json = self::executeCall( - $requestUrl, - "GET", - "", - array( - 'Authorization' => "Bearer " . $params['access_token'], - 'Content-Type' => 'x-www-form-urlencoded' - ), - $apiContext - ); - - $ret = new OpenIdUserinfo(); - $ret->fromJson($json); - - return $ret; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Order.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Order.php deleted file mode 100644 index f611ff7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Order.php +++ /dev/null @@ -1,438 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the order transaction. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base. - * - * @param string $purchase_unit_reference_id - * - * @return $this - */ - public function setPurchaseUnitReferenceId($purchase_unit_reference_id) - { - $this->purchase_unit_reference_id = $purchase_unit_reference_id; - return $this; - } - - /** - * Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base. - * - * @return string - */ - public function getPurchaseUnitReferenceId() - { - return $this->purchase_unit_reference_id; - } - - /** - * Amount being collected. - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount being collected. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - - /** - * specifies payment mode of the transaction - * Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"] - * - * @param string $payment_mode - * - * @return $this - */ - public function setPaymentMode($payment_mode) - { - $this->payment_mode = $payment_mode; - return $this; - } - - /** - * specifies payment mode of the transaction - * - * @return string - */ - public function getPaymentMode() - { - return $this->payment_mode; - } - - /** - * State of the order transaction. - * Valid Values: ["pending", "completed", "refunded", "partially_refunded", "voided"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the order transaction. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`. - * Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"] - * - * @param string $reason_code - * - * @return $this - */ - public function setReasonCode($reason_code) - { - $this->reason_code = $reason_code; - return $this; - } - - /** - * Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getReasonCode() - { - return $this->reason_code; - } - - /** - * [DEPRECATED] Reason the transaction is in pending state. Use reason_code field above instead. - * Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"] - * - * @param string $pending_reason - * - * @return $this - */ - public function setPendingReason($pending_reason) - { - $this->pending_reason = $pending_reason; - return $this; - } - - /** - * @deprecated [DEPRECATED] Reason the transaction is in pending state. Use reason_code field above instead. - * - * @return string - */ - public function getPendingReason() - { - return $this->pending_reason; - } - - /** - * The level of seller protection in force for the transaction. - * Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"] - * - * @param string $protection_eligibility - * - * @return $this - */ - public function setProtectionEligibility($protection_eligibility) - { - $this->protection_eligibility = $protection_eligibility; - return $this; - } - - /** - * The level of seller protection in force for the transaction. - * - * @return string - */ - public function getProtectionEligibility() - { - return $this->protection_eligibility; - } - - /** - * The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:
`ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.
`UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned. - * Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"] - * - * @param string $protection_eligibility_type - * - * @return $this - */ - public function setProtectionEligibilityType($protection_eligibility_type) - { - $this->protection_eligibility_type = $protection_eligibility_type; - return $this; - } - - /** - * The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:
`ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.
`UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned. - * - * @return string - */ - public function getProtectionEligibilityType() - { - return $this->protection_eligibility_type; - } - - /** - * ID of the Payment resource that this transaction is based on. - * - * @param string $parent_payment - * - * @return $this - */ - public function setParentPayment($parent_payment) - { - $this->parent_payment = $parent_payment; - return $this; - } - - /** - * ID of the Payment resource that this transaction is based on. - * - * @return string - */ - public function getParentPayment() - { - return $this->parent_payment; - } - - /** - * Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action. - * - * @param \PayPal\Api\FmfDetails $fmf_details - * - * @return $this - */ - public function setFmfDetails($fmf_details) - { - $this->fmf_details = $fmf_details; - return $this; - } - - /** - * Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action. - * - * @return \PayPal\Api\FmfDetails - */ - public function getFmfDetails() - { - return $this->fmf_details; - } - - /** - * Time the resource was created in UTC ISO8601 format. - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time the resource was created in UTC ISO8601 format. - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time the resource was last updated in UTC ISO8601 format. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time the resource was last updated in UTC ISO8601 format. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Retrieve details about an order by passing the order_id in the request URI. - * - * @param string $orderId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Order - */ - public static function get($orderId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($orderId, 'orderId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/orders/$orderId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Order(); - $ret->fromJson($json); - return $ret; - } - - /** - * Capture a payment. In addition, include the amount of the payment and indicate whether this is a final capture for the given authorization in the body of the request JSON. - * - * @param Capture $capture - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Capture - */ - public function capture($capture, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($capture, 'capture'); - $payLoad = $capture->toJSON(); - $json = self::executeCall( - "/v1/payments/orders/{$this->getId()}/capture", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Capture(); - $ret->fromJson($json); - return $ret; - } - - /** - * Void (cancel) an order by passing the order_id in the request URI. Note that an order cannot be voided if payment has already been partially or fully captured. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Order - */ - public function void($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/orders/{$this->getId()}/do-void", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Authorize an order by passing the order_id in the request URI. In addition, include an amount object in the body of the request JSON. - * - * @param Authorization $authorization Authorization Object with Amount value to be authorized - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Authorization - */ - public function authorize($authorization, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($authorization, 'Authorization'); - $payLoad = $authorization->toJSON(); - $json = self::executeCall( - "/v1/payments/orders/{$this->getId()}/authorize", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Authorization(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OverrideChargeModel.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OverrideChargeModel.php deleted file mode 100644 index b911c17..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/OverrideChargeModel.php +++ /dev/null @@ -1,65 +0,0 @@ -charge_id = $charge_id; - return $this; - } - - /** - * ID of charge model. - * - * @return string - */ - public function getChargeId() - { - return $this->charge_id; - } - - /** - * Updated Amount to be associated with this charge model. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Updated Amount to be associated with this charge model. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Patch.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Patch.php deleted file mode 100644 index 152f92c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Patch.php +++ /dev/null @@ -1,114 +0,0 @@ -op = $op; - return $this; - } - - /** - * The operation to perform. - * - * @return string - */ - public function getOp() - { - return $this->op; - } - - /** - * String containing a JSON Pointer value that references a location within the target document where the operation is performed. - * - * @param string $path - * - * @return $this - */ - public function setPath($path) - { - $this->path = $path; - return $this; - } - - /** - * String containing a JSON Pointer value that references a location within the target document where the operation is performed. - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * New value to apply based on the operation. - * - * @param mixed $value - * - * @return $this - */ - public function setValue($value) - { - $this->value = $value; - return $this; - } - - /** - * New value to apply based on the operation. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * A string containing a JSON Pointer value that references the location in the target document to move the value from. - * - * @param string $from - * - * @return $this - */ - public function setFrom($from) - { - $this->from = $from; - return $this; - } - - /** - * A string containing a JSON Pointer value that references the location in the target document to move the value from. - * - * @return string - */ - public function getFrom() - { - return $this->from; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PatchRequest.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PatchRequest.php deleted file mode 100644 index effc105..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PatchRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -patches = $patches; - return $this; - } - - /** - * Placeholder for holding array of patch objects - * - * @return \PayPal\Api\Patch[] - */ - public function getPatches() - { - return $this->patches; - } - - /** - * Append Patches to the list. - * - * @param \PayPal\Api\Patch $patch - * @return $this - */ - public function addPatch($patch) - { - if (!$this->getPatches()) { - return $this->setPatches(array($patch)); - } else { - return $this->setPatches( - array_merge($this->getPatches(), array($patch)) - ); - } - } - - /** - * Remove Patches from the list. - * - * @param \PayPal\Api\Patch $patch - * @return $this - */ - public function removePatch($patch) - { - return $this->setPatches( - array_diff($this->getPatches(), array($patch)) - ); - } - - /** - * As PatchRequest holds the array of Patch object, we would override the json conversion to return - * a json representation of array of Patch objects. - * - * @param int $options - * @return mixed|string - */ - public function toJSON($options = 0) - { - $json = array(); - foreach ($this->getPatches() as $patch) { - $json[] = $patch->toArray(); - } - return str_replace('\\/', '/', json_encode($json, $options)); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payee.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payee.php deleted file mode 100644 index c0fde8f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payee.php +++ /dev/null @@ -1,165 +0,0 @@ -email = $email; - return $this; - } - - /** - * Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receiver PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Encrypted PayPal account identifier for the Payee. - * - * @param string $merchant_id - * - * @return $this - */ - public function setMerchantId($merchant_id) - { - $this->merchant_id = $merchant_id; - return $this; - } - - /** - * Encrypted PayPal account identifier for the Payee. - * - * @return string - */ - public function getMerchantId() - { - return $this->merchant_id; - } - - /** - * First Name of the Payee. - * - * @deprecated Not publicly available - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * First Name of the Payee. - * - * @deprecated Not publicly available - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Last Name of the Payee. - * - * @deprecated Not publicly available - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Last Name of the Payee. - * - * @deprecated Not publicly available - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Unencrypted PayPal account Number of the Payee - * - * @deprecated Not publicly available - * @param string $account_number - * - * @return $this - */ - public function setAccountNumber($account_number) - { - $this->account_number = $account_number; - return $this; - } - - /** - * Unencrypted PayPal account Number of the Payee - * - * @deprecated Not publicly available - * @return string - */ - public function getAccountNumber() - { - return $this->account_number; - } - - /** - * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Phone $phone - * - * @return $this - */ - public function setPhone($phone) - { - $this->phone = $phone; - return $this; - } - - /** - * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. - * - * @deprecated Not publicly available - * @return \PayPal\Api\Phone - */ - public function getPhone() - { - return $this->phone; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payer.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payer.php deleted file mode 100644 index 860d095..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payer.php +++ /dev/null @@ -1,270 +0,0 @@ -payment_method = $payment_method; - return $this; - } - - /** - * Payment method being used - PayPal Wallet payment, Bank Direct Debit or Direct Credit card. - * - * @return string - */ - public function getPaymentMethod() - { - return $this->payment_method; - } - - /** - * Status of payer's PayPal Account. - * Valid Values: ["VERIFIED", "UNVERIFIED"] - * - * @param string $status - * - * @return $this - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * Status of payer's PayPal Account. - * - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Type of account relationship payer has with PayPal. - * Valid Values: ["BUSINESS", "PERSONAL", "PREMIER"] - * - * @deprecated Not publicly available - * @param string $account_type - * - * @return $this - */ - public function setAccountType($account_type) - { - $this->account_type = $account_type; - return $this; - } - - /** - * Type of account relationship payer has with PayPal. - * - * @deprecated Not publicly available - * @return string - */ - public function getAccountType() - { - return $this->account_type; - } - - /** - * Duration since the payer established account relationship with PayPal in days. - * - * @deprecated Not publicly available - * @param string $account_age - * - * @return $this - */ - public function setAccountAge($account_age) - { - $this->account_age = $account_age; - return $this; - } - - /** - * Duration since the payer established account relationship with PayPal in days. - * - * @deprecated Not publicly available - * @return string - */ - public function getAccountAge() - { - return $this->account_age; - } - - /** - * List of funding instruments to fund the payment. 'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed. - * - * @param \PayPal\Api\FundingInstrument[] $funding_instruments - * - * @return $this - */ - public function setFundingInstruments($funding_instruments) - { - $this->funding_instruments = $funding_instruments; - return $this; - } - - /** - * List of funding instruments to fund the payment. 'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed. - * - * @return \PayPal\Api\FundingInstrument[] - */ - public function getFundingInstruments() - { - return $this->funding_instruments; - } - - /** - * Append FundingInstruments to the list. - * - * @param \PayPal\Api\FundingInstrument $fundingInstrument - * @return $this - */ - public function addFundingInstrument($fundingInstrument) - { - if (!$this->getFundingInstruments()) { - return $this->setFundingInstruments(array($fundingInstrument)); - } else { - return $this->setFundingInstruments( - array_merge($this->getFundingInstruments(), array($fundingInstrument)) - ); - } - } - - /** - * Remove FundingInstruments from the list. - * - * @param \PayPal\Api\FundingInstrument $fundingInstrument - * @return $this - */ - public function removeFundingInstrument($fundingInstrument) - { - return $this->setFundingInstruments( - array_diff($this->getFundingInstruments(), array($fundingInstrument)) - ); - } - - /** - * Id of user selected funding option for the payment.'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed. - * - * @param string $funding_option_id - * - * @return $this - */ - public function setFundingOptionId($funding_option_id) - { - $this->funding_option_id = $funding_option_id; - return $this; - } - - /** - * Id of user selected funding option for the payment.'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed. - * - * @return string - */ - public function getFundingOptionId() - { - return $this->funding_option_id; - } - - /** - * Default funding option available for the payment - * - * @deprecated Not publicly available - * @param \PayPal\Api\FundingOption $funding_option - * - * @return $this - */ - public function setFundingOption($funding_option) - { - $this->funding_option = $funding_option; - return $this; - } - - /** - * Default funding option available for the payment - * - * @deprecated Not publicly available - * @return \PayPal\Api\FundingOption - */ - public function getFundingOption() - { - return $this->funding_option; - } - - /** - * Funding option related to default funding option. - * - * @deprecated Not publicly available - * @param \PayPal\Api\FundingOption $related_funding_option - * - * @return $this - */ - public function setRelatedFundingOption($related_funding_option) - { - $this->related_funding_option = $related_funding_option; - return $this; - } - - /** - * Funding option related to default funding option. - * - * @deprecated Not publicly available - * @return \PayPal\Api\FundingOption - */ - public function getRelatedFundingOption() - { - return $this->related_funding_option; - } - - /** - * Information related to the Payer. - * - * @param \PayPal\Api\PayerInfo $payer_info - * - * @return $this - */ - public function setPayerInfo($payer_info) - { - $this->payer_info = $payer_info; - return $this; - } - - /** - * Information related to the Payer. - * - * @return \PayPal\Api\PayerInfo - */ - public function getPayerInfo() - { - return $this->payer_info; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php deleted file mode 100644 index 39cbfda..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php +++ /dev/null @@ -1,428 +0,0 @@ -email = $email; - return $this; - } - - /** - * Email address representing the payer. 127 characters max. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * External Remember Me id representing the payer - * - * @param string $external_remember_me_id - * - * @return $this - */ - public function setExternalRememberMeId($external_remember_me_id) - { - $this->external_remember_me_id = $external_remember_me_id; - return $this; - } - - /** - * External Remember Me id representing the payer - * - * @return string - */ - public function getExternalRememberMeId() - { - return $this->external_remember_me_id; - } - - /** - * Account Number representing the Payer - * - * @deprecated Not publicly available - * @param string $account_number - * - * @return $this - */ - public function setAccountNumber($account_number) - { - $this->account_number = $account_number; - return $this; - } - - /** - * Account Number representing the Payer - * - * @deprecated Not publicly available - * @return string - */ - public function getAccountNumber() - { - return $this->account_number; - } - - /** - * Salutation of the payer. - * - * @param string $salutation - * - * @return $this - */ - public function setSalutation($salutation) - { - $this->salutation = $salutation; - return $this; - } - - /** - * Salutation of the payer. - * - * @return string - */ - public function getSalutation() - { - return $this->salutation; - } - - /** - * First name of the payer. - * - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * First name of the payer. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Middle name of the payer. - * - * @param string $middle_name - * - * @return $this - */ - public function setMiddleName($middle_name) - { - $this->middle_name = $middle_name; - return $this; - } - - /** - * Middle name of the payer. - * - * @return string - */ - public function getMiddleName() - { - return $this->middle_name; - } - - /** - * Last name of the payer. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Last name of the payer. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Suffix of the payer. - * - * @param string $suffix - * - * @return $this - */ - public function setSuffix($suffix) - { - $this->suffix = $suffix; - return $this; - } - - /** - * Suffix of the payer. - * - * @return string - */ - public function getSuffix() - { - return $this->suffix; - } - - /** - * PayPal assigned encrypted Payer ID. - * - * @param string $payer_id - * - * @return $this - */ - public function setPayerId($payer_id) - { - $this->payer_id = $payer_id; - return $this; - } - - /** - * PayPal assigned encrypted Payer ID. - * - * @return string - */ - public function getPayerId() - { - return $this->payer_id; - } - - /** - * Phone number representing the payer. 20 characters max. - * - * @param string $phone - * - * @return $this - */ - public function setPhone($phone) - { - $this->phone = $phone; - return $this; - } - - /** - * Phone number representing the payer. 20 characters max. - * - * @return string - */ - public function getPhone() - { - return $this->phone; - } - - /** - * Phone type - * Valid Values: ["HOME", "WORK", "MOBILE", "OTHER"] - * - * @param string $phone_type - * - * @return $this - */ - public function setPhoneType($phone_type) - { - $this->phone_type = $phone_type; - return $this; - } - - /** - * Phone type - * - * @return string - */ - public function getPhoneType() - { - return $this->phone_type; - } - - /** - * Birth date of the Payer in ISO8601 format (yyyy-mm-dd). - * - * @param string $birth_date - * - * @return $this - */ - public function setBirthDate($birth_date) - { - $this->birth_date = $birth_date; - return $this; - } - - /** - * Birth date of the Payer in ISO8601 format (yyyy-mm-dd). - * - * @return string - */ - public function getBirthDate() - { - return $this->birth_date; - } - - /** - * Payer’s tax ID. Only supported when the `payment_method` is set to `paypal`. - * - * @param string $tax_id - * - * @return $this - */ - public function setTaxId($tax_id) - { - $this->tax_id = $tax_id; - return $this; - } - - /** - * Payer’s tax ID. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getTaxId() - { - return $this->tax_id; - } - - /** - * Payer’s tax ID type. Allowed values: `BR_CPF` or `BR_CNPJ`. Only supported when the `payment_method` is set to `paypal`. - * Valid Values: ["BR_CPF", "BR_CNPJ"] - * - * @param string $tax_id_type - * - * @return $this - */ - public function setTaxIdType($tax_id_type) - { - $this->tax_id_type = $tax_id_type; - return $this; - } - - /** - * Payer’s tax ID type. Allowed values: `BR_CPF` or `BR_CNPJ`. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getTaxIdType() - { - return $this->tax_id_type; - } - - /** - * Two-letter registered country code of the payer to identify the buyer country. - * - * @param string $country_code - * - * @return $this - */ - public function setCountryCode($country_code) - { - $this->country_code = $country_code; - return $this; - } - - /** - * Two-letter registered country code of the payer to identify the buyer country. - * - * @return string - */ - public function getCountryCode() - { - return $this->country_code; - } - - /** - * Billing address of the Payer. - * - * @param \PayPal\Api\Address $billing_address - * - * @return $this - */ - public function setBillingAddress($billing_address) - { - $this->billing_address = $billing_address; - return $this; - } - - /** - * Billing address of the Payer. - * - * @return \PayPal\Api\Address - */ - public function getBillingAddress() - { - return $this->billing_address; - } - - /** - * Shipping address of payer PayPal account. - * - * @param \PayPal\Api\ShippingAddress $shipping_address - * - * @return $this - */ - public function setShippingAddress($shipping_address) - { - $this->shipping_address = $shipping_address; - return $this; - } - - /** - * Shipping address of payer PayPal account. - * - * @return \PayPal\Api\ShippingAddress - */ - public function getShippingAddress() - { - return $this->shipping_address; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payment.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payment.php deleted file mode 100644 index 13229d5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payment.php +++ /dev/null @@ -1,693 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the created payment, the 'transaction ID' - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Payment intent. - * Valid Values: ["sale", "authorize", "order"] - * - * @param string $intent - * - * @return $this - */ - public function setIntent($intent) - { - $this->intent = $intent; - return $this; - } - - /** - * Payment intent. - * - * @return string - */ - public function getIntent() - { - return $this->intent; - } - - /** - * Source of the funds for this payment represented by a PayPal account or a direct credit card. - * - * @param \PayPal\Api\Payer $payer - * - * @return $this - */ - public function setPayer($payer) - { - $this->payer = $payer; - return $this; - } - - /** - * Source of the funds for this payment represented by a PayPal account or a direct credit card. - * - * @return \PayPal\Api\Payer - */ - public function getPayer() - { - return $this->payer; - } - - /** - * Information that the merchant knows about the payer. This information is not definitive and only serves as a hint to the UI or any pre-processing logic. - * - * @param \PayPal\Api\PotentialPayerInfo $potential_payer_info - * - * @return $this - */ - public function setPotentialPayerInfo($potential_payer_info) - { - $this->potential_payer_info = $potential_payer_info; - return $this; - } - - /** - * Information that the merchant knows about the payer. This information is not definitive and only serves as a hint to the UI or any pre-processing logic. - * - * @return \PayPal\Api\PotentialPayerInfo - */ - public function getPotentialPayerInfo() - { - return $this->potential_payer_info; - } - - /** - * Receiver of funds for this payment. **Readonly for PayPal external REST payments.** - * - * @param \PayPal\Api\Payee $payee - * - * @return $this - */ - public function setPayee($payee) - { - $this->payee = $payee; - return $this; - } - - /** - * Receiver of funds for this payment. **Readonly for PayPal external REST payments.** - * - * @return \PayPal\Api\Payee - */ - public function getPayee() - { - return $this->payee; - } - - /** - * ID of the cart to execute the payment. - * - * @deprecated Not publicly available - * @param string $cart - * - * @return $this - */ - public function setCart($cart) - { - $this->cart = $cart; - return $this; - } - - /** - * ID of the cart to execute the payment. - * - * @deprecated Not publicly available - * @return string - */ - public function getCart() - { - return $this->cart; - } - - /** - * Transactional details including the amount and item details. - * - * @param \PayPal\Api\Transaction[] $transactions - * - * @return $this - */ - public function setTransactions($transactions) - { - $this->transactions = $transactions; - return $this; - } - - /** - * Transactional details including the amount and item details. - * - * @return \PayPal\Api\Transaction[] - */ - public function getTransactions() - { - return $this->transactions; - } - - /** - * Append Transactions to the list. - * - * @param \PayPal\Api\Transaction $transaction - * @return $this - */ - public function addTransaction($transaction) - { - if (!$this->getTransactions()) { - return $this->setTransactions(array($transaction)); - } else { - return $this->setTransactions( - array_merge($this->getTransactions(), array($transaction)) - ); - } - } - - /** - * Remove Transactions from the list. - * - * @param \PayPal\Api\Transaction $transaction - * @return $this - */ - public function removeTransaction($transaction) - { - return $this->setTransactions( - array_diff($this->getTransactions(), array($transaction)) - ); - } - - /** - * Applicable for advanced payments like multi seller payment (MSP) to support partial failures - * - * @deprecated Not publicly available - * @param \PayPal\Api\Error[] $failed_transactions - * - * @return $this - */ - public function setFailedTransactions($failed_transactions) - { - $this->failed_transactions = $failed_transactions; - return $this; - } - - /** - * Applicable for advanced payments like multi seller payment (MSP) to support partial failures - * - * @deprecated Not publicly available - * @return \PayPal\Api\Error[] - */ - public function getFailedTransactions() - { - return $this->failed_transactions; - } - - /** - * Append FailedTransactions to the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Error $error - * @return $this - */ - public function addFailedTransaction($error) - { - if (!$this->getFailedTransactions()) { - return $this->setFailedTransactions(array($error)); - } else { - return $this->setFailedTransactions( - array_merge($this->getFailedTransactions(), array($error)) - ); - } - } - - /** - * Remove FailedTransactions from the list. - * - * @deprecated Not publicly available - * @param \PayPal\Api\Error $error - * @return $this - */ - public function removeFailedTransaction($error) - { - return $this->setFailedTransactions( - array_diff($this->getFailedTransactions(), array($error)) - ); - } - - /** - * Collection of PayPal generated billing agreement tokens. - * - * @param string[] $billing_agreement_tokens - * - * @return $this - */ - public function setBillingAgreementTokens($billing_agreement_tokens) - { - $this->billing_agreement_tokens = $billing_agreement_tokens; - return $this; - } - - /** - * Collection of PayPal generated billing agreement tokens. - * - * @return string[] - */ - public function getBillingAgreementTokens() - { - return $this->billing_agreement_tokens; - } - - /** - * Append BillingAgreementTokens to the list. - * - * @param string $billingAgreementToken - * @return $this - */ - public function addBillingAgreementToken($billingAgreementToken) - { - if (!$this->getBillingAgreementTokens()) { - return $this->setBillingAgreementTokens(array($billingAgreementToken)); - } else { - return $this->setBillingAgreementTokens( - array_merge($this->getBillingAgreementTokens(), array($billingAgreementToken)) - ); - } - } - - /** - * Remove BillingAgreementTokens from the list. - * - * @param string $billingAgreementToken - * @return $this - */ - public function removeBillingAgreementToken($billingAgreementToken) - { - return $this->setBillingAgreementTokens( - array_diff($this->getBillingAgreementTokens(), array($billingAgreementToken)) - ); - } - - /** - * Credit financing offered to payer on PayPal side. Returned in payment after payer opts-in - * - * @deprecated Not publicly available - * @param \PayPal\Api\CreditFinancingOffered $credit_financing_offered - * - * @return $this - */ - public function setCreditFinancingOffered($credit_financing_offered) - { - $this->credit_financing_offered = $credit_financing_offered; - return $this; - } - - /** - * Credit financing offered to payer on PayPal side. Returned in payment after payer opts-in - * - * @deprecated Not publicly available - * @return \PayPal\Api\CreditFinancingOffered - */ - public function getCreditFinancingOffered() - { - return $this->credit_financing_offered; - } - - /** - * Instructions for the payer to complete this payment. - * - * @param \PayPal\Api\PaymentInstruction $payment_instruction - * - * @return $this - */ - public function setPaymentInstruction($payment_instruction) - { - $this->payment_instruction = $payment_instruction; - return $this; - } - - /** - * Instructions for the payer to complete this payment. - * - * @return \PayPal\Api\PaymentInstruction - */ - public function getPaymentInstruction() - { - return $this->payment_instruction; - } - - /** - * Payment state. - * Valid Values: ["created", "approved", "failed", "partially_completed", "in_progress"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * Payment state. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * PayPal generated identifier for the merchant's payment experience profile. Refer to [this](https://developer.paypal.com/webapps/developer/docs/api/#payment-experience) link to create experience profile ID. - * - * @param string $experience_profile_id - * - * @return $this - */ - public function setExperienceProfileId($experience_profile_id) - { - $this->experience_profile_id = $experience_profile_id; - return $this; - } - - /** - * PayPal generated identifier for the merchant's payment experience profile. Refer to [this](https://developer.paypal.com/webapps/developer/docs/api/#payment-experience) link to create experience profile ID. - * - * @return string - */ - public function getExperienceProfileId() - { - return $this->experience_profile_id; - } - - /** - * free-form field for the use of clients to pass in a message to the payer - * - * @param string $note_to_payer - * - * @return $this - */ - public function setNoteToPayer($note_to_payer) - { - $this->note_to_payer = $note_to_payer; - return $this; - } - - /** - * free-form field for the use of clients to pass in a message to the payer - * - * @return string - */ - public function getNoteToPayer() - { - return $this->note_to_payer; - } - - /** - * Set of redirect URLs you provide only for PayPal-based payments. - * - * @param \PayPal\Api\RedirectUrls $redirect_urls - * - * @return $this - */ - public function setRedirectUrls($redirect_urls) - { - $this->redirect_urls = $redirect_urls; - return $this; - } - - /** - * Set of redirect URLs you provide only for PayPal-based payments. - * - * @return \PayPal\Api\RedirectUrls - */ - public function getRedirectUrls() - { - return $this->redirect_urls; - } - - /** - * Failure reason code returned when the payment failed for some valid reasons. - * Valid Values: ["UNABLE_TO_COMPLETE_TRANSACTION", "INVALID_PAYMENT_METHOD", "PAYER_CANNOT_PAY", "CANNOT_PAY_THIS_PAYEE", "REDIRECT_REQUIRED", "PAYEE_FILTER_RESTRICTIONS"] - * - * @param string $failure_reason - * - * @return $this - */ - public function setFailureReason($failure_reason) - { - $this->failure_reason = $failure_reason; - return $this; - } - - /** - * Failure reason code returned when the payment failed for some valid reasons. - * - * @return string - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Payment creation time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Payment creation time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Payment update time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Payment update time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Get Approval Link - * - * @return null|string - */ - public function getApprovalLink() - { - return $this->getLink(PayPalConstants::APPROVAL_URL); - } - - /** - * Create and process a payment by passing a payment object that includes the intent, payer, and transactions in the body of the request JSON. For PayPal payments, include redirect URLs in the payment object. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Payment - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/payments/payment", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Look up a particular payment resource by passing the payment_id in the request URI. - * - * @param string $paymentId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Payment - */ - public static function get($paymentId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($paymentId, 'paymentId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/payment/$paymentId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Payment(); - $ret->fromJson($json); - return $ret; - } - - /** - * Use this call to partially update the payment resource for the given identifier. Allowed objects are amount, shipping_address, invoice_id and custom. Please note that it is not possible to use patch after execute has been called. - * - * @param PatchRequest $patchRequest - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return boolean - */ - public function update($patchRequest, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($patchRequest, 'patchRequest'); - $payLoad = $patchRequest->toJSON(); - self::executeCall( - "/v1/payments/payment/{$this->getId()}", - "PATCH", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Execute (complete) a PayPal payment that has been approved by the payer. Optionally update selective payment information when executing the payment. - * - * @param PaymentExecution $paymentExecution - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Payment - */ - public function execute($paymentExecution, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($paymentExecution, 'paymentExecution'); - $payLoad = $paymentExecution->toJSON(); - $json = self::executeCall( - "/v1/payments/payment/{$this->getId()}/execute", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * List payments in any state (created, approved, failed, etc.). Payments returned are the payments made to the merchant issuing the request. - * - * @param array $params - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PaymentHistory - */ - public static function all($params, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($params, 'params'); - $payLoad = ""; - $allowedParams = array( - 'count' => 1, - 'start_id' => 1, - 'start_index' => 1, - 'start_time' => 1, - 'end_time' => 1, - 'payee_id' => 1, - 'sort_by' => 1, - 'sort_order' => 1, - ); - $json = self::executeCall( - "/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PaymentHistory(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentCard.php deleted file mode 100644 index 3e6c7b4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentCard.php +++ /dev/null @@ -1,457 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the credit card being saved for later use. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Card number. - * - * @param string $number - * - * @return $this - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * Card number. - * - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * Type of the Card. - * Valid Values: ["VISA", "AMEX", "SOLO", "JCB", "STAR", "DELTA", "DISCOVER", "SWITCH", "MAESTRO", "CB_NATIONALE", "CONFINOGA", "COFIDIS", "ELECTRON", "CETELEM", "CHINA_UNION_PAY", "MASTERCARD"] - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Type of the Card. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * 2 digit card expiry month. - * - * @param string $expire_month - * - * @return $this - */ - public function setExpireMonth($expire_month) - { - $this->expire_month = $expire_month; - return $this; - } - - /** - * 2 digit card expiry month. - * - * @return string - */ - public function getExpireMonth() - { - return $this->expire_month; - } - - /** - * 4 digit card expiry year - * - * @param string $expire_year - * - * @return $this - */ - public function setExpireYear($expire_year) - { - $this->expire_year = $expire_year; - return $this; - } - - /** - * 4 digit card expiry year - * - * @return string - */ - public function getExpireYear() - { - return $this->expire_year; - } - - /** - * 2 digit card start month. Needed for UK Maestro Card. - * - * @param string $start_month - * - * @return $this - */ - public function setStartMonth($start_month) - { - $this->start_month = $start_month; - return $this; - } - - /** - * 2 digit card start month. Needed for UK Maestro Card. - * - * @return string - */ - public function getStartMonth() - { - return $this->start_month; - } - - /** - * 4 digit card start year. Needed for UK Maestro Card. - * - * @param string $start_year - * - * @return $this - */ - public function setStartYear($start_year) - { - $this->start_year = $start_year; - return $this; - } - - /** - * 4 digit card start year. Needed for UK Maestro Card. - * - * @return string - */ - public function getStartYear() - { - return $this->start_year; - } - - /** - * Card validation code. Only supported when making a Payment but not when saving a payment card for future use. - * - * @param string $cvv2 - * - * @return $this - */ - public function setCvv2($cvv2) - { - $this->cvv2 = $cvv2; - return $this; - } - - /** - * Card validation code. Only supported when making a Payment but not when saving a payment card for future use. - * - * @return string - */ - public function getCvv2() - { - return $this->cvv2; - } - - /** - * Card holder's first name. - * - * @param string $first_name - * - * @return $this - */ - public function setFirstName($first_name) - { - $this->first_name = $first_name; - return $this; - } - - /** - * Card holder's first name. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Card holder's last name. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Card holder's last name. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * 2 letter country code - * - * @param string $billing_country - * - * @return $this - */ - public function setBillingCountry($billing_country) - { - $this->billing_country = $billing_country; - return $this; - } - - /** - * 2 letter country code - * - * @return string - */ - public function getBillingCountry() - { - return $this->billing_country; - } - - /** - * Billing Address associated with this card. - * - * @param \PayPal\Api\Address $billing_address - * - * @return $this - */ - public function setBillingAddress($billing_address) - { - $this->billing_address = $billing_address; - return $this; - } - - /** - * Billing Address associated with this card. - * - * @return \PayPal\Api\Address - */ - public function getBillingAddress() - { - return $this->billing_address; - } - - /** - * A unique identifier of the customer to whom this card account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault. - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * A unique identifier of the customer to whom this card account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault. - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * State of the funding instrument. - * Valid Values: ["EXPIRED", "ACTIVE"] - * - * @param string $status - * - * @return $this - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * State of the funding instrument. - * - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Date/Time until this resource can be used fund a payment. - * - * @param string $valid_until - * - * @return $this - */ - public function setValidUntil($valid_until) - { - $this->valid_until = $valid_until; - return $this; - } - - /** - * Date/Time until this resource can be used fund a payment. - * - * @return string - */ - public function getValidUntil() - { - return $this->valid_until; - } - - /** - * 1-2 digit card issue number. Needed for UK Maestro Card. - * - * @param string $issue_number - * - * @return $this - */ - public function setIssueNumber($issue_number) - { - $this->issue_number = $issue_number; - return $this; - } - - /** - * 1-2 digit card issue number. Needed for UK Maestro Card. - * - * @return string - */ - public function getIssueNumber() - { - return $this->issue_number; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentCardToken.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentCardToken.php deleted file mode 100644 index d5fbe6c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentCardToken.php +++ /dev/null @@ -1,162 +0,0 @@ -payment_card_id = $payment_card_id; - return $this; - } - - /** - * ID of a previously saved Payment Card resource. - * - * @return string - */ - public function getPaymentCardId() - { - return $this->payment_card_id; - } - - /** - * The unique identifier of the payer used when saving this payment card. - * - * @param string $external_customer_id - * - * @return $this - */ - public function setExternalCustomerId($external_customer_id) - { - $this->external_customer_id = $external_customer_id; - return $this; - } - - /** - * The unique identifier of the payer used when saving this payment card. - * - * @return string - */ - public function getExternalCustomerId() - { - return $this->external_customer_id; - } - - /** - * Last 4 digits of the card number from the saved card. - * - * @param string $last4 - * - * @return $this - */ - public function setLast4($last4) - { - $this->last4 = $last4; - return $this; - } - - /** - * Last 4 digits of the card number from the saved card. - * - * @return string - */ - public function getLast4() - { - return $this->last4; - } - - /** - * Type of the Card. - * Valid Values: ["VISA", "AMEX", "SOLO", "JCB", "STAR", "DELTA", "DISCOVER", "SWITCH", "MAESTRO", "CB_NATIONALE", "CONFINOGA", "COFIDIS", "ELECTRON", "CETELEM", "CHINA_UNION_PAY", "MASTERCARD"] - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Type of the Card. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Expiry month from the saved card with value 1 - 12. - * - * @param int $expire_month - * - * @return $this - */ - public function setExpireMonth($expire_month) - { - $this->expire_month = $expire_month; - return $this; - } - - /** - * Expiry month from the saved card with value 1 - 12. - * - * @return int - */ - public function getExpireMonth() - { - return $this->expire_month; - } - - /** - * Four digit expiry year from the saved card, represented as YYYY format. - * - * @param int $expire_year - * - * @return $this - */ - public function setExpireYear($expire_year) - { - $this->expire_year = $expire_year; - return $this; - } - - /** - * Four digit expiry year from the saved card, represented as YYYY format. - * - * @return int - */ - public function getExpireYear() - { - return $this->expire_year; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentDefinition.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentDefinition.php deleted file mode 100644 index 36cb799..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentDefinition.php +++ /dev/null @@ -1,239 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the payment_definition. 128 characters max. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Name of the payment definition. 128 characters max. - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the payment definition. 128 characters max. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Type of the payment definition. Allowed values: `TRIAL`, `REGULAR`. - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Type of the payment definition. Allowed values: `TRIAL`, `REGULAR`. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * How frequently the customer should be charged. - * - * @param string $frequency_interval - * - * @return $this - */ - public function setFrequencyInterval($frequency_interval) - { - $this->frequency_interval = $frequency_interval; - return $this; - } - - /** - * How frequently the customer should be charged. - * - * @return string - */ - public function getFrequencyInterval() - { - return $this->frequency_interval; - } - - /** - * Frequency of the payment definition offered. Allowed values: `WEEK`, `DAY`, `YEAR`, `MONTH`. - * - * @param string $frequency - * - * @return $this - */ - public function setFrequency($frequency) - { - $this->frequency = $frequency; - return $this; - } - - /** - * Frequency of the payment definition offered. Allowed values: `WEEK`, `DAY`, `YEAR`, `MONTH`. - * - * @return string - */ - public function getFrequency() - { - return $this->frequency; - } - - /** - * Number of cycles in this payment definition. - * - * @param string $cycles - * - * @return $this - */ - public function setCycles($cycles) - { - $this->cycles = $cycles; - return $this; - } - - /** - * Number of cycles in this payment definition. - * - * @return string - */ - public function getCycles() - { - return $this->cycles; - } - - /** - * Amount that will be charged at the end of each cycle for this payment definition. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount that will be charged at the end of each cycle for this payment definition. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Array of charge_models for this payment definition. - * - * @param \PayPal\Api\ChargeModel[] $charge_models - * - * @return $this - */ - public function setChargeModels($charge_models) - { - $this->charge_models = $charge_models; - return $this; - } - - /** - * Array of charge_models for this payment definition. - * - * @return \PayPal\Api\ChargeModel[] - */ - public function getChargeModels() - { - return $this->charge_models; - } - - /** - * Append ChargeModels to the list. - * - * @param \PayPal\Api\ChargeModel $chargeModel - * @return $this - */ - public function addChargeModel($chargeModel) - { - if (!$this->getChargeModels()) { - return $this->setChargeModels(array($chargeModel)); - } else { - return $this->setChargeModels( - array_merge($this->getChargeModels(), array($chargeModel)) - ); - } - } - - /** - * Remove ChargeModels from the list. - * - * @param \PayPal\Api\ChargeModel $chargeModel - * @return $this - */ - public function removeChargeModel($chargeModel) - { - return $this->setChargeModels( - array_diff($this->getChargeModels(), array($chargeModel)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentDetail.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentDetail.php deleted file mode 100644 index 6cd29ea..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentDetail.php +++ /dev/null @@ -1,164 +0,0 @@ -type = $type; - return $this; - } - - /** - * PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL. - * - * @param string $transaction_id - * - * @return $this - */ - public function setTransactionId($transaction_id) - { - $this->transaction_id = $transaction_id; - return $this; - } - - /** - * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL. - * - * @return string - */ - public function getTransactionId() - { - return $this->transaction_id; - } - - /** - * Type of the transaction. - * Valid Values: ["SALE", "AUTHORIZATION", "CAPTURE"] - * - * @param string $transaction_type - * - * @return $this - */ - public function setTransactionType($transaction_type) - { - $this->transaction_type = $transaction_type; - return $this; - } - - /** - * Type of the transaction. - * - * @return string - */ - public function getTransactionType() - { - return $this->transaction_type; - } - - /** - * Date when the invoice was paid. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $date - * - * @return $this - */ - public function setDate($date) - { - $this->date = $date; - return $this; - } - - /** - * Date when the invoice was paid. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getDate() - { - return $this->date; - } - - /** - * Payment mode or method. This field is mandatory if the value of the type field is EXTERNAL. - * Valid Values: ["BANK_TRANSFER", "CASH", "CHECK", "CREDIT_CARD", "DEBIT_CARD", "PAYPAL", "WIRE_TRANSFER", "OTHER"] - * - * @param string $method - * - * @return $this - */ - public function setMethod($method) - { - $this->method = $method; - return $this; - } - - /** - * Payment mode or method. This field is mandatory if the value of the type field is EXTERNAL. - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Optional note associated with the payment. - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Optional note associated with the payment. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php deleted file mode 100644 index 327731b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php +++ /dev/null @@ -1,119 +0,0 @@ -payer_id = $payer_id; - return $this; - } - - /** - * The ID of the Payer, passed in the `return_url` by PayPal. - * - * @return string - */ - public function getPayerId() - { - return $this->payer_id; - } - - /** - * Carrier account id for a carrier billing payment. For a carrier billing payment, payer_id is not applicable. - * - * @param string $carrier_account_id - * - * @return $this - */ - public function setCarrierAccountId($carrier_account_id) - { - $this->carrier_account_id = $carrier_account_id; - return $this; - } - - /** - * Carrier account id for a carrier billing payment. For a carrier billing payment, payer_id is not applicable. - * - * @return string - */ - public function getCarrierAccountId() - { - return $this->carrier_account_id; - } - - /** - * Transactional details including the amount and item details. - * - * @param \PayPal\Api\Transaction[] $transactions - * - * @return $this - */ - public function setTransactions($transactions) - { - $this->transactions = $transactions; - return $this; - } - - /** - * Transactional details including the amount and item details. - * - * @return \PayPal\Api\Transaction[] - */ - public function getTransactions() - { - return $this->transactions; - } - - /** - * Append Transactions to the list. - * - * @param \PayPal\Api\Transaction $transaction - * @return $this - */ - public function addTransaction($transaction) - { - if (!$this->getTransactions()) { - return $this->setTransactions(array($transaction)); - } else { - return $this->setTransactions( - array_merge($this->getTransactions(), array($transaction)) - ); - } - } - - /** - * Remove Transactions from the list. - * - * @param \PayPal\Api\Transaction $transaction - * @return $this - */ - public function removeTransaction($transaction) - { - return $this->setTransactions( - array_diff($this->getTransactions(), array($transaction)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php deleted file mode 100644 index 89e417a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php +++ /dev/null @@ -1,119 +0,0 @@ -payments = $payments; - return $this; - } - - /** - * A list of Payment resources - * - * @return \PayPal\Api\Payment[] - */ - public function getPayments() - { - return $this->payments; - } - - /** - * Append Payments to the list. - * - * @param \PayPal\Api\Payment $payment - * @return $this - */ - public function addPayment($payment) - { - if (!$this->getPayments()) { - return $this->setPayments(array($payment)); - } else { - return $this->setPayments( - array_merge($this->getPayments(), array($payment)) - ); - } - } - - /** - * Remove Payments from the list. - * - * @param \PayPal\Api\Payment $payment - * @return $this - */ - public function removePayment($payment) - { - return $this->setPayments( - array_diff($this->getPayments(), array($payment)) - ); - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @param int $count - * - * @return $this - */ - public function setCount($count) - { - $this->count = $count; - return $this; - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Identifier of the next element to get the next range of results. - * - * @param string $next_id - * - * @return $this - */ - public function setNextId($next_id) - { - $this->next_id = $next_id; - return $this; - } - - /** - * Identifier of the next element to get the next range of results. - * - * @return string - */ - public function getNextId() - { - return $this->next_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentInstruction.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentInstruction.php deleted file mode 100644 index 152d83f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentInstruction.php +++ /dev/null @@ -1,190 +0,0 @@ -reference_number = $reference_number; - return $this; - } - - /** - * ID of payment instruction - * - * @return string - */ - public function getReferenceNumber() - { - return $this->reference_number; - } - - /** - * Type of payment instruction - * Valid Values: ["MANUAL_BANK_TRANSFER", "PAY_UPON_INVOICE"] - * - * @param string $instruction_type - * - * @return $this - */ - public function setInstructionType($instruction_type) - { - $this->instruction_type = $instruction_type; - return $this; - } - - /** - * Type of payment instruction - * - * @return string - */ - public function getInstructionType() - { - return $this->instruction_type; - } - - /** - * Recipient bank Details. - * - * @param \PayPal\Api\RecipientBankingInstruction $recipient_banking_instruction - * - * @return $this - */ - public function setRecipientBankingInstruction($recipient_banking_instruction) - { - $this->recipient_banking_instruction = $recipient_banking_instruction; - return $this; - } - - /** - * Recipient bank Details. - * - * @return \PayPal\Api\RecipientBankingInstruction - */ - public function getRecipientBankingInstruction() - { - return $this->recipient_banking_instruction; - } - - /** - * Amount to be transferred - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount to be transferred - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Date by which payment should be received - * - * @param string $payment_due_date - * - * @return $this - */ - public function setPaymentDueDate($payment_due_date) - { - $this->payment_due_date = $payment_due_date; - return $this; - } - - /** - * Date by which payment should be received - * - * @return string - */ - public function getPaymentDueDate() - { - return $this->payment_due_date; - } - - /** - * Additional text regarding payment handling - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Additional text regarding payment handling - * - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * Retrieve a payment instruction by passing the payment_id in the request URI. Use this request if you are implementing a solution that includes delayed payment like Pay Upon Invoice (PUI). - * - * @param string $paymentId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PaymentInstruction - */ - public static function get($paymentId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($paymentId, 'paymentId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/payment/$paymentId/payment-instruction", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PaymentInstruction(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentOptions.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentOptions.php deleted file mode 100644 index d81fe37..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentOptions.php +++ /dev/null @@ -1,92 +0,0 @@ -allowed_payment_method = $allowed_payment_method; - return $this; - } - - /** - * Optional payment method type. If specified, the transaction will go through for only instant payment. Only for use with the paypal payment_method, not relevant for the credit_card payment_method. - * - * @return string - */ - public function getAllowedPaymentMethod() - { - return $this->allowed_payment_method; - } - - /** - * Indicator if this payment request is a recurring payment. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @param bool $recurring_flag - * - * @return $this - */ - public function setRecurringFlag($recurring_flag) - { - $this->recurring_flag = $recurring_flag; - return $this; - } - - /** - * Indicator if this payment request is a recurring payment. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @return bool - */ - public function getRecurringFlag() - { - return $this->recurring_flag; - } - - /** - * Indicator if fraud management filters (fmf) should be skipped for this transaction. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @param bool $skip_fmf - * - * @return $this - */ - public function setSkipFmf($skip_fmf) - { - $this->skip_fmf = $skip_fmf; - return $this; - } - - /** - * Indicator if fraud management filters (fmf) should be skipped for this transaction. Only supported when the `payment_method` is set to `credit_card` - * - * @deprecated Not publicly available - * @return bool - */ - public function getSkipFmf() - { - return $this->skip_fmf; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentTerm.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentTerm.php deleted file mode 100644 index 0a0dbab..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentTerm.php +++ /dev/null @@ -1,66 +0,0 @@ -term_type = $term_type; - return $this; - } - - /** - * Terms by which the invoice payment is due. - * - * @return string - */ - public function getTermType() - { - return $this->term_type; - } - - /** - * Date on which invoice payment is due. It must be always a future date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $due_date - * - * @return $this - */ - public function setDueDate($due_date) - { - $this->due_date = $due_date; - return $this; - } - - /** - * Date on which invoice payment is due. It must be always a future date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getDueDate() - { - return $this->due_date; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payout.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payout.php deleted file mode 100644 index b97b515..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payout.php +++ /dev/null @@ -1,166 +0,0 @@ -sender_batch_header = $sender_batch_header; - return $this; - } - - /** - * The original batch header as provided by the payment sender. - * - * @return \PayPal\Api\PayoutSenderBatchHeader - */ - public function getSenderBatchHeader() - { - return $this->sender_batch_header; - } - - /** - * An array of payout items (that is, a set of individual payouts). - * - * @param \PayPal\Api\PayoutItem[] $items - * - * @return $this - */ - public function setItems($items) - { - $this->items = $items; - return $this; - } - - /** - * An array of payout items (that is, a set of individual payouts). - * - * @return \PayPal\Api\PayoutItem[] - */ - public function getItems() - { - return $this->items; - } - - /** - * Append Items to the list. - * - * @param \PayPal\Api\PayoutItem $payoutItem - * @return $this - */ - public function addItem($payoutItem) - { - if (!$this->getItems()) { - return $this->setItems(array($payoutItem)); - } else { - return $this->setItems( - array_merge($this->getItems(), array($payoutItem)) - ); - } - } - - /** - * Remove Items from the list. - * - * @param \PayPal\Api\PayoutItem $payoutItem - * @return $this - */ - public function removeItem($payoutItem) - { - return $this->setItems( - array_diff($this->getItems(), array($payoutItem)) - ); - } - - /** - * Create a payout batch resource by passing a sender_batch_header and an items array to the request URI. The sender_batch_header contains payout parameters that describe the handling of a batch resource while the items array conatins payout items. - * - * @param array $params - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PayoutBatch - */ - public function create($params = array(), $apiContext = null, $restCall = null) - { - $params = $params ? $params : array(); - ArgumentValidator::validate($params, 'params'); - $payLoad = $this->toJSON(); - $allowedParams = array( - 'sync_mode' => 1, - ); - $json = self::executeCall( - "/v1/payments/payouts" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PayoutBatch(); - $ret->fromJson($json); - return $ret; - } - - /** - * You can submit a payout with a synchronous API call, which immediately returns the results of a PayPal payment. - * - * @param ApiContext $apiContext - * @param PayPalRestCall $restCall - * @return PayoutBatch - */ - public function createSynchronous($apiContext = null, $restCall = null) - { - $params = array('sync_mode' => 'true'); - return $this->create($params, $apiContext, $restCall); - } - - /** - * Obtain the status of a specific batch resource by passing the payout batch ID to the request URI. You can issue this call multiple times to get the current status. - * - * @param string $payoutBatchId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PayoutBatch - */ - public static function get($payoutBatchId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($payoutBatchId, 'payoutBatchId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/payouts/$payoutBatchId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PayoutBatch(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatch.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatch.php deleted file mode 100644 index 47c1c03..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatch.php +++ /dev/null @@ -1,120 +0,0 @@ -batch_header = $batch_header; - return $this; - } - - /** - * A batch header that includes the generated batch status. - * - * @return \PayPal\Api\PayoutBatchHeader - */ - public function getBatchHeader() - { - return $this->batch_header; - } - - /** - * Array of the items in a batch payout. - * - * @param \PayPal\Api\PayoutItemDetails[] $items - * - * @return $this - */ - public function setItems($items) - { - $this->items = $items; - return $this; - } - - /** - * Array of the items in a batch payout. - * - * @return \PayPal\Api\PayoutItemDetails[] - */ - public function getItems() - { - return $this->items; - } - - /** - * Append Items to the list. - * - * @param \PayPal\Api\PayoutItemDetails $payoutItemDetails - * @return $this - */ - public function addItem($payoutItemDetails) - { - if (!$this->getItems()) { - return $this->setItems(array($payoutItemDetails)); - } else { - return $this->setItems( - array_merge($this->getItems(), array($payoutItemDetails)) - ); - } - } - - /** - * Remove Items from the list. - * - * @param \PayPal\Api\PayoutItemDetails $payoutItemDetails - * @return $this - */ - public function removeItem($payoutItemDetails) - { - return $this->setItems( - array_diff($this->getItems(), array($payoutItemDetails)) - ); - } - - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatchHeader.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatchHeader.php deleted file mode 100644 index c46125c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatchHeader.php +++ /dev/null @@ -1,263 +0,0 @@ -payout_batch_id = $payout_batch_id; - return $this; - } - - /** - * An ID for the batch payout. Generated by PayPal. 30 characters max. - * - * @return string - */ - public function getPayoutBatchId() - { - return $this->payout_batch_id; - } - - /** - * Generated batch status. - * - * @param string $batch_status - * - * @return $this - */ - public function setBatchStatus($batch_status) - { - $this->batch_status = $batch_status; - return $this; - } - - /** - * Generated batch status. - * - * @return string - */ - public function getBatchStatus() - { - return $this->batch_status; - } - - /** - * The time the batch entered processing. - * - * @param string $time_created - * - * @return $this - */ - public function setTimeCreated($time_created) - { - $this->time_created = $time_created; - return $this; - } - - /** - * The time the batch entered processing. - * - * @return string - */ - public function getTimeCreated() - { - return $this->time_created; - } - - /** - * The time that processing for the batch was completed. - * - * @param string $time_completed - * - * @return $this - */ - public function setTimeCompleted($time_completed) - { - $this->time_completed = $time_completed; - return $this; - } - - /** - * The time that processing for the batch was completed. - * - * @return string - */ - public function getTimeCompleted() - { - return $this->time_completed; - } - - /** - * The original batch header as provided by the payment sender. - * - * @param \PayPal\Api\PayoutSenderBatchHeader $sender_batch_header - * - * @return $this - */ - public function setSenderBatchHeader($sender_batch_header) - { - $this->sender_batch_header = $sender_batch_header; - return $this; - } - - /** - * The original batch header as provided by the payment sender. - * - * @return \PayPal\Api\PayoutSenderBatchHeader - */ - public function getSenderBatchHeader() - { - return $this->sender_batch_header; - } - - /** - * Total amount, in U.S. dollars, requested for the applicable payouts. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Total amount, in U.S. dollars, requested for the applicable payouts. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Total estimate in U.S. dollars for the applicable payouts fees. - * - * @param \PayPal\Api\Currency $fees - * - * @return $this - */ - public function setFees($fees) - { - $this->fees = $fees; - return $this; - } - - /** - * Total estimate in U.S. dollars for the applicable payouts fees. - * - * @return \PayPal\Api\Currency - */ - public function getFees() - { - return $this->fees; - } - - /** - * Sets Errors - * - * @param \PayPal\Api\Error $errors - * - * @return $this - */ - public function setErrors($errors) - { - $this->errors = $errors; - return $this; - } - - /** - * Gets Errors - * - * @return \PayPal\Api\Error - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutItem.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutItem.php deleted file mode 100644 index 76f2d23..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutItem.php +++ /dev/null @@ -1,190 +0,0 @@ -recipient_type = $recipient_type; - return $this; - } - - /** - * The type of identification for the payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`. - * - * @return string - */ - public function getRecipientType() - { - return $this->recipient_type; - } - - /** - * The amount of money to pay a receiver. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * The amount of money to pay a receiver. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max. - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max. - * - * @param string $receiver - * - * @return $this - */ - public function setReceiver($receiver) - { - $this->receiver = $receiver; - return $this; - } - - /** - * The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max. - * - * @return string - */ - public function getReceiver() - { - return $this->receiver; - } - - /** - * A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max. - * - * @param string $sender_item_id - * - * @return $this - */ - public function setSenderItemId($sender_item_id) - { - $this->sender_item_id = $sender_item_id; - return $this; - } - - /** - * A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max. - * - * @return string - */ - public function getSenderItemId() - { - return $this->sender_item_id; - } - - /** - * Obtain the status of a payout item by passing the item ID to the request URI. - * - * @param string $payoutItemId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PayoutItemDetails - */ - public static function get($payoutItemId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($payoutItemId, 'payoutItemId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/payouts-item/$payoutItemId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PayoutItemDetails(); - $ret->fromJson($json); - return $ret; - } - - /** - * Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return. - * - * @param string $payoutItemId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PayoutItemDetails - */ - public static function cancel($payoutItemId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($payoutItemId, 'payoutItemId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/payouts-item/$payoutItemId/cancel", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PayoutItemDetails(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutItemDetails.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutItemDetails.php deleted file mode 100644 index deeec97..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutItemDetails.php +++ /dev/null @@ -1,287 +0,0 @@ -payout_item_id = $payout_item_id; - return $this; - } - - /** - * An ID for an individual payout. Provided by PayPal, such as in the case of getting the status of a batch request. 30 characters max. - * - * @return string - */ - public function getPayoutItemId() - { - return $this->payout_item_id; - } - - /** - * Generated ID for the transaction. 30 characters max. - * - * @param string $transaction_id - * - * @return $this - */ - public function setTransactionId($transaction_id) - { - $this->transaction_id = $transaction_id; - return $this; - } - - /** - * Generated ID for the transaction. 30 characters max. - * - * @return string - */ - public function getTransactionId() - { - return $this->transaction_id; - } - - /** - * Status of a transaction. - * - * @param string $transaction_status - * - * @return $this - */ - public function setTransactionStatus($transaction_status) - { - $this->transaction_status = $transaction_status; - return $this; - } - - /** - * Status of a transaction. - * - * @return string - */ - public function getTransactionStatus() - { - return $this->transaction_status; - } - - /** - * Amount of money in U.S. dollars for fees. - * - * @param \PayPal\Api\Currency $payout_item_fee - * - * @return $this - */ - public function setPayoutItemFee($payout_item_fee) - { - $this->payout_item_fee = $payout_item_fee; - return $this; - } - - /** - * Amount of money in U.S. dollars for fees. - * - * @return \PayPal\Api\Currency - */ - public function getPayoutItemFee() - { - return $this->payout_item_fee; - } - - /** - * An ID for the batch payout. Generated by PayPal. 30 characters max. - * - * @param string $payout_batch_id - * - * @return $this - */ - public function setPayoutBatchId($payout_batch_id) - { - $this->payout_batch_id = $payout_batch_id; - return $this; - } - - /** - * An ID for the batch payout. Generated by PayPal. 30 characters max. - * - * @return string - */ - public function getPayoutBatchId() - { - return $this->payout_batch_id; - } - - /** - * Sender-created ID for tracking the batch in an accounting system. 30 characters max. - * - * @param string $sender_batch_id - * - * @return $this - */ - public function setSenderBatchId($sender_batch_id) - { - $this->sender_batch_id = $sender_batch_id; - return $this; - } - - /** - * Sender-created ID for tracking the batch in an accounting system. 30 characters max. - * - * @return string - */ - public function getSenderBatchId() - { - return $this->sender_batch_id; - } - - /** - * The data for a payout item that the sender initially provided. - * - * @param \PayPal\Api\PayoutItem $payout_item - * - * @return $this - */ - public function setPayoutItem($payout_item) - { - $this->payout_item = $payout_item; - return $this; - } - - /** - * The data for a payout item that the sender initially provided. - * - * @return \PayPal\Api\PayoutItem - */ - public function getPayoutItem() - { - return $this->payout_item; - } - - /** - * Time of the last processing for this item. - * - * @param string $time_processed - * - * @return $this - */ - public function setTimeProcessed($time_processed) - { - $this->time_processed = $time_processed; - return $this; - } - - /** - * Time of the last processing for this item. - * - * @return string - */ - public function getTimeProcessed() - { - return $this->time_processed; - } - - /** - * Sets Error - * - * @param \PayPal\Api\Error $errors - * - * @return $this - */ - public function setErrors($errors) - { - $this->errors = $errors; - return $this; - } - - /** - * Gets Error - * - * @return \PayPal\Api\Error - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutSenderBatchHeader.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutSenderBatchHeader.php deleted file mode 100644 index 2cd0f64..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutSenderBatchHeader.php +++ /dev/null @@ -1,89 +0,0 @@ -sender_batch_id = $sender_batch_id; - return $this; - } - - /** - * Sender-created ID for tracking the batch payout in an accounting system. 30 characters max. - * - * @return string - */ - public function getSenderBatchId() - { - return $this->sender_batch_id; - } - - /** - * The subject line text for the email that PayPal sends when a payout item is completed. (The subject line is the same for all recipients.) Maximum of 255 single-byte alphanumeric characters. - * - * @param string $email_subject - * - * @return $this - */ - public function setEmailSubject($email_subject) - { - $this->email_subject = $email_subject; - return $this; - } - - /** - * The subject line text for the email that PayPal sends when a payout item is completed. (The subject line is the same for all recipients.) Maximum of 255 single-byte alphanumeric characters. - * - * @return string - */ - public function getEmailSubject() - { - return $this->email_subject; - } - - /** - * The type of ID for a payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`. - * - * @param string $recipient_type - * - * @return $this - */ - public function setRecipientType($recipient_type) - { - $this->recipient_type = $recipient_type; - return $this; - } - - /** - * The type of ID for a payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`. - * - * @return string - */ - public function getRecipientType() - { - return $this->recipient_type; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Phone.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Phone.php deleted file mode 100644 index 8f9d89f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Phone.php +++ /dev/null @@ -1,89 +0,0 @@ -country_code = $country_code; - return $this; - } - - /** - * Country code (from in E.164 format) - * - * @return string - */ - public function getCountryCode() - { - return $this->country_code; - } - - /** - * In-country phone number (from in E.164 format) - * - * @param string $national_number - * - * @return $this - */ - public function setNationalNumber($national_number) - { - $this->national_number = $national_number; - return $this; - } - - /** - * In-country phone number (from in E.164 format) - * - * @return string - */ - public function getNationalNumber() - { - return $this->national_number; - } - - /** - * Phone extension - * - * @param string $extension - * - * @return $this - */ - public function setExtension($extension) - { - $this->extension = $extension; - return $this; - } - - /** - * Phone extension - * - * @return string - */ - public function getExtension() - { - return $this->extension; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Plan.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Plan.php deleted file mode 100644 index 630a9dc..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Plan.php +++ /dev/null @@ -1,445 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the billing plan. 128 characters max. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Name of the billing plan. 128 characters max. - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the billing plan. 128 characters max. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Description of the billing plan. 128 characters max. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of the billing plan. 128 characters max. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Type of the billing plan. Allowed values: `FIXED`, `INFINITE`. - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Type of the billing plan. Allowed values: `FIXED`, `INFINITE`. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Status of the billing plan. Allowed values: `CREATED`, `ACTIVE`, `INACTIVE`, and `DELETED`. - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * Status of the billing plan. Allowed values: `CREATED`, `ACTIVE`, `INACTIVE`, and `DELETED`. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Time when the billing plan was created. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time when the billing plan was created. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time when this billing plan was updated. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time when this billing plan was updated. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Array of payment definitions for this billing plan. - * - * @param \PayPal\Api\PaymentDefinition[] $payment_definitions - * - * @return $this - */ - public function setPaymentDefinitions($payment_definitions) - { - $this->payment_definitions = $payment_definitions; - return $this; - } - - /** - * Array of payment definitions for this billing plan. - * - * @return \PayPal\Api\PaymentDefinition[] - */ - public function getPaymentDefinitions() - { - return $this->payment_definitions; - } - - /** - * Append PaymentDefinitions to the list. - * - * @param \PayPal\Api\PaymentDefinition $paymentDefinition - * @return $this - */ - public function addPaymentDefinition($paymentDefinition) - { - if (!$this->getPaymentDefinitions()) { - return $this->setPaymentDefinitions(array($paymentDefinition)); - } else { - return $this->setPaymentDefinitions( - array_merge($this->getPaymentDefinitions(), array($paymentDefinition)) - ); - } - } - - /** - * Remove PaymentDefinitions from the list. - * - * @param \PayPal\Api\PaymentDefinition $paymentDefinition - * @return $this - */ - public function removePaymentDefinition($paymentDefinition) - { - return $this->setPaymentDefinitions( - array_diff($this->getPaymentDefinitions(), array($paymentDefinition)) - ); - } - - /** - * Array of terms for this billing plan. - * - * @param \PayPal\Api\Terms[] $terms - * - * @return $this - */ - public function setTerms($terms) - { - $this->terms = $terms; - return $this; - } - - /** - * Array of terms for this billing plan. - * - * @return \PayPal\Api\Terms[] - */ - public function getTerms() - { - return $this->terms; - } - - /** - * Append Terms to the list. - * - * @param \PayPal\Api\Terms $terms - * @return $this - */ - public function addTerm($terms) - { - if (!$this->getTerms()) { - return $this->setTerms(array($terms)); - } else { - return $this->setTerms( - array_merge($this->getTerms(), array($terms)) - ); - } - } - - /** - * Remove Terms from the list. - * - * @param \PayPal\Api\Terms $terms - * @return $this - */ - public function removeTerm($terms) - { - return $this->setTerms( - array_diff($this->getTerms(), array($terms)) - ); - } - - /** - * Specific preferences such as: set up fee, max fail attempts, autobill amount, and others that are configured for this billing plan. - * - * @param \PayPal\Api\MerchantPreferences $merchant_preferences - * - * @return $this - */ - public function setMerchantPreferences($merchant_preferences) - { - $this->merchant_preferences = $merchant_preferences; - return $this; - } - - /** - * Specific preferences such as: set up fee, max fail attempts, autobill amount, and others that are configured for this billing plan. - * - * @return \PayPal\Api\MerchantPreferences - */ - public function getMerchantPreferences() - { - return $this->merchant_preferences; - } - - /** - * Retrieve the details for a particular billing plan by passing the billing plan ID to the request URI. - * - * @param string $planId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Plan - */ - public static function get($planId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($planId, 'planId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/billing-plans/$planId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Plan(); - $ret->fromJson($json); - return $ret; - } - - /** - * Create a new billing plan by passing the details for the plan, including the plan name, description, and type, to the request URI. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Plan - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/payments/billing-plans/", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Replace specific fields within a billing plan by passing the ID of the billing plan to the request URI. In addition, pass a patch object in the request JSON that specifies the operation to perform, field to update, and new value for each update. - * - * @param PatchRequest $patchRequest - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function update($patchRequest, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($patchRequest, 'patchRequest'); - $payLoad = $patchRequest->toJSON(); - self::executeCall( - "/v1/payments/billing-plans/{$this->getId()}", - "PATCH", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Delete a billing plan by passing the ID of the billing plan to the request URI. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function delete($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $patchRequest = new PatchRequest(); - $patch = new Patch(); - $value = new PayPalModel('{ - "state":"DELETED" - }'); - $patch->setOp('replace') - ->setPath('/') - ->setValue($value); - $patchRequest->addPatch($patch); - return $this->update($patchRequest, $apiContext, $restCall); - } - - /** - * List billing plans according to optional query string parameters specified. - * - * @param array $params - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return PlanList - */ - public static function all($params, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($params, 'params'); - $payLoad = ""; - $allowedParams = array( - 'page_size' => 1, - 'status' => 1, - 'page' => 1, - 'total_required' => 1 - ); - $json = self::executeCall( - "/v1/payments/billing-plans/" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new PlanList(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PlanList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PlanList.php deleted file mode 100644 index 495599b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PlanList.php +++ /dev/null @@ -1,173 +0,0 @@ -plans = $plans; - return $this; - } - - /** - * Array of billing plans. - * - * @return \PayPal\Api\Plan[] - */ - public function getPlans() - { - return $this->plans; - } - - /** - * Append Plans to the list. - * - * @param \PayPal\Api\Plan $plan - * @return $this - */ - public function addPlan($plan) - { - if (!$this->getPlans()) { - return $this->setPlans(array($plan)); - } else { - return $this->setPlans( - array_merge($this->getPlans(), array($plan)) - ); - } - } - - /** - * Remove Plans from the list. - * - * @param \PayPal\Api\Plan $plan - * @return $this - */ - public function removePlan($plan) - { - return $this->setPlans( - array_diff($this->getPlans(), array($plan)) - ); - } - - /** - * Total number of items. - * - * @param string $total_items - * - * @return $this - */ - public function setTotalItems($total_items) - { - $this->total_items = $total_items; - return $this; - } - - /** - * Total number of items. - * - * @return string - */ - public function getTotalItems() - { - return $this->total_items; - } - - /** - * Total number of pages. - * - * @param string $total_pages - * - * @return $this - */ - public function setTotalPages($total_pages) - { - $this->total_pages = $total_pages; - return $this; - } - - /** - * Total number of pages. - * - * @return string - */ - public function getTotalPages() - { - return $this->total_pages; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PotentialPayerInfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PotentialPayerInfo.php deleted file mode 100644 index fc57e17..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PotentialPayerInfo.php +++ /dev/null @@ -1,112 +0,0 @@ -email = $email; - return $this; - } - - /** - * Email address representing the potential payer. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * ExternalRememberMe id representing the potential payer - * - * @param string $external_remember_me_id - * - * @return $this - */ - public function setExternalRememberMeId($external_remember_me_id) - { - $this->external_remember_me_id = $external_remember_me_id; - return $this; - } - - /** - * ExternalRememberMe id representing the potential payer - * - * @return string - */ - public function getExternalRememberMeId() - { - return $this->external_remember_me_id; - } - - /** - * Account Number representing the potential payer - * @deprecated Not publicly available - * @param string $account_number - * - * @return $this - */ - public function setAccountNumber($account_number) - { - $this->account_number = $account_number; - return $this; - } - - /** - * Account Number representing the potential payer - * @deprecated Not publicly available - * @return string - */ - public function getAccountNumber() - { - return $this->account_number; - } - - /** - * Billing address of the potential payer. - * - * @param \PayPal\Api\Address $billing_address - * - * @return $this - */ - public function setBillingAddress($billing_address) - { - $this->billing_address = $billing_address; - return $this; - } - - /** - * Billing address of the potential payer. - * - * @return \PayPal\Api\Address - */ - public function getBillingAddress() - { - return $this->billing_address; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Presentation.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Presentation.php deleted file mode 100644 index e75aa80..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Presentation.php +++ /dev/null @@ -1,92 +0,0 @@ -brand_name = $brand_name; - return $this; - } - - /** - * A label that overrides the business name in the PayPal account on the PayPal pages. - * - * @return string - */ - public function getBrandName() - { - return $this->brand_name; - } - - /** - * A URL to logo image. Allowed vaues: `.gif`, `.jpg`, or `.png`. - * - * - * @param string $logo_image - * - * @return $this - */ - public function setLogoImage($logo_image) - { - $this->logo_image = $logo_image; - return $this; - } - - /** - * A URL to logo image. Allowed vaues: `.gif`, `.jpg`, or `.png`. - * - * @return string - */ - public function getLogoImage() - { - return $this->logo_image; - } - - /** - * Locale of pages displayed by PayPal payment experience. - * - * - * @param string $locale_code - * - * @return $this - */ - public function setLocaleCode($locale_code) - { - $this->locale_code = $locale_code; - return $this; - } - - /** - * Locale of pages displayed by PayPal payment experience. - * - * @return string - */ - public function getLocaleCode() - { - return $this->locale_code; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PrivateLabelCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PrivateLabelCard.php deleted file mode 100644 index 385a1cc..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PrivateLabelCard.php +++ /dev/null @@ -1,137 +0,0 @@ -id = $id; - return $this; - } - - /** - * encrypted identifier of the private label card instrument. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * last 4 digits of the card number. - * - * @param string $card_number - * - * @return $this - */ - public function setCardNumber($card_number) - { - $this->card_number = $card_number; - return $this; - } - - /** - * last 4 digits of the card number. - * - * @return string - */ - public function getCardNumber() - { - return $this->card_number; - } - - /** - * Merchants providing private label store cards have associated issuer account. This value indicates encrypted account number of the associated issuer account. - * - * @param string $issuer_id - * - * @return $this - */ - public function setIssuerId($issuer_id) - { - $this->issuer_id = $issuer_id; - return $this; - } - - /** - * Merchants providing private label store cards have associated issuer account. This value indicates encrypted account number of the associated issuer account. - * - * @return string - */ - public function getIssuerId() - { - return $this->issuer_id; - } - - /** - * Merchants providing private label store cards have associated issuer account. This value indicates name on the issuer account. - * - * @param string $issuer_name - * - * @return $this - */ - public function setIssuerName($issuer_name) - { - $this->issuer_name = $issuer_name; - return $this; - } - - /** - * Merchants providing private label store cards have associated issuer account. This value indicates name on the issuer account. - * - * @return string - */ - public function getIssuerName() - { - return $this->issuer_name; - } - - /** - * This value indicates URL to access PLCC program logo image - * - * @param string $image_key - * - * @return $this - */ - public function setImageKey($image_key) - { - $this->image_key = $image_key; - return $this; - } - - /** - * This value indicates URL to access PLCC program logo image - * - * @return string - */ - public function getImageKey() - { - return $this->image_key; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ProcessorResponse.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ProcessorResponse.php deleted file mode 100644 index 5854670..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ProcessorResponse.php +++ /dev/null @@ -1,162 +0,0 @@ -response_code = $response_code; - return $this; - } - - /** - * Paypal normalized response code, generated from the processor's specific response code - * - * @return string - */ - public function getResponseCode() - { - return $this->response_code; - } - - /** - * Address Verification System response code. https://developer.paypal.com/webapps/developer/docs/classic/api/AVSResponseCodes/ - * - * @param string $avs_code - * - * @return $this - */ - public function setAvsCode($avs_code) - { - $this->avs_code = $avs_code; - return $this; - } - - /** - * Address Verification System response code. https://developer.paypal.com/webapps/developer/docs/classic/api/AVSResponseCodes/ - * - * @return string - */ - public function getAvsCode() - { - return $this->avs_code; - } - - /** - * CVV System response code. https://developer.paypal.com/webapps/developer/docs/classic/api/AVSResponseCodes/ - * - * @param string $cvv_code - * - * @return $this - */ - public function setCvvCode($cvv_code) - { - $this->cvv_code = $cvv_code; - return $this; - } - - /** - * CVV System response code. https://developer.paypal.com/webapps/developer/docs/classic/api/AVSResponseCodes/ - * - * @return string - */ - public function getCvvCode() - { - return $this->cvv_code; - } - - /** - * Provides merchant advice on how to handle declines related to recurring payments - * Valid Values: ["01_NEW_ACCOUNT_INFORMATION", "02_TRY_AGAIN_LATER", "02_STOP_SPECIFIC_PAYMENT", "03_DO_NOT_TRY_AGAIN", "03_REVOKE_AUTHORIZATION_FOR_FUTURE_PAYMENT", "21_DO_NOT_TRY_AGAIN_CARD_HOLDER_CANCELLED_RECURRRING_CHARGE", "21_CANCEL_ALL_RECURRING_PAYMENTS"] - * - * @param string $advice_code - * - * @return $this - */ - public function setAdviceCode($advice_code) - { - $this->advice_code = $advice_code; - return $this; - } - - /** - * Provides merchant advice on how to handle declines related to recurring payments - * - * @return string - */ - public function getAdviceCode() - { - return $this->advice_code; - } - - /** - * Response back from the authorization. Provided by the processor - * - * @param string $eci_submitted - * - * @return $this - */ - public function setEciSubmitted($eci_submitted) - { - $this->eci_submitted = $eci_submitted; - return $this; - } - - /** - * Response back from the authorization. Provided by the processor - * - * @return string - */ - public function getEciSubmitted() - { - return $this->eci_submitted; - } - - /** - * Visa Payer Authentication Service status. Will be return from processor - * - * @param string $vpas - * - * @return $this - */ - public function setVpas($vpas) - { - $this->vpas = $vpas; - return $this; - } - - /** - * Visa Payer Authentication Service status. Will be return from processor - * - * @return string - */ - public function getVpas() - { - return $this->vpas; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RecipientBankingInstruction.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RecipientBankingInstruction.php deleted file mode 100644 index 9c2fd0d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RecipientBankingInstruction.php +++ /dev/null @@ -1,161 +0,0 @@ -bank_name = $bank_name; - return $this; - } - - /** - * Name of the financial institution. - * - * @return string - */ - public function getBankName() - { - return $this->bank_name; - } - - /** - * Name of the account holder - * - * @param string $account_holder_name - * - * @return $this - */ - public function setAccountHolderName($account_holder_name) - { - $this->account_holder_name = $account_holder_name; - return $this; - } - - /** - * Name of the account holder - * - * @return string - */ - public function getAccountHolderName() - { - return $this->account_holder_name; - } - - /** - * bank account number - * - * @param string $account_number - * - * @return $this - */ - public function setAccountNumber($account_number) - { - $this->account_number = $account_number; - return $this; - } - - /** - * bank account number - * - * @return string - */ - public function getAccountNumber() - { - return $this->account_number; - } - - /** - * bank routing number - * - * @param string $routing_number - * - * @return $this - */ - public function setRoutingNumber($routing_number) - { - $this->routing_number = $routing_number; - return $this; - } - - /** - * bank routing number - * - * @return string - */ - public function getRoutingNumber() - { - return $this->routing_number; - } - - /** - * IBAN equivalent of the bank - * - * @param string $international_bank_account_number - * - * @return $this - */ - public function setInternationalBankAccountNumber($international_bank_account_number) - { - $this->international_bank_account_number = $international_bank_account_number; - return $this; - } - - /** - * IBAN equivalent of the bank - * - * @return string - */ - public function getInternationalBankAccountNumber() - { - return $this->international_bank_account_number; - } - - /** - * BIC identifier of the financial institution - * - * @param string $bank_identifier_code - * - * @return $this - */ - public function setBankIdentifierCode($bank_identifier_code) - { - $this->bank_identifier_code = $bank_identifier_code; - return $this; - } - - /** - * BIC identifier of the financial institution - * - * @return string - */ - public function getBankIdentifierCode() - { - return $this->bank_identifier_code; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php deleted file mode 100644 index 5c97ba4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php +++ /dev/null @@ -1,68 +0,0 @@ -return_url = $return_url; - return $this; - } - - /** - * Url where the payer would be redirected to after approving the payment. **Required for PayPal account payments.** - * - * @return string - */ - public function getReturnUrl() - { - return $this->return_url; - } - - /** - * Url where the payer would be redirected to after canceling the payment. **Required for PayPal account payments.** - * - * @param string $cancel_url - * @throws \InvalidArgumentException - * @return $this - */ - public function setCancelUrl($cancel_url) - { - UrlValidator::validate($cancel_url, "CancelUrl"); - $this->cancel_url = $cancel_url; - return $this; - } - - /** - * Url where the payer would be redirected to after canceling the payment. **Required for PayPal account payments.** - * - * @return string - */ - public function getCancelUrl() - { - return $this->cancel_url; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Refund.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Refund.php deleted file mode 100644 index dfddb0c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Refund.php +++ /dev/null @@ -1,286 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the refund transaction. 17 characters max. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max. - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - - /** - * State of the refund. - * Valid Values: ["pending", "completed", "failed"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the refund. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Reason description for the Sale transaction being refunded. - * - * @param string $reason - * - * @return $this - */ - public function setReason($reason) - { - $this->reason = $reason; - return $this; - } - - /** - * Reason description for the Sale transaction being refunded. - * - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * ID of the Sale transaction being refunded. - * - * @param string $sale_id - * - * @return $this - */ - public function setSaleId($sale_id) - { - $this->sale_id = $sale_id; - return $this; - } - - /** - * ID of the Sale transaction being refunded. - * - * @return string - */ - public function getSaleId() - { - return $this->sale_id; - } - - /** - * ID of the sale transaction being refunded. - * - * @param string $capture_id - * - * @return $this - */ - public function setCaptureId($capture_id) - { - $this->capture_id = $capture_id; - return $this; - } - - /** - * ID of the sale transaction being refunded. - * - * @return string - */ - public function getCaptureId() - { - return $this->capture_id; - } - - /** - * ID of the payment resource on which this transaction is based. - * - * @param string $parent_payment - * - * @return $this - */ - public function setParentPayment($parent_payment) - { - $this->parent_payment = $parent_payment; - return $this; - } - - /** - * ID of the payment resource on which this transaction is based. - * - * @return string - */ - public function getParentPayment() - { - return $this->parent_payment; - } - - /** - * Description of what is being refunded for. - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Description of what is being refunded for. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Time of refund as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time of refund as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time that the resource was last updated. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time that the resource was last updated. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Retrieve details about a specific refund by passing the refund_id in the request URI. - * - * @param string $refundId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Refund - */ - public static function get($refundId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($refundId, 'refundId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/refund/$refundId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Refund(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RefundDetail.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RefundDetail.php deleted file mode 100644 index 26023b0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RefundDetail.php +++ /dev/null @@ -1,90 +0,0 @@ -type = $type; - return $this; - } - - /** - * PayPal refund type indicating whether refund was done in invoicing flow via PayPal or externally. In the case of the mark-as-refunded API, refund type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $date - * - * @return $this - */ - public function setDate($date) - { - $this->date = $date; - return $this; - } - - /** - * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getDate() - { - return $this->date; - } - - /** - * Optional note associated with the refund. - * - * @param string $note - * - * @return $this - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * Optional note associated with the refund. - * - * @return string - */ - public function getNote() - { - return $this->note; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php deleted file mode 100644 index e8f9719..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php +++ /dev/null @@ -1,137 +0,0 @@ -sale = $sale; - return $this; - } - - /** - * Sale transaction - * - * @return \PayPal\Api\Sale - */ - public function getSale() - { - return $this->sale; - } - - /** - * Authorization transaction - * - * @param \PayPal\Api\Authorization $authorization - * - * @return $this - */ - public function setAuthorization($authorization) - { - $this->authorization = $authorization; - return $this; - } - - /** - * Authorization transaction - * - * @return \PayPal\Api\Authorization - */ - public function getAuthorization() - { - return $this->authorization; - } - - /** - * Order transaction - * - * @param \PayPal\Api\Order $order - * - * @return $this - */ - public function setOrder($order) - { - $this->order = $order; - return $this; - } - - /** - * Order transaction - * - * @return \PayPal\Api\Order - */ - public function getOrder() - { - return $this->order; - } - - /** - * Capture transaction - * - * @param \PayPal\Api\Capture $capture - * - * @return $this - */ - public function setCapture($capture) - { - $this->capture = $capture; - return $this; - } - - /** - * Capture transaction - * - * @return \PayPal\Api\Capture - */ - public function getCapture() - { - return $this->capture; - } - - /** - * Refund transaction - * - * @param \PayPal\Api\Refund $refund - * - * @return $this - */ - public function setRefund($refund) - { - $this->refund = $refund; - return $this; - } - - /** - * Refund transaction - * - * @return \PayPal\Api\Refund - */ - public function getRefund() - { - return $this->refund; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Sale.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Sale.php deleted file mode 100644 index 856cbe4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Sale.php +++ /dev/null @@ -1,611 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the sale transaction. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Identifier of the purchased unit associated with this object. - * - * @param string $purchase_unit_reference_id - * - * @return $this - */ - public function setPurchaseUnitReferenceId($purchase_unit_reference_id) - { - $this->purchase_unit_reference_id = $purchase_unit_reference_id; - return $this; - } - - /** - * Identifier of the purchased unit associated with this object. - * - * @return string - */ - public function getPurchaseUnitReferenceId() - { - return $this->purchase_unit_reference_id; - } - - /** - * Amount being collected. - * - * @param \PayPal\Api\Amount $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Amount being collected. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Specifies payment mode of the transaction. Only supported when the `payment_method` is set to `paypal`. - * Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"] - * - * @param string $payment_mode - * - * @return $this - */ - public function setPaymentMode($payment_mode) - { - $this->payment_mode = $payment_mode; - return $this; - } - - /** - * Specifies payment mode of the transaction. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getPaymentMode() - { - return $this->payment_mode; - } - - /** - * State of the sale. - * Valid Values: ["completed", "partially_refunded", "pending", "refunded"] - * - * @param string $state - * - * @return $this - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * State of the sale. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`. - * Valid Values: ["CHARGEBACK", "GUARANTEE", "BUYER_COMPLAINT", "REFUND", "UNCONFIRMED_SHIPPING_ADDRESS", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "PAYMENT_REVIEW", "REGULATORY_REVIEW", "UNILATERAL", "VERIFICATION_REQUIRED"] - * - * @param string $reason_code - * - * @return $this - */ - public function setReasonCode($reason_code) - { - $this->reason_code = $reason_code; - return $this; - } - - /** - * Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getReasonCode() - { - return $this->reason_code; - } - - /** - * The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`. - * Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"] - * - * @param string $protection_eligibility - * - * @return $this - */ - public function setProtectionEligibility($protection_eligibility) - { - $this->protection_eligibility = $protection_eligibility; - return $this; - } - - /** - * The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getProtectionEligibility() - { - return $this->protection_eligibility; - } - - /** - * The kind of seller protection in force for the transaction. It is returned only when protection_eligibility is ELIGIBLE or PARTIALLY_ELIGIBLE. Only supported when the `payment_method` is set to `paypal`. - * Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"] - * - * @param string $protection_eligibility_type - * - * @return $this - */ - public function setProtectionEligibilityType($protection_eligibility_type) - { - $this->protection_eligibility_type = $protection_eligibility_type; - return $this; - } - - /** - * The kind of seller protection in force for the transaction. It is returned only when protection_eligibility is ELIGIBLE or PARTIALLY_ELIGIBLE. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getProtectionEligibilityType() - { - return $this->protection_eligibility_type; - } - - /** - * Expected clearing time for eCheck transactions. Only supported when the `payment_method` is set to `paypal`. - * - * @param string $clearing_time - * - * @return $this - */ - public function setClearingTime($clearing_time) - { - $this->clearing_time = $clearing_time; - return $this; - } - - /** - * Expected clearing time for eCheck transactions. Only supported when the `payment_method` is set to `paypal`. - * - * @return string - */ - public function getClearingTime() - { - return $this->clearing_time; - } - - /** - * Status of the Recipient Fund. For now, it will be returned only when fund status is held - * Valid Values: ["HELD"] - * - * @param string $payment_hold_status - * - * @return $this - */ - public function setPaymentHoldStatus($payment_hold_status) - { - $this->payment_hold_status = $payment_hold_status; - return $this; - } - - /** - * Status of the Recipient Fund. For now, it will be returned only when fund status is held - * - * @return string - */ - public function getPaymentHoldStatus() - { - return $this->payment_hold_status; - } - - /** - * Reasons for PayPal holding recipient fund. It is set only if payment hold status is held - * - * @param string[] $payment_hold_reasons - * - * @return $this - */ - public function setPaymentHoldReasons($payment_hold_reasons) - { - $this->payment_hold_reasons = $payment_hold_reasons; - return $this; - } - - /** - * Reasons for PayPal holding recipient fund. It is set only if payment hold status is held - * - * @return string[] - */ - public function getPaymentHoldReasons() - { - return $this->payment_hold_reasons; - } - - /** - * Append PaymentHoldReasons to the list. - * - * @param string $string - * @return $this - */ - public function addPaymentHoldReason($string) - { - if (!$this->getPaymentHoldReasons()) { - return $this->setPaymentHoldReasons(array($string)); - } else { - return $this->setPaymentHoldReasons( - array_merge($this->getPaymentHoldReasons(), array($string)) - ); - } - } - - /** - * Remove PaymentHoldReasons from the list. - * - * @param string $string - * @return $this - */ - public function removePaymentHoldReason($string) - { - return $this->setPaymentHoldReasons( - array_diff($this->getPaymentHoldReasons(), array($string)) - ); - } - - /** - * Transaction fee charged by PayPal for this transaction. - * - * @param \PayPal\Api\Currency $transaction_fee - * - * @return $this - */ - public function setTransactionFee($transaction_fee) - { - $this->transaction_fee = $transaction_fee; - return $this; - } - - /** - * Transaction fee charged by PayPal for this transaction. - * - * @return \PayPal\Api\Currency - */ - public function getTransactionFee() - { - return $this->transaction_fee; - } - - /** - * Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer. - * - * @param \PayPal\Api\Currency $receivable_amount - * - * @return $this - */ - public function setReceivableAmount($receivable_amount) - { - $this->receivable_amount = $receivable_amount; - return $this; - } - - /** - * Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer. - * - * @return \PayPal\Api\Currency - */ - public function getReceivableAmount() - { - return $this->receivable_amount; - } - - /** - * Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer. - * - * @param string $exchange_rate - * - * @return $this - */ - public function setExchangeRate($exchange_rate) - { - $this->exchange_rate = $exchange_rate; - return $this; - } - - /** - * Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer. - * - * @return string - */ - public function getExchangeRate() - { - return $this->exchange_rate; - } - - /** - * Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](/docs/classic/fmf/integration-guide/FMFSummary/) for more information. - * - * @param \PayPal\Api\FmfDetails $fmf_details - * - * @return $this - */ - public function setFmfDetails($fmf_details) - { - $this->fmf_details = $fmf_details; - return $this; - } - - /** - * Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](/docs/classic/fmf/integration-guide/FMFSummary/) for more information. - * - * @return \PayPal\Api\FmfDetails - */ - public function getFmfDetails() - { - return $this->fmf_details; - } - - /** - * Receipt id is a payment identification number returned for guest users to identify the payment. - * - * @param string $receipt_id - * - * @return $this - */ - public function setReceiptId($receipt_id) - { - $this->receipt_id = $receipt_id; - return $this; - } - - /** - * Receipt id is a payment identification number returned for guest users to identify the payment. - * - * @return string - */ - public function getReceiptId() - { - return $this->receipt_id; - } - - /** - * ID of the payment resource on which this transaction is based. - * - * @param string $parent_payment - * - * @return $this - */ - public function setParentPayment($parent_payment) - { - $this->parent_payment = $parent_payment; - return $this; - } - - /** - * ID of the payment resource on which this transaction is based. - * - * @return string - */ - public function getParentPayment() - { - return $this->parent_payment; - } - - /** - * Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`. - * - * @param \PayPal\Api\ProcessorResponse $processor_response - * - * @return $this - */ - public function setProcessorResponse($processor_response) - { - $this->processor_response = $processor_response; - return $this; - } - - /** - * Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`. - * - * @return \PayPal\Api\ProcessorResponse - */ - public function getProcessorResponse() - { - return $this->processor_response; - } - - /** - * ID of the billing agreement used as reference to execute this transaction. - * - * @param string $billing_agreement_id - * - * @return $this - */ - public function setBillingAgreementId($billing_agreement_id) - { - $this->billing_agreement_id = $billing_agreement_id; - return $this; - } - - /** - * ID of the billing agreement used as reference to execute this transaction. - * - * @return string - */ - public function getBillingAgreementId() - { - return $this->billing_agreement_id; - } - - /** - * Time of sale as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6) - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time of sale as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6) - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Time the resource was last updated in UTC ISO8601 format. - * - * @param string $update_time - * - * @return $this - */ - public function setUpdateTime($update_time) - { - $this->update_time = $update_time; - return $this; - } - - /** - * Time the resource was last updated in UTC ISO8601 format. - * - * @return string - */ - public function getUpdateTime() - { - return $this->update_time; - } - - /** - * Retrieve details about a sale transaction by passing the sale_id in the request URI. This request returns only the sales that were created via the REST API. - * - * @param string $saleId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Sale - */ - public static function get($saleId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($saleId, 'saleId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payments/sale/$saleId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Sale(); - $ret->fromJson($json); - return $ret; - } - - /** - * Refund a completed payment by passing the sale_id in the request URI. In addition, include an empty JSON payload in the request body for a full refund. For a partial refund, include an amount object in the request body. - * - * @param Refund $refund - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Refund - */ - public function refund($refund, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($refund, 'refund'); - $payLoad = $refund->toJSON(); - $json = self::executeCall( - "/v1/payments/sale/{$this->getId()}/refund", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Refund(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Search.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Search.php deleted file mode 100644 index 0594f9a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Search.php +++ /dev/null @@ -1,474 +0,0 @@ -email = $email; - return $this; - } - - /** - * Initial letters of the email address. - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Initial letters of the recipient's first name. - * - * @param string $recipient_first_name - * - * @return $this - */ - public function setRecipientFirstName($recipient_first_name) - { - $this->recipient_first_name = $recipient_first_name; - return $this; - } - - /** - * Initial letters of the recipient's first name. - * - * @return string - */ - public function getRecipientFirstName() - { - return $this->recipient_first_name; - } - - /** - * Initial letters of the recipient's last name. - * - * @param string $recipient_last_name - * - * @return $this - */ - public function setRecipientLastName($recipient_last_name) - { - $this->recipient_last_name = $recipient_last_name; - return $this; - } - - /** - * Initial letters of the recipient's last name. - * - * @return string - */ - public function getRecipientLastName() - { - return $this->recipient_last_name; - } - - /** - * Initial letters of the recipient's business name. - * - * @param string $recipient_business_name - * - * @return $this - */ - public function setRecipientBusinessName($recipient_business_name) - { - $this->recipient_business_name = $recipient_business_name; - return $this; - } - - /** - * Initial letters of the recipient's business name. - * - * @return string - */ - public function getRecipientBusinessName() - { - return $this->recipient_business_name; - } - - /** - * The invoice number that appears on the invoice. - * - * @param string $number - * - * @return $this - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * The invoice number that appears on the invoice. - * - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * Status of the invoice. - * Valid Values: ["DRAFT", "SENT", "PAID", "MARKED_AS_PAID", "CANCELLED", "REFUNDED", "PARTIALLY_REFUNDED", "MARKED_AS_REFUNDED"] - * - * @param string $status - * - * @return $this - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * Status of the invoice. - * - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Lower limit of total amount. - * - * @param \PayPal\Api\Currency $lower_total_amount - * - * @return $this - */ - public function setLowerTotalAmount($lower_total_amount) - { - $this->lower_total_amount = $lower_total_amount; - return $this; - } - - /** - * Lower limit of total amount. - * - * @return \PayPal\Api\Currency - */ - public function getLowerTotalAmount() - { - return $this->lower_total_amount; - } - - /** - * Upper limit of total amount. - * - * @param \PayPal\Api\Currency $upper_total_amount - * - * @return $this - */ - public function setUpperTotalAmount($upper_total_amount) - { - $this->upper_total_amount = $upper_total_amount; - return $this; - } - - /** - * Upper limit of total amount. - * - * @return \PayPal\Api\Currency - */ - public function getUpperTotalAmount() - { - return $this->upper_total_amount; - } - - /** - * Start invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $start_invoice_date - * - * @return $this - */ - public function setStartInvoiceDate($start_invoice_date) - { - $this->start_invoice_date = $start_invoice_date; - return $this; - } - - /** - * Start invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getStartInvoiceDate() - { - return $this->start_invoice_date; - } - - /** - * End invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $end_invoice_date - * - * @return $this - */ - public function setEndInvoiceDate($end_invoice_date) - { - $this->end_invoice_date = $end_invoice_date; - return $this; - } - - /** - * End invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getEndInvoiceDate() - { - return $this->end_invoice_date; - } - - /** - * Start invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $start_due_date - * - * @return $this - */ - public function setStartDueDate($start_due_date) - { - $this->start_due_date = $start_due_date; - return $this; - } - - /** - * Start invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getStartDueDate() - { - return $this->start_due_date; - } - - /** - * End invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $end_due_date - * - * @return $this - */ - public function setEndDueDate($end_due_date) - { - $this->end_due_date = $end_due_date; - return $this; - } - - /** - * End invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getEndDueDate() - { - return $this->end_due_date; - } - - /** - * Start invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $start_payment_date - * - * @return $this - */ - public function setStartPaymentDate($start_payment_date) - { - $this->start_payment_date = $start_payment_date; - return $this; - } - - /** - * Start invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getStartPaymentDate() - { - return $this->start_payment_date; - } - - /** - * End invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $end_payment_date - * - * @return $this - */ - public function setEndPaymentDate($end_payment_date) - { - $this->end_payment_date = $end_payment_date; - return $this; - } - - /** - * End invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getEndPaymentDate() - { - return $this->end_payment_date; - } - - /** - * Start invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $start_creation_date - * - * @return $this - */ - public function setStartCreationDate($start_creation_date) - { - $this->start_creation_date = $start_creation_date; - return $this; - } - - /** - * Start invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getStartCreationDate() - { - return $this->start_creation_date; - } - - /** - * End invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @param string $end_creation_date - * - * @return $this - */ - public function setEndCreationDate($end_creation_date) - { - $this->end_creation_date = $end_creation_date; - return $this; - } - - /** - * End invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). - * - * @return string - */ - public function getEndCreationDate() - { - return $this->end_creation_date; - } - - /** - * Offset of the search results. - * - * @param \PayPal\Api\number $page - * - * @return $this - */ - public function setPage($page) - { - $this->page = $page; - return $this; - } - - /** - * Offset of the search results. - * - * @return \PayPal\Api\number - */ - public function getPage() - { - return $this->page; - } - - /** - * Page size of the search results. - * - * @param \PayPal\Api\number $page_size - * - * @return $this - */ - public function setPageSize($page_size) - { - $this->page_size = $page_size; - return $this; - } - - /** - * Page size of the search results. - * - * @return \PayPal\Api\number - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A flag indicating whether total count is required in the response. - * - * @param bool $total_count_required - * - * @return $this - */ - public function setTotalCountRequired($total_count_required) - { - $this->total_count_required = $total_count_required; - return $this; - } - - /** - * A flag indicating whether total count is required in the response. - * - * @return bool - */ - public function getTotalCountRequired() - { - return $this->total_count_required; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php deleted file mode 100644 index 9bde918..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php +++ /dev/null @@ -1,111 +0,0 @@ -id = $id; - return $this; - } - - /** - * Address ID assigned in PayPal system. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Name of the recipient at this address. - * - * @param string $recipient_name - * - * @return $this - */ - public function setRecipientName($recipient_name) - { - $this->recipient_name = $recipient_name; - return $this; - } - - /** - * Name of the recipient at this address. - * - * @return string - */ - public function getRecipientName() - { - return $this->recipient_name; - } - - /** - * Default shipping address of the Payer. - * - * @param bool $default_address - * - * @return $this - */ - public function setDefaultAddress($default_address) - { - $this->default_address = $default_address; - return $this; - } - - /** - * Default shipping address of the Payer. - * - * @return bool - */ - public function getDefaultAddress() - { - return $this->default_address; - } - - /** - * Shipping Address marked as preferred by Payer. - * - * @param bool $preferred_address - * - * @return $this - */ - public function setPreferredAddress($preferred_address) - { - $this->preferred_address = $preferred_address; - return $this; - } - - /** - * Shipping Address marked as preferred by Payer. - * - * @return bool - */ - public function getPreferredAddress() - { - return $this->preferred_address; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingCost.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingCost.php deleted file mode 100644 index b4beeb8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingCost.php +++ /dev/null @@ -1,65 +0,0 @@ -amount = $amount; - return $this; - } - - /** - * Shipping cost in amount. Range of 0 to 999999.99. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - - /** - * Tax percentage on shipping amount. - * - * @param \PayPal\Api\Tax $tax - * - * @return $this - */ - public function setTax($tax) - { - $this->tax = $tax; - return $this; - } - - /** - * Tax percentage on shipping amount. - * - * @return \PayPal\Api\Tax - */ - public function getTax() - { - return $this->tax; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingInfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingInfo.php deleted file mode 100644 index 6937b03..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ShippingInfo.php +++ /dev/null @@ -1,158 +0,0 @@ -first_name = $first_name; - return $this; - } - - /** - * First name of the invoice recipient. 30 characters max. - * - * @return string - */ - public function getFirstName() - { - return $this->first_name; - } - - /** - * Last name of the invoice recipient. 30 characters max. - * - * @param string $last_name - * - * @return $this - */ - public function setLastName($last_name) - { - $this->last_name = $last_name; - return $this; - } - - /** - * Last name of the invoice recipient. 30 characters max. - * - * @return string - */ - public function getLastName() - { - return $this->last_name; - } - - /** - * Company business name of the invoice recipient. 100 characters max. - * - * @param string $business_name - * - * @return $this - */ - public function setBusinessName($business_name) - { - $this->business_name = $business_name; - return $this; - } - - /** - * Company business name of the invoice recipient. 100 characters max. - * - * @return string - */ - public function getBusinessName() - { - return $this->business_name; - } - - /** - * - * - * @param \PayPal\Api\Phone $phone - * @return $this - */ - public function setPhone($phone) - { - $this->phone = $phone; - return $this; - } - - /** - * - * - * @return \PayPal\Api\Phone - */ - public function getPhone() - { - return $this->phone; - } - - /** - * - * - * @param string $email - * @return $this - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Address of the invoice recipient. - * - * @param \PayPal\Api\InvoiceAddress $address - * - * @return $this - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * Address of the invoice recipient. - * - * @return \PayPal\Api\InvoiceAddress - */ - public function getAddress() - { - return $this->address; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Tax.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Tax.php deleted file mode 100644 index ce6b9f2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Tax.php +++ /dev/null @@ -1,117 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the resource. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Name of the tax. 10 characters max. - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the tax. 10 characters max. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Rate of the specified tax. Range of 0.001 to 99.999. - * - * @param string|double $percent - * - * @return $this - */ - public function setPercent($percent) - { - NumericValidator::validate($percent, "Percent"); - $percent = FormatConverter::formatToPrice($percent); - $this->percent = $percent; - return $this; - } - - /** - * Rate of the specified tax. Range of 0.001 to 99.999. - * - * @return string - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Tax in the form of money. Cannot be specified in a request. - * - * @param \PayPal\Api\Currency $amount - * - * @return $this - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * Tax in the form of money. Cannot be specified in a request. - * - * @return \PayPal\Api\Currency - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Terms.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Terms.php deleted file mode 100644 index 8bc1c84..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Terms.php +++ /dev/null @@ -1,161 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the terms. 128 characters max. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Term type. Allowed values: `MONTHLY`, `WEEKLY`, `YEARLY`. - * - * @param string $type - * - * @return $this - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Term type. Allowed values: `MONTHLY`, `WEEKLY`, `YEARLY`. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Max Amount associated with this term. - * - * @param \PayPal\Api\Currency $max_billing_amount - * - * @return $this - */ - public function setMaxBillingAmount($max_billing_amount) - { - $this->max_billing_amount = $max_billing_amount; - return $this; - } - - /** - * Max Amount associated with this term. - * - * @return \PayPal\Api\Currency - */ - public function getMaxBillingAmount() - { - return $this->max_billing_amount; - } - - /** - * How many times money can be pulled during this term. - * - * @param string $occurrences - * - * @return $this - */ - public function setOccurrences($occurrences) - { - $this->occurrences = $occurrences; - return $this; - } - - /** - * How many times money can be pulled during this term. - * - * @return string - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * Amount_range associated with this term. - * - * @param \PayPal\Api\Currency $amount_range - * - * @return $this - */ - public function setAmountRange($amount_range) - { - $this->amount_range = $amount_range; - return $this; - } - - /** - * Amount_range associated with this term. - * - * @return \PayPal\Api\Currency - */ - public function getAmountRange() - { - return $this->amount_range; - } - - /** - * Buyer's ability to edit the amount in this term. - * - * @param string $buyer_editable - * - * @return $this - */ - public function setBuyerEditable($buyer_editable) - { - $this->buyer_editable = $buyer_editable; - return $this; - } - - /** - * Buyer's ability to edit the amount in this term. - * - * @return string - */ - public function getBuyerEditable() - { - return $this->buyer_editable; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transaction.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transaction.php deleted file mode 100644 index 9623430..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transaction.php +++ /dev/null @@ -1,62 +0,0 @@ -transactions = $transactions; - return $this; - } - - /** - * Additional transactions for complex payment scenarios. - * - * @return self[] - */ - public function getTransactions() - { - return $this->transactions; - } - - /** - * Identifier to the purchase unit corresponding to this sale transaction - * - * @param string $purchase_unit_reference_id - * - * @return $this - */ - public function setPurchaseUnitReferenceId($purchase_unit_reference_id) - { - $this->purchase_unit_reference_id = $purchase_unit_reference_id; - return $this; - } - - /** - * Identifier to the purchase unit corresponding to this sale transaction - * - * @return string - */ - public function getPurchaseUnitReferenceId() - { - return $this->purchase_unit_reference_id; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/TransactionBase.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/TransactionBase.php deleted file mode 100644 index bf92833..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/TransactionBase.php +++ /dev/null @@ -1,40 +0,0 @@ -related_resources = $related_resources; - return $this; - } - - /** - * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment. - * - * @return \PayPal\Api\RelatedResources[] - */ - public function getRelatedResources() - { - return $this->related_resources; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transactions.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transactions.php deleted file mode 100644 index f7a09c1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transactions.php +++ /dev/null @@ -1,42 +0,0 @@ -amount = $amount; - return $this; - } - - /** - * Amount being collected. - * - * @return \PayPal\Api\Amount - */ - public function getAmount() - { - return $this->amount; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebProfile.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebProfile.php deleted file mode 100644 index 0d5a8f6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebProfile.php +++ /dev/null @@ -1,286 +0,0 @@ -id = $id; - return $this; - } - - /** - * ID of the web experience profile. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Name of the web experience profile. - * - * - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * Name of the web experience profile. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Parameters for flow configuration. - * - * - * @param \PayPal\Api\FlowConfig $flow_config - * - * @return $this - */ - public function setFlowConfig($flow_config) - { - $this->flow_config = $flow_config; - return $this; - } - - /** - * Parameters for flow configuration. - * - * @return \PayPal\Api\FlowConfig - */ - public function getFlowConfig() - { - return $this->flow_config; - } - - /** - * Parameters for input fields customization. - * - * - * @param \PayPal\Api\InputFields $input_fields - * - * @return $this - */ - public function setInputFields($input_fields) - { - $this->input_fields = $input_fields; - return $this; - } - - /** - * Parameters for input fields customization. - * - * @return \PayPal\Api\InputFields - */ - public function getInputFields() - { - return $this->input_fields; - } - - /** - * Parameters for style and presentation. - * - * - * @param \PayPal\Api\Presentation $presentation - * - * @return $this - */ - public function setPresentation($presentation) - { - $this->presentation = $presentation; - return $this; - } - - /** - * Parameters for style and presentation. - * - * @return \PayPal\Api\Presentation - */ - public function getPresentation() - { - return $this->presentation; - } - - /** - * Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return CreateProfileResponse - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/payment-experience/web-profiles/", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new CreateProfileResponse(); - $ret->fromJson($json); - return $ret; - } - - /** - * Update a web experience profile by passing the ID of the profile to the request URI. In addition, pass the profile details in the request JSON. If your request does not include values for all profile detail fields, the previously set values for the omitted fields are removed by this operation. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function update($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = $this->toJSON(); - self::executeCall( - "/v1/payment-experience/web-profiles/{$this->getId()}", - "PUT", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Partially update an existing web experience profile by passing the ID of the profile to the request URI. In addition, pass a patch object in the request JSON that specifies the operation to perform, path of the profile location to update, and a new value if needed to complete the operation. - * - * @param Patch[] $patch - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function partial_update($patch, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($patch, 'patch'); - $payload = array(); - foreach ($patch as $patchObject) { - $payload[] = $patchObject->toArray(); - } - $payLoad = json_encode($payload); - self::executeCall( - "/v1/payment-experience/web-profiles/{$this->getId()}", - "PATCH", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - - /** - * Retrieve the details of a particular web experience profile by passing the ID of the profile to the request URI. - * - * @param string $profileId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebProfile - */ - public static function get($profileId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($profileId, 'profileId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/payment-experience/web-profiles/$profileId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new WebProfile(); - $ret->fromJson($json); - return $ret; - } - - /** - * Lists all web experience profiles that exist for a merchant (or subject). - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebProfile[] - */ - public static function get_list($apiContext = null, $restCall = null) - { - $payLoad = ""; - $json = self::executeCall( - "/v1/payment-experience/web-profiles/", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - return WebProfile::getList($json); - } - - /** - * Delete an existing web experience profile by passing the profile ID to the request URI. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function delete($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - self::executeCall( - "/v1/payment-experience/web-profiles/{$this->getId()}", - "DELETE", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Webhook.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Webhook.php deleted file mode 100644 index de02b77..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Webhook.php +++ /dev/null @@ -1,241 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the webhook resource. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Webhook notification endpoint url. - * - * @param string $url - * @throws \InvalidArgumentException - * @return $this - */ - public function setUrl($url) - { - UrlValidator::validate($url, "Url"); - $this->url = $url; - return $this; - } - - /** - * Webhook notification endpoint url. - * - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * List of Webhooks event-types. - * - * @param \PayPal\Api\WebhookEventType[] $event_types - * - * @return $this - */ - public function setEventTypes($event_types) - { - $this->event_types = $event_types; - return $this; - } - - /** - * List of Webhooks event-types. - * - * @return \PayPal\Api\WebhookEventType[] - */ - public function getEventTypes() - { - return $this->event_types; - } - - /** - * Append EventTypes to the list. - * - * @param \PayPal\Api\WebhookEventType $webhookEventType - * @return $this - */ - public function addEventType($webhookEventType) - { - if (!$this->getEventTypes()) { - return $this->setEventTypes(array($webhookEventType)); - } else { - return $this->setEventTypes( - array_merge($this->getEventTypes(), array($webhookEventType)) - ); - } - } - - /** - * Remove EventTypes from the list. - * - * @param \PayPal\Api\WebhookEventType $webhookEventType - * @return $this - */ - public function removeEventType($webhookEventType) - { - return $this->setEventTypes( - array_diff($this->getEventTypes(), array($webhookEventType)) - ); - } - - /** - * Creates the Webhook for the application associated with the access token. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Webhook - */ - public function create($apiContext = null, $restCall = null) - { - $payLoad = $this->toJSON(); - $json = self::executeCall( - "/v1/notifications/webhooks", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Retrieves the Webhook identified by webhook_id for the application associated with access token. - * - * @param string $webhookId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Webhook - */ - public static function get($webhookId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($webhookId, 'webhookId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/notifications/webhooks/$webhookId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new Webhook(); - $ret->fromJson($json); - return $ret; - } - - /** - * Retrieves all Webhooks for the application associated with access token. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookList - */ - public static function getAll($apiContext = null, $restCall = null) - { - $payLoad = ""; - $json = self::executeCall( - "/v1/notifications/webhooks", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new WebhookList(); - $ret->fromJson($json); - return $ret; - } - - /** - * Updates the Webhook identified by webhook_id for the application associated with access token. - * - * @param PatchRequest $patchRequest - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return Webhook - */ - public function update($patchRequest, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - ArgumentValidator::validate($patchRequest, 'patchRequest'); - $payLoad = $patchRequest->toJSON(); - $json = self::executeCall( - "/v1/notifications/webhooks/{$this->getId()}", - "PATCH", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Deletes the Webhook identified by webhook_id for the application associated with access token. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return bool - */ - public function delete($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - self::executeCall( - "/v1/notifications/webhooks/{$this->getId()}", - "DELETE", - $payLoad, - null, - $apiContext, - $restCall - ); - return true; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEvent.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEvent.php deleted file mode 100644 index bc9426f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEvent.php +++ /dev/null @@ -1,282 +0,0 @@ -id = $id; - return $this; - } - - /** - * Identifier of the Webhooks event resource. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Time the resource was created. - * - * @param string $create_time - * - * @return $this - */ - public function setCreateTime($create_time) - { - $this->create_time = $create_time; - return $this; - } - - /** - * Time the resource was created. - * - * @return string - */ - public function getCreateTime() - { - return $this->create_time; - } - - /** - * Name of the resource contained in resource element. - * - * @param string $resource_type - * - * @return $this - */ - public function setResourceType($resource_type) - { - $this->resource_type = $resource_type; - return $this; - } - - /** - * Name of the resource contained in resource element. - * - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Name of the event type that occurred on resource, identified by data_resource element, to trigger the Webhooks event. - * - * @param string $event_type - * - * @return $this - */ - public function setEventType($event_type) - { - $this->event_type = $event_type; - return $this; - } - - /** - * Name of the event type that occurred on resource, identified by data_resource element, to trigger the Webhooks event. - * - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * A summary description of the event. E.g. A successful payment authorization was created for $$ - * - * @param string $summary - * - * @return $this - */ - public function setSummary($summary) - { - $this->summary = $summary; - return $this; - } - - /** - * A summary description of the event. E.g. A successful payment authorization was created for $$ - * - * @return string - */ - public function getSummary() - { - return $this->summary; - } - - /** - * This contains the resource that is identified by resource_type element. - * - * @param \PayPal\Common\PayPalModel $resource - * - * @return $this - */ - public function setResource($resource) - { - $this->resource = $resource; - return $this; - } - - /** - * This contains the resource that is identified by resource_type element. - * - * @return \PayPal\Common\PayPalModel - */ - public function getResource() - { - return $this->resource; - } - - /** - * Validates Received Event from Webhook, and returns the webhook event object. Because security verifications by verifying certificate chain is not enabled in PHP yet, - * we need to fallback to default behavior of retrieving the ID attribute of the data, and make a separate GET call to PayPal APIs, to retrieve the data. - * This is important to do again, as hacker could have faked the data, and the retrieved data cannot be trusted without either doing client side security validation, or making a separate call - * to PayPal APIs to retrieve the actual data. This limits the hacker to mimick a fake data, as hacker wont be able to predict the Id correctly. - * - * NOTE: PLEASE DO NOT USE THE DATA PROVIDED IN WEBHOOK DIRECTLY, AS HACKER COULD PASS IN FAKE DATA. IT IS VERY IMPORTANT THAT YOU RETRIEVE THE ID AND MAKE A SEPARATE CALL TO PAYPAL API. - * - * @param string $body - * @param ApiContext $apiContext - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookEvent - * @throws \InvalidArgumentException if input arguments are incorrect, or Id is not found. - * @throws PayPalConnectionException if any exception from PayPal APIs other than not found is sent. - */ - public static function validateAndGetReceivedEvent($body, $apiContext = null, $restCall = null) - { - if ($body == null | empty($body)){ - throw new \InvalidArgumentException("Body cannot be null or empty"); - } - if (!JsonValidator::validate($body, true)) { - throw new \InvalidArgumentException("Request Body is not a valid JSON."); - } - $object = new WebhookEvent($body); - if ($object->getId() == null) { - throw new \InvalidArgumentException("Id attribute not found in JSON. Possible reason could be invalid JSON Object"); - } - try { - return self::get($object->getId(), $apiContext, $restCall); - } catch(PayPalConnectionException $ex) { - if ($ex->getCode() == 404) { - // It means that the given webhook event Id is not found for this merchant. - throw new \InvalidArgumentException("Webhook Event Id provided in the data is incorrect. This could happen if anyone other than PayPal is faking the incoming webhook data."); - } - throw $ex; - } - } - - /** - * Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event. - * - * @param string $eventId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookEvent - */ - public static function get($eventId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($eventId, 'eventId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/notifications/webhooks-events/$eventId", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new WebhookEvent(); - $ret->fromJson($json); - return $ret; - } - - /** - * Resends the Webhooks event resource identified by event_id. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookEvent - */ - public function resend($apiContext = null, $restCall = null) - { - ArgumentValidator::validate($this->getId(), "Id"); - $payLoad = ""; - $json = self::executeCall( - "/v1/notifications/webhooks-events/{$this->getId()}/resend", - "POST", - $payLoad, - null, - $apiContext, - $restCall - ); - $this->fromJson($json); - return $this; - } - - /** - * Retrieves the list of Webhooks events resources for the application associated with token. The developers can use it to see list of past webhooks events. - * - * @param array $params - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookEventList - */ - public static function all($params, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($params, 'params'); - $payLoad = ""; - $allowedParams = array( - 'page_size' => 1, - 'start_time' => 1, - 'end_time' => 1, - ); - $json = self::executeCall( - "/v1/notifications/webhooks-events" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new WebhookEventList(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventList.php deleted file mode 100644 index 3ad2d8a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventList.php +++ /dev/null @@ -1,149 +0,0 @@ -events = $events; - return $this; - } - - /** - * A list of Webhooks event resources - * - * @return \PayPal\Api\WebhookEvent[] - */ - public function getEvents() - { - return $this->events; - } - - /** - * Append Events to the list. - * - * @param \PayPal\Api\WebhookEvent $webhookEvent - * @return $this - */ - public function addEvent($webhookEvent) - { - if (!$this->getEvents()) { - return $this->setEvents(array($webhookEvent)); - } else { - return $this->setEvents( - array_merge($this->getEvents(), array($webhookEvent)) - ); - } - } - - /** - * Remove Events from the list. - * - * @param \PayPal\Api\WebhookEvent $webhookEvent - * @return $this - */ - public function removeEvent($webhookEvent) - { - return $this->setEvents( - array_diff($this->getEvents(), array($webhookEvent)) - ); - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @param int $count - * - * @return $this - */ - public function setCount($count) - { - $this->count = $count; - return $this; - } - - /** - * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. - * - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Sets Links - * - * @param \PayPal\Api\Links[] $links - * - * @return $this - */ - public function setLinks($links) - { - $this->links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventType.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventType.php deleted file mode 100644 index ad3d579..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventType.php +++ /dev/null @@ -1,116 +0,0 @@ -name = $name; - return $this; - } - - /** - * Unique event-type name. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Human readable description of the event-type - * - * @param string $description - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Human readable description of the event-type - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Retrieves the list of events-types subscribed by the given Webhook. - * - * @param string $webhookId - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookEventTypeList - */ - public static function subscribedEventTypes($webhookId, $apiContext = null, $restCall = null) - { - ArgumentValidator::validate($webhookId, 'webhookId'); - $payLoad = ""; - $json = self::executeCall( - "/v1/notifications/webhooks/$webhookId/event-types", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new WebhookEventTypeList(); - $ret->fromJson($json); - return $ret; - } - - /** - * Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to. - * - * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. - * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls - * @return WebhookEventTypeList - */ - public static function availableEventTypes($apiContext = null, $restCall = null) - { - $payLoad = ""; - $json = self::executeCall( - "/v1/notifications/webhooks-event-types", - "GET", - $payLoad, - null, - $apiContext, - $restCall - ); - $ret = new WebhookEventTypeList(); - $ret->fromJson($json); - return $ret; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventTypeList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventTypeList.php deleted file mode 100644 index 61c0d65..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookEventTypeList.php +++ /dev/null @@ -1,71 +0,0 @@ -event_types = $event_types; - return $this; - } - - /** - * A list of Webhooks event-types - * - * @return \PayPal\Api\WebhookEventType[] - */ - public function getEventTypes() - { - return $this->event_types; - } - - /** - * Append EventTypes to the list. - * - * @param \PayPal\Api\WebhookEventType $webhookEventType - * @return $this - */ - public function addEventType($webhookEventType) - { - if (!$this->getEventTypes()) { - return $this->setEventTypes(array($webhookEventType)); - } else { - return $this->setEventTypes( - array_merge($this->getEventTypes(), array($webhookEventType)) - ); - } - } - - /** - * Remove EventTypes from the list. - * - * @param \PayPal\Api\WebhookEventType $webhookEventType - * @return $this - */ - public function removeEventType($webhookEventType) - { - return $this->setEventTypes( - array_diff($this->getEventTypes(), array($webhookEventType)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookList.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookList.php deleted file mode 100644 index 4bb5148..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/WebhookList.php +++ /dev/null @@ -1,71 +0,0 @@ -webhooks = $webhooks; - return $this; - } - - /** - * A list of Webhooks - * - * @return \PayPal\Api\Webhook[] - */ - public function getWebhooks() - { - return $this->webhooks; - } - - /** - * Append Webhooks to the list. - * - * @param \PayPal\Api\Webhook $webhook - * @return $this - */ - public function addWebhook($webhook) - { - if (!$this->getWebhooks()) { - return $this->setWebhooks(array($webhook)); - } else { - return $this->setWebhooks( - array_merge($this->getWebhooks(), array($webhook)) - ); - } - } - - /** - * Remove Webhooks from the list. - * - * @param \PayPal\Api\Webhook $webhook - * @return $this - */ - public function removeWebhook($webhook) - { - return $this->setWebhooks( - array_diff($this->getWebhooks(), array($webhook)) - ); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php deleted file mode 100644 index 30749d6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php +++ /dev/null @@ -1,313 +0,0 @@ -clientId = $clientId; - $this->clientSecret = $clientSecret; - $this->cipher = new Cipher($this->clientSecret); - $this->logger = PayPalLoggingManager::getInstance(__CLASS__); - } - - /** - * Get Client ID - * - * @return string - */ - public function getClientId() - { - return $this->clientId; - } - - /** - * Get Client Secret - * - * @return string - */ - public function getClientSecret() - { - return $this->clientSecret; - } - - /** - * Get AccessToken - * - * @param $config - * - * @return null|string - */ - public function getAccessToken($config) - { - // Check if we already have accessToken in Cache - if ($this->accessToken && (time() - $this->tokenCreateTime) < ($this->tokenExpiresIn - self::$expiryBufferTime)) { - return $this->accessToken; - } - // Check for persisted data first - $token = AuthorizationCache::pull($config, $this->clientId); - if ($token) { - // We found it - // This code block is for backward compatibility only. - if (array_key_exists('accessToken', $token)) { - $this->accessToken = $token['accessToken']; - } - - $this->tokenCreateTime = $token['tokenCreateTime']; - $this->tokenExpiresIn = $token['tokenExpiresIn']; - - // Case where we have an old unencrypted cache file - if (!array_key_exists('accessTokenEncrypted', $token)) { - AuthorizationCache::push($config, $this->clientId, $this->encrypt($this->accessToken), $this->tokenCreateTime, $this->tokenExpiresIn); - } else { - $this->accessToken = $this->decrypt($token['accessTokenEncrypted']); - } - } - - // Check if Access Token is not null and has not expired. - // The API returns expiry time as a relative time unit - // We use a buffer time when checking for token expiry to account - // for API call delays and any delay between the time the token is - // retrieved and subsequently used - if ( - $this->accessToken != null && - (time() - $this->tokenCreateTime) > ($this->tokenExpiresIn - self::$expiryBufferTime) - ) { - $this->accessToken = null; - } - - - // If accessToken is Null, obtain a new token - if ($this->accessToken == null) { - // Get a new one by making calls to API - $this->updateAccessToken($config); - AuthorizationCache::push($config, $this->clientId, $this->encrypt($this->accessToken), $this->tokenCreateTime, $this->tokenExpiresIn); - } - - return $this->accessToken; - } - - - /** - * Get a Refresh Token from Authorization Code - * - * @param $config - * @param $authorizationCode - * @param array $params optional arrays to override defaults - * @return string|null - */ - public function getRefreshToken($config, $authorizationCode = null, $params = array()) - { - static $allowedParams = array( - 'grant_type' => 'authorization_code', - 'code' => 1, - 'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob', - 'response_type' => 'token' - ); - - $params = is_array($params) ? $params : array(); - if ($authorizationCode) { - //Override the authorizationCode if value is explicitly set - $params['code'] = $authorizationCode; - } - $payload = http_build_query(array_merge($allowedParams, array_intersect_key($params, $allowedParams))); - - $response = $this->getToken($config, $this->clientId, $this->clientSecret, $payload); - - if ($response != null && isset($response["refresh_token"])) { - return $response['refresh_token']; - } - - return null; - } - - /** - * Updates Access Token based on given input - * - * @param array $config - * @param string|null $refreshToken - * @return string - */ - public function updateAccessToken($config, $refreshToken = null) - { - $this->generateAccessToken($config, $refreshToken); - return $this->accessToken; - } - - /** - * Retrieves the token based on the input configuration - * - * @param array $config - * @param string $clientId - * @param string $clientSecret - * @param string $payload - * @return mixed - * @throws PayPalConfigurationException - * @throws \PayPal\Exception\PayPalConnectionException - */ - protected function getToken($config, $clientId, $clientSecret, $payload) - { - $httpConfig = new PayPalHttpConfig(null, 'POST', $config); - - $handlers = array(self::$AUTH_HANDLER); - - /** @var IPayPalHandler $handler */ - foreach ($handlers as $handler) { - if (!is_object($handler)) { - $fullHandler = "\\" . (string)$handler; - $handler = new $fullHandler(new ApiContext($this)); - } - $handler->handle($httpConfig, $payload, array('clientId' => $clientId, 'clientSecret' => $clientSecret)); - } - - $connection = new PayPalHttpConnection($httpConfig, $config); - $res = $connection->execute($payload); - $response = json_decode($res, true); - - return $response; - } - - - /** - * Generates a new access token - * - * @param array $config - * @param null|string $refreshToken - * @return null - * @throws PayPalConnectionException - */ - private function generateAccessToken($config, $refreshToken = null) - { - $params = array('grant_type' => 'client_credentials'); - if ($refreshToken != null) { - // If the refresh token is provided, it would get access token using refresh token - // Used for Future Payments - $params['grant_type'] = 'refresh_token'; - $params['refresh_token'] = $refreshToken; - } - $payload = http_build_query($params); - $response = $this->getToken($config, $this->clientId, $this->clientSecret, $payload); - - if ($response == null || !isset($response["access_token"]) || !isset($response["expires_in"])) { - $this->accessToken = null; - $this->tokenExpiresIn = null; - $this->logger->warning( - "Could not generate new Access token. Invalid response from server: " - ); - throw new PayPalConnectionException(null, "Could not generate new Access token. Invalid response from server: "); - } else { - $this->accessToken = $response["access_token"]; - $this->tokenExpiresIn = $response["expires_in"]; - } - $this->tokenCreateTime = time(); - - return $this->accessToken; - } - - /** - * Helper method to encrypt data using clientSecret as key - * - * @param $data - * @return string - */ - public function encrypt($data) - { - return $this->cipher->encrypt($data); - } - - /** - * Helper method to decrypt data using clientSecret as key - * - * @param $data - * @return string - */ - public function decrypt($data) - { - return $this->cipher->decrypt($data); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Cache/AuthorizationCache.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Cache/AuthorizationCache.php deleted file mode 100644 index 46e86fd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Cache/AuthorizationCache.php +++ /dev/null @@ -1,121 +0,0 @@ - $clientId, - 'accessTokenEncrypted' => $accessToken, - 'tokenCreateTime' => $tokenCreateTime, - 'tokenExpiresIn' => $tokenExpiresIn - ); - } - if(!file_put_contents($cachePath, json_encode($tokens))) { - throw new \Exception("Failed to write cache"); - }; - } - - /** - * Determines from the Configuration if caching is currently enabled/disabled - * - * @param $config - * @return bool - */ - public static function isEnabled($config) - { - $value = self::getConfigValue('cache.enabled', $config); - return empty($value) ? false : ((trim($value) == true || trim($value) == 'true')); - } - - /** - * Returns the cache file path - * - * @param $config - * @return string - */ - public static function cachePath($config) - { - $cachePath = self::getConfigValue('cache.FileName', $config); - return empty($cachePath) ? __DIR__ . self::$CACHE_PATH : $cachePath; - } - - /** - * Returns the Value of the key if found in given config, or from PayPal Config Manager - * Returns null if not found - * - * @param $key - * @param $config - * @return null|string - */ - private static function getConfigValue($key, $config) - { - $config = ($config && is_array($config)) ? $config : PayPalConfigManager::getInstance()->getConfigHashmap(); - return (array_key_exists($key, $config)) ? trim($config[$key]) : null; - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/ArrayUtil.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/ArrayUtil.php deleted file mode 100644 index 4b4ffaf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/ArrayUtil.php +++ /dev/null @@ -1,27 +0,0 @@ - $v) { - if (is_int($k)) { - return false; - } - } - return true; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php deleted file mode 100644 index fdfaba8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalModel.php +++ /dev/null @@ -1,307 +0,0 @@ -fromJson($data) later after creating the object. - * - * @param null $data - * @throws \InvalidArgumentException - */ - public function __construct($data = null) - { - switch (gettype($data)) { - case "NULL": - break; - case "string": - JsonValidator::validate($data); - $this->fromJson($data); - break; - case "array": - $this->fromArray($data); - break; - default: - } - } - - /** - * Returns a list of Object from Array or Json String. It is generally used when your json - * contains an array of this object - * - * @param mixed $data Array object or json string representation - * @return array - */ - public static function getList($data) - { - // Return Null if Null - if ($data === null) { return null; } - - if (is_a($data, get_class(new \stdClass()))) { - //This means, root element is object - return new static(json_encode($data)); - } - - $list = array(); - - if (is_array($data)) { - $data = json_encode($data); - } - - if (JsonValidator::validate($data)) { - // It is valid JSON - $decoded = json_decode($data); - if ($decoded === null) { - return $list; - } - if (is_array($decoded)) { - foreach ($decoded as $k => $v) { - $list[] = self::getList($v); - } - } - if (is_a($decoded, get_class(new \stdClass()))) { - //This means, root element is object - $list[] = new static(json_encode($decoded)); - } - } - - return $list; - } - - /** - * Magic Get Method - * - * @param $key - * @return mixed - */ - public function __get($key) - { - if ($this->__isset($key)) { - return $this->_propMap[$key]; - } - return null; - } - - /** - * Magic Set Method - * - * @param $key - * @param $value - */ - public function __set($key, $value) - { - if (!is_array($value) && $value === null) { - $this->__unset($key); - } else { - $this->_propMap[$key] = $value; - } - } - - /** - * Converts the input key into a valid Setter Method Name - * - * @param $key - * @return mixed - */ - private function convertToCamelCase($key) - { - return str_replace(' ', '', ucwords(str_replace(array('_', '-'), ' ', $key))); - } - - /** - * Magic isSet Method - * - * @param $key - * @return bool - */ - public function __isset($key) - { - return isset($this->_propMap[$key]); - } - - /** - * Magic Unset Method - * - * @param $key - */ - public function __unset($key) - { - unset($this->_propMap[$key]); - } - - /** - * Converts Params to Array - * - * @param $param - * @return array - */ - private function _convertToArray($param) - { - $ret = array(); - foreach ($param as $k => $v) { - if ($v instanceof PayPalModel) { - $ret[$k] = $v->toArray(); - } else if (sizeof($v) <= 0 && is_array($v)) { - $ret[$k] = array(); - } else if (is_array($v)) { - $ret[$k] = $this->_convertToArray($v); - } else { - $ret[$k] = $v; - } - } - // If the array is empty, which means an empty object, - // we need to convert array to StdClass object to properly - // represent JSON String - if (sizeof($ret) <= 0) { - $ret = new PayPalModel(); - } - return $ret; - } - - /** - * Fills object value from Array list - * - * @param $arr - * @return $this - */ - public function fromArray($arr) - { - if (!empty($arr)) { - // Iterate over each element in array - foreach ($arr as $k => $v) { - // If the value is an array, it means, it is an object after conversion - if (is_array($v)) { - // Determine the class of the object - if (($clazz = ReflectionUtil::getPropertyClass(get_class($this), $k)) != null){ - // If the value is an associative array, it means, its an object. Just make recursive call to it. - if (empty($v)){ - if (ReflectionUtil::isPropertyClassArray(get_class($this), $k)) { - // It means, it is an array of objects. - $this->assignValue($k, array()); - continue; - } - $o = new $clazz(); - //$arr = array(); - $this->assignValue($k, $o); - } elseif (ArrayUtil::isAssocArray($v)) { - /** @var self $o */ - $o = new $clazz(); - $o->fromArray($v); - $this->assignValue($k, $o); - } else { - // Else, value is an array of object/data - $arr = array(); - // Iterate through each element in that array. - foreach ($v as $nk => $nv) { - if (is_array($nv)) { - $o = new $clazz(); - $o->fromArray($nv); - $arr[$nk] = $o; - } else { - $arr[$nk] = $nv; - } - } - $this->assignValue($k, $arr); - } - } else { - $this->assignValue($k, $v); - } - } else { - $this->assignValue($k, $v); - } - } - } - return $this; - } - - private function assignValue($key, $value) - { - $setter = 'set'. $this->convertToCamelCase($key); - // If we find the setter, use that, otherwise use magic method. - if (method_exists($this, $setter)) { - $this->$setter($value); - } else { - $this->__set($key, $value); - } - } - - /** - * Fills object value from Json string - * - * @param $json - * @return $this - */ - public function fromJson($json) - { - return $this->fromArray(json_decode($json, true)); - } - - /** - * Returns array representation of object - * - * @return array - */ - public function toArray() - { - return $this->_convertToArray($this->_propMap); - } - - /** - * Returns object JSON representation - * - * @param int $options http://php.net/manual/en/json.constants.php - * @return string - */ - public function toJSON($options = 0) - { - // Because of PHP Version 5.3, we cannot use JSON_UNESCAPED_SLASHES option - // Instead we would use the str_replace command for now. - // TODO: Replace this code with return json_encode($this->toArray(), $options | 64); once we support PHP >= 5.4 - if (version_compare(phpversion(), '5.4.0', '>=') === true) { - return json_encode($this->toArray(), $options | 64); - } - return str_replace('\\/', '/', json_encode($this->toArray(), $options)); - } - - /** - * Magic Method for toString - * - * @return string - */ - public function __toString() - { - return $this->toJSON(128); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalResourceModel.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalResourceModel.php deleted file mode 100644 index 7662db1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalResourceModel.php +++ /dev/null @@ -1,105 +0,0 @@ -links = $links; - return $this; - } - - /** - * Gets Links - * - * @return \PayPal\Api\Links[] - */ - public function getLinks() - { - return $this->links; - } - - public function getLink($rel) - { - foreach ($this->links as $link) { - if ($link->getRel() == $rel) { - return $link->getHref(); - } - } - return null; - } - - /** - * Append Links to the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function addLink($links) - { - if (!$this->getLinks()) { - return $this->setLinks(array($links)); - } else { - return $this->setLinks( - array_merge($this->getLinks(), array($links)) - ); - } - } - - /** - * Remove Links from the list. - * - * @param \PayPal\Api\Links $links - * @return $this - */ - public function removeLink($links) - { - return $this->setLinks( - array_diff($this->getLinks(), array($links)) - ); - } - - - /** - * Execute SDK Call to Paypal services - * - * @param string $url - * @param string $method - * @param string $payLoad - * @param array $headers - * @param ApiContext $apiContext - * @param PayPalRestCall $restCall - * @param array $handlers - * @return string json response of the object - */ - protected static function executeCall($url, $method, $payLoad, $headers = array(), $apiContext = null, $restCall = null, $handlers = array('PayPal\Handler\RestHandler')) - { - //Initialize the context and rest call object if not provided explicitly - $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential); - $restCall = $restCall ? $restCall : new PayPalRestCall($apiContext); - - //Make the execution call - $json = $restCall->execute($handlers, $url, $method, $payLoad, $headers); - return $json; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalUserAgent.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalUserAgent.php deleted file mode 100644 index d072b2f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalUserAgent.php +++ /dev/null @@ -1,58 +0,0 @@ -getDocComment(), - $annots, - PREG_PATTERN_ORDER)) { - return null; - } - foreach ($annots[1] as $i => $annot) { - $annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)"); - } - - return $annotations; - } - - /** - * preg_replace_callback callback function - * - * @param $match - * @return string - */ - private static function replace_callback($match) - { - return ucwords($match[2]); - } - - /** - * Returns the properly formatted getter function name based on class name and property - * Formats the property name to a standard getter function - * - * @param string $class - * @param string $propertyName - * @return string getter function name - */ - public static function getter($class, $propertyName) - { - return method_exists($class, "get" . ucfirst($propertyName)) ? - "get" . ucfirst($propertyName) : - "get" . preg_replace_callback("/([_\-\s]?([a-z0-9]+))/", "self::replace_callback", $propertyName); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Converter/FormatConverter.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Converter/FormatConverter.php deleted file mode 100644 index e564742..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Converter/FormatConverter.php +++ /dev/null @@ -1,62 +0,0 @@ - 0, 'TWD' => 0); - if ($currency && array_key_exists($currency, $currencyDecimals)) { - if (strpos($value, ".") !== false && (floor($value) != $value)) { - //throw exception if it has decimal values for JPY and TWD which does not ends with .00 - throw new \InvalidArgumentException("value cannot have decimals for $currency currency"); - } - $decimals = $currencyDecimals[$currency]; - } else if (strpos($value, ".") === false) { - // Check if value has decimal values. If not no need to assign 2 decimals with .00 at the end - $decimals = 0; - } - return self::formatToNumber($value, $decimals); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalConfigManager.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalConfigManager.php deleted file mode 100644 index f884df4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalConfigManager.php +++ /dev/null @@ -1,163 +0,0 @@ -addConfigFromIni($configFile); - } - } - - /** - * Returns the singleton object - * - * @return $this - */ - public static function getInstance() - { - if (!isset(self::$instance)) { - self::$instance = new self(); - } - return self::$instance; - } - - /** - * Add Configuration from configuration.ini files - * - * @param string $fileName - * @return $this - */ - public function addConfigFromIni($fileName) - { - if ($configs = parse_ini_file($fileName)) { - $this->addConfigs($configs); - } - return $this; - } - - /** - * If a configuration exists in both arrays, - * then the element from the first array will be used and - * the matching key's element from the second array will be ignored. - * - * @param array $configs - * @return $this - */ - public function addConfigs($configs = array()) - { - $this->configs = $configs + $this->configs; - return $this; - } - - /** - * Simple getter for configuration params - * If an exact match for key is not found, - * does a "contains" search on the key - * - * @param string $searchKey - * @return array - */ - public function get($searchKey) - { - - if (array_key_exists($searchKey, $this->configs)) { - return $this->configs[$searchKey]; - } else { - $arr = array(); - foreach ($this->configs as $k => $v) { - if (strstr($k, $searchKey)) { - $arr[$k] = $v; - } - } - - return $arr; - } - - } - - /** - * Utility method for handling account configuration - * return config key corresponding to the API userId passed in - * - * If $userId is null, returns config keys corresponding to - * all configured accounts - * - * @param string|null $userId - * @return array|string - */ - public function getIniPrefix($userId = null) - { - - if ($userId == null) { - $arr = array(); - foreach ($this->configs as $key => $value) { - $pos = strpos($key, '.'); - if (strstr($key, "acct")) { - $arr[] = substr($key, 0, $pos); - } - } - return array_unique($arr); - } else { - $iniPrefix = array_search($userId, $this->configs); - $pos = strpos($iniPrefix, '.'); - $acct = substr($iniPrefix, 0, $pos); - - return $acct; - } - } - - /** - * returns the config file hashmap - */ - public function getConfigHashmap() - { - return $this->configs; - } - - /** - * Disabling __clone call - */ - public function __clone() - { - trigger_error('Clone is not allowed.', E_USER_ERROR); - } - -} - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalConstants.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalConstants.php deleted file mode 100644 index 1c5ca4b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalConstants.php +++ /dev/null @@ -1,27 +0,0 @@ -initCredential($config); - } catch (\Exception $e) { - $this->credentialHashmap = array(); - throw $e; - } - } - - /** - * Create singleton instance for this class. - * - * @param array|null $config - * @return PayPalCredentialManager - */ - public static function getInstance($config = null) - { - if (!self::$instance) { - self::$instance = new self($config == null ? PayPalConfigManager::getInstance()->getConfigHashmap() : $config); - } - return self::$instance; - } - - /** - * Load credentials for multiple accounts, with priority given to Signature credential. - * - * @param array $config - */ - private function initCredential($config) - { - $suffix = 1; - $prefix = "acct"; - - $arr = array(); - foreach ($config as $k => $v) { - if (strstr($k, $prefix)) { - $arr[$k] = $v; - } - } - $credArr = $arr; - - $arr = array(); - foreach ($config as $key => $value) { - $pos = strpos($key, '.'); - if (strstr($key, "acct")) { - $arr[] = substr($key, 0, $pos); - } - } - $arrayPartKeys = array_unique($arr); - - $key = $prefix . $suffix; - $userName = null; - while (in_array($key, $arrayPartKeys)) { - if (isset($credArr[$key . ".ClientId"]) && isset($credArr[$key . ".ClientId"])) { - $userName = $key; - $this->credentialHashmap[$userName] = new OAuthTokenCredential( - $credArr[$key . ".ClientId"], - $credArr[$key . ".ClientSecret"] - ); - } - if ($userName && $this->defaultAccountName == null) { - if (array_key_exists($key . '.UserName', $credArr)) { - $this->defaultAccountName = $credArr[$key . '.UserName']; - } else { - $this->defaultAccountName = $key; - } - } - $suffix++; - $key = $prefix . $suffix; - } - - } - - /** - * Sets credential object for users - * - * @param \PayPal\Auth\OAuthTokenCredential $credential - * @param string|null $userId User Id associated with the account - * @param bool $default If set, it would make it as a default credential for all requests - * - * @return $this - */ - public function setCredentialObject(OAuthTokenCredential $credential, $userId = null, $default = true) - { - $key = $userId == null ? 'default' : $userId; - $this->credentialHashmap[$key] = $credential; - if ($default) { - $this->defaultAccountName = $key; - } - return $this; - } - - /** - * Obtain Credential Object based on UserId provided. - * - * @param null $userId - * @return OAuthTokenCredential - * @throws PayPalInvalidCredentialException - */ - public function getCredentialObject($userId = null) - { - if ($userId == null && array_key_exists($this->defaultAccountName, $this->credentialHashmap)) { - $credObj = $this->credentialHashmap[$this->defaultAccountName]; - } else if (array_key_exists($userId, $this->credentialHashmap)) { - $credObj = $this->credentialHashmap[$userId]; - } - - if (empty($credObj)) { - throw new PayPalInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") . - ". Please make sure your configuration/APIContext has credential information"); - } - return $credObj; - } - - /** - * Disabling __clone call - */ - public function __clone() - { - trigger_error('Clone is not allowed.', E_USER_ERROR); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConfig.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConfig.php deleted file mode 100644 index 3864a96..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConfig.php +++ /dev/null @@ -1,302 +0,0 @@ - 1, - CURLOPT_CONNECTTIMEOUT => 10, - CURLOPT_RETURNTRANSFER => TRUE, - CURLOPT_TIMEOUT => 60, // maximum number of seconds to allow cURL functions to execute - CURLOPT_USERAGENT => 'PayPal-PHP-SDK', - CURLOPT_HTTPHEADER => array(), - CURLOPT_SSL_VERIFYHOST => 2, - CURLOPT_SSL_VERIFYPEER => 1, - CURLOPT_SSL_CIPHER_LIST => 'TLSv1' - //Allowing TLSv1 cipher list. - //Adding it like this for backward compatibility with older versions of curl - ); - - const HEADER_SEPARATOR = ';'; - const HTTP_GET = 'GET'; - const HTTP_POST = 'POST'; - - private $headers = array(); - - private $curlOptions; - - private $url; - - private $method; - - /*** - * Number of times to retry a failed HTTP call - */ - private $retryCount = 0; - - /** - * Default Constructor - * - * @param string $url - * @param string $method HTTP method (GET, POST etc) defaults to POST - * @param array $configs All Configurations - */ - public function __construct($url = null, $method = self::HTTP_POST, $configs = array()) - { - $this->url = $url; - $this->method = $method; - $this->curlOptions = $this->getHttpConstantsFromConfigs($configs, 'http.') + self::$defaultCurlOptions; - // Update the Cipher List based on OpenSSL or NSS settings - $curl = curl_version(); - $sslVersion = isset($curl['ssl_version']) ? $curl['ssl_version'] : ''; - if (substr_compare($sslVersion, "NSS/", 0, strlen("NSS/")) === 0) { - //Remove the Cipher List for NSS - $this->removeCurlOption(CURLOPT_SSL_CIPHER_LIST); - } - } - - /** - * Gets Url - * - * @return null|string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Gets Method - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Gets all Headers - * - * @return array - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Get Header by Name - * - * @param $name - * @return string|null - */ - public function getHeader($name) - { - if (array_key_exists($name, $this->headers)) { - return $this->headers[$name]; - } - return null; - } - - /** - * Sets Url - * - * @param $url - */ - public function setUrl($url) - { - $this->url = $url; - } - - /** - * Set Headers - * - * @param array $headers - */ - public function setHeaders(array $headers = array()) - { - $this->headers = $headers; - } - - /** - * Adds a Header - * - * @param $name - * @param $value - * @param bool $overWrite allows you to override header value - */ - public function addHeader($name, $value, $overWrite = true) - { - if (!array_key_exists($name, $this->headers) || $overWrite) { - $this->headers[$name] = $value; - } else { - $this->headers[$name] = $this->headers[$name] . self::HEADER_SEPARATOR . $value; - } - } - - /** - * Removes a Header - * - * @param $name - */ - public function removeHeader($name) - { - unset($this->headers[$name]); - } - - /** - * Gets all curl options - * - * @return array - */ - public function getCurlOptions() - { - return $this->curlOptions; - } - - /** - * Add Curl Option - * - * @param string $name - * @param mixed $value - */ - public function addCurlOption($name, $value) - { - $this->curlOptions[$name] = $value; - } - - /** - * Removes a curl option from the list - * - * @param $name - */ - public function removeCurlOption($name) - { - unset($this->curlOptions[$name]); - } - - /** - * Set Curl Options. Overrides all curl options - * - * @param $options - */ - public function setCurlOptions($options) - { - $this->curlOptions = $options; - } - - /** - * Set ssl parameters for certificate based client authentication - * - * @param $certPath - * @param null $passPhrase - */ - public function setSSLCert($certPath, $passPhrase = null) - { - $this->curlOptions[CURLOPT_SSLCERT] = realpath($certPath); - if (isset($passPhrase) && trim($passPhrase) != "") { - $this->curlOptions[CURLOPT_SSLCERTPASSWD] = $passPhrase; - } - } - - /** - * Set connection timeout in seconds - * - * @param integer $timeout - */ - public function setHttpTimeout($timeout) - { - $this->curlOptions[CURLOPT_CONNECTTIMEOUT] = $timeout; - } - - /** - * Set HTTP proxy information - * - * @param string $proxy - * @throws PayPalConfigurationException - */ - public function setHttpProxy($proxy) - { - $urlParts = parse_url($proxy); - if ($urlParts == false || !array_key_exists("host", $urlParts)) { - throw new PayPalConfigurationException("Invalid proxy configuration " . $proxy); - } - $this->curlOptions[CURLOPT_PROXY] = $urlParts["host"]; - if (isset($urlParts["port"])) { - $this->curlOptions[CURLOPT_PROXY] .= ":" . $urlParts["port"]; - } - if (isset($urlParts["user"])) { - $this->curlOptions[CURLOPT_PROXYUSERPWD] = $urlParts["user"] . ":" . $urlParts["pass"]; - } - } - - /** - * Set Http Retry Counts - * - * @param int $retryCount - */ - public function setHttpRetryCount($retryCount) - { - $this->retryCount = $retryCount; - } - - /** - * Get Http Retry Counts - * - * @return int - */ - public function getHttpRetryCount() - { - return $this->retryCount; - } - - /** - * Sets the User-Agent string on the HTTP request - * - * @param string $userAgentString - */ - public function setUserAgent($userAgentString) - { - $this->curlOptions[CURLOPT_USERAGENT] = $userAgentString; - } - - /** - * Retrieves an array of constant key, and value based on Prefix - * - * @param array $configs - * @param $prefix - * @return array - */ - public function getHttpConstantsFromConfigs($configs = array(), $prefix) - { - $arr = array(); - if ($prefix != null && is_array($configs)) { - foreach ($configs as $k => $v) { - // Check if it startsWith - if (substr($k, 0, strlen($prefix)) === $prefix) { - $newKey = ltrim($k, $prefix); - if (defined($newKey)) { - $arr[constant($newKey)] = $v; - } - } - } - } - return $arr; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php deleted file mode 100644 index 0cbe5aa..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php +++ /dev/null @@ -1,197 +0,0 @@ -httpConfig = $httpConfig; - $this->logger = PayPalLoggingManager::getInstance(__CLASS__); - } - - /** - * Gets all Http Headers - * - * @return array - */ - private function getHttpHeaders() - { - - $ret = array(); - foreach ($this->httpConfig->getHeaders() as $k => $v) { - $ret[] = "$k: $v"; - } - return $ret; - } - - /** - * Executes an HTTP request - * - * @param string $data query string OR POST content as a string - * @throws PayPalConnectionException - */ - /** - * Executes an HTTP request - * - * @param string $data query string OR POST content as a string - * @return mixed - * @throws PayPalConnectionException - */ - public function execute($data) - { - //Initialize the logger - $this->logger->info($this->httpConfig->getMethod() . ' ' . $this->httpConfig->getUrl()); - - //Initialize Curl Options - $ch = curl_init($this->httpConfig->getUrl()); - curl_setopt_array($ch, $this->httpConfig->getCurlOptions()); - curl_setopt($ch, CURLOPT_URL, $this->httpConfig->getUrl()); - curl_setopt($ch, CURLOPT_HEADER, true); - curl_setopt($ch, CURLINFO_HEADER_OUT, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders()); - - //Determine Curl Options based on Method - switch ($this->httpConfig->getMethod()) { - case 'POST': - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case 'PUT': - case 'PATCH': - case 'DELETE': - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - } - - //Default Option if Method not of given types in switch case - if ($this->httpConfig->getMethod() != NULL) { - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->httpConfig->getMethod()); - } - - //Logging Each Headers for debugging purposes - foreach ($this->getHttpHeaders() as $header) { - //TODO: Strip out credentials and other secure info when logging. - // $this->logger->debug($header); - } - - //Execute Curl Request - $result = curl_exec($ch); - //Retrieve Response Status - $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - - //Retry if Certificate Exception - if (curl_errno($ch) == 60) { - $this->logger->info("Invalid or no certificate authority found - Retrying using bundled CA certs file"); - curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); - $result = curl_exec($ch); - //Retrieve Response Status - $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - } - - //Retry if Failing - $retries = 0; - if (in_array($httpStatus, self::$retryCodes) && $this->httpConfig->getHttpRetryCount() != null) { - $this->logger->info("Got $httpStatus response from server. Retrying"); - do { - $result = curl_exec($ch); - //Retrieve Response Status - $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - } while (in_array($httpStatus, self::$retryCodes) && (++$retries < $this->httpConfig->getHttpRetryCount())); - } - - //Throw Exception if Retries and Certificates doenst work - if (curl_errno($ch)) { - $ex = new PayPalConnectionException( - $this->httpConfig->getUrl(), - curl_error($ch), - curl_errno($ch) - ); - curl_close($ch); - throw $ex; - } - - // Get Request and Response Headers - $requestHeaders = curl_getinfo($ch, CURLINFO_HEADER_OUT); - //Using alternative solution to CURLINFO_HEADER_SIZE as it throws invalid number when called using PROXY. - $responseHeaderSize = strlen($result) - curl_getinfo($ch, CURLINFO_SIZE_DOWNLOAD); - $responseHeaders = substr($result, 0, $responseHeaderSize); - $result = substr($result, $responseHeaderSize); - - $this->logger->debug("Request Headers \t: " . str_replace("\r\n", ", ", $requestHeaders)); - $this->logger->debug(($data && $data != '' ? "Request Data\t\t: " . $data : "No Request Payload") . "\n" . str_repeat('-', 128) . "\n"); - $this->logger->info("Response Status \t: " . $httpStatus); - $this->logger->debug("Response Headers\t: " . str_replace("\r\n", ", ", $responseHeaders)); - - //Close the curl request - curl_close($ch); - - //More Exceptions based on HttpStatus Code - if (in_array($httpStatus, self::$retryCodes)) { - $ex = new PayPalConnectionException( - $this->httpConfig->getUrl(), - "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. " . - "Retried $retries times." - ); - $ex->setData($result); - $this->logger->error("Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. " . - "Retried $retries times." . $result); - $this->logger->debug("\n\n" . str_repeat('=', 128) . "\n"); - throw $ex; - } else if ($httpStatus < 200 || $httpStatus >= 300) { - $ex = new PayPalConnectionException( - $this->httpConfig->getUrl(), - "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}.", - $httpStatus - ); - $ex->setData($result); - $this->logger->error("Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. " . $result ); - $this->logger->debug("\n\n" . str_repeat('=', 128) . "\n"); - throw $ex; - } - - $this->logger->debug(($result && $result != '' ? "Response Data \t: " . $result : "No Response Body") . "\n\n" . str_repeat('=', 128) . "\n"); - - //Return result object - return $result; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalLoggingLevel.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalLoggingLevel.php deleted file mode 100644 index 607420a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalLoggingLevel.php +++ /dev/null @@ -1,26 +0,0 @@ -setLoggerName($loggerName); - return $instance; - } - - /** - * Sets Logger Name. Generally defaulted to Logging Class - * - * @param string $loggerName - */ - public function setLoggerName($loggerName = __CLASS__) - { - $this->loggerName = $loggerName; - } - - /** - * Default Constructor - */ - public function __construct() - { - $config = PayPalConfigManager::getInstance()->getConfigHashmap(); - - $this->isLoggingEnabled = (array_key_exists('log.LogEnabled', $config) && $config['log.LogEnabled'] == '1'); - - if ($this->isLoggingEnabled) { - $this->loggerFile = ($config['log.FileName']) ? $config['log.FileName'] : ini_get('error_log'); - $loggingLevel = strtoupper($config['log.LogLevel']); - $this->loggingLevel = - (isset($loggingLevel) && defined(__NAMESPACE__ . "\\PayPalLoggingLevel::$loggingLevel")) ? - constant(__NAMESPACE__ . "\\PayPalLoggingLevel::$loggingLevel") : - PayPalLoggingManager::DEFAULT_LOGGING_LEVEL; - } - } - - /** - * Default Logger - * - * @param string $message - * @param int $level - */ - private function log($message, $level = PayPalLoggingLevel::INFO) - { - if ($this->isLoggingEnabled) { - $config = PayPalConfigManager::getInstance()->getConfigHashmap(); - // Check if logging in live - if (array_key_exists('mode', $config) && $config['mode'] == 'live') { - // Live should not have logging level above INFO. - if ($this->loggingLevel >= PayPalLoggingLevel::INFO) { - // If it is at Debug Level, throw an warning in the log. - if ($this->loggingLevel == PayPalLoggingLevel::DEBUG) { - error_log("[" . date('d-m-Y h:i:s') . "] " . $this->loggerName . ": ERROR\t: Not allowed to keep 'Debug' level for Live Environments. Reduced to 'INFO'\n", 3, $this->loggerFile); - } - // Reducing it to info level - $this->loggingLevel = PayPalLoggingLevel::INFO; - } - } - - if ($level <= $this->loggingLevel) { - error_log("[" . date('d-m-Y h:i:s') . "] " . $this->loggerName . ": $message\n", 3, $this->loggerFile); - } - } - } - - /** - * Log Error - * - * @param string $message - */ - public function error($message) - { - $this->log("ERROR\t: " . $message, PayPalLoggingLevel::ERROR); - } - - /** - * Log Warning - * - * @param string $message - */ - public function warning($message) - { - $this->log("WARNING\t: " . $message, PayPalLoggingLevel::WARN); - } - - /** - * Log Info - * - * @param string $message - */ - public function info($message) - { - $this->log("INFO\t: " . $message, PayPalLoggingLevel::INFO); - } - - /** - * Log Fine - * - * @param string $message - */ - public function fine($message) - { - $this->log("FINE\t: " . $message, PayPalLoggingLevel::FINE); - } - - /** - * Log Fine - * - * @param string $message - */ - public function debug($message) - { - $this->log("DEBUG\t: " . $message, PayPalLoggingLevel::DEBUG); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/cacert.pem b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/cacert.pem deleted file mode 100644 index 1202c20..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/cacert.pem +++ /dev/null @@ -1,171 +0,0 @@ -Verisign Class 3 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 -f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol -hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA -TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah -WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf -Tqj/ZA1k ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority - G2 -============================================================ ------BEGIN CERTIFICATE----- -MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO -FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71 -lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB -MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT -1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD -Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 ------END CERTIFICATE----- - - -Verisign Class 3 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv -cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw -CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy -dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 -EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc -cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw -EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj -055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA -ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f -j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC -/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 -xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa -t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== ------END CERTIFICATE----- - -Verisign Class 4 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv -cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw -CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy -dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS -tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM -8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW -Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX -Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA -j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt -mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm -fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd -RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG -UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== ------END CERTIFICATE----- -VeriSign Class 3 Public Primary Certification Authority - G5 -============================================================ ------BEGIN CERTIFICATE----- -MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE -BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO -ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk -IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB -yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln -biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh -dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt -YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz -j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD -Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/ -Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r -fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/ -BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv -Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy -aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG -SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+ -X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE -KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC -Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE -ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq ------END CERTIFICATE----- -VeriSign Universal Root Certification Authority -=============================================== ------BEGIN CERTIFICATE----- -MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE -BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO -ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk -IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u -IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv -cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj -1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP -MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72 -9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I -AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR -tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G -CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O -a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud -DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 -Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx -Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx -P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P -wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 -mJO37M2CYfE45k+XmCpajQ== ------END CERTIFICATE----- - -VeriSign Class 3 Public Primary Certification Authority - G4 -============================================================ ------BEGIN CERTIFICATE----- -MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC -VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 -b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz -ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL -MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU -cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo -b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 -Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz -rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB -/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw -HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u -Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD -A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx -AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== ------END CERTIFICATE----- -Verisign Class 3 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 -f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol -hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky -CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX -bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/ -D/xwzoiQ ------END CERTIFICATE----- diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalConfigurationException.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalConfigurationException.php deleted file mode 100644 index 5105747..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalConfigurationException.php +++ /dev/null @@ -1,23 +0,0 @@ -url = $url; - } - - /** - * Sets Data - * - * @param $data - */ - public function setData($data) - { - $this->data = $data; - } - - /** - * Gets Data - * - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Gets Url - * - * @return string - */ - public function getUrl() - { - return $this->url; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalInvalidCredentialException.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalInvalidCredentialException.php deleted file mode 100644 index 2531f5b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalInvalidCredentialException.php +++ /dev/null @@ -1,36 +0,0 @@ -getLine() . ' in ' . $this->getFile() - . ': ' . $this->getMessage() . ''; - return $errorMsg; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalMissingCredentialException.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalMissingCredentialException.php deleted file mode 100644 index 9fac996..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Exception/PayPalMissingCredentialException.php +++ /dev/null @@ -1,37 +0,0 @@ -getLine() . ' in ' . $this->getFile() - . ': ' . $this->getMessage() . ''; - - return $errorMsg; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/IPayPalHandler.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/IPayPalHandler.php deleted file mode 100644 index 0d1c8ff..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/IPayPalHandler.php +++ /dev/null @@ -1,20 +0,0 @@ -apiContext = $apiContext; - } - - /** - * @param PayPalHttpConfig $httpConfig - * @param string $request - * @param mixed $options - * @return mixed|void - * @throws PayPalConfigurationException - * @throws PayPalInvalidCredentialException - * @throws PayPalMissingCredentialException - */ - public function handle($httpConfig, $request, $options) - { - $config = $this->apiContext->getConfig(); - - $httpConfig->setUrl( - rtrim(trim($this->_getEndpoint($config)), '/') . - (isset($options['path']) ? $options['path'] : '') - ); - - $headers = array( - "User-Agent" => PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION), - "Authorization" => "Basic " . base64_encode($options['clientId'] . ":" . $options['clientSecret']), - "Accept" => "*/*" - ); - $httpConfig->setHeaders($headers); - - // Add any additional Headers that they may have provided - $headers = $this->apiContext->getRequestHeaders(); - foreach ($headers as $key => $value) { - $httpConfig->addHeader($key, $value); - } - } - - /** - * Get HttpConfiguration object for OAuth API - * - * @param array $config - * - * @return PayPalHttpConfig - * @throws \PayPal\Exception\PayPalConfigurationException - */ - private static function _getEndpoint($config) - { - if (isset($config['oauth.EndPoint'])) { - $baseEndpoint = $config['oauth.EndPoint']; - } else if (isset($config['service.EndPoint'])) { - $baseEndpoint = $config['service.EndPoint']; - } else if (isset($config['mode'])) { - switch (strtoupper($config['mode'])) { - case 'SANDBOX': - $baseEndpoint = PayPalConstants::REST_SANDBOX_ENDPOINT; - break; - case 'LIVE': - $baseEndpoint = PayPalConstants::REST_LIVE_ENDPOINT; - break; - default: - throw new PayPalConfigurationException('The mode config parameter must be set to either sandbox/live'); - } - } else { - // Defaulting to Sandbox - $baseEndpoint = PayPalConstants::REST_SANDBOX_ENDPOINT; - } - - $baseEndpoint = rtrim(trim($baseEndpoint), '/') . "/v1/oauth2/token"; - - return $baseEndpoint; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/RestHandler.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/RestHandler.php deleted file mode 100644 index 80c94e4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/RestHandler.php +++ /dev/null @@ -1,122 +0,0 @@ -apiContext = $apiContext; - } - - /** - * @param PayPalHttpConfig $httpConfig - * @param string $request - * @param mixed $options - * @return mixed|void - * @throws PayPalConfigurationException - * @throws PayPalInvalidCredentialException - * @throws PayPalMissingCredentialException - */ - public function handle($httpConfig, $request, $options) - { - - $credential = $this->apiContext->getCredential(); - $config = $this->apiContext->getConfig(); - - if ($credential == null) { - // Try picking credentials from the config file - $credMgr = PayPalCredentialManager::getInstance($config); - $credValues = $credMgr->getCredentialObject(); - - if (!is_array($credValues)) { - throw new PayPalMissingCredentialException("Empty or invalid credentials passed"); - } - - $credential = new OAuthTokenCredential($credValues['clientId'], $credValues['clientSecret']); - } - - if ($credential == null || !($credential instanceof OAuthTokenCredential)) { - throw new PayPalInvalidCredentialException("Invalid credentials passed"); - } - - $httpConfig->setUrl( - rtrim(trim($this->_getEndpoint($config)), '/') . - (isset($options['path']) ? $options['path'] : '') - ); - - if (!array_key_exists("User-Agent", $httpConfig->getHeaders())) { - $httpConfig->addHeader("User-Agent", PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION)); - } - - if (!is_null($credential) && $credential instanceof OAuthTokenCredential && is_null($httpConfig->getHeader('Authorization'))) { - $httpConfig->addHeader('Authorization', "Bearer " . $credential->getAccessToken($config), false); - } - - if ($httpConfig->getMethod() == 'POST' || $httpConfig->getMethod() == 'PUT') { - $httpConfig->addHeader('PayPal-Request-Id', $this->apiContext->getRequestId()); - } - // Add any additional Headers that they may have provided - $headers = $this->apiContext->getRequestHeaders(); - foreach ($headers as $key => $value) { - $httpConfig->addHeader($key, $value); - } - } - - /** - * End Point - * - * @param array $config - * - * @return string - * @throws \PayPal\Exception\PayPalConfigurationException - */ - private function _getEndpoint($config) - { - if (isset($config['service.EndPoint'])) { - return $config['service.EndPoint']; - } else if (isset($config['mode'])) { - switch (strtoupper($config['mode'])) { - case 'SANDBOX': - return PayPalConstants::REST_SANDBOX_ENDPOINT; - break; - case 'LIVE': - return PayPalConstants::REST_LIVE_ENDPOINT; - break; - default: - throw new PayPalConfigurationException('The mode config parameter must be set to either sandbox/live'); - break; - } - } else { - // Defaulting to Sandbox - return PayPalConstants::REST_SANDBOX_ENDPOINT; - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php deleted file mode 100644 index a1be160..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php +++ /dev/null @@ -1,165 +0,0 @@ -requestId = $requestId; - $this->credential = $credential; - } - - /** - * Get Credential - * - * @return \PayPal\Auth\OAuthTokenCredential - */ - public function getCredential() - { - if ($this->credential == null) { - return PayPalCredentialManager::getInstance()->getCredentialObject(); - } - return $this->credential; - } - - public function getRequestHeaders() - { - $result = PayPalConfigManager::getInstance()->get('http.headers'); - $headers = array(); - foreach ($result as $header => $value) { - $headerName = ltrim($header, 'http.headers'); - $headers[$headerName] = $value; - } - return $headers; - } - - public function addRequestHeader($name, $value) - { - // Determine if the name already has a 'http.headers' prefix. If not, add one. - if (!(substr($name, 0, strlen('http.headers')) === 'http.headers')) { - $name = 'http.headers.' . $name; - } - PayPalConfigManager::getInstance()->addConfigs(array($name => $value)); - } - - /** - * Get Request ID - * - * @return string - */ - public function getRequestId() - { - if ($this->requestId == null) { - $this->requestId = $this->generateRequestId(); - } - - return $this->requestId; - } - - /** - * Resets the requestId that can be used to set the PayPal-request-id - * header used for idempotency. In cases where you need to make multiple create calls - * using the same ApiContext object, you need to reset request Id. - * - * @return string - */ - public function resetRequestId() - { - $this->requestId = $this->generateRequestId(); - return $this->getRequestId(); - } - - /** - * Sets Config - * - * @param array $config SDK configuration parameters - */ - public function setConfig(array $config) - { - PayPalConfigManager::getInstance()->addConfigs($config); - } - - /** - * Gets Configurations - * - * @return array - */ - public function getConfig() - { - return PayPalConfigManager::getInstance()->getConfigHashmap(); - } - - /** - * Gets a specific configuration from key - * - * @param $searchKey - * @return mixed - */ - public function get($searchKey) - { - return PayPalConfigManager::getInstance()->get($searchKey); - } - - /** - * Generates a unique per request id that - * can be used to set the PayPal-Request-Id header - * that is used for idempotency - * - * @return string - */ - private function generateRequestId() - { - static $pid = -1; - static $addr = -1; - - if ($pid == -1) { - $pid = getmypid(); - } - - if ($addr == -1) { - if (array_key_exists('SERVER_ADDR', $_SERVER)) { - $addr = ip2long($_SERVER['SERVER_ADDR']); - } else { - $addr = php_uname('n'); - } - } - - return $addr . $pid . $_SERVER['REQUEST_TIME'] . mt_rand(0, 0xffff); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Rest/IResource.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Rest/IResource.php deleted file mode 100644 index 281ac47..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Rest/IResource.php +++ /dev/null @@ -1,12 +0,0 @@ -secretKey = $secretKey; - } - - /** - * Encrypts the input text using the cipher key - * - * @param $input - * @return string - */ - function encrypt($input) - { - // Create a random IV. Not using mcrypt to generate one, as to not have a dependency on it. - $iv = substr(uniqid("", true), 0, Cipher::IV_SIZE); - // Encrypt the data - $encrypted = openssl_encrypt($input, "AES-256-CBC", $this->secretKey, 0, $iv); - // Encode the data with IV as prefix - return base64_encode($iv . $encrypted); - } - - /** - * Decrypts the input text from the cipher key - * - * @param $input - * @return string - */ - function decrypt($input) - { - // Decode the IV + data - $input = base64_decode($input); - // Remove the IV - $iv = substr($input, 0, Cipher::IV_SIZE); - // Return Decrypted Data - return openssl_decrypt(substr($input, Cipher::IV_SIZE), "AES-256-CBC", $this->secretKey, 0, $iv); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Transport/PayPalRestCall.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Transport/PayPalRestCall.php deleted file mode 100644 index e80f5ec..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Transport/PayPalRestCall.php +++ /dev/null @@ -1,79 +0,0 @@ -apiContext = $apiContext; - $this->logger = PayPalLoggingManager::getInstance(__CLASS__); - } - - /** - * @param array $handlers Array of handlers - * @param string $path Resource path relative to base service endpoint - * @param string $method HTTP method - one of GET, POST, PUT, DELETE, PATCH etc - * @param string $data Request payload - * @param array $headers HTTP headers - * @return mixed - * @throws \PayPal\Exception\PayPalConnectionException - */ - public function execute($handlers = array(), $path, $method, $data = '', $headers = array()) - { - - $config = $this->apiContext->getConfig(); - $httpConfig = new PayPalHttpConfig(null, $method, $config); - $headers = $headers ? $headers : array(); - $httpConfig->setHeaders($headers + - array( - 'Content-Type' => 'application/json' - ) - ); - - /** @var \Paypal\Handler\IPayPalHandler $handler */ - foreach ($handlers as $handler) { - if (!is_object($handler)) { - $fullHandler = "\\" . (string)$handler; - $handler = new $fullHandler($this->apiContext); - } - $handler->handle($httpConfig, $data, array('path' => $path, 'apiContext' => $this->apiContext)); - } - $connection = new PayPalHttpConnection($httpConfig, $config); - $response = $connection->execute($data); - - return $response; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Validation/ArgumentValidator.php b/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Validation/ArgumentValidator.php deleted file mode 100644 index 5f2d3bf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/lib/PayPal/Validation/ArgumentValidator.php +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - tests - - - - - - - - - - - - ./lib - - - - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/phpunit.xml b/_sakura/vendor/paypal/rest-api-sdk-php/phpunit.xml deleted file mode 100644 index 039146f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/phpunit.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - tests - - - - - - integration - - - - - - - - - - - ./lib - - - - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/release_notes.md b/_sakura/vendor/paypal/rest-api-sdk-php/release_notes.md deleted file mode 100644 index 0174338..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/release_notes.md +++ /dev/null @@ -1,220 +0,0 @@ -PayPal PHP SDK release notes -============================ - -v1.6.2 ----- -* TLS Check Sample Added -* Updated README - -v1.6.1 ----- -* User Agent Changes -* SDK Version Fix - -v1.6.0 ----- -* Updated Payments API to latest version -* Removed ModelAccessValidator -* Minor Bug Fixes #399 - -v1.5.1 ----- -* Fixed a bug #343 in Future Payment -* Minor Improvements -* Updates to Sample Docs - -v1.5.0 ----- -* Enabled Vault List API -* Added More Fields to Vault Credit Card Object -* Minor Fixes - -v1.4.0 ----- -* Ability to validate Webhook -* Fixes to Logging Manager to skip if mode is not set -* SDK updates and fixes - -v1.3.2 ----- -* Minor Fix for Agreement Details - -v1.3.1 ----- -* PayPalModel to differentiate between empty objects and array -* Fixed CURLINFO_HEADER_SIZE miscalculations if Proxy Enabled - -v1.3.0 ----- -* Updated Payment APIs -* Updating ModelAccessValidator to be disabled if not set explicitly - -v1.2.1 ----- -* Ability to handle missing accesors for unknown objects in json - -v1.2.0 ----- -* Order API Support -* Introduced DEBUG mode in Logging. Deprecated FINE. -* Ability to not Log on DEBUG, while on live environment -* Vault APIs Update API Support -* Transaction Fee Added in Sale Object -* Fixed #237, #234, #233, #215 - -v1.1.1 ----- -* Fix to Cipher Encryption (Critical) - -v1.1.0 ----- -* Enabled Payouts Cancel API Support for Unclaimed Payouts -* Encrypting Access Token in Cached Storage -* Updated Billing Agreement Search Transaction code to pass start_date and end_date -* Updated OAuthToken to throw proper error on not receiving access token -* Minor Bug Fixes and Documentation Updates - -v1.0.0 ----- -* Enabled Payouts API Support -* Authorization Cache Custom Path Directory Configuration -* Helper Functions to retrieve specific HATEOS Links -* Default Mode set to Sandbox -* Enabled Rest SDK to work nicely with Classic SDKs. -* If missing annotation of return type in Getters, it throws a proper exception -* `echo` on PayPalModel Objects will print nice looking JSON -* Updated Invoice Object to retrieve payments and refunds - -> ## Breaking Changes -* Removed Deprecated Getter Setters from all Model Classes - * All Camelcase getters and setters are removed. Please use first letter uppercase syntax - * E.g. instead of using get_notify_url(), use getNotifyUrl() instead -* Renamed Classes - * PayPal\Common\PPModel => PayPal\Common\PayPalModel - * PayPal\Common\ResourceModel => PayPal\Common\PayPalResourceModel - * PayPal\Common\PPUserAgent => PayPal\Common\PayPalUserAgent - * PayPal\Core\PPConfigManager => PayPal\Core\PayPalConfigManager - * PayPal\Core\PPConstants => PayPal\Core\PayPalConstants - * PayPal\Core\PPCredentialManager => PayPal\Core\PayPalCredentialManager - * PayPal\Core\PPHttpConfig => PayPal\Core\PayPalHttpConfig - * PayPal\Core\PPHttpConnection => PayPal\Core\PayPalHttpConnection - * PayPal\Core\PPLoggingLevel => PayPal\Core\PayPalLoggingLevel - * PayPal\Core\PPLoggingManager => PayPal\Core\PayPalLoggingManager - * PayPal\Exception\PPConfigurationException => PayPal\Exception\PayPalConfigurationException - * PayPal\Exception\PPConnectionException => PayPal\Exception\PayPalConnectionException - * PayPal\Exception\PPInvalidCredentialException => PayPal\Exception\PayPalInvalidCredentialException - * PayPal\Exception\PPMissingCredentialException => PayPal\Exception\PayPalMissingCredentialException - * PayPal\Handler\IPPHandler => PayPal\Handler\IPayPalHandler - * PayPal\Transport\PPRestCall => PayPal\Transport\PayPalRestCall -* Namespace Changes and Class Naming Convention - * PayPal\Common\FormatConverter => PayPal\Converter\FormatConverter - * PayPal\Rest\RestHandler => PayPal\Handler\RestHandler - * PayPal\Rest\OauthHandler => PayPal\Handler\OauthHandler -* Fixes to Methods - * PayPal\Api\Invoice->getPaymentDetails() was renamed to getPayments() - * PayPal\Api\Invoice->getRefundDetails() was renamed to getRefunds() - -v1.0.0-beta ----- -* Namespace Changes and Class Naming Convention -* Helper Functions to retrieve specific HATEOS Links -* Default Mode set to Sandbox - -v0.16.1 ----- -* Configurable Headers for all requests to PayPal -* Allows adding additional headers to every call to PayPal APIs -* SDK Config to add headers with http.headers.* syntax - -v0.16.0 ----- -* Enabled Webhook Management Capabilities -* Enabled Caching Abilities for Access Tokens - -v0.15.1 ----- -* Enabled Deleting Billing Plans -* Updated Samples - -v0.15.0 ----- -* Extended Invoicing Capabilities -* Allows QR Code Generation for Invoices -* Updated Formatter to work with multiple locales -* Removed Future Payments mandate on Correlation Id - -v0.14.2 ----- -* Quick Patch to Unset Cipher List for NSS - -v0.14.1 ----- -* Updated HttpConfig to use TLSv1 as Cipher List -* Added resetRequestId in ApiContext to enable multiple create calls in succession -* Sanitize Input for Price Variables -* Made samples look better and work best - -v0.14.0 ----- -* Enabled Billing Plans and Agreements APIs -* Renamed SDK name to PayPal-PHP-SDK - -v0.13.2 ----- -* Updated Future Payments and LIPP Support -* Updated Logging Syntax - -v0.13.1 ----- -* Enabled TLS version 1.x for SSL Negotiation -* Updated Identity Support from SDK Core -* Fixed Backward Compatibility changes - -v0.13.0 ----- -* Enabled Payment Experience - -v0.12.0 ----- -* Enabled EC Parameters Support for Payment APIs -* Enabled Validation for Missing Accessors - -v0.11.1 ----- -* Removed Dependency from SDK Core Project -* Enabled Future Payments - -v0.11.0 ----- -* Ability for PUT and PATCH requests -* Invoice number, custom and soft descriptor -* Order API and tests, more Authorization tests -* remove references to sdk-packages -* patch for retrieving paid invoices -* Shipping address docs patch -* Remove @array annotation -* Validate return cancel url -* type hinting, comment cleaning, and getters and setters for Shipping - -v0.8.0 ------ -* Invoicing API support added - -v0.7.1 ------ -* Added support for Reauthorization - -v0.7.0 ------ -* Added support for Auth and Capture APIs -* Types modified to match the API Spec -* Updated SDK to use namespace supported core library - -v0.6.0 ------ -* Adding support for dynamic configuration of SDK (Upgrading sdk-core-php dependency to V1.4.0) -* Deprecating the setCredential method and changing resource class methods to take an ApiContext argument instead of a OauthTokenCredential argument. - -v0.5.0 ------ -* Initial Release diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/.htaccess b/_sakura/vendor/paypal/rest-api-sdk-php/sample/.htaccess deleted file mode 100644 index eaf2fb9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ - -php_value display_errors On -php_flag magic_quotes 1 -php_flag magic_quotes_gpc 1 -php_value mbstring.http_input auto -php_value date.timezone America/Los_Angeles - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/README.md b/_sakura/vendor/paypal/rest-api-sdk-php/sample/README.md deleted file mode 100644 index 286f0f6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Rest API Samples - -![Home Image](https://raw.githubusercontent.com/wiki/paypal/PayPal-PHP-SDK/images/homepage.jpg) - -These examples are created to experiment with the PayPal-PHP-SDK capabilities. Each examples are designed to demonstrate the default use-cases in each segment. - -This sample project is a simple web app that you can explore to understand what each PayPal APIs can do for you. Irrespective of how you [installed your SDK](https://github.com/paypal/PayPal-PHP-SDK/wiki/Installation), you should be able to get the samples running by following the instructions below: - -## Viewing Sample Code -You can [view sample source codes here](http://paypal.github.io/PayPal-PHP-SDK/sample/). However, we recommend you run samples locally to get a better idea. - -## Instructions - -If you are running PHP 5.4 or greater, PHP provides a [ built-in support ]( http://php.net/manual/en/features.commandline.webserver.php) for hosting PHP sites. - -Note: The root directory for composer based download would be `vendor` and for direct download it would be `PayPal-PHP-SDK`. Please update the commands accordingly. - -1. Run `php -f PayPal-PHP-SDK/paypal/rest-api-sdk-php/sample/index.php` from your project root directory. -2. This would host a PHP server at `localhost:5000`. The output should look something like this: - - ``` - - - - - - - - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/favicon.ico b/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/favicon.ico deleted file mode 100644 index 78713f9..0000000 Binary files a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/favicon.ico and /dev/null differ diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/pp_v_rgb.png b/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/pp_v_rgb.png deleted file mode 100644 index 4d9aaf6..0000000 Binary files a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/pp_v_rgb.png and /dev/null differ diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/sample_console.png b/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/sample_console.png deleted file mode 100644 index 321bf7d..0000000 Binary files a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/sample_console.png and /dev/null differ diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/sample_web.png b/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/sample_web.png deleted file mode 100644 index 6e40e39..0000000 Binary files a/_sakura/vendor/paypal/rest-api-sdk-php/sample/images/sample_web.png and /dev/null differ diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/index.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/index.php deleted file mode 100644 index b0e6800..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/index.php +++ /dev/null @@ -1,1433 +0,0 @@ - - - - - - - - - - - - PayPal REST API Samples - - - - - - - - - - -
-
-
-
- -
-
-

// REST API Samples

- -

These examples are created to experiment with the PayPal-PHP-SDK capabilities. Each examples - are - designed to demonstrate the default use-cases in each segment.

-
- -
-
-
-
-
-
- -
-
-
-

TLS CHECK

-
- - -
- -
-
-

Payments

-
- -
    -
  • -
    -
    PayPal Payments - similar to Express Checkout in Classic APIs
    -
    - -
    -
    -
    -
    Step II: Execute after Success - (required step after user approval)
    -
    - -
    -
  • -
  • -
    -
    Payments using credit card information
    - -
    -
  • -
  • -
    -
    Payments using saved credit card (using Vault APIs)
    - -
    -
  • -
  • -
    -
    -
    Future payments* - (needs Authorization Code from Mobile SDK) -
    -
    -
    -
    - Source -
    - -
    -
  • -
  • -
    -
    Update payment details
    - -
    -
  • -
  • -
    -
    Get payment details
    - -
    -
  • -
  • -
    -
    Get payment history
    - -
    -
  • -
-
- -
-
-

Payouts

-
- - -
- -
- - - -
- -
-
-

Sale

-
- - -
- -
-
-

Order

-
- - -
- -
- - - -
- -
-
-

Vault

-
- - -
- -
- - - -
- -
- - - -
- -
-
-

Invoice

-
- - -
- -
- - - -
-
-
-
- -
- - - - - - - - - - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/CancelInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/CancelInvoice.php deleted file mode 100644 index 82020a0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/CancelInvoice.php +++ /dev/null @@ -1,41 +0,0 @@ -setSubject("Past due") - ->setNote("Canceling invoice") - ->setSendToMerchant(true) - ->setSendToPayer(true); - - - // ### Cancel Invoice - // Cancel invoice object by calling the - // static `cancel` method - // on the Invoice class by passing a valid - // notification object - // (See bootstrap.php for more on `ApiContext`) - $cancelStatus = $invoice->cancel($notify, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Cancel Invoice", "Invoice", null, $notify, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Cancel Invoice", "Invoice", $invoice->getId(), $notify, null); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/CreateInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/CreateInvoice.php deleted file mode 100644 index 7e244fb..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/CreateInvoice.php +++ /dev/null @@ -1,165 +0,0 @@ -setMerchantInfo(new MerchantInfo()) - ->setBillingInfo(array(new BillingInfo())) - ->setNote("Medical Invoice 16 Jul, 2013 PST") - ->setPaymentTerm(new PaymentTerm()) - ->setShippingInfo(new ShippingInfo()); - -// ### Merchant Info -// A resource representing merchant information that can be -// used to identify merchant -$invoice->getMerchantInfo() - ->setEmail("jaypatel512-facilitator@hotmail.com") - ->setFirstName("Dennis") - ->setLastName("Doctor") - ->setbusinessName("Medical Professionals, LLC") - ->setPhone(new Phone()) - ->setAddress(new Address()); - -$invoice->getMerchantInfo()->getPhone() - ->setCountryCode("001") - ->setNationalNumber("5032141716"); - -// ### Address Information -// The address used for creating the invoice -$invoice->getMerchantInfo()->getAddress() - ->setLine1("1234 Main St.") - ->setCity("Portland") - ->setState("OR") - ->setPostalCode("97217") - ->setCountryCode("US"); - -// ### Billing Information -// Set the email address for each billing -$billing = $invoice->getBillingInfo(); -$billing[0] - ->setEmail("example@example.com"); - -$billing[0]->setBusinessName("Jay Inc") - ->setAdditionalInfo("This is the billing Info") - ->setAddress(new InvoiceAddress()); - -$billing[0]->getAddress() - ->setLine1("1234 Main St.") - ->setCity("Portland") - ->setState("OR") - ->setPostalCode("97217") - ->setCountryCode("US"); - -// ### Items List -// You could provide the list of all items for -// detailed breakdown of invoice -$items = array(); -$items[0] = new InvoiceItem(); -$items[0] - ->setName("Sutures") - ->setQuantity(100) - ->setUnitPrice(new Currency()); - -$items[0]->getUnitPrice() - ->setCurrency("USD") - ->setValue(5); - -// #### Tax Item -// You could provide Tax information to each item. -$tax = new \PayPal\Api\Tax(); -$tax->setPercent(1)->setName("Local Tax on Sutures"); -$items[0]->setTax($tax); - -// Second Item -$items[1] = new InvoiceItem(); -// Lets add some discount to this item. -$item1discount = new Cost(); -$item1discount->setPercent("3"); -$items[1] - ->setName("Injection") - ->setQuantity(5) - ->setDiscount($item1discount) - ->setUnitPrice(new Currency()); - -$items[1]->getUnitPrice() - ->setCurrency("USD") - ->setValue(5); - -// #### Tax Item -// You could provide Tax information to each item. -$tax2 = new \PayPal\Api\Tax(); -$tax2->setPercent(3)->setName("Local Tax on Injection"); -$items[1]->setTax($tax2); - -$invoice->setItems($items); - -// #### Final Discount -// You can add final discount to the invoice as shown below. You could either use "percent" or "value" when providing the discount -$cost = new Cost(); -$cost->setPercent("2"); -$invoice->setDiscount($cost); - -$invoice->getPaymentTerm() - ->setTermType("NET_45"); - -// ### Shipping Information -$invoice->getShippingInfo() - ->setFirstName("Sally") - ->setLastName("Patient") - ->setBusinessName("Not applicable") - ->setPhone(new Phone()) - ->setAddress(new InvoiceAddress()); - -$invoice->getShippingInfo()->getPhone() - ->setCountryCode("001") - ->setNationalNumber("5039871234"); - -$invoice->getShippingInfo()->getAddress() - ->setLine1("1234 Main St.") - ->setCity("Portland") - ->setState("OR") - ->setPostalCode("97217") - ->setCountryCode("US"); - -// ### Logo -// You can set the logo in the invoice by providing the external URL pointing to a logo -$invoice->setLogoUrl('https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg'); - -// For Sample Purposes Only. -$request = clone $invoice; - -try { - // ### Create Invoice - // Create an invoice by calling the invoice->create() method - // with a valid ApiContext (See bootstrap.php for more on `ApiContext`) - $invoice->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Create Invoice", "Invoice", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Create Invoice", "Invoice", $invoice->getId(), $request, $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/DeleteInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/DeleteInvoice.php deleted file mode 100644 index 7657b9d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/DeleteInvoice.php +++ /dev/null @@ -1,28 +0,0 @@ -delete($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Delete Invoice", "Invoice", null, $deleteStatus, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Delete Invoice", "Invoice", $invoice->getId(), null, null); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/GetInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/GetInvoice.php deleted file mode 100644 index d256048..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/GetInvoice.php +++ /dev/null @@ -1,30 +0,0 @@ -getId(); - -// ### Retrieve Invoice -// Retrieve the invoice object by calling the -// static `get` method -// on the Invoice class by passing a valid -// Invoice ID -// (See bootstrap.php for more on `ApiContext`) -try { - $invoice = Invoice::get($invoiceId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Invoice", "Invoice", $invoice->getId(), $invoiceId, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Invoice", "Invoice", $invoice->getId(), $invoiceId, $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/ListInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/ListInvoice.php deleted file mode 100644 index 99a3cc0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/ListInvoice.php +++ /dev/null @@ -1,24 +0,0 @@ - 0, 'page_size' => 4, 'total_count_required' => "true"), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Lookup Invoice History", "Invoice", null, null, $ex); - exit(1); -} -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Lookup Invoice History", "Invoice", null, null, $invoices); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RecordPayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RecordPayment.php deleted file mode 100644 index b413b37..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RecordPayment.php +++ /dev/null @@ -1,58 +0,0 @@ -recordPayment($record, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Payment for Invoice", "Invoice", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Payment for Invoice", "Invoice", $invoice->getId(), $record, null); - -// ### Retrieve Invoice -// Retrieve the invoice object by calling the -// static `get` method -// on the Invoice class by passing a valid -// Invoice ID -// (See bootstrap.php for more on `ApiContext`) -try { - $invoice = Invoice::get($invoice->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RecordRefund.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RecordRefund.php deleted file mode 100644 index 12144fe..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RecordRefund.php +++ /dev/null @@ -1,57 +0,0 @@ -recordRefund($refund, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Refund for Invoice", "Invoice", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Refund for Invoice", "Invoice", $invoice->getId(), $refund, null); - -// ### Retrieve Invoice -// Retrieve the invoice object by calling the -// static `get` method -// on the Invoice class by passing a valid -// Invoice ID -// (See bootstrap.php for more on `ApiContext`) -try { - $invoice = Invoice::get($invoice->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RemindInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RemindInvoice.php deleted file mode 100644 index dc8ab16..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RemindInvoice.php +++ /dev/null @@ -1,58 +0,0 @@ -setSubject("Past due") - ->setNote("Please pay soon") - ->setSendToMerchant(true); - - // ### Remind Invoice - // Remind the notifiers by calling the - // `remind` method - // on the Invoice class by passing a valid - // notification object - // (See bootstrap.php for more on `ApiContext`) - $remindStatus = $invoice->remind($notify, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Remind Invoice", "Invoice", null, $notify, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Remind Invoice", "Invoice", null, $notify, null); - -// ### Retrieve Invoice -// Retrieve the invoice object by calling the -// static `get` method -// on the Invoice class by passing a valid -// Invoice ID -// (See bootstrap.php for more on `ApiContext`) -try { - $invoice = Invoice::get($invoice->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RetrieveQRCode.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RetrieveQRCode.php deleted file mode 100644 index e9cbd1d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/RetrieveQRCode.php +++ /dev/null @@ -1,42 +0,0 @@ -getId(), array('height' => '300', 'width' => '300'), $apiContext); - - // ### Optionally Save to File - // This is not a required step. However, if you want to store this image as a file, you can use - // 'saveToFile' method with proper file name. - // This will save the image as /samples/invoice/images/sample.png - $path = $image->saveToFile("images/sample.png"); - - -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Retrieved QR Code for Invoice", "Invoice", $invoice->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Retrieved QR Code for Invoice", "Invoice", $invoice->getId(), null, $image); - -// ### Show the Image -// In PHP, there are many ways to present an images. -// One of the ways, you could directly inject the base64-encoded string -// with proper image information in front of it. -echo 'Invoice QR Code'; - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/SearchInvoices.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/SearchInvoices.php deleted file mode 100644 index b94a3a8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/SearchInvoices.php +++ /dev/null @@ -1,38 +0,0 @@ -send($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Send Invoice", "Invoice", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Send Invoice", "Invoice", $invoice->getId(), null, null); - -// ### Retrieve Invoice -// Retrieve the invoice object by calling the -// static `get` method -// on the Invoice class by passing a valid -// Invoice ID -// (See bootstrap.php for more on `ApiContext`) -try { - $invoice = Invoice::get($invoice->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/UpdateInvoice.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/UpdateInvoice.php deleted file mode 100644 index 57ca622..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/UpdateInvoice.php +++ /dev/null @@ -1,57 +0,0 @@ -setInvoiceDate("2014-12-16 PST"); - -// ### NOTE: These are the work-around added to the -// sample, to get past the bug in PayPal APIs. -// There is already an internal ticket #PPTIPS-1932 created for it. -$invoice->setDiscount(null); -$billingInfo = $invoice->getBillingInfo()[0]; -$billingInfo->setAddress(null); -$invoice->getPaymentTerm()->setDueDate(null); - -try { - // ### Update Invoice - // Update an invoice by calling the invoice->update() method - // with a valid ApiContext (See bootstrap.php for more on `ApiContext`) - $invoice->update($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Invoice Updated", "Invoice", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Invoice Updated", "Invoice", $invoice->getId(), $request, $invoice); - -// ### Retrieve Invoice -// Retrieve the invoice object by calling the -// static `get` method -// on the Invoice class by passing a valid -// Invoice ID -// (See bootstrap.php for more on `ApiContext`) -try { - $invoice = Invoice::get($invoice->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $invoice); - -return $invoice; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/images/sample.png b/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/images/sample.png deleted file mode 100644 index 4d0799e..0000000 Binary files a/_sakura/vendor/paypal/rest-api-sdk-php/sample/invoice/images/sample.png and /dev/null differ diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/GenerateAccessTokenFromRefreshToken.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/GenerateAccessTokenFromRefreshToken.php deleted file mode 100644 index ff90540..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/GenerateAccessTokenFromRefreshToken.php +++ /dev/null @@ -1,23 +0,0 @@ -createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext); - -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Obtained Access Token From Refresh Token", "Access Token", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Obtained Access Token From Refresh Token", "Access Token", $tokenInfo->getAccessToken(), null, $tokenInfo); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/GetUserInfo.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/GetUserInfo.php deleted file mode 100644 index 52b8be7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/GetUserInfo.php +++ /dev/null @@ -1,38 +0,0 @@ -createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext); - - $params = array('access_token' => $tokenInfo->getAccessToken()); - $userInfo = OpenIdUserinfo::getUserinfo($params, $apiContext); - -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("User Information", "User Info", null, $params, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("User Information", "User Info", $userInfo->getUserId(), $params, $userInfo); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/ObtainUserConsent.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/ObtainUserConsent.php deleted file mode 100644 index d7c97f5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/ObtainUserConsent.php +++ /dev/null @@ -1,24 +0,0 @@ -Click Here to Obtain User Consent', $baseUrl, $redirectUrl); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/UserConsentRedirect.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/UserConsentRedirect.php deleted file mode 100644 index 6ac77e7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/lipp/UserConsentRedirect.php +++ /dev/null @@ -1,29 +0,0 @@ - $code), null, null, $apiContext); - } catch (PayPalConnectionException $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Obtained Access Token", "Access Token", null, $_GET['code'], $ex); - exit(1); - } - - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Obtained Access Token", "Access Token", $accessToken->getAccessToken(), $_GET['code'], $accessToken); - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/CreateWebhook.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/CreateWebhook.php deleted file mode 100644 index 7606b52..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/CreateWebhook.php +++ /dev/null @@ -1,86 +0,0 @@ -setUrl("https://requestb.in/10ujt3c1?uniqid=" . uniqid()); - -// # Event Types -// Event types correspond to what kind of notifications you want to receive on the given URL. -$webhookEventTypes = array(); -$webhookEventTypes[] = new \PayPal\Api\WebhookEventType( - '{ - "name":"PAYMENT.AUTHORIZATION.CREATED" - }' -); -$webhookEventTypes[] = new \PayPal\Api\WebhookEventType( - '{ - "name":"PAYMENT.AUTHORIZATION.VOIDED" - }' -); -$webhook->setEventTypes($webhookEventTypes); - -// For Sample Purposes Only. -$request = clone $webhook; - -// ### Create Webhook -try { - $output = $webhook->create($apiContext); -} catch (Exception $ex) { - // ^ Ignore workflow code segment - if ($ex instanceof \PayPal\Exception\PayPalConnectionException) { - $data = $ex->getData(); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Webhook Failed. Checking if it is Webhook Number Limit Exceeded. Trying to delete all existing webhooks", "Webhook", "Please Use Delete All Webhooks Sample to delete all existing webhooks in sample", $request, $ex); - if (strpos($data,'WEBHOOK_NUMBER_LIMIT_EXCEEDED') !== false) { - require 'DeleteAllWebhooks.php'; - try { - $output = $webhook->create($apiContext); - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Webhook", "Webhook", null, $request, $ex); - exit(1); - } - } else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Webhook", "Webhook", null, $request, $ex); - exit(1); - } - } else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Webhook", "Webhook", null, $request, $ex); - exit(1); - } - // Print Success Result -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Webhook", "Webhook", $output->getId(), $request, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/DeleteAllWebhooks.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/DeleteAllWebhooks.php deleted file mode 100644 index 746a7b0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/DeleteAllWebhooks.php +++ /dev/null @@ -1,26 +0,0 @@ -getWebhooks() as $webhook) { - $webhook->delete($apiContext); - } -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Deleted all Webhooks", "WebhookList", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Delete all Webhook, as it may have exceed the maximum count.", "WebhookList", null, null, null); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/DeleteWebhook.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/DeleteWebhook.php deleted file mode 100644 index c1c70bc..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/DeleteWebhook.php +++ /dev/null @@ -1,27 +0,0 @@ - - -// ## Get Webhook Instance - -/** @var \PayPal\Api\Webhook $webhook */ -$webhook = require 'CreateWebhook.php'; - - -// ### Delete Webhook -try { - $output = $webhook->delete($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Delete a Webhook", "Webhook", null, $webhookId, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Delete a Webhook", "Webhook", $webhook->getId(), null, null); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/GetWebhook.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/GetWebhook.php deleted file mode 100644 index 3ec7a7f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/GetWebhook.php +++ /dev/null @@ -1,28 +0,0 @@ - - -// ## Get Webhook ID. -// In samples we are using CreateWebhook.php sample to get the created instance of webhook. -// However, in real case scenario, we could use just the ID from database or retrieved from the form. -/** @var \PayPal\Api\Webhook $webhook */ -$webhook = require 'CreateWebhook.php'; -$webhookId = $webhook->getId(); - -// ### Get Webhook -try { - $output = \PayPal\Api\Webhook::get($webhookId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get a Webhook", "Webhook", null, $webhookId, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get a Webhook", "Webhook", $output->getId(), null, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ListSubscribedWebhookEventTypes.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ListSubscribedWebhookEventTypes.php deleted file mode 100644 index 186d23b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ListSubscribedWebhookEventTypes.php +++ /dev/null @@ -1,28 +0,0 @@ - - -// ## List Subscribed Event Types -// Use this call to retrieve the list of events types that are subscribed to a webhook. - -/** @var \PayPal\Api\Webhook $webhook */ -$webhook = require 'CreateWebhook.php'; -$webhookId = $webhook->getId(); - -// ### Get List of Subscribed Event Types -try { - $output = \PayPal\Api\WebhookEventType::subscribedEventTypes($webhookId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("List subscribed webhook event types", "WebhookEventTypeList", null, $webhookId, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("List subscribed webhook event types", "WebhookEventTypeList",null, null, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ListWebhooks.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ListWebhooks.php deleted file mode 100644 index 05c1dbf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ListWebhooks.php +++ /dev/null @@ -1,29 +0,0 @@ -'2014-12-06T11:00:00Z', - // 'end_time'=>'2014-12-12T11:00:00Z' -); - -// ### Search Webhook events -try { - $output = \PayPal\Api\WebhookEvent::all($params, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Search Webhook events", "WebhookEventList", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Search Webhook events", "WebhookEventList", null, $params, $output); - - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/UpdateWebhook.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/UpdateWebhook.php deleted file mode 100644 index 043733b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/UpdateWebhook.php +++ /dev/null @@ -1,57 +0,0 @@ - - -// ## Get Webhook ID. -// In samples we are using CreateWebhook.php sample to get the created instance of webhook. -// However, in real case scenario, we could use just the ID from database or use an already existing webhook. -/** @var \PayPal\Api\Webhook $webhook */ -$webhook = require 'CreateWebhook.php'; -// Updating the webhook as per given request -// -// [ -// { -// "op":"replace", -// "path":"/url", -// "value":"https://requestb.in/10ujt3c1" -// }, -// { -// "op":"replace", -// "path":"/event_types", -// "value":[ -// { -// "name":"PAYMENT.SALE.REFUNDED" -// } -// ] -// } -// ] -$patch = new \PayPal\Api\Patch(); -$patch->setOp("replace") - ->setPath("/url") - ->setValue("https://requestb.in/10ujt3c1?uniqid=". uniqid()); - -$patch2 = new \PayPal\Api\Patch(); -$patch2->setOp("replace") - ->setPath("/event_types") - ->setValue(json_decode('[{"name":"PAYMENT.SALE.REFUNDED"}]')); - -$patchRequest = new \PayPal\Api\PatchRequest(); -$patchRequest->addPatch($patch)->addPatch($patch2); - -// ### Get Webhook -try { - $output = $webhook->update($patchRequest, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Updated a Webhook", "Webhook", null, $patchRequest, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Updated a Webhook", "Webhook", $output->getId(), $patchRequest, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ValidateWebhookEvent.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ValidateWebhookEvent.php deleted file mode 100644 index e8c5372..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/ValidateWebhookEvent.php +++ /dev/null @@ -1,36 +0,0 @@ -getId(), $bodyReceived, $output); - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/WebhookEventTypesList.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/WebhookEventTypesList.php deleted file mode 100644 index f19d591..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/notifications/WebhookEventTypesList.php +++ /dev/null @@ -1,23 +0,0 @@ -setLandingPageType("Billing"); -// The URL on the merchant site for transferring to after a bank transfer payment. -$flowConfig->setBankTxnPendingUrl("http://www.yeowza.com/"); - -// Parameters for style and presentation. -$presentation = new \PayPal\Api\Presentation(); - -// A URL to logo image. Allowed vaues: .gif, .jpg, or .png. -$presentation->setLogoImage("http://www.yeowza.com/favico.ico") -// A label that overrides the business name in the PayPal account on the PayPal pages. - ->setBrandName("YeowZa! Paypal") -// Locale of pages displayed by PayPal payment experience. - ->setLocaleCode("US"); - -// Parameters for input fields customization. -$inputFields = new \PayPal\Api\InputFields(); -// Enables the buyer to enter a note to the merchant on the PayPal page during checkout. -$inputFields->setAllowNote(true) - // Determines whether or not PayPal displays shipping address fields on the experience pages. Allowed values: 0, 1, or 2. When set to 0, PayPal displays the shipping address on the PayPal pages. When set to 1, PayPal does not display shipping address fields whatsoever. When set to 2, if you do not pass the shipping address, PayPal obtains it from the buyer’s account profile. For digital goods, this field is required, and you must set it to 1. - ->setNoShipping(1) - // Determines whether or not the PayPal pages should display the shipping address and not the shipping address on file with PayPal for this buyer. Displaying the PayPal street address on file does not allow the buyer to edit that address. Allowed values: 0 or 1. When set to 0, the PayPal pages should not display the shipping address. When set to 1, the PayPal pages should display the shipping address. - ->setAddressOverride(0); - -// #### Payment Web experience profile resource -$webProfile = new \PayPal\Api\WebProfile(); - -// Name of the web experience profile. Required. Must be unique -$webProfile->setName("YeowZa! T-Shirt Shop" . uniqid()) - // Parameters for flow configuration. - ->setFlowConfig($flowConfig) - // Parameters for style and presentation. - ->setPresentation($presentation) - // Parameters for input field customization. - ->setInputFields($inputFields); - -// For Sample Purposes Only. -$request = clone $webProfile; - -try { - // Use this call to create a profile. - $createProfileResponse = $webProfile->create($apiContext); -} catch (\PayPal\Exception\PayPalConnectionException $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Web Profile", "Web Profile", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Web Profile", "Web Profile", $createProfileResponse->getId(), $request, $createProfileResponse); - -return $createProfileResponse; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/DeleteWebProfile.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/DeleteWebProfile.php deleted file mode 100644 index 9cf0c1f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/DeleteWebProfile.php +++ /dev/null @@ -1,28 +0,0 @@ -setId($createProfileResponse->getId()); - -try { - // Execute the delete method - $webProfile->delete($apiContext); -} catch (\PayPal\Exception\PayPalConnectionException $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Deleted Web Profile", "Web Profile", $createProfileResponse->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Deleted Web Profile", "Web Profile", $createProfileResponse->getId(), null, null); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/GetWebProfile.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/GetWebProfile.php deleted file mode 100644 index 09bcc93..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/GetWebProfile.php +++ /dev/null @@ -1,26 +0,0 @@ -getId(), $apiContext); -} catch (\PayPal\Exception\PayPalConnectionException $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Web Profile", "Web Profile", $webProfile->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Web Profile", "Web Profile", $webProfile->getId(), null, $webProfile); - -return $webProfile; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/ListWebProfiles.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/ListWebProfiles.php deleted file mode 100644 index 57762c7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/ListWebProfiles.php +++ /dev/null @@ -1,26 +0,0 @@ -toJSON(128) . PHP_EOL; -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get List of All Web Profiles", "Web Profiles", null, null, $result); - -return $list; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/PartiallyUpdateWebProfile.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/PartiallyUpdateWebProfile.php deleted file mode 100644 index 79b25f8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/PartiallyUpdateWebProfile.php +++ /dev/null @@ -1,46 +0,0 @@ -setOp("add") - // string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed. Required. - ->setPath("/presentation/brand_name") - // New value to apply based on the operation. - ->setValue("New Brand Name"); - -// Similar patch operation to remove the landing page type -$patchOperation2 = new \PayPal\Api\Patch(); -$patchOperation2->setOp("remove") - ->setPath("/flow_config/landing_page_type"); - - -//Generate an array of patch operations -$patches = array($patchOperation1, $patchOperation2); - -try { - // Execute the partial update, to carry out these two operations on a given web profile object - if ($webProfile->partial_update($patches, $apiContext)) { - $webProfile = \PayPal\Api\WebProfile::get($webProfile->getId(), $apiContext); - } -} catch (\Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Partially Updated Web Profile", "Web Profile", $webProfile->getId(), $patches, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Partially Updated Web Profile", "Web Profile", $webProfile->getId(), $patches, $webProfile); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/UpdateWebProfile.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/UpdateWebProfile.php deleted file mode 100644 index 4cf4770..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payment-experience/UpdateWebProfile.php +++ /dev/null @@ -1,30 +0,0 @@ -getPresentation()->setLogoImage("http://www.google.com/favico.ico"); - -try { - // Update the web profile to change the logo image. - if ($webProfile->update($apiContext)) { - // If the update is successfull, we can now get the object, and verify the web profile - // object - $updatedWebProfile = \PayPal\Api\WebProfile::get($webProfile->getId(), $apiContext); - } -} catch (\Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Updated Web Profile", "Web Profile", $webProfile->getId(), $webProfile, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Updated Web Profile", "Web Profile", $updatedWebProfile->getId(), $webProfile, $updatedWebProfile); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizationCapture.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizationCapture.php deleted file mode 100644 index 493e4c5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizationCapture.php +++ /dev/null @@ -1,41 +0,0 @@ -capture method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -try { - $authId = $authorization->getId(); - - $amt = new Amount(); - $amt->setCurrency("USD") - ->setTotal(1); - - ### Capture - $capture = new Capture(); - $capture->setAmount($amt); - - // Perform a capture - $getCapture = $authorization->capture($capture, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Capture Payment", "Authorization", null, $capture, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Capture Payment", "Authorization", $getCapture->getId(), $capture, $getCapture); - -return $getCapture; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizePayment.php deleted file mode 100644 index c32b581..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizePayment.php +++ /dev/null @@ -1,83 +0,0 @@ -setLine1("3909 Witmer Road") - ->setLine2("Niagara Falls") - ->setCity("Niagara Falls") - ->setState("NY") - ->setPostalCode("14305") - ->setCountryCode("US") - ->setPhone("716-298-1822"); - -$card = new CreditCard(); -$card->setType("visa") - ->setNumber("4417119669820331") - ->setExpireMonth("11") - ->setExpireYear("2019") - ->setCvv2("012") - ->setFirstName("Joe") - ->setLastName("Shopper") - ->setBillingAddress($addr); - -$fi = new FundingInstrument(); -$fi->setCreditCard($card); - -$payer = new Payer(); -$payer->setPaymentMethod("credit_card") - ->setFundingInstruments(array($fi)); - -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(1); - -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setDescription("Payment description."); - -$payment = new Payment(); - -// Setting intent to authorize creates a payment -// authorization. Setting it to sale creates actual payment -$payment->setIntent("authorize") - ->setPayer($payer) - ->setTransactions(array($transaction)); - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the payment->create() method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -// The return object contains the state. -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError('Authorize a Payment', 'Authorized Payment', $payment->getId(), $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult('Authorize a Payment', 'Authorized Payment', $payment->getId(), $request, $payment); - -$transactions = $payment->getTransactions(); -$relatedResources = $transactions[0]->getRelatedResources(); -$authorization = $relatedResources[0]->getAuthorization(); - -return $authorization; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizePaymentUsingPayPal.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizePaymentUsingPayPal.php deleted file mode 100644 index 10900ed..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/AuthorizePaymentUsingPayPal.php +++ /dev/null @@ -1,117 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.50); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/ExecutePayment.php?success=true") - ->setCancelUrl("$baseUrl/ExecutePayment.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'sale' -$payment = new Payment(); -$payment->setIntent("authorize") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state and the -// url to which the buyer must be redirected to -// for payment approval -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Payment Authorization Using PayPal. Please visit the URL to Authorize.", "Payment", null, $request, $ex); - exit(1); -} - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getLinks() -// method -$approvalUrl = $payment->getApprovalLink(); - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Authorization Using PayPal. Please visit the URL to Authorize.", "Payment", "$approvalUrl", $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreateFuturePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreateFuturePayment.php deleted file mode 100644 index c3e3f59..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreateFuturePayment.php +++ /dev/null @@ -1,97 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal("0.17"); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setDescription("Payment description"); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/ExecutePayment.php?success=true") - ->setCancelUrl("$baseUrl/ExecutePayment.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'sale' -$payment = new FuturePayment(); -$payment->setIntent("authorize") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - -// ### Get Refresh Token -// You need to get a permanent refresh token from the authorization code, retrieved from the mobile sdk. - -// authorization code from mobile sdk -$authorizationCode = 'EK7_MAKlB4QxW1dWKnvnr_CEdLKnpH3vnGAf155Eg8yO8e_7VaQonsqIbTK9CR7tUsoIN2eCc5raOfaGbZDCT0j6k_BDE8GkyLgk8ulcQyR_3S-fgBzjMzBwNqpj3AALgCVR03zw1iT8HTsxZXp3s2U'; - -// Client Metadata id from mobile sdk -// For more information look for PayPal-Client-Metadata-Id in https://developer.paypal.com/docs/api/#authentication--headers -$clientMetadataId = '123123456'; - -try { - // Exchange authorization_code for long living refresh token. You should store - // it in a database for later use - $refreshToken = FuturePayment::getRefreshToken($authorizationCode, $apiContext); - - // Update the access token in apiContext - $payment->updateAccessToken($refreshToken, $apiContext); - - // For Sample Purposes Only. - $request = clone $payment; - - // ### Create Future Payment - // Create a payment by calling the 'create' method - // passing it a valid apiContext. - // (See bootstrap.php for more on `ApiContext`) - // The return object contains the state and the - // url to which the buyer must be redirected to - // for payment approval - // Please note that currently future payments works only with PayPal as a funding instrument. - $payment->create($apiContext, $clientMetadataId); - -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Future Payment", "Payment", null, $payment, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Future Payment", "Payment", $payment->getId(), $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePayment.php deleted file mode 100644 index c0317c7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePayment.php +++ /dev/null @@ -1,124 +0,0 @@ -setType("visa") - ->setNumber("4148529247832259") - ->setExpireMonth("11") - ->setExpireYear("2019") - ->setCvv2("012") - ->setFirstName("Joe") - ->setLastName("Shopper"); - -// ### FundingInstrument -// A resource representing a Payer's funding instrument. -// For direct credit card payments, set the CreditCard -// field on this object. -$fi = new FundingInstrument(); -$fi->setCreditCard($card); - -// ### Payer -// A resource representing a Payer that funds a payment -// For direct credit card payments, set payment method -// to 'credit_card' and add an array of funding instruments. -$payer = new Payer(); -$payer->setPaymentMethod("credit_card") - ->setFundingInstruments(array($fi)); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setDescription('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setTax(0.3) - ->setPrice(7.50); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setDescription('Granola Bars with Peanuts') - ->setCurrency('USD') - ->setQuantity(5) - ->setTax(0.2) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.5); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to sale 'sale' -$payment = new Payment(); -$payment->setIntent("sale") - ->setPayer($payer) - ->setTransactions(array($transaction)); - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the payment->create() method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -// The return object contains the state. -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError('Create Payment Using Credit Card. If 500 Exception, try creating a new Credit Card using Step 4, on this link, and using it.', 'Payment', null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult('Create Payment Using Credit Card', 'Payment', $payment->getId(), $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePaymentUsingPayPal.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePaymentUsingPayPal.php deleted file mode 100644 index 88d5aa5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePaymentUsingPayPal.php +++ /dev/null @@ -1,117 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setSku("123123") // Similar to `item_number` in Classic API - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setSku("321321") // Similar to `item_number` in Classic API - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.50); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/ExecutePayment.php?success=true") - ->setCancelUrl("$baseUrl/ExecutePayment.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'sale' -$payment = new Payment(); -$payment->setIntent("sale") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state and the -// url to which the buyer must be redirected to -// for payment approval -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", null, $request, $ex); - exit(1); -} - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getApprovalLink() -// method -$approvalUrl = $payment->getApprovalLink(); - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePaymentUsingSavedCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePaymentUsingSavedCard.php deleted file mode 100644 index 96f8512..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/CreatePaymentUsingSavedCard.php +++ /dev/null @@ -1,115 +0,0 @@ -setCreditCardId($card->getId()); - -// ### FundingInstrument -// A resource representing a Payer's funding instrument. -// For stored credit card payments, set the CreditCardToken -// field on this object. -$fi = new FundingInstrument(); -$fi->setCreditCardToken($creditCardToken); - -// ### Payer -// A resource representing a Payer that funds a payment -// For stored credit card payments, set payment method -// to 'credit_card'. -$payer = new Payer(); -$payer->setPaymentMethod("credit_card") - ->setFundingInstruments(array($fi)); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.5); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'sale' -$payment = new Payment(); -$payment->setIntent("sale") - ->setPayer($payer) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ###Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state. -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Create Payment using Saved Card", "Payment", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Create Payment using Saved Card", "Payment", $payment->getId(), $request, $payment); - -return $card; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/ExecutePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/ExecutePayment.php deleted file mode 100644 index c1fb9e5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/ExecutePayment.php +++ /dev/null @@ -1,91 +0,0 @@ -/execute'. - -require __DIR__ . '/../bootstrap.php'; -use PayPal\Api\Amount; -use PayPal\Api\Details; -use PayPal\Api\ExecutePayment; -use PayPal\Api\Payment; -use PayPal\Api\PaymentExecution; -use PayPal\Api\Transaction; - -// ### Approval Status -// Determine if the user approved the payment or not -if (isset($_GET['success']) && $_GET['success'] == 'true') { - - // Get the payment Object by passing paymentId - // payment id was previously stored in session in - // CreatePaymentUsingPayPal.php - $paymentId = $_GET['paymentId']; - $payment = Payment::get($paymentId, $apiContext); - - // ### Payment Execute - // PaymentExecution object includes information necessary - // to execute a PayPal account payment. - // The payer_id is added to the request query parameters - // when the user is redirected from paypal back to your site - $execution = new PaymentExecution(); - $execution->setPayerId($_GET['PayerID']); - - // ### Optional Changes to Amount - // If you wish to update the amount that you wish to charge the customer, - // based on the shipping address or any other reason, you could - // do that by passing the transaction object with just `amount` field in it. - // Here is the example on how we changed the shipping to $1 more than before. - $transaction = new Transaction(); - $amount = new Amount(); - $details = new Details(); - - $details->setShipping(2.2) - ->setTax(1.3) - ->setSubtotal(17.50); - - $amount->setCurrency('USD'); - $amount->setTotal(21); - $amount->setDetails($details); - $transaction->setAmount($amount); - - // Add the above transaction object inside our Execution object. - $execution->addTransaction($transaction); - - try { - // Execute the payment - // (See bootstrap.php for more on `ApiContext`) - $result = $payment->execute($execution, $apiContext); - - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Executed Payment", "Payment", $payment->getId(), $execution, $result); - - try { - $payment = Payment::get($paymentId, $apiContext); - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Payment", "Payment", null, null, $ex); - exit(1); - } - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Executed Payment", "Payment", null, null, $ex); - exit(1); - } - - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Payment", "Payment", $payment->getId(), null, $payment); - - return $payment; - - -} else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("User Cancelled the Approval", null); - exit; -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetAuthorization.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetAuthorization.php deleted file mode 100644 index 6e423af..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetAuthorization.php +++ /dev/null @@ -1,30 +0,0 @@ - - -/** @var Authorization $authorization */ -$authorization = require 'AuthorizePayment.php'; -$authorizationId = $authorization->getId(); -use PayPal\Api\Authorization; - -// ### GetAuthorization -// You can retrieve info about an Authorization -// by invoking the Authorization::get method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -// The return object contains the authorization state. - -try { - // Retrieve the authorization - $result = Authorization::get($authorizationId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Authorization", "Authorization", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Authorization", "Authorization", $authorizationId, null, $result); - -return $result; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetCapture.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetCapture.php deleted file mode 100644 index 19cea3a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetCapture.php +++ /dev/null @@ -1,24 +0,0 @@ - - -/** @var Capture $request */ -$request = require 'AuthorizationCapture.php'; - -use PayPal\Api\Capture; - -// ### Retrieve Capture details -// You can look up a capture by invoking the Capture::get method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -try { - $capture = Capture::get($request->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Captured Payment", "Capture", $request->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Captured Payment", "Capture", $capture->getId(), null, $capture); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetPayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetPayment.php deleted file mode 100644 index 9df9b66..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/GetPayment.php +++ /dev/null @@ -1,34 +0,0 @@ -getId(); - -// ### Retrieve payment -// Retrieve the payment object by calling the -// static `get` method -// on the Payment class by passing a valid -// Payment ID -// (See bootstrap.php for more on `ApiContext`) -try { - $payment = Payment::get($paymentId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Payment", "Payment", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Payment", "Payment", $payment->getId(), null, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/ListPayments.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/ListPayments.php deleted file mode 100644 index 5811072..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/ListPayments.php +++ /dev/null @@ -1,35 +0,0 @@ - 10, 'start_index' => 5); - - $payments = Payment::all($params, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("List Payments", "Payment", null, $params, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("List Payments", "Payment", null, $params, $payments); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderAuthorize.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderAuthorize.php deleted file mode 100644 index 441dfa9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderAuthorize.php +++ /dev/null @@ -1,53 +0,0 @@ -/authorize - -/** @var \PayPal\Api\Payment $payment */ -$payment = require __DIR__ . '/ExecutePayment.php'; - -use PayPal\Api\Amount; -use PayPal\Api\Authorization; - -// ### Approval Status -// Determine if the user approved the payment or not -if (isset($_GET['success']) && $_GET['success'] == 'true') { - - // ### Retrieve the order - // OrderId could be retrieved by parsing the object inside related_resources. - $transactions = $payment->getTransactions(); - $transaction = $transactions[0]; - $relatedResources = $transaction->getRelatedResources(); - $relatedResource = $relatedResources[0]; - $order = $relatedResource->getOrder(); - - // ### Create Authorization Object - // with Amount in it - $authorization = new Authorization(); - $authorization->setAmount(new Amount( - '{ - "total": "2.00", - "currency": "USD" - }' - )); - - try { - // ### Authorize Order - // Authorize the order by passing authorization object we created. - // We will get a new authorization object back. - $result = $order->authorize($authorization, $apiContext); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Authorized Order", "Authorization", $result->getId(), $authorization, $result); - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Authorized Order", "Authorization", null, $authorization, $ex); - exit(1); - } - - return $result; - -} else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("User Cancelled the Approval", null); - exit; -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCapture.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCapture.php deleted file mode 100644 index d704081..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCapture.php +++ /dev/null @@ -1,54 +0,0 @@ -/authorize - -/** @var \PayPal\Api\Payment $payment */ -$payment = require __DIR__ . '/ExecutePayment.php'; - -use PayPal\Api\Amount; -use PayPal\Api\Capture; - -// ### Approval Status -// Determine if the user approved the payment or not -if (isset($_GET['success']) && $_GET['success'] == 'true') { - - // ### Retrieve the order - // OrderId could be retrieved by parsing the object inside related_resources. - $transactions = $payment->getTransactions(); - $transaction = $transactions[0]; - $relatedResources = $transaction->getRelatedResources(); - $relatedResource = $relatedResources[0]; - $order = $relatedResource->getOrder(); - - // ### Create Capture Object - // with Amount in it - $capture = new Capture(); - $capture->setIsFinalCapture(true); - $capture->setAmount(new Amount( - '{ - "total": "2.00", - "currency": "USD" - }' - )); - - try { - // ### Capture Order - // Capture the order by passing capture object we created. - // We will get a new capture object back. - $result = $order->capture($capture, $apiContext); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Captured Order", "Capture", $result->getId(), $capture, $result); - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Captured Order", "Capture", null, $capture, $ex); - exit(1); - } - - return $result; - -} else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("User Cancelled the Approval", null); - exit; -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForAuthorization.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForAuthorization.php deleted file mode 100644 index 704e39a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForAuthorization.php +++ /dev/null @@ -1,114 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.50); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/OrderAuthorize.php?success=true") - ->setCancelUrl("$baseUrl/OrderAuthorize.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'order' -$payment = new Payment(); -$payment->setIntent("order") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state and the -// url to which the buyer must be redirected to -// for payment approval -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", null, $request, $ex); - exit(1); -} - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getApprovalLink() -// method -$approvalUrl = $payment->getApprovalLink(); - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForCapture.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForCapture.php deleted file mode 100644 index d0882c4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForCapture.php +++ /dev/null @@ -1,114 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.50); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/OrderCapture.php?success=true") - ->setCancelUrl("$baseUrl/OrderCapture.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'order' -$payment = new Payment(); -$payment->setIntent("order") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state and the -// url to which the buyer must be redirected to -// for payment approval -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", null, $request, $ex); - exit(1); -} - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getApprovalLink() -// method -$approvalUrl = $payment->getApprovalLink(); - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForVoid.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForVoid.php deleted file mode 100644 index eea420d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateForVoid.php +++ /dev/null @@ -1,114 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.50); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/OrderDoVoid.php?success=true") - ->setCancelUrl("$baseUrl/OrderDoVoid.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'order' -$payment = new Payment(); -$payment->setIntent("order") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state and the -// url to which the buyer must be redirected to -// for payment approval -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", null, $request, $ex); - exit(1); -} - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getApprovalLink() -// method -$approvalUrl = $payment->getApprovalLink(); - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateUsingPayPal.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateUsingPayPal.php deleted file mode 100644 index f194394..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderCreateUsingPayPal.php +++ /dev/null @@ -1,114 +0,0 @@ -setPaymentMethod("paypal"); - -// ### Itemized information -// (Optional) Lets you specify item wise -// information -$item1 = new Item(); -$item1->setName('Ground Coffee 40 oz') - ->setCurrency('USD') - ->setQuantity(1) - ->setPrice(7.5); -$item2 = new Item(); -$item2->setName('Granola bars') - ->setCurrency('USD') - ->setQuantity(5) - ->setPrice(2); - -$itemList = new ItemList(); -$itemList->setItems(array($item1, $item2)); - -// ### Additional payment details -// Use this optional field to set additional -// payment information such as tax, shipping -// charges etc. -$details = new Details(); -$details->setShipping(1.2) - ->setTax(1.3) - ->setSubtotal(17.50); - -// ### Amount -// Lets you specify a payment amount. -// You can also specify additional details -// such as shipping, tax. -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20) - ->setDetails($details); - -// ### Transaction -// A transaction defines the contract of a -// payment - what is the payment for and who -// is fulfilling it. -$transaction = new Transaction(); -$transaction->setAmount($amount) - ->setItemList($itemList) - ->setDescription("Payment description") - ->setInvoiceNumber(uniqid()); - -// ### Redirect urls -// Set the urls that the buyer must be redirected to after -// payment approval/ cancellation. -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/OrderGet.php?success=true") - ->setCancelUrl("$baseUrl/OrderGet.php?success=false"); - -// ### Payment -// A Payment Resource; create one using -// the above types and intent set to 'order' -$payment = new Payment(); -$payment->setIntent("order") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; - -// ### Create Payment -// Create a payment by calling the 'create' method -// passing it a valid apiContext. -// (See bootstrap.php for more on `ApiContext`) -// The return object contains the state and the -// url to which the buyer must be redirected to -// for payment approval -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", null, $request, $ex); - exit(1); -} - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getApprovalLink() -// method -$approvalUrl = $payment->getApprovalLink(); - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Order Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $payment); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderDoVoid.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderDoVoid.php deleted file mode 100644 index 7c0e287..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderDoVoid.php +++ /dev/null @@ -1,40 +0,0 @@ -/do-void - -/** @var \PayPal\Api\Payment $payment */ -$payment = require __DIR__ . '/ExecutePayment.php'; - -// ### Approval Status -// Determine if the user approved the payment or not -if (isset($_GET['success']) && $_GET['success'] == 'true') { - - // ### Retrieve the order - // OrderId could be retrieved by parsing the object inside related_resources. - $transactions = $payment->getTransactions(); - $transaction = $transactions[0]; - $relatedResources = $transaction->getRelatedResources(); - $relatedResource = $relatedResources[0]; - $order = $relatedResource->getOrder(); - - try { - // ### Void Order - // Call void method on order object. You will get an Order Object back - $result = $order->void($apiContext); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Voided Order", "Order", $result->getId(), null, $result); - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Voided Order", "Order", null, null, $ex); - exit(1); - } - - return $result; - -} else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("User Cancelled the Approval", null); - exit; -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderGet.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderGet.php deleted file mode 100644 index 05da1e2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/OrderGet.php +++ /dev/null @@ -1,35 +0,0 @@ - - -/** @var \PayPal\Api\Payment $payment */ -$payment = require __DIR__ . '/ExecutePayment.php'; - -// ### Approval Status -// Determine if the user approved the payment or not -if (isset($_GET['success']) && $_GET['success'] == 'true') { - - $transactions = $payment->getTransactions(); - $transaction = $transactions[0]; - $relatedResources = $transaction->getRelatedResources(); - $relatedResource = $relatedResources[0]; - $order = $relatedResource->getOrder(); - - try { - $result = \PayPal\Api\Order::get($order->getId(), $apiContext); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Order", "Order", $result->getId(), null, $result); - } catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Order", "Order", null, null, $ex); - exit(1); - } - - return $result; - -} else { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("User Cancelled the Approval", null); - exit; -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/Reauthorization.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/Reauthorization.php deleted file mode 100644 index dbebdfa..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/Reauthorization.php +++ /dev/null @@ -1,36 +0,0 @@ -setCurrency("USD"); - $amount->setTotal(1); - - // ### Reauthorize with amount being reauthorized - $authorization->setAmount($amount); - - $reAuthorization = $authorization->reauthorize($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Reauthorize Payment", "Payment", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY -ResultPrinter::printResult("Reauthorize Payment", "Payment", $authorization->getId(), null, $reAuthorization); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/RefundCapture.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/RefundCapture.php deleted file mode 100644 index 1ebbdaf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/RefundCapture.php +++ /dev/null @@ -1,32 +0,0 @@ -}/refund -/** @var Capture $capture */ -$capture = require 'AuthorizationCapture.php'; - -use PayPal\Api\Capture; -use PayPal\Api\Refund; - -// ### Refund -// Create a refund object indicating -// refund amount and call the refund method - -$refund = new Refund(); -$refund->setAmount($amt); - -try { - // Create a new apiContext object so we send a new - // PayPal-Request-Id (idempotency) header for this resource - $apiContext = getApiContext($clientId, $clientSecret); - - $captureRefund = $capture->refund($refund, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Refund Capture", "Capture", null, $refund, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Refund Capture", "Capture", $captureRefund->getId(), $refund, $captureRefund); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/UpdatePayment.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/UpdatePayment.php deleted file mode 100644 index 1f4170b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/UpdatePayment.php +++ /dev/null @@ -1,116 +0,0 @@ - - -/** @var Payment $createdPayment */ -$createdPayment = require 'CreatePaymentUsingPayPal.php'; -use PayPal\Api\Payment; - -$paymentId = $createdPayment->getId(); - -// #### Create a Patch Request -// This is how the data would look like: -// [ -// { -// "op": "replace", -// "path": "/transactions/0/amount", -// "value": { -// "total": "25.00", -// "currency": "USD", -// "details": { -// "subtotal": "17.50", -// "shipping": "6.20", -// "tax": "1.30" -// } -// } -// }, -// { -// "op": "add", -// "path": "/transactions/0/item_list/shipping_address", -// "value": { -// "recipient_name": "Gruneberg, Anna", -// "line1": "52 N Main St", -// "city": "San Jose", -// "postal_code": "95112", -// "country_code": "US", -// "state": "CA" -// } -// } -// ] -$patchReplace = new \PayPal\Api\Patch(); -$patchReplace->setOp('replace') - ->setPath('/transactions/0/amount') - ->setValue(json_decode('{ - "total": "25.00", - "currency": "USD", - "details": { - "subtotal": "17.50", - "shipping": "6.20", - "tax":"1.30" - } - }')); - -$patchAdd = new \PayPal\Api\Patch(); -$patchAdd->setOp('add') - ->setPath('/transactions/0/item_list/shipping_address') - ->setValue(json_decode('{ - "recipient_name": "Gruneberg, Anna", - "line1": "52 N Main St", - "city": "San Jose", - "state": "CA", - "postal_code": "95112", - "country_code": "US" - }')); - -$patchRequest = new \PayPal\Api\PatchRequest(); -$patchRequest->setPatches(array($patchReplace, $patchAdd)); - - -// ### Update payment -// Update payment object by calling the -// static `update` method -// on the Payment class by passing a valid -// Payment ID -// (See bootstrap.php for more on `ApiContext`) -try { - $result = $createdPayment->update($patchRequest, $apiContext); - -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Update Payment", "PatchRequest", null, $patchRequest, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Update Payment", "PatchRequest", $payment->getId(), $patchRequest, null); - -// ### Getting Updated Payment Object -if ($result == true) { - $result = Payment::get($createdPayment->getId(), $apiContext); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Payment", "Payment", $result->getId(), null, $result); - - -// ### Get redirect url -// The API response provides the url that you must redirect -// the buyer to. Retrieve the url from the $payment->getLinks() -// method -foreach ($result->getLinks() as $link) { - if ($link->getRel() == 'approval_url') { - $approvalUrl = $link->getHref(); - break; - } -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $result); -} - -return $result; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/VoidAuthorization.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/VoidAuthorization.php deleted file mode 100644 index 2eb5996..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payments/VoidAuthorization.php +++ /dev/null @@ -1,34 +0,0 @@ -/void" - -/** @var Authorization $authorization */ -$authorization = require 'AuthorizePayment.php'; -// Replace $authorizationid with any static Id you might already have. It will do a void on it -$authorizationId = '1BF65516U6866543H'; // $authorization->getId(); -use PayPal\Api\Authorization; - - -// ### VoidAuthorization -// You can void a previously authorized payment -// by invoking the $authorization->void method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -try { - - // Lookup the authorization - $authorization = Authorization::get($authorizationId, $apiContext); - - // Void the authorization - $voidedAuth = $authorization->void($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Void Authorization", "Authorization", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Void Authorization", "Authorization", $voidedAuth->getId(), null, $voidedAuth); - -return $voidedAuth; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CancelPayoutItem.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CancelPayoutItem.php deleted file mode 100644 index 0e8aac6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CancelPayoutItem.php +++ /dev/null @@ -1,37 +0,0 @@ -/cancel - -/** @var \PayPal\Api\PayoutBatch $payoutBatch */ -$payoutBatch = require 'CreateSinglePayout.php'; -// ## Payout Item ID -// You can replace this with your Payout Batch Id on already created Payout. -$payoutItems = $payoutBatch->getItems(); -$payoutItem = $payoutItems[0]; -$payoutItemId = $payoutItem->getPayoutItemId(); - -$output = null; -// ### Cancel Payout Item -// Check if Payout Item is UNCLAIMED, and if so, cancel it. -try { - if ($payoutItem->getTransactionStatus() == 'UNCLAIMED') { - // Cancel the Payout Item - $output = \PayPal\Api\PayoutItem::cancel($payoutItemId, $apiContext); - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Cancel Unclaimed Payout Item", "PayoutItem", $output->getPayoutItemId(), null, $output); - } else { - // The item transaction status is not unclaimed. You can only cancel an unclaimed transaction. - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Cancel Unclaimed Payout Item", "PayoutItem", null, $payoutItemId, new Exception("Payout Item Status is not UNCLAIMED")); - } -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Cancel Unclaimed Payout Item", "PayoutItem", null, $payoutItemId, $ex); - exit(1); -} - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CreateBatchPayout.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CreateBatchPayout.php deleted file mode 100644 index 5003c93..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CreateBatchPayout.php +++ /dev/null @@ -1,126 +0,0 @@ -setSenderBatchId(uniqid()) - ->setEmailSubject("You have a payment"); - -// #### Sender Item -// Please note that if you are using single payout with sync mode, you can only pass one Item in the request -$senderItem1 = new \PayPal\Api\PayoutItem(); -$senderItem1->setRecipientType('Email') - ->setNote('Thanks you.') - ->setReceiver('shirt-supplier-one@gmail.com') - ->setSenderItemId("item_1" . uniqid()) - ->setAmount(new \PayPal\Api\Currency('{ - "value":"0.99", - "currency":"USD" - }')); - -// #### Sender Item 2 -// There are many different ways of assigning values in PayPal SDK. Here is another way where you could directly inject json string. -$senderItem2 = new \PayPal\Api\PayoutItem( - '{ - "recipient_type": "EMAIL", - "amount": { - "value": 0.90, - "currency": "USD" - }, - "receiver": "shirt-supplier-two@mail.com", - "note": "Thank you.", - "sender_item_id": "item_2" - }' -); - -// #### Sender Item 3 -// One more way of assigning values in constructor when creating instance of PayPalModel object. Injecting array. -$senderItem3 = new \PayPal\Api\PayoutItem( - array( - "recipient_type" => "EMAIL", - "receiver" => "shirt-supplier-three@mail.com", - "note" => "Thank you.", - "sender_item_id" => uniqid(), - "amount" => array( - "value" => "0.90", - "currency" => "USD" - ) - - ) -); - -$payouts->setSenderBatchHeader($senderBatchHeader) - ->addItem($senderItem1)->addItem($senderItem2)->addItem($senderItem3); - - -// For Sample Purposes Only. -$request = clone $payouts; - -// ### Create Payout -try { - $output = $payouts->create(null, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Batch Payout", "Payout", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Batch Payout", "Payout", $output->getBatchHeader()->getPayoutBatchId(), $request, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CreateSinglePayout.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CreateSinglePayout.php deleted file mode 100644 index dd487d9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/CreateSinglePayout.php +++ /dev/null @@ -1,75 +0,0 @@ -setSenderBatchId(uniqid()) - ->setEmailSubject("You have a Payout!"); - -// #### Sender Item -// Please note that if you are using single payout with sync mode, you can only pass one Item in the request -$senderItem = new \PayPal\Api\PayoutItem(); -$senderItem->setRecipientType('Email') - ->setNote('Thanks for your patronage!') - ->setReceiver('shirt-supplier-one@gmail.com') - ->setSenderItemId("2014031400023") - ->setAmount(new \PayPal\Api\Currency('{ - "value":"1.0", - "currency":"USD" - }')); - -$payouts->setSenderBatchHeader($senderBatchHeader) - ->addItem($senderItem); - - -// For Sample Purposes Only. -$request = clone $payouts; - -// ### Create Payout -try { - $output = $payouts->createSynchronous($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Created Single Synchronous Payout", "Payout", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Created Single Synchronous Payout", "Payout", $output->getBatchHeader()->getPayoutBatchId(), $request, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/GetPayoutBatchStatus.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/GetPayoutBatchStatus.php deleted file mode 100644 index 6423abd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/GetPayoutBatchStatus.php +++ /dev/null @@ -1,27 +0,0 @@ - - -/** @var \PayPal\Api\PayoutBatch $payoutBatch */ -$payoutBatch = require 'CreateBatchPayout.php'; -// ## Payout Batch ID -// You can replace this with your Payout Batch Id on already created Payout. -$payoutBatchId = $payoutBatch->getBatchHeader()->getPayoutBatchId(); - -// ### Get Payout Batch Status -try { - $output = \PayPal\Api\Payout::get($payoutBatchId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Payout Batch Status", "PayoutBatch", null, $payoutBatchId, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Payout Batch Status", "PayoutBatch", $output->getBatchHeader()->getPayoutBatchId(), null, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/GetPayoutItemStatus.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/GetPayoutItemStatus.php deleted file mode 100644 index 6bc577f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/payouts/GetPayoutItemStatus.php +++ /dev/null @@ -1,29 +0,0 @@ - - -/** @var \PayPal\Api\PayoutBatch $payoutBatch */ -$payoutBatch = require 'GetPayoutBatchStatus.php'; -// ## Payout Item ID -// You can replace this with your Payout Batch Id on already created Payout. -$payoutItems = $payoutBatch->getItems(); -$payoutItem = $payoutItems[0]; -$payoutItemId = $payoutItem->getPayoutItemId(); - -// ### Get Payout Item Status -try { - $output = \PayPal\Api\PayoutItem::get($payoutItemId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Payout Item Status", "PayoutItem", null, $payoutItemId, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Payout Item Status", "PayoutItem", $output->getPayoutItemId(), null, $output); - -return $output; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/sale/GetSale.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/sale/GetSale.php deleted file mode 100644 index 8b91501..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/sale/GetSale.php +++ /dev/null @@ -1,35 +0,0 @@ -getTransactions(); -$relatedResources = $transactions[0]->getRelatedResources(); -$sale = $relatedResources[0]->getSale(); -$saleId = $sale->getId(); - -try { - // ### Retrieve the sale object - // Pass the ID of the sale - // transaction from your payment resource. - $sale = Sale::get($saleId, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Look Up A Sale", "Sale", $sale->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Look Up A Sale", "Sale", $sale->getId(), null, $sale); - -return $sale; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/sale/RefundSale.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/sale/RefundSale.php deleted file mode 100644 index ef51d1e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/sale/RefundSale.php +++ /dev/null @@ -1,52 +0,0 @@ -getId(); - -use PayPal\Api\Amount; -use PayPal\Api\Refund; -use PayPal\Api\Sale; - -// ### Refund amount -// Includes both the refunded amount (to Payer) -// and refunded fee (to Payee). Use the $amt->details -// field to mention fees refund details. -$amt = new Amount(); -$amt->setCurrency('USD') - ->setTotal(0.01); - -// ### Refund object -$refund = new Refund(); -$refund->setAmount($amt); - -// ###Sale -// A sale transaction. -// Create a Sale object with the -// given sale transaction id. -$sale = new Sale(); -$sale->setId($saleId); -try { - // Create a new apiContext object so we send a new - // PayPal-Request-Id (idempotency) header for this resource - $apiContext = getApiContext($clientId, $clientSecret); - - // Refund the sale - // (See bootstrap.php for more on `ApiContext`) - $refundedSale = $sale->refund($refund, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Refund Sale", "Sale", $refundedSale->getId(), $refund, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Refund Sale", "Sale", $refundedSale->getId(), $refund, $refundedSale); - -return $refundedSale; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/sdk_config.ini b/_sakura/vendor/paypal/rest-api-sdk-php/sample/sdk_config.ini deleted file mode 100644 index bec2fc3..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/sdk_config.ini +++ /dev/null @@ -1,62 +0,0 @@ -;## This is an example configuration file for the SDK. -;## The sample scripts configure the SDK dynamically -;## but you can choose to go for file based configuration -;## in simpler apps (See bootstrap.php for more). -[Account] -acct1.ClientId = AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS -acct1.ClientSecret = EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL - -;Connection Information -[Http] -; Add Curl Constants to be configured -; The settings provided in configurations would override defaults -; if provided in configurations -http.CURLOPT_CONNECTTIMEOUT = 30 - -; Adding HTTP Headers to each request sent to PayPal APIs -;http.headers.PayPal-Partner-Attribution-Id = 123123123 - -;http.Proxy=http://[username:password]@hostname[:port] - -;Service Configuration -[Service] -; can be set to sandbox / live -mode = sandbox - -;Logging Information -[Log] -log.LogEnabled=true - -; When using a relative path, the log file is created -; relative to the .php file that is the entry point -; for this request. You can also provide an absolute -; path here -log.FileName=../PayPal.log - -; Logging level can be one of -; Sandbox Environments: DEBUG, INFO, WARN, ERROR -; Live Environments: INFO, WARN, ERROR -; Logging is most verbose in the 'DEBUG' level and -; decreases as you proceed towards ERROR -; DEBUG level is disabled for live, to not log sensitive information. -; If the level is set to DEBUG, it will be reduced to FINE automatically, -; with a warning message -log.LogLevel=INFO - -;Caching Configuration -[cache] -; If Cache is enabled, it stores the access token retrieved from ClientId and Secret from the -; server into a file provided by the cache.FileName option or by using -; the constant $CACHE_PATH value in PayPal/Cache/AuthorizationCache if the option is omitted/empty. -; If the value is set to 'true', it would try to create a file and store the information. -; For any other value, it would disable it -; Please note, this is a very good performance improvement, and we would encourage you to -; set this up properly to reduce the number of calls, to almost 50% on normal use cases -; PLEASE NOTE: You may need to provide proper write permissions to /var directory under PayPal-PHP-SDK on -; your hosting server or whichever custom directory you choose -cache.enabled=true -; When using a relative path, the cache file is created -; relative to the .php file that is the entry point -; for this request. You can also provide an absolute -; path here -cache.FileName=../auth.cache diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/tls/TlsCheck.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/tls/TlsCheck.php deleted file mode 100644 index 74b80f8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/tls/TlsCheck.php +++ /dev/null @@ -1,65 +0,0 @@ -setConfig(array('service.EndPoint'=>"https://test-api.sandbox.paypal.com")); -// 3. Thats it. Run your code, and see if it works as normal. -// 4. You can check sdk logs to verify it is infact pointing to the above URL instead of default sandbox one. - -// ### Create a Payment for testing -// We will create a conventional paypal payment to verify its creation -$payer = new Payer(); -$payer->setPaymentMethod("paypal"); -$amount = new Amount(); -$amount->setCurrency("USD") - ->setTotal(20); -$transaction = new Transaction(); -$transaction->setAmount($amount); -$baseUrl = getBaseUrl(); -$redirectUrls = new RedirectUrls(); -$redirectUrls->setReturnUrl("$baseUrl/ExecutePayment.php?success=true") - ->setCancelUrl("$baseUrl/ExecutePayment.php?success=false"); -$payment = new Payment(); -$payment->setIntent("sale") - ->setPayer($payer) - ->setRedirectUrls($redirectUrls) - ->setTransactions(array($transaction)); - - -// For Sample Purposes Only. -$request = clone $payment; -$curl_info = curl_version(); -try { - $payment->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("FAILURE: SECURITY WARNING: TLSv1.2 is not supported on this system. Please upgrade your curl to atleast 7.34.0.
- Current Curl Version: " . $curl_info['version'] . "
- Current OpenSSL Version:" . $curl_info['ssl_version'], "Payment", null, $request, $ex); - exit(1); -} - - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY -ResultPrinter::printResult("SUCCESS: Your server supports TLS protocols required for secure connection to PayPal Servers.
- Current Curl Version: " . $curl_info['version'] . "
- Current OpenSSL Version:" . $curl_info['ssl_version'], null, null, null, "SUCCESS. Your system supports TLSv1.2"); - -return $payment; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/CreateBankAccount.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/CreateBankAccount.php deleted file mode 100644 index aeda49b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/CreateBankAccount.php +++ /dev/null @@ -1,83 +0,0 @@ -setAccountNumber("4417119669820331") - ->setAccountNumberType("IBAN") - ->setAccountType("SAVINGS") - ->setAccountName("Ramraj") - ->setCheckType("PERSONAL") - ->setAuthType("WEB") - ->setBankName("CITI") - ->setCountryCode("US") - ->setFirstName("Ramraj") - ->setLastName("K") - ->setBirthDate("1987-08-13") - ->setExternalCustomerId(uniqid()); - -$billingAddress = new \PayPal\Api\Address(); -$billingAddress->setLine1("52 N Main St") - ->setCity("Johnstown") - ->setState("OH") - ->setCountryCode("US") - ->setPostalCode("43210") - ->setPhone("408-334-8890"); - -$bankAccount->setBillingAddress($billingAddress); - -// For Sample Purposes Only. -$request = clone $bankAccount; - -// ### Save bank account -// Creates the bank account as a resource -// in the PayPal vault. The response contains -// an 'id' that you can use to refer to it -// in future payments. -// (See bootstrap.php for more on `ApiContext`) -try { - $bankAccount->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Create Bank Account", "Bank Account", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Create Bank Account", "Bank Account", $bankAccount->getId(), $request, $bankAccount); - -return $bankAccount; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/CreateCreditCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/CreateCreditCard.php deleted file mode 100644 index e025b9a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/CreateCreditCard.php +++ /dev/null @@ -1,56 +0,0 @@ -setType("visa") - ->setNumber("4917912523797702") - ->setExpireMonth("11") - ->setExpireYear("2019") - ->setCvv2("012") - ->setFirstName("Joe") - ->setLastName("Shopper"); - -// ### Additional Information -// Now you can also store the information that could help you connect -// your users with the stored credit cards. -// All these three fields could be used for storing any information that could help merchant to point the card. -// However, Ideally, MerchantId could be used to categorize stores, apps, websites, etc. -// ExternalCardId could be used for uniquely identifying the card per MerchantId. So, combination of "MerchantId" and "ExternalCardId" should be unique. -// ExternalCustomerId could be userId, user email, etc to group multiple cards per user. -$card->setMerchantId("MyStore1"); -$card->setExternalCardId("CardNumber123" . uniqid()); -$card->setExternalCustomerId("123123-myUser1@something.com"); - -// For Sample Purposes Only. -$request = clone $card; - -// ### Save card -// Creates the credit card as a resource -// in the PayPal vault. The response contains -// an 'id' that you can use to refer to it -// in future payments. -// (See bootstrap.php for more on `ApiContext`) -try { - $card->create($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Create Credit Card", "Credit Card", null, $request, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Create Credit Card", "Credit Card", $card->getId(), $request, $card); - -return $card; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/DeleteBankAccount.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/DeleteBankAccount.php deleted file mode 100644 index 48b3835..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/DeleteBankAccount.php +++ /dev/null @@ -1,23 +0,0 @@ -} -// NOTE: HTTP method used here is DELETE - -/** @var \PayPal\Api\BankAccount $card */ -$bankAccount = require 'CreateBankAccount.php'; - -try { - // ### Delete Card - // Lookup and delete a saved credit card. - // (See bootstrap.php for more on `ApiContext`) - $bankAccount->delete($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Delete Bank Account", "Bank Account", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Delete Bank Account", "Bank Account", $bankAccount->getId(), null, null); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/DeleteCreditCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/DeleteCreditCard.php deleted file mode 100644 index 3676f58..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/DeleteCreditCard.php +++ /dev/null @@ -1,24 +0,0 @@ -} -// NOTE: HTTP method used here is DELETE - -/** @var CreditCard $card */ -$card = require 'CreateCreditCard.php'; -use PayPal\Api\CreditCard; - -try { - // ### Delete Card - // Lookup and delete a saved credit card. - // (See bootstrap.php for more on `ApiContext`) - $card->delete($apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Delete Credit Card", "Credit Card", null, null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Delete Credit Card", "Credit Card", $card->getId(), null, null); diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/GetBankAccount.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/GetBankAccount.php deleted file mode 100644 index 721f287..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/GetBankAccount.php +++ /dev/null @@ -1,27 +0,0 @@ -getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Bank Account", "Bank Account", $bankAccount->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Bank Account", "Bank Account", $bankAccount->getId(), null, $bankAccount); - -return $bankAccount; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/GetCreditCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/GetCreditCard.php deleted file mode 100644 index e106d97..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/GetCreditCard.php +++ /dev/null @@ -1,28 +0,0 @@ -getId(); - -use PayPal\Api\CreditCard; - -/// ### Retrieve card -// (See bootstrap.php for more on `ApiContext`) -try { - $card = CreditCard::get($card->getId(), $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Get Credit Card", "Credit Card", $card->getId(), null, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Get Credit Card", "Credit Card", $card->getId(), null, $card); - -return $card; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/ListCreditCards.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/ListCreditCards.php deleted file mode 100644 index 8cd5d81..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/ListCreditCards.php +++ /dev/null @@ -1,36 +0,0 @@ - "create_time", - "sort_order" => "desc", - "merchant_id" => "MyStore1" // Filtering by MerchantId set during CreateCreditCard. - ); - $cards = CreditCard::all($params, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("List All Credit Cards", "CreditCardList", null, $params, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("List All Credit Cards", "CreditCardList", null, $params, $cards); - -return $card; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/UpdateCreditCard.php b/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/UpdateCreditCard.php deleted file mode 100644 index 9e65944..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/sample/vault/UpdateCreditCard.php +++ /dev/null @@ -1,53 +0,0 @@ - -// The following code takes you through -// the process of updating a saved CreditCard - -/** @var CreditCard $card */ -$card = require 'CreateCreditCard.php'; -$id = $card->getId(); - -use PayPal\Api\CreditCard; -use PayPal\Api\Patch; - -// ### Patch Object -// You could update a credit card by sending patch requests. Each path object would have a specific detail in the object to be updated. -$pathOperation = new Patch(); -$pathOperation->setOp("replace") - ->setPath('/expire_month') - ->setValue("12"); - -// ### Another Patch Object -// You could set more than one patch while updating a credit card. -$pathOperation2 = new Patch(); -$pathOperation2->setOp('add') - ->setPath('/billing_address') - ->setValue(json_decode('{ - "line1": "111 First Street", - "city": "Saratoga", - "country_code": "US", - "state": "CA", - "postal_code": "95070" - }')); - -$pathRequest = new \PayPal\Api\PatchRequest(); -$pathRequest->addPatch($pathOperation) - ->addPatch($pathOperation2); -/// ### Update Credit Card -// (See bootstrap.php for more on `ApiContext`) -try { - $card = $card->update($pathRequest, $apiContext); -} catch (Exception $ex) { - // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError("Updated Credit Card", "Credit Card", $card->getId(), $pathRequest, $ex); - exit(1); -} - -// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult("Updated Credit Card", "Credit Card", $card->getId(), $pathRequest, $card); - -return $card; diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php deleted file mode 100644 index b3ebcf9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php +++ /dev/null @@ -1,75 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getLine1()); - $this->assertNotNull($obj->getLine2()); - $this->assertNotNull($obj->getCity()); - $this->assertNotNull($obj->getCountryCode()); - $this->assertNotNull($obj->getPostalCode()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getPhone()); - $this->assertNotNull($obj->getNormalizationStatus()); - $this->assertNotNull($obj->getStatus()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Address $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getLine1(), "TestSample"); - $this->assertEquals($obj->getLine2(), "TestSample"); - $this->assertEquals($obj->getCity(), "TestSample"); - $this->assertEquals($obj->getCountryCode(), "TestSample"); - $this->assertEquals($obj->getPostalCode(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getPhone(), "TestSample"); - $this->assertEquals($obj->getNormalizationStatus(), "TestSample"); - $this->assertEquals($obj->getStatus(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php deleted file mode 100644 index 3099606..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getNote()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param AgreementStateDescriptor $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getNote(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTest.php deleted file mode 100644 index 2da2e72..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTest.php +++ /dev/null @@ -1,287 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getStartDate()); - $this->assertNotNull($obj->getPayer()); - $this->assertNotNull($obj->getShippingAddress()); - $this->assertNotNull($obj->getOverrideMerchantPreferences()); - $this->assertNotNull($obj->getOverrideChargeModels()); - $this->assertNotNull($obj->getPlan()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Agreement $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getStartDate(), "TestSample"); - $this->assertEquals($obj->getPayer(), PayerTest::getObject()); - $this->assertEquals($obj->getShippingAddress(), AddressTest::getObject()); - $this->assertEquals($obj->getOverrideMerchantPreferences(), MerchantPreferencesTest::getObject()); - $this->assertEquals($obj->getOverrideChargeModels(), OverrideChargeModelTest::getObject()); - $this->assertEquals($obj->getPlan(), PlanTest::getObject()); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->create($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testExecute($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->execute("123123", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - AgreementTest::getJson() - )); - - $result = $obj->get("agreementId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testUpdate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - $patchRequest = PatchRequestTest::getObject(); - - $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testSuspend($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $agreementStateDescriptor = AgreementStateDescriptorTest::getObject(); - - $result = $obj->suspend($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testReActivate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $agreementStateDescriptor = AgreementStateDescriptorTest::getObject(); - - $result = $obj->reActivate($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testCancel($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $agreementStateDescriptor = AgreementStateDescriptorTest::getObject(); - - $result = $obj->cancel($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testBillBalance($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $agreementStateDescriptor = AgreementStateDescriptorTest::getObject(); - - $result = $obj->billBalance($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testSetBalance($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $currency = CurrencyTest::getObject(); - - $result = $obj->setBalance($currency, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Agreement $obj - */ - public function testTransactions($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - AgreementTransactionsTest::getJson() - )); - - $result = $obj->searchTransactions("agreementId", array(), $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTransactionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTransactionTest.php deleted file mode 100644 index 47f02ca..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTransactionTest.php +++ /dev/null @@ -1,73 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getTransactionId()); - $this->assertNotNull($obj->getStatus()); - $this->assertNotNull($obj->getTransactionType()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getFeeAmount()); - $this->assertNotNull($obj->getNetAmount()); - $this->assertNotNull($obj->getPayerEmail()); - $this->assertNotNull($obj->getPayerName()); - $this->assertNotNull($obj->getTimeStamp()); - $this->assertNotNull($obj->getTimeZone()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param AgreementTransaction $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getTransactionId(), "TestSample"); - $this->assertEquals($obj->getStatus(), "TestSample"); - $this->assertEquals($obj->getTransactionType(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getFeeAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getNetAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getPayerEmail(), "TestSample"); - $this->assertEquals($obj->getPayerName(), "TestSample"); - $this->assertEquals($obj->getTimeStamp(), "TestSample"); - $this->assertEquals($obj->getTimeZone(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTransactionsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTransactionsTest.php deleted file mode 100644 index 5d513d2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AgreementTransactionsTest.php +++ /dev/null @@ -1,55 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getAgreementTransactionList()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param AgreementTransactions $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getAgreementTransactionList(), AgreementTransactionTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AlternatePaymentTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AlternatePaymentTest.php deleted file mode 100644 index 3074ee7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AlternatePaymentTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getAlternatePaymentAccountId()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getAlternatePaymentProviderId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param AlternatePayment $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getAlternatePaymentAccountId(), "TestSample"); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getAlternatePaymentProviderId(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php deleted file mode 100644 index ecd4061..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCurrency()); - $this->assertNotNull($obj->getTotal()); - $this->assertNotNull($obj->getDetails()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Amount $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCurrency(), "TestSample"); - $this->assertEquals($obj->getTotal(), "12.34"); - $this->assertEquals($obj->getDetails(), DetailsTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php deleted file mode 100644 index 91fa813..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php +++ /dev/null @@ -1,177 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getPaymentMode()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getReasonCode()); - $this->assertNotNull($obj->getPendingReason()); - $this->assertNotNull($obj->getProtectionEligibility()); - $this->assertNotNull($obj->getProtectionEligibilityType()); - $this->assertNotNull($obj->getFmfDetails()); - $this->assertNotNull($obj->getParentPayment()); - $this->assertNotNull($obj->getValidUntil()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Authorization $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - $this->assertEquals($obj->getPaymentMode(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getReasonCode(), "TestSample"); - $this->assertEquals($obj->getPendingReason(), "TestSample"); - $this->assertEquals($obj->getProtectionEligibility(), "TestSample"); - $this->assertEquals($obj->getProtectionEligibilityType(), "TestSample"); - $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject()); - $this->assertEquals($obj->getParentPayment(), "TestSample"); - $this->assertEquals($obj->getValidUntil(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Authorization $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - AuthorizationTest::getJson() - )); - - $result = $obj->get("authorizationId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Authorization $obj - */ - public function testCapture($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - CaptureTest::getJson() - )); - $capture = CaptureTest::getObject(); - - $result = $obj->capture($capture, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Authorization $obj - */ - public function testVoid($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->void($mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Authorization $obj - */ - public function testReauthorize($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->reauthorize($mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankAccountTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankAccountTest.php deleted file mode 100644 index d97cc5f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankAccountTest.php +++ /dev/null @@ -1,105 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getAccountNumber()); - $this->assertNotNull($obj->getAccountNumberType()); - $this->assertNotNull($obj->getRoutingNumber()); - $this->assertNotNull($obj->getAccountType()); - $this->assertNotNull($obj->getAccountName()); - $this->assertNotNull($obj->getCheckType()); - $this->assertNotNull($obj->getAuthType()); - $this->assertNotNull($obj->getAuthCaptureTimestamp()); - $this->assertNotNull($obj->getBankName()); - $this->assertNotNull($obj->getCountryCode()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getBirthDate()); - $this->assertNotNull($obj->getBillingAddress()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getConfirmationStatus()); - $this->assertNotNull($obj->getPayerId()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getMerchantId()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getValidUntil()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param BankAccount $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getAccountNumber(), "TestSample"); - $this->assertEquals($obj->getAccountNumberType(), "TestSample"); - $this->assertEquals($obj->getRoutingNumber(), "TestSample"); - $this->assertEquals($obj->getAccountType(), "TestSample"); - $this->assertEquals($obj->getAccountName(), "TestSample"); - $this->assertEquals($obj->getCheckType(), "TestSample"); - $this->assertEquals($obj->getAuthType(), "TestSample"); - $this->assertEquals($obj->getAuthCaptureTimestamp(), "TestSample"); - $this->assertEquals($obj->getBankName(), "TestSample"); - $this->assertEquals($obj->getCountryCode(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getBirthDate(), "TestSample"); - $this->assertEquals($obj->getBillingAddress(), AddressTest::getObject()); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getConfirmationStatus(), "TestSample"); - $this->assertEquals($obj->getPayerId(), "TestSample"); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getMerchantId(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getValidUntil(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankAccountsListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankAccountsListTest.php deleted file mode 100644 index d834f3f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankAccountsListTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getBankAccounts()); - $this->assertNotNull($obj->getCount()); - $this->assertNotNull($obj->getNextId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param BankAccountsList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getBankAccounts(), BankAccountTest::getObject()); - $this->assertEquals($obj->getCount(), 123); - $this->assertEquals($obj->getNextId(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankTokenTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankTokenTest.php deleted file mode 100644 index 659ff15..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BankTokenTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getBankId()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getMandateReferenceNumber()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param BankToken $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getBankId(), "TestSample"); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getMandateReferenceNumber(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BillingInfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BillingInfoTest.php deleted file mode 100644 index 540b937..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BillingInfoTest.php +++ /dev/null @@ -1,71 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEmail()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getBusinessName()); - $this->assertNotNull($obj->getAddress()); - $this->assertNotNull($obj->getLanguage()); - $this->assertNotNull($obj->getAdditionalInfo()); - $this->assertNotNull($obj->getNotificationChannel()); - $this->assertNotNull($obj->getPhone()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param BillingInfo $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEmail(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getBusinessName(), "TestSample"); - $this->assertEquals($obj->getAddress(), InvoiceAddressTest::getObject()); - $this->assertEquals($obj->getLanguage(), "TestSample"); - $this->assertEquals($obj->getAdditionalInfo(), "TestSample"); - $this->assertEquals($obj->getNotificationChannel(), "TestSample"); - $this->assertEquals($obj->getPhone(), PhoneTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BillingTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BillingTest.php deleted file mode 100644 index 30bb830..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/BillingTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getBillingAgreementId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Billing $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getBillingAgreementId(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CancelNotificationTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CancelNotificationTest.php deleted file mode 100644 index 6454cc2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CancelNotificationTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSubject()); - $this->assertNotNull($obj->getNote()); - $this->assertNotNull($obj->getSendToMerchant()); - $this->assertNotNull($obj->getSendToPayer()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CancelNotification $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSubject(), "TestSample"); - $this->assertEquals($obj->getNote(), "TestSample"); - $this->assertEquals($obj->getSendToMerchant(), true); - $this->assertEquals($obj->getSendToPayer(), true); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php deleted file mode 100644 index 0313a2d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php +++ /dev/null @@ -1,127 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getIsFinalCapture()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getParentPayment()); - $this->assertNotNull($obj->getTransactionFee()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Capture $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - $this->assertEquals($obj->getIsFinalCapture(), true); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getParentPayment(), "TestSample"); - $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject()); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Capture $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - CaptureTest::getJson() - )); - - $result = $obj->get("captureId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Capture $obj - */ - public function testRefund($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - RefundTest::getJson() - )); - $refund = RefundTest::getObject(); - - $result = $obj->refund($refund, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CarrierAccountTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CarrierAccountTest.php deleted file mode 100644 index bbaa6cd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CarrierAccountTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getPhoneNumber()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getPhoneSource()); - $this->assertNotNull($obj->getCountryCode()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CarrierAccount $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getPhoneNumber(), "TestSample"); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getPhoneSource(), "TestSample"); - $this->assertEquals($obj->getCountryCode(), CountryCodeTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CarrierAccountTokenTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CarrierAccountTokenTest.php deleted file mode 100644 index dfb909a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CarrierAccountTokenTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCarrierAccountId()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CarrierAccountToken $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCarrierAccountId(), "TestSample"); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CartBaseTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CartBaseTest.php deleted file mode 100644 index 73ec0b3..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CartBaseTest.php +++ /dev/null @@ -1,104 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getReferenceId()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getPayee()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getNoteToPayee()); - $this->assertNotNull($obj->getCustom()); - $this->assertNotNull($obj->getInvoiceNumber()); - $this->assertNotNull($obj->getSoftDescriptor()); - $this->assertNotNull($obj->getSoftDescriptorCity()); - $this->assertNotNull($obj->getPaymentOptions()); - $this->assertNotNull($obj->getItemList()); - $this->assertNotNull($obj->getNotifyUrl()); - $this->assertNotNull($obj->getOrderUrl()); - $this->assertNotNull($obj->getExternalFunding()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CartBase $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getReferenceId(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - $this->assertEquals($obj->getPayee(), PayeeTest::getObject()); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getNoteToPayee(), "TestSample"); - $this->assertEquals($obj->getCustom(), "TestSample"); - $this->assertEquals($obj->getInvoiceNumber(), "TestSample"); - $this->assertEquals($obj->getSoftDescriptor(), "TestSample"); - $this->assertEquals($obj->getSoftDescriptorCity(), "TestSample"); - $this->assertEquals($obj->getPaymentOptions(), PaymentOptionsTest::getObject()); - $this->assertEquals($obj->getItemList(), ItemListTest::getObject()); - $this->assertEquals($obj->getNotifyUrl(), "http://www.google.com"); - $this->assertEquals($obj->getOrderUrl(), "http://www.google.com"); - $this->assertEquals($obj->getExternalFunding(), ExternalFundingTest::getObject()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage NotifyUrl is not a fully qualified URL - */ - public function testUrlValidationForNotifyUrl() - { - $obj = new CartBase(); - $obj->setNotifyUrl(null); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage OrderUrl is not a fully qualified URL - */ - public function testUrlValidationForOrderUrl() - { - $obj = new CartBase(); - $obj->setOrderUrl(null); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ChargeModelTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ChargeModelTest.php deleted file mode 100644 index 46f4d2a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ChargeModelTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ChargeModel $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CostTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CostTest.php deleted file mode 100644 index 61e3861..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CostTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPercent()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Cost $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPercent(), "12.34"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CountryCodeTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CountryCodeTest.php deleted file mode 100644 index 73e5b8f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CountryCodeTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCountryCode()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CountryCode $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCountryCode(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreateProfileResponseTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreateProfileResponseTest.php deleted file mode 100644 index ec2da48..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreateProfileResponseTest.php +++ /dev/null @@ -1,55 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CreateProfileResponse $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php deleted file mode 100644 index 14dd6a9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php +++ /dev/null @@ -1,73 +0,0 @@ -setType(self::$cardType); - $card->setNumber(self::$cardNumber); - $card->setExpireMonth(self::$expireMonth); - $card->setExpireYear(self::$expireYear); - $card->setCvv2(self::$cvv); - $card->setFirstName(self::$firstName); - $card->setLastName(self::$lastName); - $card->setId(self::$id); - $card->setValidUntil(self::$validUntil); - $card->setState(self::$state); - return $card; - } - - public function setup() - { - - $card = self::createCreditCard(); - $card->setBillingAddress(AddressTest::getObject()); - $card->setLinks(array(LinksTest::getObject())); - $this->cards['full'] = $card; - - $card = self::createCreditCard(); - $this->cards['partial'] = $card; - } - - public function testGetterSetters() - { - $cardHistory = new CreditCardHistory(); - $cardHistory->setCreditCards(array($this->cards['partial'], $this->cards['full'])); - $cardHistory->setCount(2); - - $this->assertEquals(2, count($cardHistory->getCreditCards())); - } - - - public function testSerializationDeserialization() - { - $cardHistory = new CreditCardHistory(); - $cardHistory->setCreditCards(array($this->cards['partial'], $this->cards['full'])); - $cardHistory->setCount(2); - - $cardHistoryCopy = new CreditCardHistory(); - $cardHistoryCopy->fromJson($cardHistory->toJSON()); - - $this->assertEquals($cardHistory, $cardHistoryCopy); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardListTest.php deleted file mode 100644 index 3a266c9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardListTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getItems()); - $this->assertNotNull($obj->getLinks()); - $this->assertNotNull($obj->getTotalItems()); - $this->assertNotNull($obj->getTotalPages()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CreditCardList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getItems(), CreditCardTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - $this->assertEquals($obj->getTotalItems(), 123); - $this->assertEquals($obj->getTotalPages(), 123); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php deleted file mode 100644 index 0eb4f7c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php +++ /dev/null @@ -1,83 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getNumber()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getExpireMonth()); - $this->assertNotNull($obj->getExpireYear()); - $this->assertNotNull($obj->getCvv2()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getBillingAddress()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getValidUntil()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CreditCard $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getNumber(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getExpireMonth(), 123); - $this->assertEquals($obj->getExpireYear(), 123); - $this->assertEquals($obj->getCvv2(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getBillingAddress(), AddressTest::getObject()); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getValidUntil(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php deleted file mode 100644 index 21aa209..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php +++ /dev/null @@ -1,69 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCreditCardId()); - $this->assertNotNull($obj->getPayerId()); - $this->assertNotNull($obj->getLast4()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getExpireMonth()); - $this->assertNotNull($obj->getExpireYear()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CreditCardToken $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCreditCardId(), "TestSample"); - $this->assertEquals($obj->getPayerId(), "TestSample"); - $this->assertEquals($obj->getLast4(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getExpireMonth(), 123); - $this->assertEquals($obj->getExpireYear(), 123); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditFinancingOfferedTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditFinancingOfferedTest.php deleted file mode 100644 index 752a565..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditFinancingOfferedTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getTotalCost()); - $this->assertNotNull($obj->getTerm()); - $this->assertNotNull($obj->getMonthlyPayment()); - $this->assertNotNull($obj->getTotalInterest()); - $this->assertNotNull($obj->getPayerAcceptance()); - $this->assertNotNull($obj->getCartAmountImmutable()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CreditFinancingOffered $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getTotalCost(), CurrencyTest::getObject()); - $this->assertEquals($obj->getTerm(), "12.34"); - $this->assertEquals($obj->getMonthlyPayment(), CurrencyTest::getObject()); - $this->assertEquals($obj->getTotalInterest(), CurrencyTest::getObject()); - $this->assertEquals($obj->getPayerAcceptance(), true); - $this->assertEquals($obj->getCartAmountImmutable(), true); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditTest.php deleted file mode 100644 index 56cca3f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CreditTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getType()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Credit $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CurrencyConversionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CurrencyConversionTest.php deleted file mode 100644 index 9027f3b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CurrencyConversionTest.php +++ /dev/null @@ -1,91 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getConversionDate()); - $this->assertNotNull($obj->getFromCurrency()); - $this->assertNotNull($obj->getFromAmount()); - $this->assertNotNull($obj->getToCurrency()); - $this->assertNotNull($obj->getToAmount()); - $this->assertNotNull($obj->getConversionType()); - $this->assertNotNull($obj->getConversionTypeChangeable()); - $this->assertNotNull($obj->getWebUrl()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CurrencyConversion $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getConversionDate(), "TestSample"); - $this->assertEquals($obj->getFromCurrency(), "TestSample"); - $this->assertEquals($obj->getFromAmount(), "TestSample"); - $this->assertEquals($obj->getToCurrency(), "TestSample"); - $this->assertEquals($obj->getToAmount(), "TestSample"); - $this->assertEquals($obj->getConversionType(), "TestSample"); - $this->assertEquals($obj->getConversionTypeChangeable(), true); - $this->assertEquals($obj->getWebUrl(), "http://www.google.com"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage WebUrl is not a fully qualified URL - */ - public function testUrlValidationForWebUrl() - { - $obj = new CurrencyConversion(); - $obj->setWebUrl(null); - } - - public function testUrlValidationForWebUrlDeprecated() - { - $obj = new CurrencyConversion(); - $obj->setWebUrl(null); - $this->assertNull($obj->getWebUrl()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CurrencyTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CurrencyTest.php deleted file mode 100644 index 19cc0cf..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CurrencyTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCurrency()); - $this->assertNotNull($obj->getValue()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Currency $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCurrency(), "TestSample"); - $this->assertEquals($obj->getValue(), "12.34"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CustomAmountTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CustomAmountTest.php deleted file mode 100644 index 1b8d1a4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/CustomAmountTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getLabel()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param CustomAmount $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getLabel(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php deleted file mode 100644 index a1e708f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php +++ /dev/null @@ -1,73 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSubtotal()); - $this->assertNotNull($obj->getShipping()); - $this->assertNotNull($obj->getTax()); - $this->assertNotNull($obj->getHandlingFee()); - $this->assertNotNull($obj->getShippingDiscount()); - $this->assertNotNull($obj->getInsurance()); - $this->assertNotNull($obj->getGiftWrap()); - $this->assertNotNull($obj->getFee()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Details $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSubtotal(), "12.34"); - $this->assertEquals($obj->getShipping(), "12.34"); - $this->assertEquals($obj->getTax(), "12.34"); - $this->assertEquals($obj->getHandlingFee(), "12.34"); - $this->assertEquals($obj->getShippingDiscount(), "12.34"); - $this->assertEquals($obj->getInsurance(), "12.34"); - $this->assertEquals($obj->getGiftWrap(), "12.34"); - $this->assertEquals($obj->getFee(), "12.34"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ErrorDetailsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ErrorDetailsTest.php deleted file mode 100644 index 60b9e77..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ErrorDetailsTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getField()); - $this->assertNotNull($obj->getIssue()); - $this->assertNotNull($obj->getPurchaseUnitReferenceId()); - $this->assertNotNull($obj->getCode()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ErrorDetails $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getField(), "TestSample"); - $this->assertEquals($obj->getIssue(), "TestSample"); - $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample"); - $this->assertEquals($obj->getCode(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ErrorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ErrorTest.php deleted file mode 100644 index 4d12f3f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ErrorTest.php +++ /dev/null @@ -1,77 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getPurchaseUnitReferenceId()); - $this->assertNotNull($obj->getMessage()); - $this->assertNotNull($obj->getCode()); - $this->assertNotNull($obj->getDetails()); - $this->assertNotNull($obj->getProcessorResponse()); - $this->assertNotNull($obj->getFmfDetails()); - $this->assertNotNull($obj->getInformationLink()); - $this->assertNotNull($obj->getDebugId()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Error $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample"); - $this->assertEquals($obj->getMessage(), "TestSample"); - $this->assertEquals($obj->getCode(), "TestSample"); - $this->assertEquals($obj->getDetails(), ErrorDetailsTest::getObject()); - $this->assertEquals($obj->getProcessorResponse(), ProcessorResponseTest::getObject()); - $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject()); - $this->assertEquals($obj->getInformationLink(), "TestSample"); - $this->assertEquals($obj->getDebugId(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ExtendedBankAccountTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ExtendedBankAccountTest.php deleted file mode 100644 index fc9533f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ExtendedBankAccountTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getMandateReferenceNumber()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ExtendedBankAccount $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getMandateReferenceNumber(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ExternalFundingTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ExternalFundingTest.php deleted file mode 100644 index 852ded8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ExternalFundingTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getReferenceId()); - $this->assertNotNull($obj->getCode()); - $this->assertNotNull($obj->getFundingAccountId()); - $this->assertNotNull($obj->getDisplayText()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ExternalFunding $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getReferenceId(), "TestSample"); - $this->assertEquals($obj->getCode(), "TestSample"); - $this->assertEquals($obj->getFundingAccountId(), "TestSample"); - $this->assertEquals($obj->getDisplayText(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FlowConfigTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FlowConfigTest.php deleted file mode 100644 index 7644839..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FlowConfigTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getLandingPageType()); - $this->assertNotNull($obj->getBankTxnPendingUrl()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param FlowConfig $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getLandingPageType(), "TestSample"); - $this->assertEquals($obj->getBankTxnPendingUrl(), "http://www.google.com"); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage BankTxnPendingUrl is not a fully qualified URL - */ - public function testUrlValidationForBankTxnPendingUrl() - { - $obj = new FlowConfig(); - $obj->setBankTxnPendingUrl(null); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FmfDetailsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FmfDetailsTest.php deleted file mode 100644 index 96eb7ad..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FmfDetailsTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getFilterType()); - $this->assertNotNull($obj->getFilterId()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param FmfDetails $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getFilterType(), "TestSample"); - $this->assertEquals($obj->getFilterId(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingDetailTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingDetailTest.php deleted file mode 100644 index 9f1f947..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingDetailTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getClearingTime()); - $this->assertNotNull($obj->getPaymentHoldDate()); - $this->assertNotNull($obj->getPaymentDebitDate()); - $this->assertNotNull($obj->getProcessingType()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param FundingDetail $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getClearingTime(), "TestSample"); - $this->assertEquals($obj->getPaymentHoldDate(), "TestSample"); - $this->assertEquals($obj->getPaymentDebitDate(), "TestSample"); - $this->assertEquals($obj->getProcessingType(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php deleted file mode 100644 index a329171..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php +++ /dev/null @@ -1,83 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCreditCard()); - $this->assertNotNull($obj->getCreditCardToken()); - $this->assertNotNull($obj->getPaymentCard()); - $this->assertNotNull($obj->getBankAccount()); - $this->assertNotNull($obj->getBankAccountToken()); - $this->assertNotNull($obj->getCredit()); - $this->assertNotNull($obj->getIncentive()); - $this->assertNotNull($obj->getExternalFunding()); - $this->assertNotNull($obj->getCarrierAccountToken()); - $this->assertNotNull($obj->getCarrierAccount()); - $this->assertNotNull($obj->getPrivateLabelCard()); - $this->assertNotNull($obj->getBilling()); - $this->assertNotNull($obj->getAlternatePayment()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param FundingInstrument $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCreditCard(), CreditCardTest::getObject()); - $this->assertEquals($obj->getCreditCardToken(), CreditCardTokenTest::getObject()); - $this->assertEquals($obj->getPaymentCard(), PaymentCardTest::getObject()); - $this->assertEquals($obj->getBankAccount(), ExtendedBankAccountTest::getObject()); - $this->assertEquals($obj->getBankAccountToken(), BankTokenTest::getObject()); - $this->assertEquals($obj->getCredit(), CreditTest::getObject()); - $this->assertEquals($obj->getIncentive(), IncentiveTest::getObject()); - $this->assertEquals($obj->getExternalFunding(), ExternalFundingTest::getObject()); - $this->assertEquals($obj->getCarrierAccountToken(), CarrierAccountTokenTest::getObject()); - $this->assertEquals($obj->getCarrierAccount(), CarrierAccountTest::getObject()); - $this->assertEquals($obj->getPrivateLabelCard(), PrivateLabelCardTest::getObject()); - $this->assertEquals($obj->getBilling(), BillingTest::getObject()); - $this->assertEquals($obj->getAlternatePayment(), AlternatePaymentTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingOptionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingOptionTest.php deleted file mode 100644 index ed44ef1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingOptionTest.php +++ /dev/null @@ -1,69 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getFundingSources()); - $this->assertNotNull($obj->getBackupFundingInstrument()); - $this->assertNotNull($obj->getCurrencyConversion()); - $this->assertNotNull($obj->getInstallmentInfo()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param FundingOption $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getFundingSources(), FundingSourceTest::getObject()); - $this->assertEquals($obj->getBackupFundingInstrument(), FundingInstrumentTest::getObject()); - $this->assertEquals($obj->getCurrencyConversion(), CurrencyConversionTest::getObject()); - $this->assertEquals($obj->getInstallmentInfo(), InstallmentInfoTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingSourceTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingSourceTest.php deleted file mode 100644 index d6160d4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/FundingSourceTest.php +++ /dev/null @@ -1,75 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getFundingMode()); - $this->assertNotNull($obj->getFundingInstrumentType()); - $this->assertNotNull($obj->getSoftDescriptor()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getLegalText()); - $this->assertNotNull($obj->getFundingDetail()); - $this->assertNotNull($obj->getAdditionalText()); - $this->assertNotNull($obj->getExtends()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param FundingSource $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getFundingMode(), "TestSample"); - $this->assertEquals($obj->getFundingInstrumentType(), "TestSample"); - $this->assertEquals($obj->getSoftDescriptor(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getLegalText(), "TestSample"); - $this->assertEquals($obj->getFundingDetail(), FundingDetailTest::getObject()); - $this->assertEquals($obj->getAdditionalText(), "TestSample"); - $this->assertEquals($obj->getExtends(), FundingInstrumentTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/HyperSchemaTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/HyperSchemaTest.php deleted file mode 100644 index c53772e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/HyperSchemaTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getLinks()); - $this->assertNotNull($obj->getFragmentResolution()); - $this->assertNotNull($obj->getReadonly()); - $this->assertNotNull($obj->getContentEncoding()); - $this->assertNotNull($obj->getPathStart()); - $this->assertNotNull($obj->getMediaType()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param HyperSchema $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - $this->assertEquals($obj->getFragmentResolution(), "TestSample"); - $this->assertEquals($obj->getReadonly(), true); - $this->assertEquals($obj->getContentEncoding(), "TestSample"); - $this->assertEquals($obj->getPathStart(), "TestSample"); - $this->assertEquals($obj->getMediaType(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ImageTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ImageTest.php deleted file mode 100644 index 6af355c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ImageTest.php +++ /dev/null @@ -1,55 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getImage()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Image $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getImage(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/IncentiveTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/IncentiveTest.php deleted file mode 100644 index 7f9aff8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/IncentiveTest.php +++ /dev/null @@ -1,84 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getCode()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getMinimumPurchaseAmount()); - $this->assertNotNull($obj->getLogoImageUrl()); - $this->assertNotNull($obj->getExpiryDate()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getTerms()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Incentive $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getCode(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getMinimumPurchaseAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getLogoImageUrl(), "http://www.google.com"); - $this->assertEquals($obj->getExpiryDate(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getTerms(), "TestSample"); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage LogoImageUrl is not a fully qualified URL - */ - public function testUrlValidationForLogoImageUrl() - { - $obj = new Incentive(); - $obj->setLogoImageUrl(null); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InputFieldsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InputFieldsTest.php deleted file mode 100644 index 588f89c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InputFieldsTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getAllowNote()); - $this->assertNotNull($obj->getNoShipping()); - $this->assertNotNull($obj->getAddressOverride()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param InputFields $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getAllowNote(), true); - $this->assertEquals($obj->getNoShipping(), 123); - $this->assertEquals($obj->getAddressOverride(), 123); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InstallmentInfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InstallmentInfoTest.php deleted file mode 100644 index 8867823..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InstallmentInfoTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getInstallmentId()); - $this->assertNotNull($obj->getNetwork()); - $this->assertNotNull($obj->getIssuer()); - $this->assertNotNull($obj->getInstallmentOptions()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param InstallmentInfo $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getInstallmentId(), "TestSample"); - $this->assertEquals($obj->getNetwork(), "TestSample"); - $this->assertEquals($obj->getIssuer(), "TestSample"); - $this->assertEquals($obj->getInstallmentOptions(), InstallmentOptionTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InstallmentOptionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InstallmentOptionTest.php deleted file mode 100644 index 9c66ffc..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InstallmentOptionTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getTerm()); - $this->assertNotNull($obj->getMonthlyPayment()); - $this->assertNotNull($obj->getDiscountAmount()); - $this->assertNotNull($obj->getDiscountPercentage()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param InstallmentOption $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getTerm(), 123); - $this->assertEquals($obj->getMonthlyPayment(), CurrencyTest::getObject()); - $this->assertEquals($obj->getDiscountAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getDiscountPercentage(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceAddressTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceAddressTest.php deleted file mode 100644 index 257f3de..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceAddressTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getLine1()); - $this->assertNotNull($obj->getLine2()); - $this->assertNotNull($obj->getCity()); - $this->assertNotNull($obj->getCountryCode()); - $this->assertNotNull($obj->getPostalCode()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getPhone()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param InvoiceAddress $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getLine1(), "TestSample"); - $this->assertEquals($obj->getLine2(), "TestSample"); - $this->assertEquals($obj->getCity(), "TestSample"); - $this->assertEquals($obj->getCountryCode(), "TestSample"); - $this->assertEquals($obj->getPostalCode(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getPhone(), PhoneTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceItemTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceItemTest.php deleted file mode 100644 index 372e58c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceItemTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getQuantity()); - $this->assertNotNull($obj->getUnitPrice()); - $this->assertNotNull($obj->getTax()); - $this->assertNotNull($obj->getDate()); - $this->assertNotNull($obj->getDiscount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param InvoiceItem $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getQuantity(), "12.34"); - $this->assertEquals($obj->getUnitPrice(), CurrencyTest::getObject()); - $this->assertEquals($obj->getTax(), TaxTest::getObject()); - $this->assertEquals($obj->getDate(), "TestSample"); - $this->assertEquals($obj->getDiscount(), CostTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php deleted file mode 100644 index cbba180..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getTotalCount()); - $this->assertNotNull($obj->getInvoices()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param InvoiceSearchResponse $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getTotalCount(), 123); - $this->assertEquals($obj->getInvoices(), InvoiceTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceTest.php deleted file mode 100644 index 410f60a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/InvoiceTest.php +++ /dev/null @@ -1,356 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getNumber()); - $this->assertNotNull($obj->getUri()); - $this->assertNotNull($obj->getStatus()); - $this->assertNotNull($obj->getMerchantInfo()); - $this->assertNotNull($obj->getBillingInfo()); - $this->assertNotNull($obj->getShippingInfo()); - $this->assertNotNull($obj->getItems()); - $this->assertNotNull($obj->getInvoiceDate()); - $this->assertNotNull($obj->getPaymentTerm()); - $this->assertNotNull($obj->getDiscount()); - $this->assertNotNull($obj->getShippingCost()); - $this->assertNotNull($obj->getCustom()); - $this->assertNotNull($obj->getTaxCalculatedAfterDiscount()); - $this->assertNotNull($obj->getTaxInclusive()); - $this->assertNotNull($obj->getTerms()); - $this->assertNotNull($obj->getNote()); - $this->assertNotNull($obj->getMerchantMemo()); - $this->assertNotNull($obj->getLogoUrl()); - $this->assertNotNull($obj->getTotalAmount()); - $this->assertNotNull($obj->getPayments()); - $this->assertNotNull($obj->getRefunds()); - $this->assertNotNull($obj->getMetadata()); - $this->assertNotNull($obj->getAdditionalData()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Invoice $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getNumber(), "TestSample"); - $this->assertEquals($obj->getUri(), "TestSample"); - $this->assertEquals($obj->getStatus(), "TestSample"); - $this->assertEquals($obj->getMerchantInfo(), MerchantInfoTest::getObject()); - $this->assertEquals($obj->getBillingInfo(), BillingInfoTest::getObject()); - $this->assertEquals($obj->getShippingInfo(), ShippingInfoTest::getObject()); - $this->assertEquals($obj->getItems(), InvoiceItemTest::getObject()); - $this->assertEquals($obj->getInvoiceDate(), "TestSample"); - $this->assertEquals($obj->getPaymentTerm(), PaymentTermTest::getObject()); - $this->assertEquals($obj->getDiscount(), CostTest::getObject()); - $this->assertEquals($obj->getShippingCost(), ShippingCostTest::getObject()); - $this->assertEquals($obj->getCustom(), CustomAmountTest::getObject()); - $this->assertEquals($obj->getTaxCalculatedAfterDiscount(), true); - $this->assertEquals($obj->getTaxInclusive(), true); - $this->assertEquals($obj->getTerms(), "TestSample"); - $this->assertEquals($obj->getNote(), "TestSample"); - $this->assertEquals($obj->getMerchantMemo(), "TestSample"); - $this->assertEquals($obj->getLogoUrl(), "http://www.google.com"); - $this->assertEquals($obj->getTotalAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getPayments(), PaymentDetailTest::getObject()); - $this->assertEquals($obj->getRefunds(), RefundDetailTest::getObject()); - $this->assertEquals($obj->getMetadata(), MetadataTest::getObject()); - $this->assertEquals($obj->getAdditionalData(), "TestSample"); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage LogoUrl is not a fully qualified URL - */ - public function testUrlValidationForLogoUrl() - { - $obj = new Invoice(); - $obj->setLogoUrl(null); - } - - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->create($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testSearch($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - InvoiceSearchResponseTest::getJson() - )); - $search = SearchTest::getObject(); - - $result = $obj->search($search, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testSend($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - - $result = $obj->send($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testRemind($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $notification = NotificationTest::getObject(); - - $result = $obj->remind($notification, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testCancel($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $cancelNotification = CancelNotificationTest::getObject(); - - $result = $obj->cancel($cancelNotification, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testRecordPayment($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $paymentDetail = PaymentDetailTest::getObject(); - - $result = $obj->recordPayment($paymentDetail, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testRecordRefund($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $refundDetail = RefundDetailTest::getObject(); - - $result = $obj->recordRefund($refundDetail, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - InvoiceTest::getJson() - )); - - $result = $obj->get("invoiceId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testGetAll($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - InvoiceSearchResponseTest::getJson() - )); - - $result = $obj->getAll(array(), $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testUpdate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->update($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testDelete($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - - $result = $obj->delete($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Invoice $obj - */ - public function testQrCode($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - ImageTest::getJson() - )); - - $result = $obj->qrCode("invoiceId", array(), $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php deleted file mode 100644 index 2f9a805..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getItems()); - $this->assertNotNull($obj->getShippingAddress()); - $this->assertNotNull($obj->getShippingMethod()); - $this->assertNotNull($obj->getShippingPhoneNumber()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ItemList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getItems(), ItemTest::getObject()); - $this->assertEquals($obj->getShippingAddress(), ShippingAddressTest::getObject()); - $this->assertEquals($obj->getShippingMethod(), "TestSample"); - $this->assertEquals($obj->getShippingPhoneNumber(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php deleted file mode 100644 index 311d108..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php +++ /dev/null @@ -1,96 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSku()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getQuantity()); - $this->assertNotNull($obj->getPrice()); - $this->assertNotNull($obj->getCurrency()); - $this->assertNotNull($obj->getTax()); - $this->assertNotNull($obj->getUrl()); - $this->assertNotNull($obj->getCategory()); - $this->assertNotNull($obj->getWeight()); - $this->assertNotNull($obj->getLength()); - $this->assertNotNull($obj->getHeight()); - $this->assertNotNull($obj->getWidth()); - $this->assertNotNull($obj->getSupplementaryData()); - $this->assertNotNull($obj->getPostbackData()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Item $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSku(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getQuantity(), "12.34"); - $this->assertEquals($obj->getPrice(), "12.34"); - $this->assertEquals($obj->getCurrency(), "TestSample"); - $this->assertEquals($obj->getTax(), "12.34"); - $this->assertEquals($obj->getUrl(), "http://www.google.com"); - $this->assertEquals($obj->getCategory(), "TestSample"); - $this->assertEquals($obj->getWeight(), MeasurementTest::getObject()); - $this->assertEquals($obj->getLength(), MeasurementTest::getObject()); - $this->assertEquals($obj->getHeight(), MeasurementTest::getObject()); - $this->assertEquals($obj->getWidth(), MeasurementTest::getObject()); - $this->assertEquals($obj->getSupplementaryData(), NameValuePairTest::getObject()); - $this->assertEquals($obj->getPostbackData(), NameValuePairTest::getObject()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Url is not a fully qualified URL - */ - public function testUrlValidationForUrl() - { - $obj = new Item(); - $obj->setUrl(null); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php deleted file mode 100644 index f8d008a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getHref()); - $this->assertNotNull($obj->getRel()); - $this->assertNotNull($obj->getTargetSchema()); - $this->assertNotNull($obj->getMethod()); - $this->assertNotNull($obj->getEnctype()); - $this->assertNotNull($obj->getSchema()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Links $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getHref(), "TestSample"); - $this->assertEquals($obj->getRel(), "TestSample"); - $this->assertEquals($obj->getTargetSchema(), HyperSchemaTest::getObject()); - $this->assertEquals($obj->getMethod(), "TestSample"); - $this->assertEquals($obj->getEnctype(), "TestSample"); - $this->assertEquals($obj->getSchema(), HyperSchemaTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MeasurementTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MeasurementTest.php deleted file mode 100644 index 889f7ef..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MeasurementTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getValue()); - $this->assertNotNull($obj->getUnit()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Measurement $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getValue(), "TestSample"); - $this->assertEquals($obj->getUnit(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MerchantInfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MerchantInfoTest.php deleted file mode 100644 index 8801722..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MerchantInfoTest.php +++ /dev/null @@ -1,73 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEmail()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getAddress()); - $this->assertNotNull($obj->getBusinessName()); - $this->assertNotNull($obj->getPhone()); - $this->assertNotNull($obj->getFax()); - $this->assertNotNull($obj->getWebsite()); - $this->assertNotNull($obj->getTaxId()); - $this->assertNotNull($obj->getAdditionalInfo()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param MerchantInfo $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEmail(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getAddress(), AddressTest::getObject()); - $this->assertEquals($obj->getBusinessName(), "TestSample"); - $this->assertEquals($obj->getPhone(), PhoneTest::getObject()); - $this->assertEquals($obj->getFax(), PhoneTest::getObject()); - $this->assertEquals($obj->getWebsite(), "TestSample"); - $this->assertEquals($obj->getTaxId(), "TestSample"); - $this->assertEquals($obj->getAdditionalInfo(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MerchantPreferencesTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MerchantPreferencesTest.php deleted file mode 100644 index 513925d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MerchantPreferencesTest.php +++ /dev/null @@ -1,120 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getSetupFee()); - $this->assertNotNull($obj->getCancelUrl()); - $this->assertNotNull($obj->getReturnUrl()); - $this->assertNotNull($obj->getNotifyUrl()); - $this->assertNotNull($obj->getMaxFailAttempts()); - $this->assertNotNull($obj->getAutoBillAmount()); - $this->assertNotNull($obj->getInitialFailAmountAction()); - $this->assertNotNull($obj->getAcceptedPaymentType()); - $this->assertNotNull($obj->getCharSet()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param MerchantPreferences $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getSetupFee(), CurrencyTest::getObject()); - $this->assertEquals($obj->getCancelUrl(), "http://www.google.com"); - $this->assertEquals($obj->getReturnUrl(), "http://www.google.com"); - $this->assertEquals($obj->getNotifyUrl(), "http://www.google.com"); - $this->assertEquals($obj->getMaxFailAttempts(), "TestSample"); - $this->assertEquals($obj->getAutoBillAmount(), "TestSample"); - $this->assertEquals($obj->getInitialFailAmountAction(), "TestSample"); - $this->assertEquals($obj->getAcceptedPaymentType(), "TestSample"); - $this->assertEquals($obj->getCharSet(), "TestSample"); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage CancelUrl is not a fully qualified URL - */ - public function testUrlValidationForCancelUrl() - { - $obj = new MerchantPreferences(); - $obj->setCancelUrl(null); - } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage ReturnUrl is not a fully qualified URL - */ - public function testUrlValidationForReturnUrl() - { - $obj = new MerchantPreferences(); - $obj->setReturnUrl(null); - } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage NotifyUrl is not a fully qualified URL - */ - public function testUrlValidationForNotifyUrl() - { - $obj = new MerchantPreferences(); - $obj->setNotifyUrl(null); - } - - public function testUrlValidationForCancelUrlDeprecated() - { - $obj = new MerchantPreferences(); - $obj->setCancelUrl(null); - $this->assertNull($obj->getCancelUrl()); - } - public function testUrlValidationForReturnUrlDeprecated() - { - $obj = new MerchantPreferences(); - $obj->setReturnUrl(null); - $this->assertNull($obj->getReturnUrl()); - } - public function testUrlValidationForNotifyUrlDeprecated() - { - $obj = new MerchantPreferences(); - $obj->setNotifyUrl(null); - $this->assertNull($obj->getNotifyUrl()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MetadataTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MetadataTest.php deleted file mode 100644 index 1e85fee..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/MetadataTest.php +++ /dev/null @@ -1,90 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCreatedDate()); - $this->assertNotNull($obj->getCreatedBy()); - $this->assertNotNull($obj->getCancelledDate()); - $this->assertNotNull($obj->getCancelledBy()); - $this->assertNotNull($obj->getLastUpdatedDate()); - $this->assertNotNull($obj->getLastUpdatedBy()); - $this->assertNotNull($obj->getFirstSentDate()); - $this->assertNotNull($obj->getLastSentDate()); - $this->assertNotNull($obj->getLastSentBy()); - $this->assertNotNull($obj->getPayerViewUrl()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Metadata $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCreatedDate(), "TestSample"); - $this->assertEquals($obj->getCreatedBy(), "TestSample"); - $this->assertEquals($obj->getCancelledDate(), "TestSample"); - $this->assertEquals($obj->getCancelledBy(), "TestSample"); - $this->assertEquals($obj->getLastUpdatedDate(), "TestSample"); - $this->assertEquals($obj->getLastUpdatedBy(), "TestSample"); - $this->assertEquals($obj->getFirstSentDate(), "TestSample"); - $this->assertEquals($obj->getLastSentDate(), "TestSample"); - $this->assertEquals($obj->getLastSentBy(), "TestSample"); - $this->assertEquals($obj->getPayerViewUrl(), "http://www.google.com"); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage PayerViewUrl is not a fully qualified URL - */ - public function testUrlValidationForPayerViewUrl() - { - $obj = new Metadata(); - $obj->setPayerViewUrl(null); - } - - public function testUrlValidationForPayerViewUrlDeprecated() - { - $obj = new Metadata(); - $obj->setPayer_view_url(null); - $this->assertNull($obj->getPayer_view_url()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/NameValuePairTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/NameValuePairTest.php deleted file mode 100644 index c709df7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/NameValuePairTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getValue()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param NameValuePair $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getValue(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/NotificationTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/NotificationTest.php deleted file mode 100644 index eb0b91d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/NotificationTest.php +++ /dev/null @@ -1,60 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSubject()); - $this->assertNotNull($obj->getNote()); - $this->assertNotNull($obj->getSendToMerchant()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Notification $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSubject(), "TestSample"); - $this->assertEquals($obj->getNote(), "TestSample"); - $this->assertEquals($obj->getSendToMerchant(), true); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdAddressTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdAddressTest.php deleted file mode 100644 index 1079d34..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdAddressTest.php +++ /dev/null @@ -1,52 +0,0 @@ -addr = self::getTestData(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - public static function getTestData() - { - $addr = new OpenIdAddress(); - $addr->setCountry("US")->setLocality("San Jose") - ->setPostalCode("95112")->setRegion("CA") - ->setStreetAddress("1, North 1'st street"); - return $addr; - } - - /** - * @test - */ - public function testSerializationDeserialization() - { - $addrCopy = new OpenIdAddress(); - $addrCopy->fromJson($this->addr->toJson()); - - $this->assertEquals($this->addr, $addrCopy); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdErrorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdErrorTest.php deleted file mode 100644 index 1d938c3..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdErrorTest.php +++ /dev/null @@ -1,47 +0,0 @@ -error = new OpenIdError(); - $this->error->setErrorDescription('error description') - ->setErrorUri('http://developer.paypal.com/api/error') - ->setError('VALIDATION_ERROR'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testSerializationDeserialization() - { - $errorCopy = new OpenIdError(); - $errorCopy->fromJson($this->error->toJson()); - - $this->assertEquals($this->error, $errorCopy); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdSessionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdSessionTest.php deleted file mode 100644 index ee209f9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdSessionTest.php +++ /dev/null @@ -1,96 +0,0 @@ -context = new ApiContext(); - $this->context->setConfig( - array( - 'acct1.ClientId' => 'DummyId', - 'acct1.ClientSecret' => 'A8VERY8SECRET8VALUE0', - 'mode' => 'live' - ) - ); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - - /** - * @test - */ - public function testLoginUrlForMultipleScopes() - { - - $clientId = "AQkquBDf1zctJOWGKWUEtKXm6qVhueUEMvXO_-MCI4DQQ4-LWvkDLIN2fGsd"; - $redirectUri = 'https://devtools-paypal.com/'; - $scope = array('this', 'that', 'and more'); - - $expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize"; - - $this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri), - OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - custom scope"); - - $scope = array(); - $this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=openid+profile+address+email+phone+" . urlencode("https://uri.paypal.com/services/paypalattributes") . "+" . urlencode('https://uri.paypal.com/services/expresscheckout') . "&redirect_uri=" . urlencode($redirectUri), - OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - default scope"); - - - $scope = array('openid'); - $this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=openid&redirect_uri=" . urlencode($redirectUri), - OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - openid scope"); - } - - /** - * @test - */ - public function testLoginWithCustomConfig() - { - - $redirectUri = 'http://mywebsite.com'; - $scope = array('this', 'that', 'and more'); - - $expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize"; - - $this->assertEquals($expectedBaseUrl . "?client_id=DummyId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri), - OpenIdSession::getAuthorizationUrl($redirectUri, $scope, "DummyId", null, null, $this->context), "Failed case - custom config"); - } - - /** - * @test - */ - public function testLogoutWithCustomConfig() - { - - $redirectUri = 'http://mywebsite.com'; - $idToken = 'abc'; - - $expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/endsession"; - - $this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true", - OpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config"); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php deleted file mode 100644 index e22f431..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php +++ /dev/null @@ -1,78 +0,0 @@ -token = new OpenIdTokeninfo(); - $this->token->setAccessToken("Access token") - ->setExpiresIn(900) - ->setRefreshToken("Refresh token") - ->setIdToken("id token") - ->setScope("openid address") - ->setTokenType("Bearer"); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testSerializationDeserialization() - { - $tokenCopy = new OpenIdTokeninfo(); - $tokenCopy->fromJson($this->token->toJson()); - - $this->assertEquals($this->token, $tokenCopy); - } - - /** - * @t1est - * TODO: Fix Test. This test is disabled - */ - public function t1estOperations() - { - - $clientId = 'AQkquBDf1zctJOWGKWUEtKXm6qVhueUEMvXO_-MCI4DQQ4-LWvkDLIN2fGsd'; - $clientSecret = 'ELtVxAjhT7cJimnz5-Nsx9k2reTKSVfErNQF-CmrwJgxRtylkGTKlU4RvrX'; - - $params = array( - 'code' => '', - 'redirect_uri' => 'https://devtools-paypal.com/', - 'client_id' => $clientId, - 'client_secret' => $clientSecret - ); - $accessToken = OpenIdTokeninfo::createFromAuthorizationCode($params); - $this->assertNotNull($accessToken); - - $params = array( - 'refresh_token' => $accessToken->getRefreshToken(), - 'client_id' => $clientId, - 'client_secret' => $clientSecret - ); - $accessToken = $accessToken->createFromRefreshToken($params); - $this->assertNotNull($accessToken); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdUserinfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdUserinfoTest.php deleted file mode 100644 index 8c543b1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OpenIdUserinfoTest.php +++ /dev/null @@ -1,63 +0,0 @@ -setAccountType("PERSONAL")->setAgeRange("20-30")->setBirthday("1970-01-01") - ->setEmail("me@email.com")->setEmailVerified(true) - ->setFamilyName("Doe")->setMiddleName("A")->setGivenName("John") - ->setLocale("en-US")->setGender("male")->setName("John A Doe") - ->setPayerId("A-XZASASA")->setPhoneNumber("1-408-111-1111") - ->setPicture("http://gravatar.com/me.jpg") - ->setSub("me@email.com")->setUserId("userId") - ->setVerified(true)->setVerifiedAccount(true) - ->setZoneinfo("America/PST")->setLanguage('en_US') - ->setAddress(OpenIdAddressTest::getTestData()); - - $userCopy = new OpenIdUserinfo(); - $userCopy->fromJson($user->toJSON()); - - $this->assertEquals($user, $userCopy); - } - - /** - * @test - */ - public function testInvalidParamUserInfoCall() - { - $this->setExpectedException('PayPal\Exception\PayPalConnectionException'); - OpenIdUserinfo::getUserinfo(array('access_token' => 'accessToken')); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OrderTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OrderTest.php deleted file mode 100644 index 5bdc9a5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OrderTest.php +++ /dev/null @@ -1,178 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getPurchaseUnitReferenceId()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getPaymentMode()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getReasonCode()); - $this->assertNotNull($obj->getPendingReason()); - $this->assertNotNull($obj->getProtectionEligibility()); - $this->assertNotNull($obj->getProtectionEligibilityType()); - $this->assertNotNull($obj->getParentPayment()); - $this->assertNotNull($obj->getFmfDetails()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Order $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - $this->assertEquals($obj->getPaymentMode(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getReasonCode(), "TestSample"); - $this->assertEquals($obj->getPendingReason(), "TestSample"); - $this->assertEquals($obj->getProtectionEligibility(), "TestSample"); - $this->assertEquals($obj->getProtectionEligibilityType(), "TestSample"); - $this->assertEquals($obj->getParentPayment(), "TestSample"); - $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject()); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Order $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - OrderTest::getJson() - )); - - $result = $obj->get("orderId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Order $obj - */ - public function testCapture($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - CaptureTest::getJson() - )); - $capture = CaptureTest::getObject(); - - $result = $obj->capture($capture, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Order $obj - */ - public function testVoid($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->void($mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Order $obj - */ - public function testAuthorize($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - AuthorizationTest::getJson() - )); - - $authorization = new Authorization(); - $result = $obj->authorize($authorization, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OverrideChargeModelTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OverrideChargeModelTest.php deleted file mode 100644 index 4492418..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/OverrideChargeModelTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getChargeId()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param OverrideChargeModel $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getChargeId(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PatchRequestTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PatchRequestTest.php deleted file mode 100644 index 12629d2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PatchRequestTest.php +++ /dev/null @@ -1,54 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPatches()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PatchRequest $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPatches(), PatchTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PatchTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PatchTest.php deleted file mode 100644 index 8ed800b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PatchTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getOp()); - $this->assertNotNull($obj->getPath()); - $this->assertNotNull($obj->getValue()); - $this->assertNotNull($obj->getFrom()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Patch $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getOp(), "TestSample"); - $this->assertEquals($obj->getPath(), "TestSample"); - $this->assertEquals($obj->getValue(), "TestSampleObject"); - $this->assertEquals($obj->getFrom(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php deleted file mode 100644 index 853e56b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php +++ /dev/null @@ -1,69 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEmail()); - $this->assertNotNull($obj->getMerchantId()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getAccountNumber()); - $this->assertNotNull($obj->getPhone()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Payee $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEmail(), "TestSample"); - $this->assertEquals($obj->getMerchantId(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getAccountNumber(), "TestSample"); - $this->assertEquals($obj->getPhone(), PhoneTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php deleted file mode 100644 index 7a1546a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php +++ /dev/null @@ -1,91 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEmail()); - $this->assertNotNull($obj->getExternalRememberMeId()); - $this->assertNotNull($obj->getAccountNumber()); - $this->assertNotNull($obj->getSalutation()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getMiddleName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getSuffix()); - $this->assertNotNull($obj->getPayerId()); - $this->assertNotNull($obj->getPhone()); - $this->assertNotNull($obj->getPhoneType()); - $this->assertNotNull($obj->getBirthDate()); - $this->assertNotNull($obj->getTaxId()); - $this->assertNotNull($obj->getTaxIdType()); - $this->assertNotNull($obj->getCountryCode()); - $this->assertNotNull($obj->getBillingAddress()); - $this->assertNotNull($obj->getShippingAddress()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PayerInfo $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEmail(), "TestSample"); - $this->assertEquals($obj->getExternalRememberMeId(), "TestSample"); - $this->assertEquals($obj->getAccountNumber(), "TestSample"); - $this->assertEquals($obj->getSalutation(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getMiddleName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getSuffix(), "TestSample"); - $this->assertEquals($obj->getPayerId(), "TestSample"); - $this->assertEquals($obj->getPhone(), "TestSample"); - $this->assertEquals($obj->getPhoneType(), "TestSample"); - $this->assertEquals($obj->getBirthDate(), "TestSample"); - $this->assertEquals($obj->getTaxId(), "TestSample"); - $this->assertEquals($obj->getTaxIdType(), "TestSample"); - $this->assertEquals($obj->getCountryCode(), "TestSample"); - $this->assertEquals($obj->getBillingAddress(), AddressTest::getObject()); - $this->assertEquals($obj->getShippingAddress(), ShippingAddressTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php deleted file mode 100644 index e5cab69..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php +++ /dev/null @@ -1,75 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPaymentMethod()); - $this->assertNotNull($obj->getStatus()); - $this->assertNotNull($obj->getAccountType()); - $this->assertNotNull($obj->getAccountAge()); - $this->assertNotNull($obj->getFundingInstruments()); - $this->assertNotNull($obj->getFundingOptionId()); - $this->assertNotNull($obj->getFundingOption()); - $this->assertNotNull($obj->getRelatedFundingOption()); - $this->assertNotNull($obj->getPayerInfo()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Payer $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPaymentMethod(), "TestSample"); - $this->assertEquals($obj->getStatus(), "TestSample"); - $this->assertEquals($obj->getAccountType(), "TestSample"); - $this->assertEquals($obj->getAccountAge(), "TestSample"); - $this->assertEquals($obj->getFundingInstruments(), FundingInstrumentTest::getObject()); - $this->assertEquals($obj->getFundingOptionId(), "TestSample"); - $this->assertEquals($obj->getFundingOption(), FundingOptionTest::getObject()); - $this->assertEquals($obj->getRelatedFundingOption(), FundingOptionTest::getObject()); - $this->assertEquals($obj->getPayerInfo(), PayerInfoTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentCardTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentCardTest.php deleted file mode 100644 index 44aa163..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentCardTest.php +++ /dev/null @@ -1,91 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getNumber()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getExpireMonth()); - $this->assertNotNull($obj->getExpireYear()); - $this->assertNotNull($obj->getStartMonth()); - $this->assertNotNull($obj->getStartYear()); - $this->assertNotNull($obj->getCvv2()); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getBillingCountry()); - $this->assertNotNull($obj->getBillingAddress()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getStatus()); - $this->assertNotNull($obj->getValidUntil()); - $this->assertNotNull($obj->getIssueNumber()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentCard $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getNumber(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getExpireMonth(), 123); - $this->assertEquals($obj->getExpireYear(), 123); - $this->assertEquals($obj->getStartMonth(), "TestSample"); - $this->assertEquals($obj->getStartYear(), "TestSample"); - $this->assertEquals($obj->getCvv2(), "TestSample"); - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getBillingCountry(), "TestSample"); - $this->assertEquals($obj->getBillingAddress(), AddressTest::getObject()); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getStatus(), "TestSample"); - $this->assertEquals($obj->getValidUntil(), "TestSample"); - $this->assertEquals($obj->getIssueNumber(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentCardTokenTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentCardTokenTest.php deleted file mode 100644 index 43f6a5c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentCardTokenTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPaymentCardId()); - $this->assertNotNull($obj->getExternalCustomerId()); - $this->assertNotNull($obj->getLast4()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getExpireMonth()); - $this->assertNotNull($obj->getExpireYear()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentCardToken $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPaymentCardId(), "TestSample"); - $this->assertEquals($obj->getExternalCustomerId(), "TestSample"); - $this->assertEquals($obj->getLast4(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getExpireMonth(), 123); - $this->assertEquals($obj->getExpireYear(), 123); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentDefinitionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentDefinitionTest.php deleted file mode 100644 index 2043b8e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentDefinitionTest.php +++ /dev/null @@ -1,69 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getFrequencyInterval()); - $this->assertNotNull($obj->getFrequency()); - $this->assertNotNull($obj->getCycles()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getChargeModels()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentDefinition $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getFrequencyInterval(), "TestSample"); - $this->assertEquals($obj->getFrequency(), "TestSample"); - $this->assertEquals($obj->getCycles(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getChargeModels(), ChargeModelTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentDetailTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentDetailTest.php deleted file mode 100644 index fa2e42a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentDetailTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getTransactionId()); - $this->assertNotNull($obj->getTransactionType()); - $this->assertNotNull($obj->getDate()); - $this->assertNotNull($obj->getMethod()); - $this->assertNotNull($obj->getNote()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentDetail $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getTransactionId(), "TestSample"); - $this->assertEquals($obj->getTransactionType(), "TestSample"); - $this->assertEquals($obj->getDate(), "TestSample"); - $this->assertEquals($obj->getMethod(), "TestSample"); - $this->assertEquals($obj->getNote(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentExecutionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentExecutionTest.php deleted file mode 100644 index fe25bd6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentExecutionTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPayerId()); - $this->assertNotNull($obj->getCarrierAccountId()); - $this->assertNotNull($obj->getTransactions()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentExecution $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPayerId(), "TestSample"); - $this->assertEquals($obj->getCarrierAccountId(), "TestSample"); - $this->assertEquals($obj->getTransactions(), array(TransactionTest::getObject())); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php deleted file mode 100644 index dade26c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPayments()); - $this->assertNotNull($obj->getCount()); - $this->assertNotNull($obj->getNextId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentHistory $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPayments(), PaymentTest::getObject()); - $this->assertEquals($obj->getCount(), 123); - $this->assertEquals($obj->getNextId(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentInstructionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentInstructionTest.php deleted file mode 100644 index d153d35..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentInstructionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getReferenceNumber()); - $this->assertNotNull($obj->getInstructionType()); - $this->assertNotNull($obj->getRecipientBankingInstruction()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getPaymentDueDate()); - $this->assertNotNull($obj->getNote()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentInstruction $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getReferenceNumber(), "TestSample"); - $this->assertEquals($obj->getInstructionType(), "TestSample"); - $this->assertEquals($obj->getRecipientBankingInstruction(), RecipientBankingInstructionTest::getObject()); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getPaymentDueDate(), "TestSample"); - $this->assertEquals($obj->getNote(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param PaymentInstruction $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PaymentInstructionTest::getJson() - )); - - $result = $obj->get("paymentId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentOptionsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentOptionsTest.php deleted file mode 100644 index e2bbda2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentOptionsTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getAllowedPaymentMethod()); - $this->assertNotNull($obj->getRecurringFlag()); - $this->assertNotNull($obj->getSkipFmf()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentOptions $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getAllowedPaymentMethod(), "TestSample"); - $this->assertEquals($obj->getRecurringFlag(), true); - $this->assertEquals($obj->getSkipFmf(), true); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTermTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTermTest.php deleted file mode 100644 index 24e9102..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTermTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getTermType()); - $this->assertNotNull($obj->getDueDate()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PaymentTerm $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getTermType(), "TestSample"); - $this->assertEquals($obj->getDueDate(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php deleted file mode 100644 index 2f6d88e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php +++ /dev/null @@ -1,209 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getIntent()); - $this->assertNotNull($obj->getPayer()); - $this->assertNotNull($obj->getPotentialPayerInfo()); - $this->assertNotNull($obj->getPayee()); - $this->assertNotNull($obj->getCart()); - $this->assertNotNull($obj->getTransactions()); - $this->assertNotNull($obj->getFailedTransactions()); - $this->assertNotNull($obj->getBillingAgreementTokens()); - $this->assertNotNull($obj->getCreditFinancingOffered()); - $this->assertNotNull($obj->getPaymentInstruction()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getExperienceProfileId()); - $this->assertNotNull($obj->getNoteToPayer()); - $this->assertNotNull($obj->getRedirectUrls()); - $this->assertNotNull($obj->getFailureReason()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Payment $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getIntent(), "TestSample"); - $this->assertEquals($obj->getPayer(), PayerTest::getObject()); - $this->assertEquals($obj->getPotentialPayerInfo(), PotentialPayerInfoTest::getObject()); - $this->assertEquals($obj->getPayee(), PayeeTest::getObject()); - $this->assertEquals($obj->getCart(), "TestSample"); - $this->assertEquals($obj->getTransactions(), array(TransactionTest::getObject())); - $this->assertEquals($obj->getFailedTransactions(), ErrorTest::getObject()); - $this->assertEquals($obj->getBillingAgreementTokens(), array("TestSample")); - $this->assertEquals($obj->getCreditFinancingOffered(), CreditFinancingOfferedTest::getObject()); - $this->assertEquals($obj->getPaymentInstruction(), PaymentInstructionTest::getObject()); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getExperienceProfileId(), "TestSample"); - $this->assertEquals($obj->getNoteToPayer(), "TestSample"); - $this->assertEquals($obj->getRedirectUrls(), RedirectUrlsTest::getObject()); - $this->assertEquals($obj->getFailureReason(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Payment $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->create($mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Payment $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PaymentTest::getJson() - )); - - $result = $obj->get("paymentId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Payment $obj - */ - public function testUpdate($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $patchRequest = PatchRequestTest::getObject(); - - $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Payment $obj - */ - public function testExecute($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - $paymentExecution = PaymentExecutionTest::getObject(); - - $result = $obj->execute($paymentExecution, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Payment $obj - */ - public function testList($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PaymentHistoryTest::getJson() - )); - $params = array(); - - $result = $obj->all($params, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutBatchHeaderTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutBatchHeaderTest.php deleted file mode 100644 index 1f96f67..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutBatchHeaderTest.php +++ /dev/null @@ -1,71 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPayoutBatchId()); - $this->assertNotNull($obj->getBatchStatus()); - $this->assertNotNull($obj->getTimeCreated()); - $this->assertNotNull($obj->getTimeCompleted()); - $this->assertNotNull($obj->getSenderBatchHeader()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getFees()); - $this->assertNotNull($obj->getErrors()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PayoutBatchHeader $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPayoutBatchId(), "TestSample"); - $this->assertEquals($obj->getBatchStatus(), "TestSample"); - $this->assertEquals($obj->getTimeCreated(), "TestSample"); - $this->assertEquals($obj->getTimeCompleted(), "TestSample"); - $this->assertEquals($obj->getSenderBatchHeader(), PayoutSenderBatchHeaderTest::getObject()); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getFees(), CurrencyTest::getObject()); - $this->assertEquals($obj->getErrors(), ErrorTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutBatchTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutBatchTest.php deleted file mode 100644 index 5b22a8a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutBatchTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getBatchHeader()); - $this->assertNotNull($obj->getItems()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PayoutBatch $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getBatchHeader(), PayoutBatchHeaderTest::getObject()); - $this->assertEquals($obj->getItems(), PayoutItemDetailsTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutItemDetailsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutItemDetailsTest.php deleted file mode 100644 index 46adfef..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutItemDetailsTest.php +++ /dev/null @@ -1,73 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPayoutItemId()); - $this->assertNotNull($obj->getTransactionId()); - $this->assertNotNull($obj->getTransactionStatus()); - $this->assertNotNull($obj->getPayoutItemFee()); - $this->assertNotNull($obj->getPayoutBatchId()); - $this->assertNotNull($obj->getSenderBatchId()); - $this->assertNotNull($obj->getPayoutItem()); - $this->assertNotNull($obj->getTimeProcessed()); - $this->assertNotNull($obj->getErrors()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PayoutItemDetails $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPayoutItemId(), "TestSample"); - $this->assertEquals($obj->getTransactionId(), "TestSample"); - $this->assertEquals($obj->getTransactionStatus(), "TestSample"); - $this->assertEquals($obj->getPayoutItemFee(), CurrencyTest::getObject()); - $this->assertEquals($obj->getPayoutBatchId(), "TestSample"); - $this->assertEquals($obj->getSenderBatchId(), "TestSample"); - $this->assertEquals($obj->getPayoutItem(), PayoutItemTest::getObject()); - $this->assertEquals($obj->getTimeProcessed(), "TestSample"); - $this->assertEquals($obj->getErrors(), ErrorTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutItemTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutItemTest.php deleted file mode 100644 index f15d884..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutItemTest.php +++ /dev/null @@ -1,116 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getRecipientType()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getNote()); - $this->assertNotNull($obj->getReceiver()); - $this->assertNotNull($obj->getSenderItemId()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PayoutItem $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getRecipientType(), "TestSample"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getNote(), "TestSample"); - $this->assertEquals($obj->getReceiver(), "TestSample"); - $this->assertEquals($obj->getSenderItemId(), "TestSample"); - } - - /** - * @dataProvider mockProvider - * @param PayoutItem $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PayoutItemDetailsTest::getJson() - )); - - $result = $obj->get("payoutItemId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param PayoutItem $obj - */ - public function testCancel($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PayoutItemDetailsTest::getJson() - )); - - $result = $obj->cancel("payoutItemId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutSenderBatchHeaderTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutSenderBatchHeaderTest.php deleted file mode 100644 index 64617ef..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutSenderBatchHeaderTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSenderBatchId()); - $this->assertNotNull($obj->getEmailSubject()); - $this->assertNotNull($obj->getRecipientType()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PayoutSenderBatchHeader $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSenderBatchId(), "TestSample"); - $this->assertEquals($obj->getEmailSubject(), "TestSample"); - $this->assertEquals($obj->getRecipientType(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutTest.php deleted file mode 100644 index 155e12e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PayoutTest.php +++ /dev/null @@ -1,110 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSenderBatchHeader()); - $this->assertNotNull($obj->getItems()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Payout $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSenderBatchHeader(), PayoutSenderBatchHeaderTest::getObject()); - $this->assertEquals($obj->getItems(), PayoutItemTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Payout $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PayoutBatchTest::getJson() - )); - $params = array(); - - $result = $obj->create($params, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Payout $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PayoutBatchTest::getJson() - )); - - $result = $obj->get("payoutBatchId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PhoneTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PhoneTest.php deleted file mode 100644 index bae5453..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PhoneTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getCountryCode()); - $this->assertNotNull($obj->getNationalNumber()); - $this->assertNotNull($obj->getExtension()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Phone $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getCountryCode(), "TestSample"); - $this->assertEquals($obj->getNationalNumber(), "TestSample"); - $this->assertEquals($obj->getExtension(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PlanListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PlanListTest.php deleted file mode 100644 index aa4954c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PlanListTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getPlans()); - $this->assertNotNull($obj->getTotalItems()); - $this->assertNotNull($obj->getTotalPages()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PlanList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getPlans(), PlanTest::getObject()); - $this->assertEquals($obj->getTotalItems(), "TestSample"); - $this->assertEquals($obj->getTotalPages(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PlanTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PlanTest.php deleted file mode 100644 index bb78481..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PlanTest.php +++ /dev/null @@ -1,165 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getPaymentDefinitions()); - $this->assertNotNull($obj->getTerms()); - $this->assertNotNull($obj->getMerchantPreferences()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Plan $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getPaymentDefinitions(), PaymentDefinitionTest::getObject()); - $this->assertEquals($obj->getTerms(), TermsTest::getObject()); - $this->assertEquals($obj->getMerchantPreferences(), MerchantPreferencesTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Plan $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PlanTest::getJson() - )); - - $result = $obj->get("planId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Plan $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->create($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Plan $obj - */ - public function testUpdate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $patchRequest = PatchRequestTest::getObject(); - - $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Plan $obj - */ - public function testList($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - PlanListTest::getJson() - )); - $params = ParamsTest::getObject(); - - $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PotentialPayerInfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PotentialPayerInfoTest.php deleted file mode 100644 index 699deff..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PotentialPayerInfoTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEmail()); - $this->assertNotNull($obj->getExternalRememberMeId()); - $this->assertNotNull($obj->getAccountNumber()); - $this->assertNotNull($obj->getBillingAddress()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PotentialPayerInfo $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEmail(), "TestSample"); - $this->assertEquals($obj->getExternalRememberMeId(), "TestSample"); - $this->assertEquals($obj->getAccountNumber(), "TestSample"); - $this->assertEquals($obj->getBillingAddress(), AddressTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PresentationTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PresentationTest.php deleted file mode 100644 index 2807f49..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PresentationTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getBrandName()); - $this->assertNotNull($obj->getLogoImage()); - $this->assertNotNull($obj->getLocaleCode()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Presentation $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getBrandName(), "TestSample"); - $this->assertEquals($obj->getLogoImage(), "TestSample"); - $this->assertEquals($obj->getLocaleCode(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PrivateLabelCardTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PrivateLabelCardTest.php deleted file mode 100644 index 2ec678e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/PrivateLabelCardTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getCardNumber()); - $this->assertNotNull($obj->getIssuerId()); - $this->assertNotNull($obj->getIssuerName()); - $this->assertNotNull($obj->getImageKey()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param PrivateLabelCard $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getCardNumber(), "TestSample"); - $this->assertEquals($obj->getIssuerId(), "TestSample"); - $this->assertEquals($obj->getIssuerName(), "TestSample"); - $this->assertEquals($obj->getImageKey(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ProcessorResponseTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ProcessorResponseTest.php deleted file mode 100644 index 6fad9ea..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ProcessorResponseTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getResponseCode()); - $this->assertNotNull($obj->getAvsCode()); - $this->assertNotNull($obj->getCvvCode()); - $this->assertNotNull($obj->getAdviceCode()); - $this->assertNotNull($obj->getEciSubmitted()); - $this->assertNotNull($obj->getVpas()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ProcessorResponse $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getResponseCode(), "TestSample"); - $this->assertEquals($obj->getAvsCode(), "TestSample"); - $this->assertEquals($obj->getCvvCode(), "TestSample"); - $this->assertEquals($obj->getAdviceCode(), "TestSample"); - $this->assertEquals($obj->getEciSubmitted(), "TestSample"); - $this->assertEquals($obj->getVpas(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RecipientBankingInstructionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RecipientBankingInstructionTest.php deleted file mode 100644 index 60176d7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RecipientBankingInstructionTest.php +++ /dev/null @@ -1,69 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getBankName()); - $this->assertNotNull($obj->getAccountHolderName()); - $this->assertNotNull($obj->getAccountNumber()); - $this->assertNotNull($obj->getRoutingNumber()); - $this->assertNotNull($obj->getInternationalBankAccountNumber()); - $this->assertNotNull($obj->getBankIdentifierCode()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param RecipientBankingInstruction $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getBankName(), "TestSample"); - $this->assertEquals($obj->getAccountHolderName(), "TestSample"); - $this->assertEquals($obj->getAccountNumber(), "TestSample"); - $this->assertEquals($obj->getRoutingNumber(), "TestSample"); - $this->assertEquals($obj->getInternationalBankAccountNumber(), "TestSample"); - $this->assertEquals($obj->getBankIdentifierCode(), "TestSample"); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RedirectUrlsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RedirectUrlsTest.php deleted file mode 100644 index e69660a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RedirectUrlsTest.php +++ /dev/null @@ -1,80 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getReturnUrl()); - $this->assertNotNull($obj->getCancelUrl()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param RedirectUrls $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getReturnUrl(), "http://www.google.com"); - $this->assertEquals($obj->getCancelUrl(), "http://www.google.com"); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage ReturnUrl is not a fully qualified URL - */ - public function testUrlValidationForReturnUrl() - { - $obj = new RedirectUrls(); - $obj->setReturnUrl(null); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage CancelUrl is not a fully qualified URL - */ - public function testUrlValidationForCancelUrl() - { - $obj = new RedirectUrls(); - $obj->setCancelUrl(null); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RefundDetailTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RefundDetailTest.php deleted file mode 100644 index 3bf0bd8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RefundDetailTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getDate()); - $this->assertNotNull($obj->getNote()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param RefundDetail $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getDate(), "TestSample"); - $this->assertEquals($obj->getNote(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php deleted file mode 100644 index 4edc7fb..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php +++ /dev/null @@ -1,109 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getReason()); - $this->assertNotNull($obj->getSaleId()); - $this->assertNotNull($obj->getCaptureId()); - $this->assertNotNull($obj->getParentPayment()); - $this->assertNotNull($obj->getDescription()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Refund $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getReason(), "TestSample"); - $this->assertEquals($obj->getSaleId(), "TestSample"); - $this->assertEquals($obj->getCaptureId(), "TestSample"); - $this->assertEquals($obj->getParentPayment(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Refund $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - RefundTest::getJson() - )); - - $result = $obj->get("refundId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php deleted file mode 100644 index 077725e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php +++ /dev/null @@ -1,67 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getSale()); - $this->assertNotNull($obj->getAuthorization()); - $this->assertNotNull($obj->getOrder()); - $this->assertNotNull($obj->getCapture()); - $this->assertNotNull($obj->getRefund()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param RelatedResources $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getSale(), SaleTest::getObject()); - $this->assertEquals($obj->getAuthorization(), AuthorizationTest::getObject()); - $this->assertEquals($obj->getOrder(), OrderTest::getObject()); - $this->assertEquals($obj->getCapture(), CaptureTest::getObject()); - $this->assertEquals($obj->getRefund(), RefundTest::getObject()); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php deleted file mode 100644 index 2a61512..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php +++ /dev/null @@ -1,152 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getPurchaseUnitReferenceId()); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getPaymentMode()); - $this->assertNotNull($obj->getState()); - $this->assertNotNull($obj->getReasonCode()); - $this->assertNotNull($obj->getProtectionEligibility()); - $this->assertNotNull($obj->getProtectionEligibilityType()); - $this->assertNotNull($obj->getClearingTime()); - $this->assertNotNull($obj->getPaymentHoldStatus()); - $this->assertNotNull($obj->getPaymentHoldReasons()); - $this->assertNotNull($obj->getTransactionFee()); - $this->assertNotNull($obj->getReceivableAmount()); - $this->assertNotNull($obj->getExchangeRate()); - $this->assertNotNull($obj->getFmfDetails()); - $this->assertNotNull($obj->getReceiptId()); - $this->assertNotNull($obj->getParentPayment()); - $this->assertNotNull($obj->getProcessorResponse()); - $this->assertNotNull($obj->getBillingAgreementId()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getUpdateTime()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Sale $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample"); - $this->assertEquals($obj->getAmount(), AmountTest::getObject()); - $this->assertEquals($obj->getPaymentMode(), "TestSample"); - $this->assertEquals($obj->getState(), "TestSample"); - $this->assertEquals($obj->getReasonCode(), "TestSample"); - $this->assertEquals($obj->getProtectionEligibility(), "TestSample"); - $this->assertEquals($obj->getProtectionEligibilityType(), "TestSample"); - $this->assertEquals($obj->getClearingTime(), "TestSample"); - $this->assertEquals($obj->getPaymentHoldStatus(), "TestSample"); - $this->assertEquals($obj->getPaymentHoldReasons(), "TestSample"); - $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject()); - $this->assertEquals($obj->getReceivableAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getExchangeRate(), "TestSample"); - $this->assertEquals($obj->getFmfDetails(), FmfDetailsTest::getObject()); - $this->assertEquals($obj->getReceiptId(), "TestSample"); - $this->assertEquals($obj->getParentPayment(), "TestSample"); - $this->assertEquals($obj->getProcessorResponse(), ProcessorResponseTest::getObject()); - $this->assertEquals($obj->getBillingAgreementId(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getUpdateTime(), "TestSample"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param Sale $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - SaleTest::getJson() - )); - - $result = $obj->get("saleId", $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param Sale $obj - */ - public function testRefund($obj, $mockApiContext) - { - $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPPRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - RefundTest::getJson() - )); - $refund = RefundTest::getObject(); - - $result = $obj->refund($refund, $mockApiContext, $mockPPRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/SearchTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/SearchTest.php deleted file mode 100644 index 4c9c432..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/SearchTest.php +++ /dev/null @@ -1,91 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEmail()); - $this->assertNotNull($obj->getRecipientFirstName()); - $this->assertNotNull($obj->getRecipientLastName()); - $this->assertNotNull($obj->getRecipientBusinessName()); - $this->assertNotNull($obj->getNumber()); - $this->assertNotNull($obj->getStatus()); - $this->assertNotNull($obj->getLowerTotalAmount()); - $this->assertNotNull($obj->getUpperTotalAmount()); - $this->assertNotNull($obj->getStartInvoiceDate()); - $this->assertNotNull($obj->getEndInvoiceDate()); - $this->assertNotNull($obj->getStartDueDate()); - $this->assertNotNull($obj->getEndDueDate()); - $this->assertNotNull($obj->getStartPaymentDate()); - $this->assertNotNull($obj->getEndPaymentDate()); - $this->assertNotNull($obj->getStartCreationDate()); - $this->assertNotNull($obj->getEndCreationDate()); - $this->assertNotNull($obj->getPage()); - $this->assertNotNull($obj->getPageSize()); - $this->assertNotNull($obj->getTotalCountRequired()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Search $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEmail(), "TestSample"); - $this->assertEquals($obj->getRecipientFirstName(), "TestSample"); - $this->assertEquals($obj->getRecipientLastName(), "TestSample"); - $this->assertEquals($obj->getRecipientBusinessName(), "TestSample"); - $this->assertEquals($obj->getNumber(), "TestSample"); - $this->assertEquals($obj->getStatus(), "TestSample"); - $this->assertEquals($obj->getLowerTotalAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getUpperTotalAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getStartInvoiceDate(), "TestSample"); - $this->assertEquals($obj->getEndInvoiceDate(), "TestSample"); - $this->assertEquals($obj->getStartDueDate(), "TestSample"); - $this->assertEquals($obj->getEndDueDate(), "TestSample"); - $this->assertEquals($obj->getStartPaymentDate(), "TestSample"); - $this->assertEquals($obj->getEndPaymentDate(), "TestSample"); - $this->assertEquals($obj->getStartCreationDate(), "TestSample"); - $this->assertEquals($obj->getEndCreationDate(), "TestSample"); - $this->assertEquals($obj->getPage(), "12.34"); - $this->assertEquals($obj->getPageSize(), "12.34"); - $this->assertEquals($obj->getTotalCountRequired(), true); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php deleted file mode 100644 index 7f2dabe..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php +++ /dev/null @@ -1,63 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getRecipientName()); - $this->assertNotNull($obj->getDefaultAddress()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ShippingAddress $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getRecipientName(), "TestSample"); - $this->assertEquals($obj->getDefaultAddress(), true); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingCostTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingCostTest.php deleted file mode 100644 index f146cf8..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingCostTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getAmount()); - $this->assertNotNull($obj->getTax()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ShippingCost $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getTax(), TaxTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingInfoTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingInfoTest.php deleted file mode 100644 index dd92c29..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingInfoTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getFirstName()); - $this->assertNotNull($obj->getLastName()); - $this->assertNotNull($obj->getBusinessName()); - $this->assertNotNull($obj->getAddress()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param ShippingInfo $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getFirstName(), "TestSample"); - $this->assertEquals($obj->getLastName(), "TestSample"); - $this->assertEquals($obj->getBusinessName(), "TestSample"); - $this->assertEquals($obj->getAddress(), AddressTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TaxTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TaxTest.php deleted file mode 100644 index 9029bf4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TaxTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getPercent()); - $this->assertNotNull($obj->getAmount()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Tax $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getPercent(), "12.34"); - $this->assertEquals($obj->getAmount(), CurrencyTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TermsTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TermsTest.php deleted file mode 100644 index 4df7938..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TermsTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getType()); - $this->assertNotNull($obj->getMaxBillingAmount()); - $this->assertNotNull($obj->getOccurrences()); - $this->assertNotNull($obj->getAmountRange()); - $this->assertNotNull($obj->getBuyerEditable()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Terms $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getType(), "TestSample"); - $this->assertEquals($obj->getMaxBillingAmount(), CurrencyTest::getObject()); - $this->assertEquals($obj->getOccurrences(), "TestSample"); - $this->assertEquals($obj->getAmountRange(), CurrencyTest::getObject()); - $this->assertEquals($obj->getBuyerEditable(), "TestSample"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php deleted file mode 100644 index dd036d2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertNotNull($obj); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Transaction $obj - */ - public function testGetters($obj) - { - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebProfileTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebProfileTest.php deleted file mode 100644 index 1cad9ee..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebProfileTest.php +++ /dev/null @@ -1,190 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getFlowConfig()); - $this->assertNotNull($obj->getInputFields()); - $this->assertNotNull($obj->getPresentation()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param WebProfile $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getFlowConfig(), FlowConfigTest::getObject()); - $this->assertEquals($obj->getInputFields(), InputFieldsTest::getObject()); - $this->assertEquals($obj->getPresentation(), PresentationTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param WebProfile $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - CreateProfileResponseTest::getJson() - )); - - $result = $obj->create($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebProfile $obj - */ - public function testUpdate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - - $result = $obj->update($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebProfile $obj - */ - public function testPartialUpdate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - $patch = array(PatchTest::getObject()); - - $result = $obj->partial_update($patch, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebProfile $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebProfileTest::getJson() - )); - - $result = $obj->get("profileId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebProfile $obj - */ - public function testGetList($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - json_encode(array(json_decode(WebProfileTest::getJson()))) - )); - - $result = $obj->get_list($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebProfile $obj - */ - public function testDelete($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - - $result = $obj->delete($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventListTest.php deleted file mode 100644 index 611a4b2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventListTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEvents()); - $this->assertNotNull($obj->getCount()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param WebhookEventList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEvents(), WebhookEventTest::getObject()); - $this->assertEquals($obj->getCount(), 123); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTest.php deleted file mode 100644 index 7918ad0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTest.php +++ /dev/null @@ -1,223 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getCreateTime()); - $this->assertNotNull($obj->getResourceType()); - $this->assertNotNull($obj->getEventType()); - $this->assertNotNull($obj->getSummary()); - $this->assertNotNull($obj->getResource()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param WebhookEvent $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getCreateTime(), "TestSample"); - $this->assertEquals($obj->getResourceType(), "TestSample"); - $this->assertEquals($obj->getEventType(), "TestSample"); - $this->assertEquals($obj->getSummary(), "TestSample"); - $this->assertEquals($obj->getResource(), "TestSampleObject"); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @dataProvider mockProvider - * @param WebhookEvent $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookEventTest::getJson() - )); - - $result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebhookEvent $obj - */ - public function testResend($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->resend($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebhookEvent $obj - */ - public function testList($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookEventListTest::getJson() - )); - $params = array(); - - $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param WebhookEvent $obj - */ - public function testValidateWebhook($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookEventTest::getJson() - )); - - $result = WebhookEvent::validateAndGetReceivedEvent('{"id":"123"}', $mockApiContext, $mockPayPalRestCall); - //$result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - /** - * @dataProvider mockProvider - * @param WebhookEvent $obj - * @param ApiContext $mockApiContext - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Webhook Event Id provided in the data is incorrect. This could happen if anyone other than PayPal is faking the incoming webhook data. - */ - public function testValidateWebhook404($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->throwException(new PayPalConnectionException(null, "404 not found", 404))); - - $result = WebhookEvent::validateAndGetReceivedEvent('{"id":"123"}', $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } - - /** - * @dataProvider mockProvider - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Body cannot be null or empty - */ - public function testValidateWebhookNull($mockApiContext) - { - WebhookEvent::validateAndGetReceivedEvent(null, $mockApiContext); - } - - /** - * @dataProvider mockProvider - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Body cannot be null or empty - */ - public function testValidateWebhookEmpty($mockApiContext) - { - WebhookEvent::validateAndGetReceivedEvent('', $mockApiContext); - } - - /** - * @dataProvider mockProvider - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Request Body is not a valid JSON. - */ - public function testValidateWebhookInvalid($mockApiContext) - { - WebhookEvent::validateAndGetReceivedEvent('something-invalid', $mockApiContext); - } - - /** - * @dataProvider mockProvider - * @param $mockApiContext ApiContext - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Id attribute not found in JSON. Possible reason could be invalid JSON Object - */ - public function testValidateWebhookValidJSONWithoutId($obj, $mockApiContext) - { - WebhookEvent::validateAndGetReceivedEvent('{"summary":"json"}', $mockApiContext); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTypeListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTypeListTest.php deleted file mode 100644 index baa569d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTypeListTest.php +++ /dev/null @@ -1,55 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getEventTypes()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param WebhookEventTypeList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getEventTypes(), WebhookEventTypeTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTypeTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTypeTest.php deleted file mode 100644 index 70ec286..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookEventTypeTest.php +++ /dev/null @@ -1,107 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getName()); - $this->assertNotNull($obj->getDescription()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param WebhookEventType $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getName(), "TestSample"); - $this->assertEquals($obj->getDescription(), "TestSample"); - } - - /** - * @dataProvider mockProvider - * @param WebhookEventType $obj - */ - public function testSubscribedEventTypes($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookEventTypeListTest::getJson() - )); - - $result = $obj->subscribedEventTypes("webhookId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param WebhookEventType $obj - */ - public function testAvailableEventTypes($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookEventTypeListTest::getJson() - )); - - $result = $obj->availableEventTypes($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookListTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookListTest.php deleted file mode 100644 index 7bb30f6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookListTest.php +++ /dev/null @@ -1,55 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getWebhooks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param WebhookList $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getWebhooks(), WebhookTest::getObject()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookTest.php deleted file mode 100644 index 4198261..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Api/WebhookTest.php +++ /dev/null @@ -1,179 +0,0 @@ -assertNotNull($obj); - $this->assertNotNull($obj->getId()); - $this->assertNotNull($obj->getUrl()); - $this->assertNotNull($obj->getEventTypes()); - $this->assertNotNull($obj->getLinks()); - $this->assertEquals(self::getJson(), $obj->toJson()); - return $obj; - } - - /** - * @depends testSerializationDeserialization - * @param Webhook $obj - */ - public function testGetters($obj) - { - $this->assertEquals($obj->getId(), "TestSample"); - $this->assertEquals($obj->getUrl(), "http://www.google.com"); - $this->assertEquals($obj->getEventTypes(), WebhookEventTypeTest::getObject()); - $this->assertEquals($obj->getLinks(), LinksTest::getObject()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Url is not a fully qualified URL - */ - public function testUrlValidationForUrl() - { - $obj = new Webhook(); - $obj->setUrl(null); - } - - /** - * @dataProvider mockProvider - * @param Webhook $obj - */ - public function testCreate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - - $result = $obj->create($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Webhook $obj - */ - public function testGet($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookTest::getJson() - )); - - $result = $obj->get("webhookId", $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Webhook $obj - */ - public function testGetAll($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - WebhookListTest::getJson() - )); - - $result = $obj->getAll($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Webhook $obj - */ - public function testUpdate($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - self::getJson() - )); - $patchRequest = PatchRequestTest::getObject(); - - $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - /** - * @dataProvider mockProvider - * @param Webhook $obj - */ - public function testDelete($obj, $mockApiContext) - { - $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $mockPayPalRestCall->expects($this->any()) - ->method('execute') - ->will($this->returnValue( - true - )); - - $result = $obj->delete($mockApiContext, $mockPayPalRestCall); - $this->assertNotNull($result); - } - - public function mockProvider() - { - $obj = self::getObject(); - $mockApiContext = $this->getMockBuilder('ApiContext') - ->disableOriginalConstructor() - ->getMock(); - return array( - array($obj, $mockApiContext), - array($obj, null) - ); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php deleted file mode 100644 index 9f367c1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php +++ /dev/null @@ -1,143 +0,0 @@ -assertEquals(Constants::CLIENT_ID, $cred->getClientId()); - $this->assertEquals(Constants::CLIENT_SECRET, $cred->getClientSecret()); - $config = PayPalConfigManager::getInstance()->getConfigHashmap(); - $token = $cred->getAccessToken($config); - $this->assertNotNull($token); - - // Check that we get the same token when issuing a new call before token expiry - $newToken = $cred->getAccessToken($config); - $this->assertNotNull($newToken); - $this->assertEquals($token, $newToken); - } - - /** - * @group integration - */ - public function testInvalidCredentials() - { - $this->setExpectedException('PayPal\Exception\PayPalConnectionException'); - $cred = new OAuthTokenCredential('dummy', 'secret'); - $this->assertNull($cred->getAccessToken(PayPalConfigManager::getInstance()->getConfigHashmap())); - } - - public function testGetAccessTokenUnit() - { - $config = array( - 'mode' => 'sandbox', - 'cache.enabled' => true, - 'cache.FileName' => AuthorizationCacheTest::CACHE_FILE - ); - $cred = new OAuthTokenCredential('clientId', 'clientSecret'); - - //{"clientId":{"clientId":"clientId","accessToken":"accessToken","tokenCreateTime":1421204091,"tokenExpiresIn":288000000}} - AuthorizationCache::push($config, 'clientId', $cred->encrypt('accessToken'), 1421204091, 288000000); - - $apiContext = new ApiContext($cred); - $apiContext->setConfig($config); - $this->assertEquals('clientId', $cred->getClientId()); - $this->assertEquals('clientSecret', $cred->getClientSecret()); - $result = $cred->getAccessToken($config); - $this->assertNotNull($result); - } - - public function testGetAccessTokenUnitMock() - { - $config = array( - 'mode' => 'sandbox' - ); - /** @var OAuthTokenCredential $auth */ - $auth = $this->getMockBuilder('\PayPal\Auth\OAuthTokenCredential') - ->setConstructorArgs(array('clientId', 'clientSecret')) - ->setMethods(array('getToken')) - ->getMock(); - - $auth->expects($this->any()) - ->method('getToken') - ->will($this->returnValue( - array('refresh_token' => 'refresh_token_value') - )); - $response = $auth->getRefreshToken($config, 'auth_value'); - $this->assertNotNull($response); - $this->assertEquals('refresh_token_value', $response); - - } - - public function testUpdateAccessTokenUnitMock() - { - $config = array( - 'mode' => 'sandbox' - ); - /** @var OAuthTokenCredential $auth */ - $auth = $this->getMockBuilder('\PayPal\Auth\OAuthTokenCredential') - ->setConstructorArgs(array('clientId', 'clientSecret')) - ->setMethods(array('getToken')) - ->getMock(); - - $auth->expects($this->any()) - ->method('getToken') - ->will($this->returnValue( - array( - 'access_token' => 'accessToken', - 'expires_in' => 280 - ) - )); - - $response = $auth->updateAccessToken($config); - $this->assertNotNull($response); - $this->assertEquals('accessToken', $response); - - $response = $auth->updateAccessToken($config, 'refresh_token'); - $this->assertNotNull($response); - $this->assertEquals('accessToken', $response); - - } - - /** - * @expectedException \PayPal\Exception\PayPalConnectionException - * @expectedExceptionMessage Could not generate new Access token. Invalid response from server: - */ - public function testUpdateAccessTokenNullReturnUnitMock() - { - $config = array( - 'mode' => 'sandbox' - ); - /** @var OAuthTokenCredential $auth */ - $auth = $this->getMockBuilder('\PayPal\Auth\OAuthTokenCredential') - ->setConstructorArgs(array('clientId', 'clientSecret')) - ->setMethods(array('getToken')) - ->getMock(); - - $auth->expects($this->any()) - ->method('getToken') - ->will($this->returnValue( - array( - ) - )); - - $response = $auth->updateAccessToken($config); - $this->assertNotNull($response); - $this->assertEquals('accessToken', $response); - - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Cache/AuthorizationCacheTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Cache/AuthorizationCacheTest.php deleted file mode 100644 index 82a5e14..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Cache/AuthorizationCacheTest.php +++ /dev/null @@ -1,107 +0,0 @@ - 'true'), true), - array(array('cache.enabled' => true), true), - ); - } - - public static function CachePathProvider() - { - return array( - array(array('cache.FileName' => 'temp.cache'), 'temp.cache') - ); - } - - /** - * - * @dataProvider EnabledProvider - */ - public function testIsEnabled($config, $expected) - { - $result = AuthorizationCache::isEnabled($config); - $this->assertEquals($expected, $result); - } - - /** - * @dataProvider CachePathProvider - */ - public function testCachePath($config, $expected) - { - $result = AuthorizationCache::cachePath($config); - $this->assertContains($expected, $result); - } - - public function testCacheDisabled() - { - // 'cache.enabled' => true, - AuthorizationCache::push(array('cache.enabled' => false), 'clientId', 'accessToken', 'tokenCreateTime', 'tokenExpiresIn'); - AuthorizationCache::pull(array('cache.enabled' => false), 'clientId'); - } - - public function testCachePush() - { - AuthorizationCache::push(array('cache.enabled' => true, 'cache.FileName' => AuthorizationCacheTest::CACHE_FILE), 'clientId', 'accessToken', 'tokenCreateTime', 'tokenExpiresIn'); - $contents = file_get_contents(AuthorizationCacheTest::CACHE_FILE); - $tokens = json_decode($contents, true); - $this->assertNotNull($contents); - $this->assertEquals('clientId', $tokens['clientId']['clientId']); - $this->assertEquals('accessToken', $tokens['clientId']['accessTokenEncrypted']); - $this->assertEquals('tokenCreateTime', $tokens['clientId']['tokenCreateTime']); - $this->assertEquals('tokenExpiresIn', $tokens['clientId']['tokenExpiresIn']); - - } - - public function testCachePullNonExisting() - { - $result = AuthorizationCache::pull(array('cache.enabled' => true, 'cache.FileName' => AuthorizationCacheTest::CACHE_FILE), 'clientIdUndefined'); - $this->assertNull($result); - } - - /** - * @depends testCachePush - */ - public function testCachePull() - { - $result = AuthorizationCache::pull(array('cache.enabled' => true, 'cache.FileName' => AuthorizationCacheTest::CACHE_FILE), 'clientId'); - $this->assertNotNull($result); - $this->assertTrue(is_array($result)); - $this->assertEquals('clientId', $result['clientId']); - $this->assertEquals('accessToken', $result['accessTokenEncrypted']); - $this->assertEquals('tokenCreateTime', $result['tokenCreateTime']); - $this->assertEquals('tokenExpiresIn', $result['tokenExpiresIn']); - - unlink(AuthorizationCacheTest::CACHE_FILE); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php deleted file mode 100644 index 15faf11..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php +++ /dev/null @@ -1,44 +0,0 @@ -name = $name; - } - - public function getName() - { - return $this->name; - } - - public function setDescription($description) - { - $this->description = $description; - } - - public function getDescription() - { - return $this->description; - } - - public function setTags($tags) - { - if (!is_array($tags)) { - $tags = array($tags); - } - $this->tags = $tags; - } - - /** - * @return array - */ - public function getTags() - { - return $this->tags; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php deleted file mode 100644 index 0c353b0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php +++ /dev/null @@ -1,24 +0,0 @@ -assertEquals(false, ArrayUtil::isAssocArray($arr)); - - $arr = array( - 'name' => 'John Doe', - 'City' => 'San Jose' - ); - $this->assertEquals(true, ArrayUtil::isAssocArray($arr)); - - $arr[] = 'CA'; - $this->assertEquals(false, ArrayUtil::isAssocArray($arr)); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php deleted file mode 100644 index 55dc955..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php +++ /dev/null @@ -1,7 +0,0 @@ -assertEquals($expected, $result); - - } - - /** - * @dataProvider CurrencyListWithNoDecimalsProvider - */ - public function testPriceWithNoDecimalCurrencyInvalid($input) - { - try { - FormatConverter::formatToPrice("1.234", $input); - } catch (\InvalidArgumentException $ex) { - $this->assertContains("value cannot have decimals for", $ex->getMessage()); - } - } - - /** - * @dataProvider CurrencyListWithNoDecimalsProvider - */ - public function testPriceWithNoDecimalCurrencyValid($input) - { - $result = FormatConverter::formatToPrice("1.0000000", $input); - $this->assertEquals("1", $result); - } - - /** - * - * @dataProvider \PayPal\Test\Validation\NumericValidatorTest::positiveProvider - */ - public function testFormatToNumber($input, $expected) - { - $result = FormatConverter::formatToNumber($input); - $this->assertEquals($expected, $result); - } - - public function testFormatToNumberDecimals() - { - $result = FormatConverter::formatToNumber("0.0", 4); - $this->assertEquals("0.0000", $result); - } - - - public function testFormat() - { - $result = FormatConverter::format("12.0123", "%0.2f"); - $this->assertEquals("12.01", $result); - } - - /** - * @dataProvider apiModelSettersProvider - * - * @param PayPalModel $class Class Object - * @param string $method Method Name where the format is being applied - * @param array $values array of ['input', 'expectedResponse'] is provided - */ - public function testSettersOfKnownApiModel($class, $method, $values) - { - $obj = new $class(); - $setter = "set" . $method; - $getter = "get" . $method; - $result = $obj->$setter($values[0]); - $this->assertEquals($values[1], $result->$getter()); - } - - /** - * @dataProvider apiModelSettersInvalidProvider - * @expectedException \InvalidArgumentException - */ - public function testSettersOfKnownApiModelInvalid($class, $methodName, $values) - { - $obj = new $class(); - $setter = "set" . $methodName; - $obj->$setter($values[0]); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php deleted file mode 100644 index da9063e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php +++ /dev/null @@ -1,227 +0,0 @@ -setName("test"); - $o->setDescription("description"); - - $this->assertEquals("test", $o->getName()); - $this->assertEquals("description", $o->getDescription()); - - $json = $o->toJSON(); - $this->assertEquals('{"name":"test","description":"description"}', $json); - - $newO = new SimpleClass(); - $newO->fromJson($json); - $this->assertEquals($o, $newO); - - } - - public function testConstructorJSON() - { - $obj = new SimpleClass('{"name":"test","description":"description"}'); - $this->assertEquals($obj->getName(), "test"); - $this->assertEquals($obj->getDescription(), "description"); - } - - public function testConstructorArray() - { - $arr = array('name' => 'test', 'description' => 'description'); - $obj = new SimpleClass($arr); - $this->assertEquals($obj->getName(), "test"); - $this->assertEquals($obj->getDescription(), "description"); - } - - public function testConstructorNull() - { - $obj = new SimpleClass(null); - $this->assertNotEquals($obj->getName(), "test"); - $this->assertNotEquals($obj->getDescription(), "description"); - $this->assertNull($obj->getName()); - $this->assertNull($obj->getDescription()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid JSON String - */ - public function testConstructorInvalidInput() - { - new SimpleClass("Something that is not even correct"); - } - - public function testSimpleClassObjectConversion() - { - $json = '{"name":"test","description":"description"}'; - - $obj = new SimpleClass(); - $obj->fromJson($json); - - $this->assertEquals("test", $obj->getName()); - $this->assertEquals("description", $obj->getDescription()); - - } - - public function testSimpleClassObjectInvalidConversion() - { - try { - $json = '{"name":"test","description":"description","invalid":"value"}'; - - $obj = new SimpleClass(); - $obj->fromJson($json); - - $this->assertEquals("test", $obj->getName()); - $this->assertEquals("description", $obj->getDescription()); - } catch (\PHPUnit_Framework_Error_Notice $ex) { - // No need to do anything - } - } - - /** - * Test Case to determine if the unknown object is returned, it would not add that object to the model. - */ - public function testUnknownObjectConversion() - { - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled')); - $json = '{"name":"test","unknown":{ "id" : "123", "object": "456"},"description":"description"}'; - - $obj = new SimpleClass(); - $obj->fromJson($json); - - $this->assertEquals("test", $obj->getName()); - $this->assertEquals("description", $obj->getDescription()); - $resultJson = $obj->toJSON(); - $this->assertContains("unknown", $resultJson); - $this->assertContains("id", $resultJson); - $this->assertContains("object", $resultJson); - $this->assertContains("123", $resultJson); - $this->assertContains("456", $resultJson); - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict')); - } - - /** - * Test Case to determine if the unknown object is returned, it would not add that object to the model. - */ - public function testUnknownArrayConversion() - { - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled')); - $json = '{"name":"test","unknown":[{"object": { "id" : "123", "object": "456"}}, {"more": { "id" : "123", "object": "456"}}],"description":"description"}'; - - $obj = new SimpleClass(); - $obj->fromJson($json); - - $this->assertEquals("test", $obj->getName()); - $this->assertEquals("description", $obj->getDescription()); - $resultJson = $obj->toJSON(); - $this->assertContains("unknown", $resultJson); - $this->assertContains("id", $resultJson); - $this->assertContains("object", $resultJson); - $this->assertContains("123", $resultJson); - $this->assertContains("456", $resultJson); - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict')); - } - - public function testEmptyArrayConversion() - { - $json = '{"id":"PAY-5DW86196ER176274EKT3AEYA","transactions":[{"related_resources":[]}]}'; - $payment = new Payment($json); - $result = $payment->toJSON(); - $this->assertContains('"related_resources":[]', $result); - $this->assertNotNull($result); - } - - public function testMultipleEmptyArrayConversion() - { - $json = '{"id":"PAY-5DW86196ER176274EKT3AEYA","transactions":[{"related_resources":[{},{}]}]}'; - $payment = new Payment($json); - $result = $payment->toJSON(); - $this->assertContains('"related_resources":[{},{}]', $result); - $this->assertNotNull($result); - } - - public function testSetterMagicMethod() - { - $obj = new PayPalModel(); - $obj->something = "other"; - $obj->else = array(); - $obj->there = null; - $obj->obj = '{}'; - $obj->objs = array('{}'); - $this->assertEquals("other", $obj->something); - $this->assertTrue(is_array($obj->else)); - $this->assertNull($obj->there); - $this->assertEquals('{}', $obj->obj); - $this->assertTrue(is_array($obj->objs)); - $this->assertEquals('{}', $obj->objs[0]); - } - - public function testInvalidMagicMethodWithDisabledValidation() - { - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled')); - $obj = new SimpleClass(); - try { - $obj->invalid = "value2"; - $this->assertEquals($obj->invalid, "value2"); - } catch (\PHPUnit_Framework_Error_Notice $ex) { - $this->fail("It should not have thrown a Notice Error as it is disabled."); - } - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict')); - } - - public function testInvalidMagicMethodWithValidationLevel() - { - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'log')); - $obj = new SimpleClass(); - $obj->invalid2 = "value2"; - $this->assertEquals($obj->invalid2, "value2"); - PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict')); - } - - public function testArrayClassConversion() - { - $o = new ArrayClass(); - $o->setName("test"); - $o->setDescription("description"); - $o->setTags(array('payment', 'info', 'test')); - - $this->assertEquals("test", $o->getName()); - $this->assertEquals("description", $o->getDescription()); - $this->assertEquals(array('payment', 'info', 'test'), $o->getTags()); - - $json = $o->toJSON(); - $this->assertEquals('{"name":"test","description":"description","tags":["payment","info","test"]}', $json); - - $newO = new ArrayClass(); - $newO->fromJson($json); - $this->assertEquals($o, $newO); - } - - public function testNestedClassConversion() - { - $n = new ArrayClass(); - $n->setName("test"); - $n->setDescription("description"); - $o = new NestedClass(); - $o->setId('123'); - $o->setInfo($n); - - $this->assertEquals("123", $o->getId()); - $this->assertEquals("test", $o->getInfo()->getName()); - - $json = $o->toJSON(); - $this->assertEquals('{"id":"123","info":{"name":"test","description":"description"}}', $json); - - $newO = new NestedClass(); - $newO->fromJson($json); - $this->assertEquals($o, $newO); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php deleted file mode 100644 index 495a70f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php +++ /dev/null @@ -1,36 +0,0 @@ -id = $id; - } - - public function getId() - { - return $this->id; - } - - /** - * - * @param \PayPal\Test\Common\ArrayClass $info - */ - public function setInfo($info) - { - $this->info = $info; - } - - /** - * - * @return \PayPal\Test\Common\ArrayClass - */ - public function getInfo() - { - return $this->info; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/PayPalModelTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/PayPalModelTest.php deleted file mode 100644 index d59bd5b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/PayPalModelTest.php +++ /dev/null @@ -1,359 +0,0 @@ -field1 = $field1; - return $this; - } - - /** - * - * @access public - * @return string - */ - public function getField1() - { - return $this->field1; - } - - /** - * - * @access public - * @param string $field2 - * @return self - */ - public function setField2($field2) - { - $this->field2 = $field2; - return $this; - } - - /** - * - * @access public - * @return string - */ - public function getField2() - { - return $this->field2; - } - -} - - -class ContainerModelTestClass extends PayPalModel -{ - - /** - * - * @access public - * @param string $field1 - */ - public function setField1($field1) - { - $this->field1 = $field1; - return $this; - } - - /** - * - * @access public - * @return string - */ - public function getField1() - { - return $this->field1; - } - - /** - * - * @access public - * @param SimpleModelTestClass $field1 - */ - public function setNested1($nested1) - { - $this->nested1 = $nested1; - return $this; - } - - /** - * - * @access public - * @return SimpleModelTestClass - */ - public function getNested1() - { - return $this->nested1; - } - - -} - -class ListModelTestClass extends PayPalModel -{ - - /** - * - * @access public - * @param string $list1 - */ - public function setList1($list1) - { - $this->list1 = $list1; - } - - /** - * - * @access public - * @return string - */ - public function getList1() - { - return $this->list1; - } - - /** - * - * @access public - * @param SimpleModelTestClass $list2 array of SimpleModelTestClass - */ - public function setList2($list2) - { - $this->list2 = $list2; - return $this; - } - - /** - * - * @access public - * @return SimpleModelTestClass array of SimpleModelTestClass - */ - public function getList2() - { - return $this->list2; - } - - -} - -/** - * Test class for PayPalModel. - * - */ -class PayPalModelTest extends PHPUnit_Framework_TestCase -{ - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp() - { - - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testSimpleConversion() - { - $o = new SimpleModelTestClass(); - $o->setField1('value 1'); - $o->setField2("value 2"); - - $this->assertEquals('{"field1":"value 1","field2":"value 2"}', $o->toJSON()); - - $oCopy = new SimpleModelTestClass(); - $oCopy->fromJson($o->toJSON()); - $this->assertEquals($o, $oCopy); - - } - - /** - * @test - */ - public function testEmptyObject() - { - $child = new SimpleModelTestClass(); - $child->setField1(null); - - $parent = new ContainerModelTestClass(); - $parent->setField1("parent"); - $parent->setNested1($child); - - $this->assertEquals('{"field1":"parent","nested1":{}}', - $parent->toJSON()); - - $parentCopy = new ContainerModelTestClass(); - $parentCopy->fromJson($parent->toJSON()); - $this->assertEquals($parent, $parentCopy); - - } - - /** - * @test - */ - public function testSpecialChars() - { - $o = new SimpleModelTestClass(); - $o->setField1('value "1'); - $o->setField2("value 2"); - - $this->assertEquals('{"field1":"value \"1","field2":"value 2"}', $o->toJSON()); - - $oCopy = new SimpleModelTestClass(); - $oCopy->fromJson($o->toJSON()); - $this->assertEquals($o, $oCopy); - - } - - - /** - * @test - */ - public function testNestedConversion() - { - $child = new SimpleModelTestClass(); - $child->setField1('value 1'); - $child->setField2("value 2"); - - $parent = new ContainerModelTestClass(); - $parent->setField1("parent"); - $parent->setNested1($child); - - $this->assertEquals('{"field1":"parent","nested1":{"field1":"value 1","field2":"value 2"}}', - $parent->toJSON()); - - $parentCopy = new ContainerModelTestClass(); - $parentCopy->fromJson($parent->toJSON()); - $this->assertEquals($parent, $parentCopy); - - } - - - /** - * @test - */ - public function testListConversion() - { - $c1 = new SimpleModelTestClass(); - $c1->setField1("a")->setField2('value'); - - $c2 = new SimpleModelTestClass(); - $c1->setField1("another")->setField2('object'); - - $parent = new ListModelTestClass(); - $parent->setList1(array('simple', 'list', 'with', 'integer', 'keys')); - $parent->setList2(array($c1, $c2)); - - $parentCopy = new ListModelTestClass(); - $parentCopy->fromJson($parent->toJSON()); - $this->assertEquals($parent, $parentCopy); - } - - public function EmptyNullProvider() - { - return array( - array(0, true), - array(null, false), - array("", true), - array("null", true), - array(-1, true), - array('', true) - ); - } - - /** - * @dataProvider EmptyNullProvider - * @param string|null $field2 - * @param bool $matches - */ - public function testEmptyNullConversion($field2, $matches) - { - $c1 = new SimpleModelTestClass(); - $c1->setField1("a")->setField2($field2); - $this->assertTrue(strpos($c1->toJSON(),"field2") !== !$matches); - } - - public function getProvider() - { - return array( - array('[[]]', 1, array(array())), - array('[{}]', 1, array(new PayPalModel())), - array('[{"id":"123"}]', 1, array(new PayPalModel(array('id' => '123')))), - array('{"id":"123"}', 1, array(new PayPalModel(array('id' => '123')))), - array('[]', 0, array()), - array('{}', 1, array(new PayPalModel())), - array(array(), 0, array()), - array(array("id" => "123"), 1, array(new PayPalModel(array('id' =>'123')))), - array(null, 0, null), - array('',0, array()), - array('[[], {"id":"123"}]', 2, array(array(), new PayPalModel(array("id"=> "123")))), - array('[{"id":"123"}, {"id":"321"}]', 2, - array( - new PayPalModel(array("id" => "123")), - new PayPalModel(array("id" => "321")) - ) - ), - array(array(array("id" => "123"), array("id" => "321")), 2, - array( - new PayPalModel(array("id" => "123")), - new PayPalModel(array("id" => "321")) - )), - array(new PayPalModel('{"id": "123"}'), 1, array(new PayPalModel(array("id" => "123")))) - ); - } - - public function getInvalidProvider() - { - return array( - array('{]'), - array('[{]') - ); - } - - /** - * @dataProvider getProvider - * @param string|null $input - * @param int $count - * @param mixed $expected - */ - public function testGetList($input, $count, $expected) - { - $result = PayPalModel::getList($input); - $this->assertEquals($expected, $result); - if ($input) { - $this->assertNotNull($result); - $this->assertTrue(is_array($result)); - $this->assertEquals($count, sizeof($result)); - } - } - - /** - * @dataProvider getInvalidProvider - * @expectedException InvalidArgumentException - * @expectedExceptionMessage Invalid JSON String - * @param string|null $input - */ - public function testGetListInvalidInput($input) - { - $result = PayPalModel::getList($input); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php deleted file mode 100644 index 4eb49ff..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php +++ /dev/null @@ -1,28 +0,0 @@ -name = $name; - } - - public function getName() - { - return $this->name; - } - - public function setDescription($description) - { - $this->description = $description; - } - - public function getDescription() - { - return $this->description; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php deleted file mode 100644 index 116561b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php +++ /dev/null @@ -1,27 +0,0 @@ -assertNotNull($id); - $this->assertNotNull($version); - $this->assertNotNull($features); - - $this->assertEquals("name", $id); - $this->assertEquals("version", $version); - - // Check that we pass in these mininal features - $this->assertThat($features, $this->stringContains("os=")); - $this->assertThat($features, $this->stringContains("bit=")); - $this->assertThat($features, $this->stringContains("platform-ver=")); - $this->assertGreaterThan(5, count(explode(';', $features))); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Constants.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Constants.php deleted file mode 100644 index eb64f22..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Constants.php +++ /dev/null @@ -1,8 +0,0 @@ -object = new \ReflectionClass('PayPal\Core\PayPalConfigManager'); - runkit_constant_remove('PP_CONFIG_PATH'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - $property = $this->object->getProperty('instance'); - $property->setValue(null); - } - - - public function testGetInstance() - { - define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__)))); - $this->object = PayPalConfigManager::getInstance(); - $instance = $this->object->getInstance(); - $instance2 = $this->object->getInstance(); - $this->assertTrue($instance instanceof PayPalConfigManager); - $this->assertSame($instance, $instance2); - } - - - public function testGet() - { - define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__)))); - $this->object = PayPalConfigManager::getInstance(); - $ret = $this->object->get('acct2'); - $this->assertConfiguration( - array('acct2.ClientId' => 'TestClientId', 'acct2.ClientSecret' => 'TestClientSecret'), - $ret - ); - $this->assertTrue(sizeof($ret) == 2); - - } - - - public function testGetIniPrefix() - { - define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__)))); - $this->object = PayPalConfigManager::getInstance(); - - $ret = $this->object->getIniPrefix(); - $this->assertContains('acct1', $ret); - $this->assertEquals(sizeof($ret), 2); - - $ret = $this->object->getIniPrefix('TestClientId'); - $this->assertEquals('acct2', $ret); - } - - - public function testConfigByDefault() - { - define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__)))); - $this->object = PayPalConfigManager::getInstance(); - - // Test file based config params and defaults - $config = PayPalConfigManager::getInstance()->getConfigHashmap(); - $this->assertConfiguration(array('mode' => 'sandbox', 'http.ConnectionTimeOut' => '60'), $config); - } - - - public function testConfigByCustom() - { - define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__)))); - $this->object = PayPalConfigManager::getInstance(); - - // Test custom config params and defaults - $config = PayPalConfigManager::getInstance()->addConfigs(array('mode' => 'custom', 'http.ConnectionTimeOut' => 900))->getConfigHashmap(); - $this->assertConfiguration(array('mode' => 'custom', 'http.ConnectionTimeOut' => '900'), $config); - } - - - public function testConfigByFileAndCustom() { - define("PP_CONFIG_PATH", __DIR__. '/non_existent/'); - $this->object = PayPalConfigManager::getInstance(); - - $config = PayPalConfigManager::getInstance()->getConfigHashmap(); - $this->assertArrayHasKey('http.ConnectionTimeOut', $config); - $this->assertEquals('30', $config['http.ConnectionTimeOut']); - $this->assertEquals('5', $config['http.Retry']); - - //Add more configs - $config = PayPalConfigManager::getInstance()->addConfigs(array('http.Retry' => "10", 'mode' => 'sandbox'))->getConfigHashmap(); - $this->assertConfiguration(array('http.ConnectionTimeOut' => "30", 'http.Retry' => "10", 'mode' => 'sandbox'), $config); - } - - /** - * Asserts if each configuration is available and has expected value. - * - * @param $conditions - * @param $config - */ - public function assertConfiguration($conditions, $config) { - foreach($conditions as $key => $value) { - $this->assertArrayHasKey($key, $config); - $this->assertEquals($value, $config[$key]); - } - } -} -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php deleted file mode 100644 index f87f552..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php +++ /dev/null @@ -1,148 +0,0 @@ - 'client-id', - 'acct1.ClientSecret' => 'client-secret', - 'http.ConnectionTimeOut' => '30', - 'http.Retry' => '5', - 'service.RedirectURL' => 'https://www.sandbox.paypal.com/webscr&cmd=', - 'service.DevCentralURL' => 'https://developer.paypal.com', - 'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr', - 'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/', - 'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com', - 'log.FileName' => 'PayPal.log', - 'log.LogLevel' => 'INFO', - 'log.LogEnabled' => '1', - ); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp() - { - $this->object = PayPalCredentialManager::getInstance($this->config); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testGetInstance() - { - $instance = $this->object->getInstance($this->config); - $this->assertTrue($instance instanceof PayPalCredentialManager); - } - - /** - * @test - */ - public function testGetSpecificCredentialObject() - { - $cred = $this->object->getCredentialObject('acct1'); - $this->assertNotNull($cred); - $this->assertAttributeEquals('client-id', 'clientId', $cred); - $this->assertAttributeEquals('client-secret', 'clientSecret', $cred); - } - - /** - * @after testGetDefaultCredentialObject - * - * @throws \PayPal\Exception\PayPalInvalidCredentialException - */ - public function testSetCredentialObject() - { - $authObject = $this->getMockBuilder('\Paypal\Auth\OAuthTokenCredential') - ->disableOriginalConstructor() - ->getMock(); - $cred = $this->object->setCredentialObject($authObject)->getCredentialObject(); - - $this->assertNotNull($cred); - $this->assertSame($this->object->getCredentialObject(), $authObject); - } - - /** - * @after testGetDefaultCredentialObject - * - * @throws \PayPal\Exception\PayPalInvalidCredentialException - */ - public function testSetCredentialObjectWithUserId() - { - $authObject = $this->getMockBuilder('\Paypal\Auth\OAuthTokenCredential') - ->disableOriginalConstructor() - ->getMock(); - $cred = $this->object->setCredentialObject($authObject, 'sample')->getCredentialObject('sample'); - $this->assertNotNull($cred); - $this->assertSame($this->object->getCredentialObject(), $authObject); - } - - /** - * @after testGetDefaultCredentialObject - * - * @throws \PayPal\Exception\PayPalInvalidCredentialException - */ - public function testSetCredentialObjectWithoutDefault() - { - $authObject = $this->getMockBuilder('\Paypal\Auth\OAuthTokenCredential') - ->disableOriginalConstructor() - ->getMock(); - $cred = $this->object->setCredentialObject($authObject, null, false)->getCredentialObject(); - $this->assertNotNull($cred); - $this->assertNotSame($this->object->getCredentialObject(), $authObject); - } - - - /** - * @test - */ - public function testGetInvalidCredentialObject() - { - $this->setExpectedException('PayPal\Exception\PayPalInvalidCredentialException'); - $cred = $this->object->getCredentialObject('invalid_biz_api1.gmail.com'); - } - - /** - * - */ - public function testGetDefaultCredentialObject() - { - $cred = $this->object->getCredentialObject(); - $this->assertNotNull($cred); - $this->assertAttributeEquals('client-id', 'clientId', $cred); - $this->assertAttributeEquals('client-secret', 'clientSecret', $cred); - } - - /** - * @test - */ - public function testGetRestCredentialObject() - { - $cred = $this->object->getCredentialObject('acct1'); - - $this->assertNotNull($cred); - - $this->assertAttributeEquals($this->config['acct1.ClientId'], 'clientId', $cred); - - $this->assertAttributeEquals($this->config['acct1.ClientSecret'], 'clientSecret', $cred); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalHttpConfigTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalHttpConfigTest.php deleted file mode 100644 index 44b0eeb..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalHttpConfigTest.php +++ /dev/null @@ -1,139 +0,0 @@ - '30', - 'http.Retry' => '5', - ); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp() - { - - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testHeaderFunctions() - { - $o = new PayPalHttpConfig(); - $o->addHeader('key1', 'value1'); - $o->addHeader('key2', 'value'); - $o->addHeader('key2', 'overwritten'); - - $this->assertEquals(2, count($o->getHeaders())); - $this->assertEquals('overwritten', $o->getHeader('key2')); - $this->assertNull($o->getHeader('key3')); - - $o = new PayPalHttpConfig(); - $o->addHeader('key1', 'value1'); - $o->addHeader('key2', 'value'); - $o->addHeader('key2', 'and more', false); - - $this->assertEquals(2, count($o->getHeaders())); - $this->assertEquals('value;and more', $o->getHeader('key2')); - - $o->removeHeader('key2'); - $this->assertEquals(1, count($o->getHeaders())); - $this->assertNull($o->getHeader('key2')); - } - - /** - * @test - */ - public function testCurlOpts() - { - $o = new PayPalHttpConfig(); - $o->setCurlOptions(array('k' => 'v')); - - $curlOpts = $o->getCurlOptions(); - $this->assertEquals(1, count($curlOpts)); - $this->assertEquals('v', $curlOpts['k']); - } - - public function testRemoveCurlOpts() - { - $o = new PayPalHttpConfig(); - $o->setCurlOptions(array('k' => 'v')); - $curlOpts = $o->getCurlOptions(); - $this->assertEquals(1, count($curlOpts)); - $this->assertEquals('v', $curlOpts['k']); - - $o->removeCurlOption('k'); - $curlOpts = $o->getCurlOptions(); - $this->assertEquals(0, count($curlOpts)); - } - - /** - * @test - */ - public function testUserAgent() - { - $ua = 'UAString'; - $o = new PayPalHttpConfig(); - $o->setUserAgent($ua); - - $curlOpts = $o->getCurlOptions(); - $this->assertEquals($ua, $curlOpts[CURLOPT_USERAGENT]); - } - - /** - * @test - */ - public function testSSLOpts() - { - $sslCert = '../cacert.pem'; - $sslPass = 'passPhrase'; - - $o = new PayPalHttpConfig(); - $o->setSSLCert($sslCert, $sslPass); - - $curlOpts = $o->getCurlOptions(); - $this->assertArrayHasKey(CURLOPT_SSLCERT, $curlOpts); - $this->assertEquals($sslPass, $curlOpts[CURLOPT_SSLCERTPASSWD]); - } - - /** - * @test - */ - public function testProxyOpts() - { - $proxy = 'http://me:secret@hostname:8081'; - - $o = new PayPalHttpConfig(); - $o->setHttpProxy($proxy); - - $curlOpts = $o->getCurlOptions(); - $this->assertEquals('hostname:8081', $curlOpts[CURLOPT_PROXY]); - $this->assertEquals('me:secret', $curlOpts[CURLOPT_PROXYUSERPWD]); - - $this->setExpectedException('PayPal\Exception\PayPalConfigurationException'); - $o->setHttpProxy('invalid string'); - } -} - -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php deleted file mode 100644 index e5a83db..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php +++ /dev/null @@ -1,66 +0,0 @@ -object = PayPalLoggingManager::getInstance('InvoiceTest'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testError() - { - $this->object->error('Test Error Message'); - - } - - /** - * @test - */ - public function testWarning() - { - $this->object->warning('Test Warning Message'); - } - - /** - * @test - */ - public function testInfo() - { - $this->object->info('Test info Message'); - } - - /** - * @test - */ - public function testFine() - { - $this->object->fine('Test fine Message'); - } -} - -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php deleted file mode 100644 index c6067af..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php +++ /dev/null @@ -1,38 +0,0 @@ -object = new PayPalConfigurationException('Test PayPalConfigurationException'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - public function testPPConfigurationException() - { - $this->assertEquals('Test PayPalConfigurationException', $this->object->getMessage()); - } -} - -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php deleted file mode 100644 index f64470a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php +++ /dev/null @@ -1,50 +0,0 @@ -object = new PayPalConnectionException('http://testURL', 'test message'); - $this->object->setData('response payload for connection'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testGetUrl() - { - $this->assertEquals('http://testURL', $this->object->getUrl()); - } - - /** - * @test - */ - public function testGetData() - { - $this->assertEquals('response payload for connection', $this->object->getData()); - } -} - -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php deleted file mode 100644 index 93d51e1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php +++ /dev/null @@ -1,42 +0,0 @@ -object = new PayPalInvalidCredentialException; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testErrorMessage() - { - $msg = $this->object->errorMessage(); - $this->assertContains('Error on line', $msg); - } -} - -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php deleted file mode 100644 index 6892f20..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php +++ /dev/null @@ -1,42 +0,0 @@ -object = new PayPalMissingCredentialException; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @test - */ - public function testErrorMessage() - { - $msg = $this->object->errorMessage(); - $this->assertContains('Error on line', $msg); - } -} - -?> diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php deleted file mode 100644 index 8b006db..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php +++ /dev/null @@ -1,232 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $this->setupTest($className, $testName); - } - - public function setupTest($className, $testName) - { - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - Setup::SetUpForFunctionalTests($this); - } - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - /** - * @return Agreement - */ - public function testCreatePayPalAgreement() - { - $plan = BillingPlansFunctionalTest::getPlan(); - $request = $this->operation['request']['body']; - $agreement = new Agreement($request); - // Update the Schema to use a working Plan - $agreement->getPlan()->setId($plan->getId()); - $result = $agreement->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } - - /** - * @depends testCreatePayPalAgreement - * @param $agreement Agreement - * @return Agreement - */ - public function testExecute($agreement) - { - if (Setup::$mode == 'sandbox') { - $this->markTestSkipped('Not executable on sandbox environment. Needs human interaction'); - } - $links = $agreement->getLinks(); - $url = parse_url($links[0]->getHref(), 6); - parse_str($url, $result); - $paymentToken = $result['token']; - $this->assertNotNull($paymentToken); - $this->assertNotEmpty($paymentToken); - $result = $agreement->execute($paymentToken, $this->apiContext, $this->mockPayPalRestCall); - return $result; - } - - /** - * @return Agreement - */ - public function testCreateCCAgreement() - { - $plan = BillingPlansFunctionalTest::getPlan(); - $request = $this->operation['request']['body']; - $agreement = new Agreement($request); - // Update the Schema to use a working Plan - $agreement->getPlan()->setId($plan->getId()); - $result = $agreement->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } - - /** - * @depends testCreateCCAgreement - * @param $agreement Agreement - * @return Plan - */ - public function testGet($agreement) - { - $result = Agreement::get($agreement->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($agreement->getId(), $result->getId()); - return $result; - } - - /** - * @depends testGet - * @param $agreement Agreement - */ - public function testUpdate($agreement) - { - /** @var Patch[] $request */ - $request = $this->operation['request']['body'][0]; - $patch = new Patch(); - $patch->setOp($request['op']); - $patch->setPath($request['path']); - $patch->setValue($request['value']); - $patches = array(); - $patches[] = $patch; - $patchRequest = new PatchRequest(); - $patchRequest->setPatches($patches); - $result = $agreement->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - } - - /** - * @depends testGet - * @param $agreement Agreement - * @return Agreement - */ - public function testSetBalance($agreement) - { - $this->markTestSkipped('Skipped as the fix is on the way.'); - $currency = new Currency($this->operation['request']['body']); - $result = $agreement->setBalance($currency, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - return $agreement; - } - - /** - * @depends testGet - * @param $agreement Agreement - * @return Agreement - */ - public function testBillBalance($agreement) - { - $this->markTestSkipped('Skipped as the fix is on the way.'); - $agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']); - $result = $agreement->billBalance($agreementStateDescriptor, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - return $agreement; - } - - /** - * @depends testGet - * @param $agreement Agreement - * @return Agreement - */ - public function testGetTransactions($agreement) - { - $params = array('start_date' => date('Y-m-d', strtotime('-15 years')), 'end_date' => date('Y-m-d', strtotime('+5 days'))); - $result = Agreement::searchTransactions($agreement->getId(), $params, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertTrue(is_array($result->getAgreementTransactionList())); - $this->assertTrue(sizeof($result->getAgreementTransactionList()) > 0); - $list = $result->getAgreementTransactionList(); - $first = $list[0]; - $this->assertEquals($first->getTransactionId(), $agreement->getId()); - } - - /** - * @depends testGet - * @param $agreement Agreement - * @return Agreement - */ - public function testSuspend($agreement) - { - $agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']); - $result = $agreement->suspend($agreementStateDescriptor, $this->apiContext, $this->mockPayPalRestCall); - $this->setupTest($this->getClassName(), 'testGetSuspended'); - $get = $this->testGet($agreement); - $this->assertTrue($result); - $this->assertEquals('Suspended', $get->getState()); - return $get; - } - - /** - * @depends testSuspend - * @param $agreement Agreement - * @return Agreement - */ - public function testReactivate($agreement) - { - $agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']); - $result = $agreement->reActivate($agreementStateDescriptor, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - $this->setupTest($this->getClassName(), 'testGet'); - $get = $this->testGet($agreement); - $this->assertEquals('Active', $get->getState()); - return $get; - } - - /** - * @depends testReactivate - * @param $agreement Agreement - * @return Agreement - */ - public function testCancel($agreement) - { - $agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']); - $result = $agreement->cancel($agreementStateDescriptor, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - $this->setupTest($this->getClassName(), 'testGetCancelled'); - $get = $this->testGet($agreement); - $this->assertEquals('Cancelled', $get->getState()); - return $get; - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php deleted file mode 100644 index 5c34167..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php +++ /dev/null @@ -1,201 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $this->setupTest($className, $testName); - } - - public function setupTest($className, $testName) - { - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - - Setup::SetUpForFunctionalTests($this); - } - - /** - * Helper function to get a Plan object in Active State - * - * @return Plan - */ - public static function getPlan() - { - if (!self::$obj) { - $test = new self(); - // Creates a Plan - $test->setupTest($test->getClassName(), 'testCreate'); - self::$obj = $test->testCreate(); - // Updates the Status to Active - $test->setupTest($test->getClassName(), 'testUpdateChangingState'); - self::$obj = $test->testUpdateChangingState(self::$obj); - } - return self::$obj; - } - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - public function testCreate() - { - $request = $this->operation['request']['body']; - $obj = new Plan($request); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - self::$obj = $result; - return $result; - } - - public function testCreateWithNOChargeModel() - { - $request = $this->operation['request']['body']; - $obj = new Plan($request); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } - - /** - * @depends testCreate - * @param $plan Plan - * @return Plan - */ - public function testGet($plan) - { - $result = Plan::get($plan->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($plan->getId(), $result->getId()); - $this->assertEquals($plan, $result, "", 0, 10, true); - return $result; - } - - /** - * @depends testGet - * @param $plan Plan - */ - public function testGetList($plan) - { - $result = Plan::all(array('page_size' => '20', 'total_required' => 'yes'), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $totalPages = $result->getTotalPages(); - $found = false; - $foundObject = null; - do { - foreach ($result->getPlans() as $obj) { - if ($obj->getId() == $plan->getId()) { - $found = true; - $foundObject = $obj; - break; - } - } - if (!$found) { - $result = Plan::all(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), $this->apiContext, $this->mockPayPalRestCall); - - } - } while ($totalPages > 0 && $found == false); - $this->assertTrue($found, "The Created Plan was not found in the get list"); - $this->assertEquals($plan->getId(), $foundObject->getId()); - - } - - /** - * @depends testGet - * @param $plan Plan - */ - public function testUpdateChangingMerchantPreferences($plan) - { - /** @var Patch[] $request */ - $request = $this->operation['request']['body'][0]; - $patch = new Patch(); - $patch->setOp($request['op']); - $patch->setPath($request['path']); - $patch->setValue($request['value']); - $patches = array(); - $patches[] = $patch; - $patchRequest = new PatchRequest(); - $patchRequest->setPatches($patches); - $result = $plan->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - } - - /** - * @depends testGet - * @param $plan Plan - */ - public function testUpdateChangingPD($plan) - { - /** @var Patch[] $request */ - $request = $this->operation['request']['body'][0]; - $patch = new Patch(); - $patch->setOp($request['op']); - $paymentDefinitions = $plan->getPaymentDefinitions(); - $patch->setPath('/payment-definitions/' . $paymentDefinitions[0]->getId()); - $patch->setValue($request['value']); - $patches = array(); - $patches[] = $patch; - $patchRequest = new PatchRequest(); - $patchRequest->setPatches($patches); - $result = $plan->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - } - - /** - * @depends testGet - * @param $plan Plan - * @return Plan - */ - public function testUpdateChangingState($plan) - { - /** @var Patch[] $request */ - $request = $this->operation['request']['body'][0]; - $patch = new Patch(); - $patch->setOp($request['op']); - $patch->setPath($request['path']); - $patch->setValue($request['value']); - $patches = array(); - $patches[] = $patch; - $patchRequest = new PatchRequest(); - $patchRequest->setPatches($patches); - $result = $plan->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - return Plan::get($plan->getId(), $this->apiContext, $this->mockPayPalRestCall); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php deleted file mode 100644 index 3a83a6f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php +++ /dev/null @@ -1,240 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $this->setupTest($className, $testName); - } - - public function setupTest($className, $testName) - { - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - - Setup::SetUpForFunctionalTests($this); - } - - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - public function testCreate() - { - $request = $this->operation['request']['body']; - $obj = new Invoice($request); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - self::$obj = $result; - return $result; - } - - /** - * @depends testCreate - * @param $invoice Invoice - * @return Invoice - */ - public function testGet($invoice) - { - $result = Invoice::get($invoice->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($invoice->getId(), $result->getId()); - return $result; - } - - /** - * @depends testCreate - * @param $invoice Invoice - * @return Invoice - */ - public function testSend($invoice) - { - $result = $invoice->send($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $invoice; - } - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testGetAll($invoice) - { - $result = Invoice::getAll(array('page_size' => '20', 'total_count_required' => 'true'), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertNotNull($result->getTotalCount()); - $totalPages = ceil($result->getTotalCount()/20); - $found = false; - $foundObject = null; - do { - foreach ($result->getInvoices() as $obj) { - if ($obj->getId() == $invoice->getId()) { - $found = true; - $foundObject = $obj; - break; - } - } - if (!$found) { - $result = Invoice::getAll(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), $this->apiContext, $this->mockPayPalRestCall); - - } - } while ($totalPages > 0 && $found == false); - $this->assertTrue($found, "The Created Invoice was not found in the get list"); - $this->assertEquals($invoice->getId(), $foundObject->getId()); - } - - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testUpdate($invoice) - { - $result = $invoice->update($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($invoice->getId(), $result->getId()); - } - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testSearch($invoice) - { - $request = $this->operation['request']['body']; - $search = new Search($request); - $result = Invoice::search($search, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertNotNull($result->getTotalCount()); - } - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testRemind($invoice) - { - $request = $this->operation['request']['body']; - $notification = new Notification($request); - $result = $invoice->remind($notification, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - } - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testCancel($invoice) - { - $request = $this->operation['request']['body']; - $notification = new CancelNotification($request); - $result = $invoice->cancel($notification, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - } - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testQRCode($invoice) - { - $result = Invoice::qrCode($invoice->getId(), array(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertNotNull($result->getImage()); - } - - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testRecordPayment($invoice) - { - $this->setupTest($this->getClassName(), 'testCreate'); - $invoice = $this->testCreate($invoice); - $this->setupTest($this->getClassName(), 'testSend'); - $invoice = $this->testSend($invoice); - $this->setupTest($this->getClassName(), 'testRecordPayment'); - $request = $this->operation['request']['body']; - $paymentDetail = new PaymentDetail($request); - $result = $invoice->recordPayment($paymentDetail, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $invoice; - } - - - /** - * @depends testRecordPayment - * @param $invoice Invoice - * @return Invoice - */ - public function testRecordRefund($invoice) - { - $request = $this->operation['request']['body']; - $refundDetail = new RefundDetail($request); - $result = $invoice->recordRefund($refundDetail, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->setupTest($this->getClassName(), 'testDelete'); - $invoice = $this->testDelete($invoice); - return $invoice; - } - - /** - * @depends testGet - * @param $invoice Invoice - * @return Invoice - */ - public function testDelete($invoice) - { - $this->setupTest($this->getClassName(), 'testCreate'); - $invoice = $this->testCreate($invoice); - $this->setupTest($this->getClassName(), 'testDelete'); - $result = $invoice->delete($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php deleted file mode 100644 index 8a1ddf4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php +++ /dev/null @@ -1,122 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - Setup::SetUpForFunctionalTests($this); - } - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - public function testCreate() - { - $request = $this->operation['request']['body']; - $obj = new Payment($request); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } - - public function testCreateWallet() - { - $request = $this->operation['request']['body']; - $obj = new Payment($request); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } - - /** - * @depends testCreate - * @param $payment Payment - * @return Payment - */ - public function testGet($payment) - { - $result = Payment::get($payment->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($payment->getId(), $result->getId()); - return $result; - } - - /** - * @depends testGet - * @param $payment Payment - * @return Sale - */ - public function testGetSale($payment) - { - $transactions = $payment->getTransactions(); - $transaction = $transactions[0]; - $relatedResources = $transaction->getRelatedResources(); - $resource = $relatedResources[0]; - $result = Sale::get($resource->getSale()->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($resource->getSale()->getId(), $result->getId()); - return $result; - } - - /** - * @depends testGetSale - * @param $sale Sale - * @return Sale - */ - public function testRefundSale($sale) - { - $refund = new Refund($this->operation['request']['body']); - $result = $sale->refund($refund, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals('completed', $result->getState()); - $this->assertEquals($sale->getId(), $result->getSaleId()); - $this->assertEquals($sale->getParentPayment(), $result->getParentPayment()); - } - - /** - * @depends testGet - * @param $payment Payment - * @return Payment - */ - public function testExecute($payment) - { - if (Setup::$mode == 'sandbox') { - $this->markTestSkipped('Not executable on sandbox environment. Needs human interaction'); - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/PayoutsFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/PayoutsFunctionalTest.php deleted file mode 100644 index 1c0d640..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/PayoutsFunctionalTest.php +++ /dev/null @@ -1,124 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - - Setup::SetUpForFunctionalTests($this); - } - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - public function testCreate() - { - $request = $this->operation['request']['body']; - $obj = new Payout($request); - if (Setup::$mode != 'mock') { - $obj->getSenderBatchHeader()->setSenderBatchId(uniqid()); - } - PayoutsFunctionalTest::$batchId = $obj->getSenderBatchHeader()->getSenderBatchId(); - $params = array('sync_mode' => 'true'); - $result = $obj->create($params, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals(PayoutsFunctionalTest::$batchId, $result->getBatchHeader()->getSenderBatchHeader()->getSenderBatchId()); - $this->assertEquals('SUCCESS', $result->getBatchHeader()->getBatchStatus()); - $items = $result->getItems(); - $this->assertTrue(sizeof($items) > 0); - $item = $items[0]; - $this->assertEquals('UNCLAIMED', $item->getTransactionStatus()); - return $result; - } - - /** - * @depends testCreate - * @param $payoutBatch PayoutBatch - * @return PayoutBatch - */ - public function testGet($payoutBatch) - { - $result = Payout::get($payoutBatch->getBatchHeader()->getPayoutBatchId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertNotNull($result->getBatchHeader()->getBatchStatus()); - $this->assertEquals(PayoutsFunctionalTest::$batchId, $result->getBatchHeader()->getSenderBatchHeader()->getSenderBatchId()); - return $result; - } - - /** - * @depends testCreate - * @param $payoutBatch PayoutBatch - * @return PayoutBatch - */ - public function testGetItem($payoutBatch) - { - $items = $payoutBatch->getItems(); - $item = $items[0]; - $result = PayoutItem::get($item->getPayoutItemId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($item->getPayoutItemId(), $result->getPayoutItemId()); - $this->assertEquals($item->getPayoutBatchId(), $result->getPayoutBatchId()); - $this->assertEquals($item->getTransactionId(), $result->getTransactionId()); - $this->assertEquals($item->getPayoutItemFee(), $result->getPayoutItemFee()); - } - - /** - * @depends testCreate - * @param $payoutBatch PayoutBatch - * @return PayoutBatch - */ - public function testCancel($payoutBatch) - { - $items = $payoutBatch->getItems(); - $item = $items[0]; - if ($item->getTransactionStatus() != 'UNCLAIMED') { - $this->markTestSkipped('Transaction status needs to be Unclaimed for this test '); - return; - } - $result = PayoutItem::cancel($item->getPayoutItemId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($item->getPayoutItemId(), $result->getPayoutItemId()); - $this->assertEquals($item->getPayoutBatchId(), $result->getPayoutBatchId()); - $this->assertEquals($item->getTransactionId(), $result->getTransactionId()); - $this->assertEquals($item->getPayoutItemFee(), $result->getPayoutItemFee()); - $this->assertEquals('RETURNED', $result->getTransactionStatus()); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php deleted file mode 100644 index a99cb6f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php +++ /dev/null @@ -1,149 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - - Setup::SetUpForFunctionalTests($this); - } - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - public function testCreate() - { - $request = $this->operation['request']['body']; - $obj = new WebProfile($request); - $obj->setName(uniqid()); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } - - /** - * @depends testCreate - * @param $createProfileResponse CreateProfileResponse - * @return WebProfile - */ - public function testGet($createProfileResponse) - { - $result = WebProfile::get($createProfileResponse->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($createProfileResponse->getId(), $result->getId()); - $this->assertEquals($this->operation['response']['body']['presentation']['logo_image'], $result->getPresentation()->getLogoImage()); - $this->assertEquals($this->operation['response']['body']['input_fields']['no_shipping'], $result->getInputFields()->getNoShipping()); - $this->assertEquals($this->operation['response']['body']['input_fields']['address_override'], $result->getInputFields()->getAddressOverride()); - - return $result; - } - - - /** - * @depends testGet - * @param $webProfile WebProfile - */ - public function testGetList($webProfile) - { - $result = WebProfile::get_list($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $found = false; - $foundObject = null; - foreach ($result as $webProfileObject) { - if ($webProfileObject->getId() == $webProfile->getId()) { - $found = true; - $foundObject = $webProfileObject; - break; - } - } - $this->assertTrue($found, "The Created Web Profile was not found in the get list"); - $this->assertEquals($webProfile->getId(), $foundObject->getId()); - $this->assertEquals($this->operation['response']['body'][0]['presentation']['logo_image'], $foundObject->getPresentation()->getLogoImage()); - $this->assertEquals($this->operation['response']['body'][0]['input_fields']['no_shipping'], $foundObject->getInputFields()->getNoShipping()); - $this->assertEquals($this->operation['response']['body'][0]['input_fields']['address_override'], $foundObject->getInputFields()->getAddressOverride()); - - } - - /** - * @depends testGet - * @param $webProfile WebProfile - */ - public function testUpdate($webProfile) - { - $boolValue = $webProfile->getInputFields()->getNoShipping(); - $newValue = ($boolValue + 1) % 2; - $webProfile->getInputFields()->setNoShipping($newValue); - $result = $webProfile->update($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($webProfile->getInputFields()->getNoShipping(), $newValue); - } - - /** - * @depends testGet - * @param $webProfile WebProfile - */ - public function testPartialUpdate($webProfile) - { - $patches = array(); - $patches[] = new Patch('{ - "op": "add", - "path": "/presentation/brand_name", - "value":"new_brand_name" - }'); - $patches[] = new Patch('{ - "op": "remove", - "path": "/flow_config/landing_page_type" - - }'); - $result = $webProfile->partial_update($patches, $this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - } - - /** - * @depends testGet - * @param $createProfileResponse CreateProfileResponse - */ - public function testDelete($createProfileResponse) - { - $webProfile = new WebProfile(); - $webProfile->setId($createProfileResponse->getId()); - $result = $webProfile->delete($this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php deleted file mode 100644 index f7b756b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php +++ /dev/null @@ -1,184 +0,0 @@ -getClassName(); - $testName = $this->getName(); - $operationString = file_get_contents(__DIR__ . "/../resources/$className/$testName.json"); - $this->operation = json_decode($operationString, true); - $this->response = true; - if (array_key_exists('body', $this->operation['response'])) { - $this->response = json_encode($this->operation['response']['body']); - } - Setup::SetUpForFunctionalTests($this); - } - - /** - * Returns just the classname of the test you are executing. It removes the namespaces. - * @return string - */ - public function getClassName() - { - return join('', array_slice(explode('\\', get_class($this)), -1)); - } - - public function testCreate() - { - $request = $this->operation['request']['body']; - $obj = new Webhook($request); - // Adding a random url request to make it unique - $obj->setUrl($obj->getUrl() . '?rand=' . uniqid()); - $result = null; - try { - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - } catch (PayPalConnectionException $ex) { - $data = $ex->getData(); - if (strpos($data,'WEBHOOK_NUMBER_LIMIT_EXCEEDED') !== false) { - $this->deleteAll(); - $result = $obj->create($this->apiContext, $this->mockPayPalRestCall); - } else { - $this->fail($ex->getMessage()); - } - } - $this->assertNotNull($result); - return $result; - } - - public function deleteAll() - { - $result = Webhook::getAll($this->apiContext, $this->mockPayPalRestCall); - foreach ($result->getWebhooks() as $webhookObject) { - $webhookObject->delete($this->apiContext, $this->mockPayPalRestCall); - } - } - - /** - * @depends testCreate - * @param $webhook Webhook - * @return Webhook - */ - public function testGet($webhook) - { - $result = Webhook::get($webhook->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($webhook->getId(), $result->getId()); - $this->assertEquals($webhook, $result, "", 0, 10, true); - return $result; - } - - /** - * @depends testGet - * @param $webhook Webhook - * @return WebhookEventTypeList - */ - public function testGetSubscribedEventTypes($webhook) - { - $result = WebhookEventType::subscribedEventTypes($webhook->getId(), $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals(2, sizeof($result->getEventTypes())); - return $result; - } - - /** - * @depends testGet - * @param $webhook Webhook - * @return WebhookList - */ - public function testGetAll($webhook) - { - $result = Webhook::getAll($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $found = false; - $foundObject = null; - foreach ($result->getWebhooks() as $webhookObject) { - if ($webhookObject->getId() == $webhook->getId()) { - $found = true; - $foundObject = $webhookObject; - break; - } - } - $this->assertTrue($found, "The Created Webhook was not found in the get list"); - $this->assertEquals($webhook->getId(), $foundObject->getId()); - return $result; - } - - /** - * @depends testGet - * @param $webhook Webhook - */ - public function testUpdate($webhook) - { - $patches = array(); - foreach ($this->operation['request']['body'] as $request) { - /** @var Patch[] $request */ - $patch = new Patch(); - $patch->setOp($request['op']); - $patch->setPath($request['path']); - $patch->setValue($request['value']); - if ($request['path'] == "/url") { - $new_url = $request['value'] . '?rand=' .uniqid(); - $patch->setValue($new_url); - } - $patches[] = $patch; - } - - $patchRequest = new PatchRequest(); - $patchRequest->setPatches($patches); - $result = $webhook->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $found = false; - $foundObject = null; - foreach ($result->getEventTypes() as $eventType) { - if ($eventType->getName() == "PAYMENT.SALE.REFUNDED") { - $found = true; - break; - } - } - $this->assertTrue($found); - } - - /** - * @depends testGet - * @param $webhook Webhook - */ - public function testDelete($webhook) - { - $result = $webhook->delete($this->apiContext, $this->mockPayPalRestCall); - $this->assertTrue($result); - } - - public function testEventSearch() - { - $result = WebhookEvent::all(array(),$this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - return $result; - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Setup.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Setup.php deleted file mode 100644 index 529ffd0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/Setup.php +++ /dev/null @@ -1,48 +0,0 @@ - 'sandbox', - 'http.ConnectionTimeOut' => 30, - 'log.LogEnabled' => true, - 'log.FileName' => '../PayPal.log', - 'log.LogLevel' => 'FINE', - 'validation.level' => 'log' - ); - $test->apiContext = new ApiContext( - new OAuthTokenCredential('AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS', 'EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL') - ); - $test->apiContext->setConfig($configs); - - //PayPalConfigManager::getInstance()->addConfigFromIni(__DIR__. '/../../../sdk_config.ini'); - //PayPalConfigManager::getInstance()->addConfigs($configs); - PayPalCredentialManager::getInstance()->setCredentialObject(PayPalCredentialManager::getInstance()->getCredentialObject('acct1')); - - self::$mode = getenv('REST_MODE') ? getenv('REST_MODE') : 'mock'; - if (self::$mode != 'sandbox') { - - // Mock PayPalRest Caller if mode set to mock - $test->mockPayPalRestCall = $test->getMockBuilder('\PayPal\Transport\PayPalRestCall') - ->disableOriginalConstructor() - ->getMock(); - - $test->mockPayPalRestCall->expects($test->any()) - ->method('execute') - ->will($test->returnValue( - $test->response - )); - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testBillBalance.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testBillBalance.json deleted file mode 100644 index 7fb1ac7..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testBillBalance.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "description" : "Bill an outstanding amount for an agreement by passing the ID of the agreement to the request URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement.", - "title" : "bill-balance", - "runnable" : true, - "operationId" : "agreement.bill-balance", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/{Agreement-Id}/bill-balance", - "method" : "POST", - "headers" : {}, - "body" : - { - "note":"Billing Balance Amount", - "amount": { - "value" : "100", - "currency" : "USD" - } - } - }, - "response" : { - "status" : "204 No Content", - "headers" : {}, - "body" : {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCancel.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCancel.json deleted file mode 100644 index 85c191a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCancel.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description" : "This operation cancels the agreement", - "title" : "Cancel agreement", - "runnable" : true, - "operationId" : "agreement.cancel", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/{Agreement-Id}/cancel", - "method" : "POST", - "headers" : {}, - "body" : - { - "note": "Cancelling the profile" - } - }, - "response" : { - "status" : "204 No Content", - "headers" : {}, - "body" : {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreateCCAgreement.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreateCCAgreement.json deleted file mode 100644 index dfe2214..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreateCCAgreement.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "description": "This operation creates agreement having Credit card as payment option", - "title": "Agreement created using credit card", - "runnable": true, - "operationId": "agreement.create", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-agreements/", - "method": "POST", - "headers": {}, - "body": { - "name": "DPRP", - "description": "Payment with credit Card ", - "start_date": "2019-06-17T9:45:04Z", - "plan": { - "id": "P-1WJ68935LL406420PUTENA2I" - }, - "shipping_address": { - "line1": "111 First Street", - "city": "Saratoga", - "state": "CA", - "postal_code": "95070", - "country_code": "US" - }, - "payer": { - "payment_method": "credit_card", - "payer_info": { - "email": "jaypatel512-facilitator@hotmail.com" - }, - "funding_instruments": [ - { - "credit_card": { - "type": "visa", - "number": "4204466604263862", - "expire_month": "12", - "expire_year": "2017", - "cvv2": "128" - } - } - ] - } - } - - - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": { - "id": "I-V8SSE9WLJGY6", - "links": [ - { - "href": "https://stage2p2163.qa.paypal.com/v1/payments/billing-agreements/I-V8SSE9WLJGY6", - "rel": "self", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreatePayPalAgreement.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreatePayPalAgreement.json deleted file mode 100644 index 0e498fc..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreatePayPalAgreement.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "description": "This operation creates agreement having PayPal as payment option", - "title": "Agreement created having PayPal as payment option", - "runnable": true, - "operationId": "agreement.create", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-agreements/", - "method": "POST", - "headers": {}, - "body": { - "name": "Base Agreement", - "description": "Basic agreement", - "start_date": "2019-06-17T9:45:04Z", - "plan": { - "id": "P-1WJ68935LL406420PUTENA2I" - }, - "payer": { - "payment_method": "paypal" - }, - "shipping_address": { - "line1": "111 First Street", - "city": "Saratoga", - "state": "CA", - "postal_code": "95070", - "country_code": "US" - } - } - - }, - "response": { - "status": "201 Created", - "headers": {}, - "body": { - "name": "Base Agreement", - "description": "Basic agreement", - "plan": { - "id": "P-1WJ68935LL406420PUTENA2I", - "state": "ACTIVE", - "name": "Fast Speed Plan", - "description": "Bathinda", - "type": "INFINITE", - "payment_definitions": [ - { - "id": "PD-9WG6983719571780GUTENA2I", - "name": "Payment Definition-1", - "type": "REGULAR", - "frequency": "Day", - "amount": { - "currency": "GBP", - "value": "10" - }, - "charge_models": [ - { - "id": "CHM-8373958130821962WUTENA2Q", - "type": "SHIPPING", - "amount": { - "currency": "GBP", - "value": "1" - } - }, - { - "id": "CHM-2937144979861454NUTENA2Q", - "type": "TAX", - "amount": { - "currency": "GBP", - "value": "2" - } - } - ], - "cycles": "0", - "frequency_interval": "1" - }, - { - "id": "PD-89M493313S710490TUTENA2Q", - "name": "Payment Definition-1", - "type": "TRIAL", - "frequency": "Month", - "amount": { - "currency": "GBP", - "value": "100" - }, - "charge_models": [ - { - "id": "CHM-78K47820SS4923826UTENA2Q", - "type": "SHIPPING", - "amount": { - "currency": "GBP", - "value": "10" - } - }, - { - "id": "CHM-9M366179U7339472RUTENA2Q", - "type": "TAX", - "amount": { - "currency": "GBP", - "value": "12" - } - } - ], - "cycles": "5", - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "GBP", - "value": "1234" - }, - "max_fail_attempts": "21", - "return_url": "http://www.paypal.com", - "cancel_url": "http://www.yahoo.com", - "auto_bill_amount": "YES", - "initial_fail_amount_action": "CONTINUE" - } - }, - "links": [ - { - "href": "https://stage2p2163.qa.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-32P34986EV202211E", - "rel": "approval_url", - "method": "REDIRECT" - }, - { - "href": "https://stage2p2163.qa.paypal.com/v1/payments/billing-agreements/EC-32P34986EV202211E/agreement-execute", - "rel": "execute", - "method": "POST" - } - ], - "start_date": "2114-06-17T9:45:04Z" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreateWithOverride.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreateWithOverride.json deleted file mode 100644 index 7586901..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testCreateWithOverride.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "description" : "This operation creates agreement having PayPal as payment option", - "title" : "Agreement created having PayPal as payment option", - "runnable" : true, - "operationId" : "agreement.create", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/", - "method" : "POST", - "headers" : {}, - "body" : - { - "name":"Override Agreement", - "description": "Agreement where merchant preferences and charge model is overridden", - "start_date" : "2014-06-17T03:05:05Z", - "payer":{ - "payment_method":"paypal", - "payer_info": - { - "email":"kkarunanidhi-per1@paypal.com" - } - }, - "plan":{ - "id":"P-1WJ68935LL406420PUTENA2I" - }, - "shipping_address":{ - "line1":"Hotel Staybridge", - "line2":"Crooke Street", - "city":"San Jose", - "state":"CA", - "postal_code":"95112", - "country_code":"US" - }, - "override_merchant_preferences":{ - "setup_fee": { - "value" : "3", - "currency" : "GBP" - }, - "return_url":"http://indiatimes.com", - "cancel_url":"http://rediff.com", - "auto_bill_amount": "YES", - "initial_fail_amount_action": "CONTINUE", - "max_fail_attempts": "11" - }, - "override_charge_models":[ - { - "charge_id": "CHM-8373958130821962WUTENA2Q", - "amount": { - "value" :"1", - "currency" : "GBP" - } - } - ] - - } - - - }, - "response" : { - "status" : "201 Created", - "headers" : {}, - "body" : - { - "name": "Override Agreement", - "description": "Agreement where merchant preferences and charge model is overridden", - "plan": { - "id": "P-1WJ68935LL406420PUTENA2I", - "state": "ACTIVE", - "name": "Fast Speed Plan", - "description": "Vanilla plan", - "type": "INFINITE", - "payment_definitions": [ - { - "id": "PD-9WG6983719571780GUTENA2I", - "name": "Payment Definition-1", - "type": "REGULAR", - "frequency": "Day", - "amount": { - "currency": "GBP", - "value": "10" - }, - "charge_models": [ - { - "id": "CHM-8373958130821962WUTENA2Q", - "type": "SHIPPING", - "amount": { - "currency": "GBP", - "value": "1" - } - }, - { - "id": "CHM-2937144979861454NUTENA2Q", - "type": "TAX", - "amount": { - "currency": "GBP", - "value": "2" - } - } - ], - "cycles": "0", - "frequency_interval": "1" - }, - { - "id": "PD-89M493313S710490TUTENA2Q", - "name": "Payment Definition-1", - "type": "TRIAL", - "frequency": "Month", - "amount": { - "currency": "GBP", - "value": "100" - }, - "charge_models": [ - { - "id": "CHM-78K47820SS4923826UTENA2Q", - "type": "SHIPPING", - "amount": { - "currency": "GBP", - "value": "10" - } - }, - { - "id": "CHM-9M366179U7339472RUTENA2Q", - "type": "TAX", - "amount": { - "currency": "GBP", - "value": "12" - } - } - ], - "cycles": "5", - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "GBP", - "value": "3" - }, - "max_fail_attempts": "11", - "return_url": "http://indiatimes.com", - "cancel_url": "http://rediff.com", - "auto_bill_amount": "YES", - "initial_fail_amount_action": "CONTINUE" - } - }, - "links": [ - { - "href": "https://stage2p2163.qa.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-83C745436S346813F", - "rel": "approval_url", - "method": "REDIRECT" - }, - { - "href": "https://stage2p2163.qa.paypal.com/v1/payments/billing-agreements/EC-83C745436S346813F/agreement-execute", - "rel": "execute", - "method": "POST" - } - ], - "start_date": "2014-06-17T03:05:05Z" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testExecute.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testExecute.json deleted file mode 100644 index cd4bbf2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testExecute.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description" : "Create PayPal agreement after buyer approval", - "title" : "Agreement creation", - "runnable" : true, - "operationId" : "agreement.execute", - "user" : { - "scopes" : ["https://uri.paypal.com/services/subscriptions" ] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/EC-6CT996018D989343F/agreement-execute", - "method" : "POST", - "headers" : {}, - "body" : {} - }, - "response" : { - "status" : "200 OK", - "headers" : {}, - "body" : - { - "id": "I-5D3XDN2D5FH1", - "links": [ - { - "href": "https://stage2p2163.qa.paypal.com/v1/payments/billing-agreements/I-5D3XDN2D5FH1", - "rel": "self", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGet.json deleted file mode 100644 index 5189efd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGet.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "description": "This operation fetches details of the agreement", - "title": "Fetch agreement details", - "runnable": true, - "operationId": "agreement.get", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-agreements/I-5D3XDN2D5FH1", - "method": "GET", - "headers": {}, - "body": {} - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": { - "id": "I-V8SSE9WLJGY6", - "state": "Active", - "description": "Payment with credit Card ", - "plan": { - "payment_definitions": [ - { - "type": "TRIAL", - "frequency": "Week", - "amount": { - "currency": "USD", - "value": "9.19" - }, - "cycles": "2", - "charge_models": [ - { - "type": "TAX", - "amount": { - "currency": "USD", - "value": "2.00" - } - }, - { - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "1.00" - } - } - ], - "frequency_interval": "5" - }, - { - "type": "REGULAR", - "frequency": "Month", - "amount": { - "currency": "USD", - "value": "100.00" - }, - "cycles": "12", - "charge_models": [ - { - "type": "TAX", - "amount": { - "currency": "USD", - "value": "12.00" - } - }, - { - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "10.00" - } - } - ], - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "USD", - "value": "1.00" - }, - "max_fail_attempts": "0", - "auto_bill_amount": "YES" - } - }, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/suspend", - "rel": "suspend", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/re-activate", - "rel": "re_activate", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/cancel", - "rel": "cancel", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/bill-balance", - "rel": "self", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/set-balance", - "rel": "self", - "method": "POST" - } - ], - "start_date": "2015-06-17T16:45:04Z", - "agreement_details": { - "outstanding_balance": { - "currency": "USD", - "value": "200.00" - }, - "cycles_remaining": "2", - "cycles_completed": "0", - "next_billing_date": "2015-06-17T10:00:00Z", - "last_payment_date": "2014-10-28T22:48:56Z", - "last_payment_amount": { - "currency": "USD", - "value": "1.00" - }, - "final_payment_date": "2017-06-26T10:00:00Z", - "failed_payment_count": "0" - } - } - - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetCancelled.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetCancelled.json deleted file mode 100644 index d1f656a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetCancelled.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "description": "This operation fetches details of the agreement", - "title": "Fetch agreement details", - "runnable": true, - "operationId": "agreement.get", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-agreements/I-5D3XDN2D5FH1", - "method": "GET", - "headers": {}, - "body": {} - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": { - "id": "I-V8SSE9WLJGY6", - "state": "Cancelled", - "description": "Payment with credit Card ", - "plan": { - "payment_definitions": [ - { - "type": "TRIAL", - "frequency": "Week", - "amount": { - "currency": "USD", - "value": "9.19" - }, - "cycles": "2", - "charge_models": [ - { - "type": "TAX", - "amount": { - "currency": "USD", - "value": "2.00" - } - }, - { - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "1.00" - } - } - ], - "frequency_interval": "5" - }, - { - "type": "REGULAR", - "frequency": "Month", - "amount": { - "currency": "USD", - "value": "100.00" - }, - "cycles": "12", - "charge_models": [ - { - "type": "TAX", - "amount": { - "currency": "USD", - "value": "12.00" - } - }, - { - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "10.00" - } - } - ], - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "USD", - "value": "1.00" - }, - "max_fail_attempts": "0", - "auto_bill_amount": "YES" - } - }, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/suspend", - "rel": "suspend", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/re-activate", - "rel": "re_activate", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/cancel", - "rel": "cancel", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/bill-balance", - "rel": "self", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/set-balance", - "rel": "self", - "method": "POST" - } - ], - "start_date": "2015-06-17T16:45:04Z", - "agreement_details": { - "outstanding_balance": { - "currency": "USD", - "value": "0.00" - }, - "cycles_remaining": "2", - "cycles_completed": "0", - "next_billing_date": "2015-06-17T10:00:00Z", - "last_payment_date": "2014-10-28T22:48:56Z", - "last_payment_amount": { - "currency": "USD", - "value": "1.00" - }, - "final_payment_date": "2017-06-26T10:00:00Z", - "failed_payment_count": "0" - } - } - - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetSuspended.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetSuspended.json deleted file mode 100644 index 5da4558..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetSuspended.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "description": "This operation fetches details of the agreement", - "title": "Fetch agreement details", - "runnable": true, - "operationId": "agreement.get", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-agreements/I-5D3XDN2D5FH1", - "method": "GET", - "headers": {}, - "body": {} - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": { - "id": "I-V8SSE9WLJGY6", - "state": "Suspended", - "description": "Payment with credit Card ", - "plan": { - "payment_definitions": [ - { - "type": "TRIAL", - "frequency": "Week", - "amount": { - "currency": "USD", - "value": "9.19" - }, - "cycles": "2", - "charge_models": [ - { - "type": "TAX", - "amount": { - "currency": "USD", - "value": "2.00" - } - }, - { - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "1.00" - } - } - ], - "frequency_interval": "5" - }, - { - "type": "REGULAR", - "frequency": "Month", - "amount": { - "currency": "USD", - "value": "100.00" - }, - "cycles": "12", - "charge_models": [ - { - "type": "TAX", - "amount": { - "currency": "USD", - "value": "12.00" - } - }, - { - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "10.00" - } - } - ], - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "USD", - "value": "1.00" - }, - "max_fail_attempts": "0", - "auto_bill_amount": "YES" - } - }, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/suspend", - "rel": "suspend", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/re-activate", - "rel": "re_activate", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/cancel", - "rel": "cancel", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/bill-balance", - "rel": "self", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-XTN3V7NY6KG7/set-balance", - "rel": "self", - "method": "POST" - } - ], - "start_date": "2015-06-17T16:45:04Z", - "agreement_details": { - "outstanding_balance": { - "currency": "USD", - "value": "0.00" - }, - "cycles_remaining": "2", - "cycles_completed": "0", - "next_billing_date": "2015-06-17T10:00:00Z", - "last_payment_date": "2014-10-28T22:48:56Z", - "last_payment_amount": { - "currency": "USD", - "value": "1.00" - }, - "final_payment_date": "2017-06-26T10:00:00Z", - "failed_payment_count": "0" - } - } - - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetTransactions.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetTransactions.json deleted file mode 100644 index 4d19888..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testGetTransactions.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description" : "This operation lists the transactions for the agreement", - "title" : "Transaction listing of agreement", - "runnable" : true, - "operationId" : "agreement.transactions", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/{Agreement-Id}/transaction?start-date=yyyy-mm-dd&end-date=yyyy-mm-dd", - "method" : "GET", - "headers" : {}, - "body" : {} - }, - "response" : { - "status" : "200 OK", - "headers" : {}, - "body" : - { - "agreement_transaction_list": [ - { - "transaction_id": "I-V8SSE9WLJGY6", - "status": "Created", - "transaction_type": "Recurring Payment", - "payer_email": "", - "payer_name": " ", - "time_stamp": "2014-06-16T13:46:53Z", - "time_zone": "GMT" - }, - { - "transaction_id": "I-V8SSE9WLJGY6", - "status": "Suspended", - "transaction_type": "Recurring Payment", - "payer_email": "", - "payer_name": " ", - "time_stamp": "2014-06-16T13:52:26Z", - "time_zone": "GMT" - }, - { - "transaction_id": "I-V8SSE9WLJGY6", - "status": "Reactivated", - "transaction_type": "Recurring Payment", - "payer_email": "", - "payer_name": " ", - "time_stamp": "2014-06-16T14:00:23Z", - "time_zone": "GMT" - }, - { - "transaction_id": "I-V8SSE9WLJGY6", - "status": "Canceled", - "transaction_type": "Recurring Payment", - "payer_email": "", - "payer_name": " ", - "time_stamp": "2014-06-16T14:02:54Z", - "time_zone": "GMT" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testReactivate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testReactivate.json deleted file mode 100644 index d29bfa9..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testReactivate.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description" : "This operation activates the suspended agreement", - "title" : "Reactivate agreement", - "runnable" : true, - "operationId" : "agreement.re-activate", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/{Agreement-Id}/re-activate", - "method" : "POST", - "headers" : {}, - "body" : - { - "note": "Reactivating the profile" - } - }, - "response" : { - "status" : "204 No Content", - "headers" : {}, - "body" : {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testSetBalance.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testSetBalance.json deleted file mode 100644 index 00a124e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testSetBalance.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description" : "Set the balance for an agreement by passing the ID of the agreement to the request URI. In addition, pass a common_currency object in the request JSON that specifies the currency type and value of the balance.", - "title" : "set-balance", - "runnable" : true, - "operationId" : "agreement.set-balance", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/{Agreement-Id}/set-balance", - "method" : "POST", - "headers" : {}, - "body" : - { - "value" : "200", - "currency" : "USD" - } - }, - "response" : { - "status" : "204 No Content", - "headers" : {}, - "body" : {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testSuspend.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testSuspend.json deleted file mode 100644 index dfd312c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testSuspend.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description" : "This operation suspends the agreement", - "title" : "Suspend agreement", - "runnable" : true, - "operationId" : "agreement.suspend", - "user" : { - "scopes" : [ "https://uri.paypal.com/services/subscriptions"] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request" : { - "path" : "v1/payments/billing-agreements/{Agreement-Id}/suspend", - "method" : "POST", - "headers" : {}, - "body" : - { - "note": "Suspending the profile" - } - }, - "response" : { - "status" : "204 No Content", - "headers" : {}, - "body" : {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testUpdate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testUpdate.json deleted file mode 100644 index 314d606..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingAgreementsFunctionalTest/testUpdate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "This operation updates agreement", - "title": "Update agreement", - "runnable": true, - "operationId": "agreement.update", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-agreements/{Agreement-Id}", - "method": "PATCH", - "headers": {}, - "body": [ - { - "op": "replace", - "path": "/", - "value": { - "description": "Updated description", - "start_date": "2024-06-18T10:00:00Z", - "shipping_address":{ - "line1":"Hotel Blue Diamond", - "line2":"Church Street", - "city":"San Jose", - "state":"CA", - "postal_code":"95112", - "country_code":"US" - } - } - } - ] - - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": {} - - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testCreate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testCreate.json deleted file mode 100644 index e473c28..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testCreate.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "description": "This operation creates a billing plan having a regular and trial billing period", - "title": "Billing Plan with regular and trial billing period", - "runnable": true, - "operationId": "plan.create", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans/", - "method": "POST", - "headers": {}, - "body": { - "name": "Sample Plan", - "description": "Plan with regular and trial", - "type": "fixed", - "payment_definitions": [ - { - "name": "Regular Payment Definition", - "type": "REGULAR", - "frequency": "MONTH", - "frequency_interval": "2", - "amount": { - "value": "100", - "currency": "USD" - }, - "cycles": "12", - "charge_models": [ - { - "type": "SHIPPING", - "amount": { - "value": "10", - "currency": "USD" - } - }, - { - "type": "TAX", - "amount": { - "value": "12", - "currency": "USD" - } - } - ] - }, - { - "name": "Trial Payment Definition", - "type": "trial", - "frequency": "week", - "frequency_interval": "5", - "amount": { - "value": "9.19", - "currency": "USD" - }, - "cycles": "2", - "charge_models": [ - { - "type": "SHIPPING", - "amount": { - "value": "1", - "currency": "USD" - } - }, - { - "type": "TAX", - "amount": { - "value": "2", - "currency": "USD" - } - } - ] - } - ], - "merchant_preferences": { - "setup_fee": { - "value": "1", - "currency": "USD" - }, - "return_url": "http://www.paypal.com", - "cancel_url": "http://www.yahoo.com", - "auto_bill_amount": "YES", - "initial_fail_amount_action": "CONTINUE", - "max_fail_attempts": "0" - } - } - }, - "response": { - "status": "201 Created", - "headers": {}, - "body": { - "id": "P-7DC96732KA7763723UOPKETA", - "state": "CREATED", - "name": "Sample Plan", - "description": "Plan with regular and trial", - "type": "FIXED", - "payment_definitions": [ - { - "id": "PD-0MF87809KK310750TUOPKETA", - "name": "Regular Payment Definition", - "type": "REGULAR", - "frequency": "Month", - "amount": { - "currency": "USD", - "value": "100" - }, - "charge_models": [ - { - "id": "CHM-89H01708244053321UOPKETA", - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "10" - } - }, - { - "id": "CHM-1V202179WT9709019UOPKETA", - "type": "TAX", - "amount": { - "currency": "USD", - "value": "12" - } - } - ], - "cycles": "12", - "frequency_interval": "2" - }, - { - "id": "PD-03223056L66578712UOPKETA", - "name": "Trial Payment Definition", - "type": "TRIAL", - "frequency": "Week", - "amount": { - "currency": "USD", - "value": "9.19" - }, - "charge_models": [ - { - "id": "CHM-7XN63093LF858372XUOPKETA", - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "1" - } - }, - { - "id": "CHM-6JY06508UT8026625UOPKETA", - "type": "TAX", - "amount": { - "currency": "USD", - "value": "2" - } - } - ], - "cycles": "2", - "frequency_interval": "5" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "USD", - "value": "1" - }, - "max_fail_attempts": "0", - "return_url": "http://www.paypal.com", - "cancel_url": "http://www.yahoo.com", - "auto_bill_amount": "YES", - "initial_fail_amount_action": "CONTINUE" - }, - "create_time": "2014-06-16T07:40:20.940Z", - "update_time": "2014-06-16T07:40:20.940Z", - "links": [ - { - "href": "https://localhost:12379/v1/payments/billing-plans/P-7DC96732KA7763723UOPKETA", - "rel": "self", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testCreateWithNOChargeModel.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testCreateWithNOChargeModel.json deleted file mode 100644 index d918587..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testCreateWithNOChargeModel.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "description": "This operation creates a billing plan with no charge models and minimal merchant preferences", - "title": "Billing Plan with no charge model and minimal merchant preferences", - "runnable": true, - "operationId": "plan.create", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans/", - "method": "POST", - "headers": {}, - "body": { - "name": "Plan with minimal merchant pref", - "description": "Plan with one payment definition,minimal merchant preferences and no charge models", - "type": "fixed", - "payment_definitions": [ - { - "name": "Payment Definition-1", - "type": "REGULAR", - "frequency": "MONTH", - "frequency_interval": "2", - "amount": { - "value": "100", - "currency": "USD" - }, - "cycles": "12" - - } - ], - "merchant_preferences": { - "return_url": "http://www.paypal.com", - "cancel_url": "http://www.yahoo.com" - } - - } - }, - "response": { - "status": "201 Created", - "headers": {}, - "body": { - "id": "P-1TV69435N82273154UPWDU4I", - "state": "CREATED", - "name": "Plan with minimal merchant pref", - "description": "Plan with one payment definition,minimal merchant preferences and no charge models", - "type": "FIXED", - "payment_definitions": [ - { - "id": "PD-62U12008P21526502UPWDU4I", - "name": "Payment Definition-1", - "type": "REGULAR", - "frequency": "Month", - "amount": { - "currency": "USD", - "value": "100" - }, - "charge_models": [], - "cycles": "12", - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "USD", - "value": "0" - }, - "max_fail_attempts": "0", - "return_url": "http://www.paypal.com", - "cancel_url": "http://www.yahoo.com", - "auto_bill_amount": "NO", - "initial_fail_amount_action": "CONTINUE" - }, - "create_time": "2014-06-16T09:05:06.161Z", - "update_time": "2014-06-16T09:05:06.161Z", - "links": [ - { - "href": "https://localhost:12379/v1/payments/billing-plans/P-1TV69435N82273154UPWDU4I", - "rel": "self", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testGet.json deleted file mode 100644 index cacd37d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testGet.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "description": "This operation fetches billing plan details cooresponding to the id.", - "title": "Fetch billing plan details", - "runnable": true, - "operationId": "plan.get", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans/P-7DC96732KA7763723UOPKETA", - "method": "GET", - "headers": {}, - "body": {} - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": { - "id": "P-7DC96732KA7763723UOPKETA", - "state": "CREATED", - "name": "Sample Plan", - "description": "Plan with regular and trial", - "type": "FIXED", - "payment_definitions": [ - { - "id": "PD-03223056L66578712UOPKETA", - "name": "Trial Payment Definition", - "type": "TRIAL", - "frequency": "Week", - "amount": { - "currency": "USD", - "value": "9.19" - }, - "charge_models": [ - { - "id": "CHM-6JY06508UT8026625UOPKETA", - "type": "TAX", - "amount": { - "currency": "USD", - "value": "2" - } - }, - { - "id": "CHM-7XN63093LF858372XUOPKETA", - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "1" - } - } - ], - "cycles": "2", - "frequency_interval": "5" - }, - { - "id": "PD-0MF87809KK310750TUOPKETA", - "name": "Regular Payment Definition", - "type": "REGULAR", - "frequency": "Month", - "amount": { - "currency": "USD", - "value": "100" - }, - "charge_models": [ - { - "id": "CHM-1V202179WT9709019UOPKETA", - "type": "TAX", - "amount": { - "currency": "USD", - "value": "12" - } - }, - { - "id": "CHM-89H01708244053321UOPKETA", - "type": "SHIPPING", - "amount": { - "currency": "USD", - "value": "10" - } - } - ], - "cycles": "12", - "frequency_interval": "2" - } - ], - "merchant_preferences": { - "setup_fee": { - "currency": "USD", - "value": "1" - }, - "max_fail_attempts": "0", - "return_url": "http://www.paypal.com", - "cancel_url": "http://www.yahoo.com", - "auto_bill_amount": "YES", - "initial_fail_amount_action": "CONTINUE" - }, - "create_time": "2014-06-16T07:40:20.940Z", - "update_time": "2014-06-16T07:40:20.940Z", - "links": [ - { - "href": "https://localhost:12379/v1/payments/billing-plans/P-7DC96732KA7763723UOPKETA", - "rel": "self", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testGetList.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testGetList.json deleted file mode 100644 index 9460c54..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testGetList.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "description": "This operation fetches billing plan list", - "title": "Billing Plan list", - "runnable": true, - "operationId": "plans", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans?page_size=3&status=ACTIVE&page_size=2&page=1&total_required=yes", - "method": "GET", - "headers": {}, - "body": {} - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": { - "total_items": "166", - "total_pages": "83", - "plans": [ - { - "id": "P-7DC96732KA7763723UOPKETA", - "state": "ACTIVE", - "name": "Testing1-Regular3", - "description": "Create Plan for Regular", - "type": "FIXED", - "create_time": "2014-08-22T04:41:52.836Z", - "update_time": "2014-08-22T04:41:53.169Z", - "links": [ - { - "href": "https://stage2p1353.qa.paypal.com/v1/payments/billing-plans/P-6EM196669U062173D7QCVDRA", - "rel": "self", - "method": "GET" - } - ] - }, - { - "id": "P-83567698LH138572V7QCVZJY", - "state": "ACTIVE", - "name": "Testing1-Regular4", - "description": "Create Plan for Regular", - "type": "INFINITE", - "create_time": "2014-08-22T04:41:55.623Z", - "update_time": "2014-08-22T04:41:56.055Z", - "links": [ - { - "href": "https://stage2p1353.qa.paypal.com/v1/payments/billing-plans/P-83567698LH138572V7QCVZJY", - "rel": "self", - "method": "GET" - } - ] - } - ], - "links": [ - { - "href": "https://stage2p1353.qa.paypal.com/v1/payments/billing-plans?page_size=2&page=1&start=3&status=active", - "rel": "start", - "method": "GET" - }, - { - "href": "https://stage2p1353.qa.paypal.com/v1/payments/billing-plans?page_size=2&page=0&status=active", - "rel": "previous_page", - "method": "GET" - }, - { - "href": "https://stage2p1353.qa.paypal.com/v1/payments/billing-plans?page_size=2&page=2&status=active", - "rel": "next_page", - "method": "GET" - }, - { - "href": "https://stage2p1353.qa.paypal.com/v1/payments/billing-plans?page_size=2&page=82&status=active", - "rel": "last", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingMerchantPreferences.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingMerchantPreferences.json deleted file mode 100644 index 1abbcfd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingMerchantPreferences.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "description": "Patch operation for changing merchant preferences values", - "title": "Patch Operation for changing merchant preferences", - "runnable": true, - "operationId": "plan.update", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans/{PLAN-ID}/", - "method": "PATCH", - "headers": {}, - "body": [ - { - "op": "replace", - "path": "/merchant-preferences", - "value": { - "cancel_url": "http://www.cancel.com", - "setup_fee": { - "value": "5", - "currency": "USD" - } - } - } - ] - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingPD.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingPD.json deleted file mode 100644 index e7c9f23..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingPD.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "description": "Patch operation for changing payment definition values", - "title": "Patch operation for payment definition", - "runnable": true, - "operationId": "plan.update", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans/{PLAN-ID}/", - "method": "PATCH", - "headers": {}, - "body": [ - { - "op": "replace", - "path": "/payment-definitions/PD-4816080302132415WUQBT7WA", - "value": { - "name": "Updated Payment Definition", - "frequency": "Day", - "amount": { - "currency": "USD", - "value": "1" - } - } - } - ] - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingState.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingState.json deleted file mode 100644 index 340639e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/BillingPlansFunctionalTest/testUpdateChangingState.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "description": "This operation changes the state of billing plan to active if its in created state.", - "title": "Patch Request for changing state", - "runnable": true, - "operationId": "plan.update", - "user": { - "scopes": ["https://uri.paypal.com/services/subscriptions"] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/billing-plans/{PLAN-ID}/", - "method": "PATCH", - "headers": {}, - "body": [ - { - "op": "replace", - "path": "/", - "value": { - "state": "ACTIVE" - } - } - ] - }, - "response": { - "status": "200 OK", - "headers": {}, - "body": {} - } -} - - - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testCancel.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testCancel.json deleted file mode 100644 index cc89dbb..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testCancel.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "operationId": "invoice.cancel", - "title": "Cancel an invoice", - "description": "Cancel an invoice", - "runnable": true, - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-WW57-VFCD-X5H4-XTUP/cancel", - "method": "POST", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": { - "subject": "Past due", - "note": "Canceling invoice", - "send_to_merchant": true, - "send_to_payer": true - } - }, - "response": { - "headers": {}, - "status": "" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testCreate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testCreate.json deleted file mode 100644 index 4d19ff6..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testCreate.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "operationId": "invoice.create", - "title": "Create an invoice", - "description": "Create an invoice", - "runnable": true, - "user": { - "scopes": [ - "https://uri.paypal.com/services/invoicing" - ] - }, - "credentials": { - "oauth": { - "clientId": "stage2managed", - "clientSecret": "secret", - "path": "/v1/oauth2/token" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/", - "method": "POST", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": {"merchant_info": { - "email": "jaypatel512-facilitator@hotmail.com", - "first_name": "Dennis", - "last_name": "Doctor", - "business_name": "Medical Professionals, LLC", - "phone": { - "country_code": "001", - "national_number": "5032141716" - }, - "address": { - "line1": "1234 Main St.", - "city": "Portland", - "state": "OR", - "postal_code": "97217", - "country_code": "US" - } - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "items": [ - { - "name": "Sutures", - "quantity": 100, - "unit_price": { - "currency": "USD", - "value": "5.00" - } - } - ], - "note": "Medical Invoice 16 Jul, 2013 PST", - "payment_term": { - "term_type": "NET_45" - }, - "shipping_info": { - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable", - "phone": { - "country_code": "001", - "national_number": "5039871234" - }, - "address": { - "line1": "1234 Main St.", - "city": "Portland", - "state": "OR", - "postal_code": "97217", - "country_code": "US" - } - } - } - }, - "response": { - "status": "201 Created", - "headers": {}, - "body": { - "id": "INV2-RF6D-L66T-D7H2-CRU7", - "number": "ABCD4971", - "status": "DRAFT", - "merchant_info": { - "email": "ppaas_default@paypal.com", - "first_name": "Dennis", - "last_name": "Doctor", - "business_name": "Medical Professionals, LLC", - "phone": { - "country_code": "1", - "national_number": "5032141234" - }, - "address": { - "line1": "1234 Main St.", - "city": "Portland", - "state": "OR", - "postal_code": "97217", - "country_code": "US" - } - }, - "billing_info": [ - { - "email": "email@example.com" - } - ], - "shipping_info": { - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable", - "phone": { - "country_code": "1", - "national_number": "5039871234" - }, - "address": { - "line1": "1234 Broad St.", - "city": "Portland", - "state": "OR", - "postal_code": "97216", - "country_code": "US" - } - }, - "items": [ - { - "name": "Sutures", - "quantity": 100, - "unit_price": { - "currency": "USD", - "value": "5.00" - } - } - ], - "invoice_date": "2014-02-27 PST", - "payment_term": { - "term_type": "NET_45", - "due_date": "2015-04-13 PDT" - }, - "tax_calculated_after_discount": false, - "tax_inclusive": false, - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "500.00" - } - - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testDelete.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testDelete.json deleted file mode 100644 index 4155e0b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testDelete.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Delete an invoice", - "title": "Delete an invoice", - "runnable": true, - "operationId": "invoice.delete", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-92MG-CNXV-ND7G-P3D2", - "method": "DELETE", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": {} - }, - "response": { - "status": "", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testGet.json deleted file mode 100644 index 65d607d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testGet.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "description": "Get the invoice resource for the given identifier.", - "title": "Get invoice details", - "runnable": true, - "operationId": "invoice.get", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7", - "method": "GET", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": {} - }, - "response": { - "status": "", - "headers": {}, - "body": { - "id": "INV2-RF6D-L66T-D7H2-CRU7", - "number": "0002", - "status": "DRAFT", - "merchant_info": { - "email": "ppaas_default@paypal.com", - "first_name": "Dennis", - "last_name": "Doctor", - "business_name": "Medical Professionals, LLC", - "phone": { - "country_code": "1", - "national_number": "5032141716" - }, - "address": { - "line1": "1234 Main St.", - "city": "Portland", - "state": "OR", - "postal_code": "97217", - "country_code": "US" - } - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "shipping_info": { - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable", - "phone": { - "country_code": "1", - "national_number": "5039871234" - }, - "address": { - "line1": "1234 Broad St.", - "city": "Portland", - "state": "OR", - "postal_code": "97216", - "country_code": "US" - } - }, - "items": [ - { - "name": "Sutures", - "quantity": 100, - "unit_price": { - "currency": "USD", - "value": "5.00" - } - } - ], - "invoice_date": "2014-03-24 PDT", - "payment_term": { - "term_type": "NET_45", - "due_date": "2014-05-08 PDT" - }, - "tax_calculated_after_discount": false, - "tax_inclusive": false, - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "500.00" - }, - "metadata": { - "created_date": "2014-03-24 12:11:52 PDT" - } - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testGetAll.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testGetAll.json deleted file mode 100644 index a5f3c4d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testGetAll.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "description": "get all invoices", - "title": "get all invoices", - "runnable": true, - "operationId": "invoice.get_all", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices?page=0&page_size=10&total_count_required=true", - "method": "GET", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": {} - }, - "response": { - "status": "", - "headers": {}, - "body": { - "total_count": 5, - "invoices": [ - { - "id": "INV2-2NB5-UJ7A-YSUJ-ABCD", - "number": "9879878979003791", - "status": "DRAFT", - "merchant_info": { - "email": "sample@sample.com" - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "shipping_info": { - "email": "example@example.com", - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable" - }, - "invoice_date": "2014-02-27 PST", - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "0.00" - }, - "metadata": { - "created_date": "2014-02-27 23:55:58 PST" - } - }, - { - "id": "INV2-5AYC-UE5K-XXEG-ABCD", - "number": "9879878979003790", - "status": "DRAFT", - "merchant_info": { - "email": "sample@sample.com" - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "shipping_info": { - "email": "example@example.com", - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable" - }, - "invoice_date": "2014-02-27 PST", - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "0.00" - }, - "metadata": { - "created_date": "2014-02-27 19:41:56 PST" - } - }, - { - "id": "INV2-C4QH-KEKM-C5QE-ABCD", - "number": "9879878979003789", - "status": "DRAFT", - "merchant_info": { - "email": "sample@sample.com" - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "shipping_info": { - "email": "example@example.com", - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable" - }, - "invoice_date": "2014-02-27 PST", - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "0.00" - }, - "metadata": { - "created_date": "2014-02-27 15:34:11 PST" - } - }, - { - "id": "INV2-RF6D-L66T-D7H2-CRU7", - "number": "9879878979003788", - "status": "DRAFT", - "merchant_info": { - "email": "sample@sample.com" - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "shipping_info": { - "email": "example@example.com", - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable" - }, - "invoice_date": "2014-02-27 PST", - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "12.00" - }, - "metadata": { - "created_date": "2014-02-27 15:34:01 PST" - } - } - ] - } - - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testQRCode.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testQRCode.json deleted file mode 100644 index f1a133d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testQRCode.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "description": "Generates QR code for the Invoice URL identified by invoice_id.", - "title": "Get QR code", - "runnable": true, - "operationId": "invoice.qr_code", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-S6FG-ZZCK-VXMM-8KKP/qr-code", - "method": "GET", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": {} - }, - "response": { - "status": "", - "headers": {}, - "body": { - "image": "iVBORw0KGgoAA......XUDM" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRecordPayment.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRecordPayment.json deleted file mode 100644 index ec67a02..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRecordPayment.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "description": "Record a payment for an invoice.", - "title": "Record a payment for an invoice.", - "runnable": true, - "operationId": "invoice.record-payment", - "request": { - "path": "v1/invoicing/invoices/INV2-T4UQ-VW4W-K7N7-XM2R/record-payment", - "method": "POST", - "headers": {}, - "body": { - "method": "CASH", - "date": "2014-07-06 03:30:00 PST", - "note": "Cash received." - } - }, - "response": { - "status": "", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRecordRefund.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRecordRefund.json deleted file mode 100644 index 90c630d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRecordRefund.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Record a refund for an invoice.", - "title": "Record a refund for an invoice.", - "runnable": true, - "operationId": "invoice.record-refund", - "request": { - "path": "v1/invoicing/invoices/INV2-T4UQ-VW4W-K7N7-XM2R/record-refund", - "method": "POST", - "headers": {}, - "body": { - "date" : "2013-11-10 14:00:00 PST", - "note" : "Refunded by cash!" - } - }, - "response": { - "status": "", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRemind.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRemind.json deleted file mode 100644 index 62cb4c3..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testRemind.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "description": "Reminds the payer to pay the invoice.", - "title": "Reminds the payer to pay the invoice.", - "runnable": true, - "operationId": "invoice.remind", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-T4UQ-VW4W-K7N7-XM2R/remind", - "method": "POST", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": { - "subject": "Past due", - "note": "Please pay soon", - "send_to_merchant": true - } - }, - "response": { - "status": "", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSearch.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSearch.json deleted file mode 100644 index a136578..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSearch.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": "Search for invoice resources.", - "title": "Search for invoice resources.", - "runnable": true, - "operationId": "invoice.search", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/search/", - "method": "POST", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": { - "page": 0, - "page_size": 3, - "total_count_required": true - } - }, - "response": { - "status": "", - "headers": {}, - "body": { - "total_count": 1, - "invoices": [ - { - "id": "INV2-RF6D-L66T-D7H2-CRU7", - "number": "0001", - "status": "SENT", - "merchant_info": { - "email": "dennis@sample.com" - }, - "billing_info": [ - { - "email": "sally-patient@example.com" - } - ], - "shipping_info": { - "email": "sally-patient@example.com" - }, - "invoice_date": "2012-05-09 PST", - "payment_term": { - "due_date": "2012-05-24 PST" - }, - "total_amount": { - "currency": "USD", - "value": "250" - }, - "metadata": { - "created_date": "2012-05-09 04:48:57 PST" - } - } - ] - } - - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json deleted file mode 100644 index 08b7981..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Sends a legitimate invoice to the payer.", - "title": "Sends a legitimate invoice to the payer.", - "runnable": true, - "operationId": "invoice.send", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7/send", - "method": "POST", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": {} - }, - "response": { - "status": "", - "headers": {}, - "body": {} - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json deleted file mode 100644 index 77fa2d0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "description": "Full update of the invoice resource for the given identifier.", - "title": "Full update of the invoice resource for the given identifier.", - "runnable": true, - "operationId": "invoice.update", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7", - "method": "PUT", - "headers": { - "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" - }, - "body": { - "merchant_info": { - "email": "ppaas_default@paypal.com", - "first_name": "Dennis", - "last_name": "Doctor", - "business_name": "Medical Professionals, LLC", - "phone": { - "country_code": "001", - "national_number": "5032141716" - }, - "address": { - "line1": "1234 Main St.", - "city": "Portland", - "state": "OR", - "postal_code": "97217", - "country_code": "US" - } - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "items": [ - { - "name": "Sutures", - "quantity": 100, - "unit_price": { - "currency": "USD", - "value": "5" - } - } - ], - "note": "Medical Invoice 16 Jul, 2013 PST", - "payment_term": { - "term_type": "NET_45" - }, - "shipping_info": { - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable", - "phone": { - "country_code": "001", - "national_number": "5039871234" - }, - "address": { - "line1": "1234 Broad St.", - "city": "Portland", - "state": "OR", - "postal_code": "97216", - "country_code": "US" - } - } - } - }, - "response": { - "status": "", - "headers": {}, - "body": { - "id": "INV2-RF6D-L66T-D7H2-CRU7", - "number": "0014", - "status": "DRAFT", - "merchant_info": { - "email": "ppaas_default@paypal.com", - "first_name": "Dennis", - "last_name": "Doctor", - "business_name": "Medical Professionals, LLC", - "phone": { - "country_code": "1", - "national_number": "5032141716" - }, - "address": { - "line1": "1234 Main St.", - "city": "Portland", - "state": "OR", - "postal_code": "97217", - "country_code": "US" - } - }, - "billing_info": [ - { - "email": "example@example.com" - } - ], - "shipping_info": { - "first_name": "Sally", - "last_name": "Patient", - "business_name": "Not applicable", - "phone": { - "country_code": "1", - "national_number": "5039871234" - }, - "address": { - "line1": "1234 Broad St.", - "city": "Portland", - "state": "OR", - "postal_code": "97216", - "country_code": "US" - } - }, - "items": [ - { - "name": "Sutures", - "quantity": 100, - "unit_price": { - "currency": "USD", - "value": "5.00" - } - } - ], - "invoice_date": "2014-03-24 PDT", - "payment_term": { - "term_type": "NET_45", - "due_date": "2014-05-08 PDT" - }, - "tax_calculated_after_discount": false, - "tax_inclusive": false, - "note": "Medical Invoice 16 Jul, 2013 PST", - "total_amount": { - "currency": "USD", - "value": "500.00" - } - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testCreate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testCreate.json deleted file mode 100644 index 313037b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testCreate.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "description": "Creates a payment resource.", - "title": "payment", - "runnable": true, - "operationId": "payment.create", - "user": { - "scopes": [ ] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": { }, - "openIdConnect": { } - }, - "request": { - "headers": { }, - "body": { - "intent": "sale", - "payer": { - "payment_method": "credit_card", - "funding_instruments": [ - { - "credit_card": { - "number": "4160285494148633", - "type": "visa", - "expire_month": 11, - "expire_year": 2018, - "cvv2": "874", - "first_name": "Betsy", - "last_name": "Buyer", - "billing_address": { - "line1": "111 First Street", - "city": "Saratoga", - "state": "CA", - "postal_code": "95070", - "country_code": "US" - } - } - } - ] - }, - "transactions": [ - { - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "subtotal": "7.41", - "tax": "0.03", - "shipping": "0.03" - } - }, - "description": "This is the payment transaction description." - } - ] - }, - "path": "/v1/payments/payment", - "method": "POST" - }, - "response": { - "headers": { }, - "body": { - "id": "PAY-17S8410768582940NKEE66EQ", - "create_time": "2013-01-31T04:12:02Z", - "update_time": "2013-01-31T04:12:04Z", - "state": "approved", - "intent": "sale", - "payer": { - "payment_method": "credit_card", - "funding_instruments": [ - { - "credit_card": { - "type": "visa", - "number": "xxxxxxxxxxxx0331", - "expire_month": "11", - "expire_year": "2018", - "first_name": "Betsy", - "last_name": "Buyer", - "billing_address": { - "line1": "111 First Street", - "city": "Saratoga", - "state": "CA", - "postal_code": "95070", - "country_code": "US" - } - } - } - ] - }, - "transactions": [ - { - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "tax": "0.03", - "shipping": "0.03" - } - }, - "description": "This is the payment transaction description.", - "related_resources": [ - { - "sale": { - "id": "4RR959492F879224U", - "create_time": "2013-01-31T04:12:02Z", - "update_time": "2013-01-31T04:12:04Z", - "state": "completed", - "amount": { - "total": "7.47", - "currency": "USD" - }, - "parent_payment": "PAY-17S8410768582940NKEE66EQ", - "links": [ - { - "href": "https://api.paypal.com/v1/payments/sale/4RR959492F879224U", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/sale/4RR959492F879224U/refund", - "rel": "refund", - "method": "POST" - }, - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-17S8410768582940NKEE66EQ", - "rel": "parent_payment", - "method": "GET" - } - ] - } - } - ] - } - ], - "links": [ - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-17S8410768582940NKEE66EQ", - "rel": "self", - "method": "GET" - } - ] - }, - "status": "201 Created" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testCreateWallet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testCreateWallet.json deleted file mode 100644 index 06bb793..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testCreateWallet.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "description": "Creates a payment resource.", - "title": "payment", - "runnable": true, - "operationId": "payment.create", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "headers": {}, - "body": { - "intent": "sale", - "payer": { - "payment_method": "paypal", - "payer_info": { - "tax_id_type": "BR_CPF", - "tax_id": "Fh618775611" - } - }, - "redirect_urls": { - "return_url": "http://localhost/Server-SDK/rest-api-sdk-php/sample/payments/ExecutePayment.php?success=true", - "cancel_url": "http://localhost/Server-SDK/rest-api-sdk-php/sample/payments/ExecutePayment.php?success=false" - }, - "transactions": [ - { - "amount": { - "total": "20.00", - "currency": "USD", - "details": { - "subtotal": "17.50", - "tax": "1.30", - "shipping": "1.20", - "handling_fee": "1.00", - "shipping_discount": "-1.00", - "insurance": "0.00" - } - }, - "description": "This is the payment transaction description.", - "custom": "EBAY_EMS_90048630024435", - "invoice_number": "48787589677", - "payment_options": { - "allowed_payment_method": "INSTANT_FUNDING_SOURCE" - }, - "soft_descriptor": "ECHI5786786", - "item_list": { - "items": [ - { - "name": "hat", - "description": "Browncolorsatinhat", - "quantity": "1", - "price": "7.50", - "tax": "0.30", - "sku": "1", - "currency": "USD" - }, - { - "name": "handbag", - "description": "Blackcolorhandbag", - "quantity": "5", - "price": "2.00", - "tax": "0.20", - "sku": "product34", - "currency": "USD" - } - ], - "shipping_address": { - "recipient_name": "HelloWorld", - "line1": "2211 North First Street", - "city": "San Jose", - "country_code": "US", - "postal_code": "95131", - "phone": "011862212345678", - "state": "CA" - } - } - } - ] - }, - "path": "/v1/payments/payment", - "method": "POST" - }, - "response": { - "headers": {}, - "body": { - "id": "PAY-17S8410768582940NKEE66EQ", - "create_time": "2013-01-31T04: 12: 02Z", - "update_time": "2013-01-31T04: 12: 04Z", - "state": "approved", - "intent": "sale", - "payer": { - "payment_method": "credit_card", - "funding_instruments": [ - { - "credit_card": { - "type": "visa", - "number": "xxxxxxxxxxxx0331", - "expire_month": "11", - "expire_year": "2018", - "first_name": "Betsy", - "last_name": "Buyer", - "billing_address": { - "line1": "111FirstStreet", - "city": "Saratoga", - "state": "CA", - "postal_code": "95070", - "country_code": "US" - } - } - } - ] - }, - "transactions": [ - { - "amount": { - "total": "20.00", - "currency": "USD", - "details": { - "subtotal": "17.50", - "tax": "1.30", - "shipping": "1.20" - } - }, - "description": "Thisisthepaymenttransactiondescription.", - "related_resources": [ - { - "sale": { - "id": "4RR959492F879224U", - "create_time": "2013-01-31T04: 12: 02Z", - "update_time": "2013-01-31T04: 12: 04Z", - "state": "completed", - "amount": { - "total": "7.47", - "currency": "USD" - }, - "parent_payment": "PAY-17S8410768582940NKEE66EQ", - "links": [ - { - "href": "https: //api.paypal.com/v1/payments/sale/4RR959492F879224U", - "rel": "self", - "method": "GET" - }, - { - "href": "https: //api.paypal.com/v1/payments/sale/4RR959492F879224U/refund", - "rel": "refund", - "method": "POST" - }, - { - "href": "https: //api.paypal.com/v1/payments/payment/PAY-17S8410768582940NKEE66EQ", - "rel": "parent_payment", - "method": "GET" - } - ] - } - } - ] - } - ], - "links": [ - { - "href": "https: //api.paypal.com/v1/payments/payment/PAY-17S8410768582940NKEE66EQ", - "rel": "self", - "method": "GET" - } - ] - }, - "status": "201 Created" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testExecute.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testExecute.json deleted file mode 100644 index 77d5a80..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testExecute.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "description": "Completes a payment.", - "title": "Execute Payment", - "runnable": true, - "operationId": "payment.execute", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "headers": {}, - "body": { - "payer_id": "CR87QHB7JTRSC" - }, - "path": "/v1/payments/payment/PAY-34629814WL663112AKEE3AWQ/execute", - "method": "POST" - }, - "response": { - "headers": {}, - "body": { - "id": "PAY-34629814WL663112AKEE3AWQ", - "create_time": "2013-01-30T23:44:26Z", - "update_time": "2013-01-30T23:44:28Z", - "state": "approved", - "intent": "sale", - "payer": { - "payment_method": "paypal", - "payer_info": { - "email": "bbuyer@example.com", - "first_name": "Betsy", - "last_name": "Buyer", - "payer_id": "CR87QHB7JTRSC" - } - }, - "transactions": [ - { - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "tax": "0.04", - "shipping": "0.06" - } - }, - "description": "This is the payment transaction description.", - "related_resources": [ - { - "sale": { - "id": "1KE4800207592173L", - "create_time": "2013-01-30T23:44:26Z", - "update_time": "2013-01-30T23:44:28Z", - "state": "completed", - "amount": { - "total": "7.47", - "currency": "USD" - }, - "parent_payment": "PAY-34629814WL663112AKEE3AWQ", - "links": [ - { - "href": "https://api.paypal.com/v1/payments/sale/1KE4800207592173L", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/sale/1KE4800207592173L/refund", - "rel": "refund", - "method": "POST" - }, - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-34629814WL663112AKEE3AWQ", - "rel": "parent_payment", - "method": "GET" - } - ] - } - } - ] - } - ], - "links": [ - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-34629814WL663112AKEE3AWQ", - "rel": "self", - "method": "GET" - } - ] - }, - "status": "200 OK" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGet.json deleted file mode 100644 index a3dea4c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGet.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "description": "Obtain the payment resource for the given identifier.", - "title": "Get a payment resource", - "runnable": true, - "operationId": "payment.get", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "headers": {}, - "body": {}, - "path": "/v1/payments/payment/PAY-5YK922393D847794YKER7MUI", - "method": "GET" - }, - "response": { - "headers": {}, - "body": { - "id": "PAY-17S8410768582940NKEE66EQ", - "create_time": "2013-01-31T04:12:02Z", - "update_time": "2013-01-31T04:12:04Z", - "state": "approved", - "intent": "sale", - "payer": { - "payment_method": "credit_card", - "funding_instruments": [ - { - "credit_card": { - "type": "visa", - "number": "xxxxxxxxxxxx0331", - "expire_month": "11", - "expire_year": "2018", - "first_name": "Betsy", - "last_name": "Buyer", - "billing_address": { - "line1": "111 First Street", - "city": "Saratoga", - "state": "CA", - "postal_code": "95070", - "country_code": "US" - } - } - } - ] - }, - "transactions": [ - { - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "tax": "0.03", - "shipping": "0.03" - } - }, - "description": "This is the payment transaction description.", - "related_resources": [ - { - "sale": { - "id": "4RR959492F879224U", - "create_time": "2013-01-31T04:12:02Z", - "update_time": "2013-01-31T04:12:04Z", - "state": "completed", - "amount": { - "total": "7.47", - "currency": "USD" - }, - "parent_payment": "PAY-17S8410768582940NKEE66EQ", - "links": [ - { - "href": "https://api.paypal.com/v1/payments/sale/4RR959492F879224U", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/sale/4RR959492F879224U/refund", - "rel": "refund", - "method": "POST" - }, - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-17S8410768582940NKEE66EQ", - "rel": "parent_payment", - "method": "GET" - } - ] - } - } - ] - } - ], - "links": [ - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-17S8410768582940NKEE66EQ", - "rel": "self", - "method": "GET" - } - ] - }, - "status": "200 OK" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGetPending.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGetPending.json deleted file mode 100644 index 08d11c0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGetPending.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Obtain the payment resource for the given identifier.", - "title": "Get a payment resource", - "runnable": true, - "operationId": "payment.get", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "headers": {}, - "body": {}, - "path": "/v1/payments/payment/PAY-5YK922393D847794YKER7MUI", - "method": "GET" - }, - "response": { - "headers": {}, - "body": { - "id": "PAY-5YK922393D847794YKER7MUI", - "create_time": "2013-02-19T22:01:53Z", - "update_time": "2013-02-19T22:01:55Z", - "state": "approved", - "intent": "sale", - "payer": { - "payment_method": "paypal", - "status": "VERIFIED" - }, - "transactions": [ - { - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "subtotal": "7.47" - } - }, - "description": "This is the payment transaction description.", - "related_resources": [ - { - "sale": { - "id": "36C38912MN9658832", - "create_time": "2013-02-19T22:01:53Z", - "update_time": "2013-02-19T22:01:55Z", - "amount": { - "total": "7.47", - "currency": "USD" - }, - "payment_mode": "INSTANT_TRANSFER", - "state": "pending", - "reason_code": "ECHECK", - "protection_eligibility": "ELIGIBLE", - "protection_eligibility_type": "ELIGIBLE", - "clearing_time": "2014-06-12T07:00:00Z", - "parent_payment": "PAY-5YK922393D847794YKER7MUI", - "links": [ - { - "href": "https://api.paypal.com/v1/payments/sale/36C38912MN9658832", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/sale/36C38912MN9658832/refund", - "rel": "refund", - "method": "POST" - }, - { - "href": "https://www.paypal.com/cgi-bin/webscr?cmd=_complete-express-checkout&token=EC-92V50600P8987630S", - "rel": "payment_instruction_redirect", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI", - "rel": "parent_payment", - "method": "GET" - } - ] - } - } - ] - } - ], - "links": [ - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-5YK922393D847794YKER7MUI", - "rel": "self", - "method": "GET" - } - ] - }, - "status": "200 OK" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGetSale.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGetSale.json deleted file mode 100644 index ac843fc..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testGetSale.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "description": "Lookup a Sale resource.", - "title": "Sale Resource", - "runnable": true, - "operationId": "sale.get", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "headers": {}, - "body": {}, - "path": "/v1/sales/4RR959492F879224U", - "method": "GET" - }, - "response": { - "headers": {}, - "body": - { - "id": "4RR959492F879224U", - "create_time": "2014-10-28T19:27:39Z", - "update_time": "2014-10-28T19:28:02Z", - "amount": { - "total": "7.47", - "currency": "USD" - }, - "payment_mode": "INSTANT_TRANSFER", - "state": "completed", - "protection_eligibility": "ELIGIBLE", - "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", - "parent_payment": "PAY-17S8410768582940NKEE66EQ", - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/sale/5SA006225W236580K", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/sale/5SA006225W236580K/refund", - "rel": "refund", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-48W25034R6080713AKRH64KY", - "rel": "parent_payment", - "method": "GET" - } - ] - }, - "status": "201 OK" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testRefundSale.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testRefundSale.json deleted file mode 100644 index bc49b9f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PaymentsFunctionalTest/testRefundSale.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "description": "Creates a refunded sale resource.", - "title": "Refund a Sale", - "runnable": true, - "operationId": "sale.refund", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "clientId": "", - "clientSecret": "", - "path": "" - }, - "login": {}, - "openIdConnect": {} - }, - "request": { - "headers": {}, - "body": { - "amount": { - "total": "2.34", - "currency": "USD" - } - }, - "path": "/v1/sales/4RR959492F879224U/refund", - "method": "POST" - }, - "response": { - "headers": {}, - "body": { - "id": "4CF18861HF410323U", - "create_time": "2013-01-31T04:13:34Z", - "update_time": "2013-01-31T04:13:36Z", - "state": "completed", - "amount": { - "total": "2.34", - "currency": "USD" - }, - "sale_id": "4RR959492F879224U", - "parent_payment": "PAY-17S8410768582940NKEE66EQ", - "links": [ - { - "href": "https://api.paypal.com/v1/payments/refund/4CF18861HF410323U", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/payment/PAY-46E69296BH2194803KEE662Y", - "rel": "parent_payment", - "method": "GET" - }, - { - "href": "https://api.paypal.com/v1/payments/sale/2MU78835H4515710F", - "rel": "sale", - "method": "GET" - } - ] - }, - "status": "201 Created" - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testCancel.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testCancel.json deleted file mode 100644 index a3850ae..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testCancel.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "description":"User initiates cancel on unlcaimed payouts item.", - "title":"Cancel item sample", - "runnable":true, - "operationId":"payouts.item.cancel", - "user":{ - "scopes":[ - - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/payments/payouts-item/452345/cancel", - "method":"POST", - "headers":{ - "Content-Type":"application/json", - "Content-Encoding":"gzip" - }, - "body":{ - - } - }, - "response":{ - "status":"200 OK", - "headers":{ - "Content-Type":"application/json", - "Content-Encoding":"gzip" - }, - "body":{ - "payout_item_id":"VHBFGN95AWV82", - "transaction_id":"0728664497487461D", - "transaction_status":"RETURNED", - "payout_item_fee":{ - "currency":"USD", - "value":"0.02" - }, - "payout_batch_id":"CDZEC5MJ8R5HY", - "sender_batch_id":"2014021801", - "payout_item":{ - "recipient_type":"EMAIL", - "amount":{ - "value":"1.00", - "currency":"USD" - }, - "note":"Thanks for your patronage!", - "receiver":"anybody01@gmail.com", - "payouts_item_id":"1421342", - "sender_item_id":"14Feb_234" - }, - "time_processed":"2014-01-27T10:17:41Z", - "errors":{ - "name":"RECEIVER_UNREGISTERED", - "message":"Receiver is unregistered", - "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#RECEIVER_UNREGISTERED" - }, - "links":[ - { - "rel":"self", - "href":"https://api.sandbox.paypal.com/v1/payments/payouts-item/1421342", - "method":"GET" - }, - { - "rel":"batch", - "href":"https://api.sandbox.paypal.com/v1/payments/payouts/20140724", - "method":"GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testCreate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testCreate.json deleted file mode 100644 index c2c5307..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testCreate.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "description" : "Sender POSTs a batch with 1 payout request. This example is for sync_mode=true. This means an immediate response. For sync_mode=false, the output will be run in back ground and the repsonse will be different.", - "title" : "POST batch sample", - "runnable" : true, - "operationId" : "payouts", - "user" : { - "scopes" : [ ] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/payments/payouts?sync_mode=true", - "method":"POST", - "headers": { - "Content-Type": "application/json", - "Content-Encoding": "gzip" - }, - "body":{ - "sender_batch_header":{ - "sender_batch_id":"2014021801", - "email_subject":"You have a Payout!" - }, - "items":[ - { - "recipient_type":"EMAIL", - "amount":{ - "value":"1.0", - "currency":"USD" - }, - "note":"Thanks for your patronage!", - "sender_item_id":"2014031400023", - "receiver":"shirt-supplier-one@mail.com" - } - ] - } - }, - "response" : { - "status" : "201 OK", - "headers" : { - "Content-Type": "application/json", - "Content-Encoding": "gzip" - }, - "body" : { - "batch_header": { - "payout_batch_id": "CDZEC5MJ8R5HY", - "batch_status": "SUCCESS", - "time_created": "2014-46-14T06:46:22Z", - "time_completed": "2014-46-14T06:46:23Z", - "sender_batch_header": { - "sender_batch_id":"2014021801", - "email_subject": "You have a Payout!" - }, - "amount": { - "currency": "USD", - "value": "1.0" - }, - "fees": { - "currency": "USD", - "value": "0.02" - } - }, - "items": [ - { - "payout_item_id": "VHBFGN95AWV82", - "transaction_id": "0728664497487461D", - "transaction_status": "UNCLAIMED", - "payout_item_fee": { - "currency": "USD", - "value": "0.02" - }, - "payout_batch_id": "CDZEC5MJ8R5HY", - "payout_item": { - "amount": { - "currency": "USD", - "value": "1.0" - }, - "note": "Thanks for your patronage!", - "receiver": "anybody01@gmail.com", - "recipient_type": "EMAIL", - "sender_item_id": "201403140001" - }, - "time_processed": "2014-46-14T06:46:23Z", - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/VHBFGN95AWV82", - "rel": "item", - "method": "GET" - } - ] - } - ], - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/payouts/CDZEC5MJ8R5HY", - "rel": "self", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testGet.json deleted file mode 100644 index 47101b4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testGet.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "description" : "GET of a batch with multiple items.", - "title" : "GET batch with multiple items", - "runnable" : true, - "operationId" : "payouts.get", - "user" : { - "scopes" : [ ] - }, - "credentials" : { - "oauth": { - "path" : "/v1/oauth/token", - "clientId":"", - "clientSecret":"" - }, - "login" : { }, - "openIdConnect" : { } - }, - "request" : { - "path" : "v1/payments/payouts/12345678", - "method" : "GET", - "headers" : { - "Content-Type": "application/json", - "Content-Encoding": "gzip" - }, - "body":{ - } - }, - "response" : { - "status" : "200 OK", - "headers" : { - "Content-Type": "application/json", - "Content-Encoding": "gzip" - }, - "body":{ - "batch_header":{ - "payout_batch_id":"12345678", - "batch_status":"PROCESSING", - "sender_batch_id":"2014021801123", - "time_created":"2014-01-27T10:17:00Z", - "time_completed":"2014-01-27T11:17:39.00Z", - "sender_batch_header":{ - "sender_batch_id":"2014021801", - "email_subject":"You have a Payout!" - }, - "amount":{ - "value":"435.85", - "currency":"USD" - }, - "fees":{ - "value":"5.84", - "currency":"USD" - } - }, - "items":[ - { - "payout_item_id":"452176", - "transaction_id":"434176", - "transaction_status":"SUCCESS", - "payout_batch_id":"12345678", - "sender_batch_id":"2014021887", - "payout_item_fee":{ - "currency":"USD", - "value":"1.00" - }, - "payout_item":{ - "recipient_type":"EMAIL", - "amount":{ - "value":"65.24", - "currency":"EUR" - }, - "note":"Thanks for your patronage!", - "receiver":"anybody77@gmail.com", - "payouts_item_id":"1421388", - "sender_item_id":"14Feb_978" - }, - "time_created":"2014-01-27T10:17:00:00Z", - "time_processed":"2014-01-27T10:18:32Z" - }, - { - "payout_item_id":"452123", - "transaction_id":"434123", - "transaction_status":"SUCCESS", - "payout_batch_id":"12345678", - "sender_batch_id":"2014021802", - "payout_item_fee":{ - "currency":"USD", - "value":"1.00" - }, - "payout_item":{ - "recipient_type":"EMAIL", - "amount":{ - "value":"59.87", - "currency":"EUR" - }, - "note":"Thanks for your patronage!", - "receiver":"anybody34@gmail.com", - "payouts_item_id":"1421345", - "sender_item_id":"14Feb_321" - }, - "time_created":"2014-01-27T10:17:00Z", - "time_processed":"2014-01-27T10:18:15Z" - }, - { - "payout_item_id":"452323", - "transaction_id":"434543", - "transaction_status":"SUCCESS", - "payout_batch_id":"12345678", - "sender_batch_id":"2014021802", - "payout_item_fee":{ - "currency":"USD", - "value":"1.00" - }, - "payout_item":{ - "recipient_type":"EMAIL", - "amount":{ - "value":"59.87", - "currency":"EUR" - }, - "note":"Thanks for your patronage!", - "receiver":"anybody03@gmail.com", - "payouts_item_id":"1421355", - "sender_item_id":"14Feb_239" - }, - "time_created":"2014-01-27T10:17:00Z", - "time_processed":"2014-01-27T10:17:15Z" - }, - { - "payout_item_id":"452350", - "transaction_id":"434543", - "transaction_status":"SUCCESS", - "payout_batch_id":"12345678", - "sender_batch_id":"2014021801", - "payout_item_fee":{ - "currency":"USD", - "value":"0.75" - }, - "payout_item":{ - "recipient_type":"EMAIL", - "amount":{ - "value":"19.87", - "currency":"USD" - }, - "note":"Thanks for your patronage!", - "receiver":"anybody02@gmail.com", - "payouts_item_id":"1421332", - "sender_item_id":"14Feb_235" - }, - "time_created":"2014-01-27T10:17:00Z", - "time_processed":"2014-01-27T10:17:25Z" - }, - { - "payout_item_id":"452345", - "transaction_id":"4345", - "transaction_status":"SUCCESS", - "payout_batch_id":"12345678", - "sender_batch_id":"2014021801", - "payout_item_fee":{ - "currency":"USD", - "value":"0.75" - }, - "payout_item":{ - "recipient_type":"EMAIL", - "amount":{ - "value":"9.87", - "currency":"USD" - }, - "note":"Thanks for your patronage!", - "receiver":"anybody01@gmail.com", - "payouts_item_id":"1421342", - "sender_item_id":"14Feb_234" - }, - "time_created":"2014-01-27T10:17:00Z", - "time_processed":"2014-01-27T10:17:37Z" - }, - { - "payout_item_id":"4782902", - "transaction_id":"6456456", - "transaction_status":"SUCCESS", - "payout_item_fee":{ - "currency":"USD", - "value":"2.35" - }, - "payout_batch_id":"12345678", - "sender_batch_id":"2014021801", - "payout_item":{ - "recipient_type":"PHONE", - "amount":{ - "value":"112.34", - "currency":"EUR" - }, - "note":"Thanks for your support!", - "receiver":"91-734-234-1234", - "payouts_item_id":"1421343", - "sender_item_id":"14Feb_235" - }, - "time_created":"2014-01-27T10:17:00Z", - "time_processed":"2014-01-27T10:17:52Z" - }, - { - "payout_item_id":"4782902", - "transaction_id":"", - "transaction_status":"PROCESSING", - "payout_batch_id":"12345678", - "sender_batch_id":"2014021801", - "payout_item":{ - "recipient_type":"PHONE", - "amount":{ - "value":"5.32", - "currency":"USD" - }, - "note":"Thanks for your patronage!", - "receiver":"408X234-1234", - "payouts_item_id":"1421344", - "sender_item_id":"14Feb_235" - }, - "time_created":"2014-01-27T10:17:00Z", - "time_processed":"2014-01-27T10:17:41Z" - } - ] - } - } -} - diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testGetItem.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testGetItem.json deleted file mode 100644 index 19adc71..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/PayoutsFunctionalTest/testGetItem.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Sender needs status of one item.", - "title": "GET item sample", - "runnable": true, - "operationId": "payouts.item", - "user": { - "scopes": [] - }, - "credentials": { - "oauth": { - "path": "/v1/oauth/token", - "clientId": "", - "clientSecret": "" - } - }, - "request": { - "path": "v1/payments/payouts-item/452345", - "method": "GET", - "headers": { - "Content-Type": "application/json", - "Content-Encoding": "gzip" - }, - "body": {} - }, - "response": { - "status": "200 OK", - "headers": { - "Content-Type": "application/json", - "Content-Encoding": "gzip" - }, - "body": { - "payout_item_id": "VHBFGN95AWV82", - "transaction_status": "PENDING", - "payout_item_fee": { - "currency": "USD", - "value": "0.02" - }, - "payout_batch_id": "CDZEC5MJ8R5HY", - "transaction_id": "0728664497487461D", - "sender_batch_id": "2014021887", - "payout_item": { - "amount": { - "currency": "USD", - "value": "0.99" - }, - "note": "Thanks you.", - "receiver": "shirt-supplier-one@gmail.com", - "recipient_type": "EMAIL", - "sender_item_id": "item_154a716f035001" - }, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/HUUQ5YASYLQFN", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/payouts/LNLSEVGU4P85S", - "rel": "batch", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testCreate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testCreate.json deleted file mode 100644 index 53c8798..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testCreate.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "description": "Create a web experience profile.", - "title": "Create profile", - "runnable": true, - "operationId": "web-profile.create", - "user": { - "scopes": [ - "https://api.paypal.com/v1/payments/.*" - ] - }, - "credentials": { - "oauth": { - "clientId": "test-client-01", - "clientSecret": "test_secret_a", - "path": "/v1/oauth2/token" - } - }, - "request": { - "path": "v1/payment-experience/web-profiles/", - "method": "POST", - "headers": { - "Content-Type": "application/json", - "PayPal-Request-Id": "abcdefgh123", - "Authorization": "Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - }, - "body": { - "name":"someName2", - "presentation":{ - "logo_image":"http://www.ebay.com" - }, - "input_fields":{ - "no_shipping":1, - "address_override":1 - }, - "flow_config":{ - "landing_page_type":"billing", - "bank_txn_pending_url":"http://www.ebay.com" - } - } - }, - "response": { - "status": "201", - "headers": { - "Content-Type": "application/json" - }, - "body": { - "id": "XP-RFV4-PVD8-AGHJ-8E5J" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testDelete.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testDelete.json deleted file mode 100644 index 6f873e4..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testDelete.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description": "Delete a web experience profile list.", - "title": "Delete profile", - "runnable": true, - "operationId": "web-profile.delete", - "user": { - "scopes": [ - "https://api.paypal.com/v1/payments/.*" - ] - }, - "credentials": { - "oauth": { - "clientId": "test-client-01", - "clientSecret": "test_secret_a", - "path": "/v1/oauth2/token" - } - }, - "request": { - "path": "v1/payment-experience/web-profiles/XP-RFV4-PVD8-AGHJ-8E5J", - "method": "DELETE", - "headers": { - "Authorization": "Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response": { - "status": "204", - "headers": { - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testGet.json deleted file mode 100644 index d3bc266..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testGet.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Fetch a web experience profile.", - "title": "Get profile", - "runnable": true, - "operationId": "web-profile.get", - "user": { - "scopes": [ - "https://api.paypal.com/v1/payments/.*" - ] - }, - "credentials": { - "oauth": { - "clientId": "test-client-01", - "clientSecret": "test_secret_a", - "path": "/v1/oauth2/token" - } - }, - "request": { - "path": "/v1/payment-experience/web-profiles/XP-RFV4-PVD8-AGHJ-8E5J", - "method": "GET", - "headers": { - "Authorization": "Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response": { - "status": "200", - "headers": { - "Content-Type": "application/json" - }, - "body": { - "id": "XP-RFV4-PVD8-AGHJ-8E5J", - "name":"someName2", - "presentation":{ - "logo_image":"http://www.ebay.com" - }, - "input_fields":{ - "no_shipping":1, - "address_override":1 - }, - "flow_config":{ - "landing_page_type":"billing", - "bank_txn_pending_url":"http://www.ebay.com" - } - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testGetList.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testGetList.json deleted file mode 100644 index 14174c0..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testGetList.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "description": "Fetch web experience profile list for a given merchant.", - "title": "Get profile list", - "runnable": true, - "operationId": "web-profile.get-list", - "user": { - "scopes": [ - "https://api.paypal.com/v1/payments/.*" - ] - }, - "credentials": { - "oauth": { - "clientId": "test-client-01", - "clientSecret": "test_secret_a", - "path": "/v1/oauth2/token" - } - }, - "request": { - "path": "/v1/payment-experience/web-profiles", - "method": "GET", - "headers": { - "Authorization": "Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response": { - "status": "200", - "headers": { - "Content-Type": "application/json" - }, - "body": [ - { - "id": "XP-RFV4-PVD8-AGHJ-8E5J", - "name":"someName2", - "presentation":{ - "logo_image":"http://www.ebay.com" - }, - "input_fields":{ - "no_shipping":1, - "address_override":1 - }, - "flow_config":{ - "landing_page_type":"billing", - "bank_txn_pending_url":"http://www.ebay.com" - } - }, - { - "id": "XP-A88A-LYLW-8Y3X-E5ER", - "name": "someName2", - "flow_config": { - "landing_page_type": "billing", - "bank_txn_pending_url": "http://www.ebay.com" - }, - "input_fields": { - "no_shipping": 1, - "address_override": 1 - }, - "presentation": { - "logo_image": "http://www.ebay.com" - } - }, - { - "id": "XP-RFV4-PVD8-AGHJ-8E5J", - "name": "someName2", - "flow_config": { - "bank_txn_pending_url": "http://www.ebay.com" - }, - "input_fields": { - "no_shipping": 1, - "address_override": 1 - }, - "presentation": { - "logo_image": "http://www.ebay.com" - } - } - ] - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testPartialUpdate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testPartialUpdate.json deleted file mode 100644 index 5850c5e..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testPartialUpdate.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "description": "Partially update a web experience profile.", - "title": "Partially Update profile", - "runnable": true, - "operationId": "web-profile.partial-update", - "user": { - "scopes": [ - "https://api.paypal.com/v1/payments/.*" - ] - }, - "credentials": { - "oauth": { - "clientId": "test-client-01", - "clientSecret": "test_secret_a", - "path": "/v1/oauth2/token" - } - }, - "request": { - "path": "v1/payment-experience/web-profiles/XP-RFV4-PVD8-AGHJ-8E5J", - "method": "PATCH", - "headers": { - "Content-Type": "application/json", - "PayPal-Request-Id": "abcdefgh123", - "Authorization": "Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - }, - "body": [ - { - "op": "add", - "path": "/presentation/brand_name", - "value":"new_brand_name" - }, - { - "op": "remove", - "path": "/flow_config/landing_page_type" - - } - ] - }, - "response": { - "status": "204", - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testUpdate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testUpdate.json deleted file mode 100644 index 022742d..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebProfileFunctionalTest/testUpdate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Update a web experience profile.", - "title": "Update profile", - "runnable": true, - "operationId": "web-profile.update", - "user": { - "scopes": [ - "https://api.paypal.com/v1/payments/.*" - ] - }, - "credentials": { - "oauth": { - "clientId": "test-client-01", - "clientSecret": "test_secret_a", - "path": "/v1/oauth2/token" - } - }, - "request": { - "path": "v1/payment-experience/web-profiles/XP-RFV4-PVD8-AGHJ-8E5J", - "method": "PUT", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - }, - "body": { - "name":"someName2", - "presentation":{ - "logo_image":"http://www.ebay.com" - }, - "input_fields":{ - "no_shipping":0, - "address_override":1 - }, - "flow_config":{ - "landing_page_type":"billing", - "bank_txn_pending_url":"http://www.ebay.com" - } - } - }, - "response": { - "status": "204", - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testCreate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testCreate.json deleted file mode 100644 index d03f819..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testCreate.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "description":"Create a webhook", - "title":"Create a webhook", - "runnable":true, - "operationId":"webhooks.create", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks", - "method":"POST", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - }, - "body":{ - "url":"https://requestb.in/10ujt3c1", - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED" - } - ] - } - }, - "response":{ - "status":"201", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "id":"0EH40505U7160970P", - "url":"https://requestb.in/10ujt3c1", - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED", - "description":"A payment authorization was created" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED", - "description":"A payment authorization was voided" - } - ], - "links":[ - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"update", - "method":"PATCH" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"delete", - "method":"DELETE" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testDelete.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testDelete.json deleted file mode 100644 index dee626b..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testDelete.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "description":"Delete a webhook", - "title":"Delete a webhook", - "runnable":true, - "operationId":"webhooks.delete", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks/5GP028458E2496506", - "method":"DELETE", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"204", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - } - } -} \ No newline at end of file diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testEventResend.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testEventResend.json deleted file mode 100644 index 85f62d5..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testEventResend.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "description":"Resend a webhook event", - "title":"Resend a webhook event", - "runnable":true, - "operationId":"event.resend", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks-events/8PT597110X687430LKGECATA/resend", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"202", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "id":"8PT597110X687430LKGECATA", - "create_time":"2013-06-25T21:41:28Z", - "resource_type":"authorization", - "trigger_event":"PAYMENT.AUTHORIZATION.CREATED", - "summary":"A payment authorization was created", - "resource":{ - "id":"2DC87612EK520411B", - "create_time":"2013-06-25T21:39:15Z", - "update_time":"2013-06-25T21:39:17Z", - "state":"authorized", - "amount":{ - "total":"7.47", - "currency":"USD", - "details":{ - "subtotal":"7.47" - } - }, - "parent_payment":"PAY-36246664YD343335CKHFA4AY", - "valid_until":"2013-07-24T21:39:15Z", - "links":[ - { - "href":"https://api.paypal.com/v1/payments/authorization/2DC87612EK520411B", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/payments/authorization/2DC87612EK520411B/capture", - "rel":"capture", - "method":"POST" - }, - { - "href":"https://api.paypal.com/v1/payments/authorization/2DC87612EK520411B/void", - "rel":"void", - "method":"POST" - }, - { - "href":"https://api.paypal.com/v1/payments/payment/PAY-36246664YD343335CKHFA4AY", - "rel":"parent_payment", - "method":"GET" - } - ] - }, - "links":[ - { - "href":"https://api.paypal.com/v1/notfications/webhooks-events/8PT597110X687430LKGECATA", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notfications/webhooks-events/8PT597110X687430LKGECATA/resend", - "rel":"resend", - "method":"POST" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testEventSearch.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testEventSearch.json deleted file mode 100644 index 5d26256..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testEventSearch.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "description":"Get list of webhook events", - "title":"Get list of webhook events", - "runnable":true, - "operationId":"event.list", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks-events", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "events": [ - { - "id": "8PT597110X687430LKGECATA", - "create_time": "2013-06-25T21:41:28Z", - "resource_type": "authorization", - "event_type": "PAYMENT.AUTHORIZATION.CREATED", - "summary": "A payment authorization was created", - "resource": { - "id": "2DC87612EK520411B", - "create_time": "2013-06-25T21:39:15Z", - "update_time": "2013-06-25T21:39:17Z", - "state": "authorized", - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "subtotal": "7.47" - } - }, - "parent_payment": "PAY-36246664YD343335CKHFA4AY", - "valid_until": "2013-07-24T21:39:15Z", - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/authorization/2DC87612EK520411B", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/authorization/2DC87612EK520411B/capture", - "rel": "capture", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/authorization/2DC87612EK520411B/void", - "rel": "void", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-36246664YD343335CKHFA4AY", - "rel": "parent_payment", - "method": "GET" - } - ] - }, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/notfications/webhooks-events/8PT597110X687430LKGECATA", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/notfications/webhooks-events/8PT597110X687430LKGECATA/resend", - "rel": "resend", - "method": "POST" - } - ] - }, - { - "id": "HTSPGS710X687430LKGECATA", - "create_time": "2013-06-25T21:41:28Z", - "resource_type": "authorization", - "event_type": "PAYMENT.AUTHORIZATION.CREATED", - "summary": "A payment authorization was created", - "resource": { - "id": "HATH7S72EK520411B", - "create_time": "2013-06-25T21:39:15Z", - "update_time": "2013-06-25T21:39:17Z", - "state": "authorized", - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "subtotal": "7.47" - } - }, - "parent_payment": "PAY-ALDSFJ64YD343335CKHFA4AY", - "valid_until": "2013-07-24T21:39:15Z", - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/payments/authorization/HATH7S72EK520411B", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/authorization/HATH7S72EK520411B/capture", - "rel": "capture", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/authorization/HATH7S72EK520411B/void", - "rel": "void", - "method": "POST" - }, - { - "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-HATH7S72EK520411B", - "rel": "parent_payment", - "method": "GET" - } - ] - }, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/notfications/webhooks-events/HTSPGS710X687430LKGECATA", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/notfications/webhooks-events/HTSPGS710X687430LKGECATA/resend", - "rel": "resend", - "method": "POST" - } - ] - } - ], - "count": 2, - "links": [ - { - "href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/?start_time=2014-08-04T12:46:47-07:00&amp;end_time=2014-09-18T12:46:47-07:00&amp;page_size=2&amp;move_to=next&amp;index_time=2014-09-17T23:07:35Z&amp;index_id=3", - "rel": "next", - "method": "GET" - }, - { - "href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/?start_time=2014-08-04T12:46:47-07:00&amp;end_time=2014-09-18T12:46:47-07:00&amp;page_size=2&amp;move_to=previous&amp;index_time=2014-09-17T23:07:35Z&amp;index_id=0", - "rel": "previous", - "method": "GET" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGet.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGet.json deleted file mode 100644 index d7e80f1..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGet.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "description":"Get a webhook", - "title":"Get a webhook", - "runnable":true, - "operationId":"webhooks.get", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks/0EH40505U7160970P", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "id":"0EH40505U7160970P", - "url":"https://requestb.in/10ujt3c1", - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED", - "description":"A payment authorization was created" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED", - "description":"A payment authorization was voided" - } - ], - "links":[ - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"update", - "method":"PATCH" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"delete", - "method":"DELETE" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetAll.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetAll.json deleted file mode 100644 index 957735a..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetAll.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "description":"Get all webhooks", - "title":"Get all webhook", - "runnable":true, - "operationId":"webhooks.get-all", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "webhooks":[ - { - "id":"40Y916089Y8324740", - "url":"http://www.ebay.com/paypal_webhook", - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED", - "description":"A payment authorization was created" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED", - "description":"A payment authorization was voided" - } - ], - "links":[ - { - "href":"https://api.paypal.com/v1/notifications/webhooks/40Y916089Y8324740", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/40Y916089Y8324740", - "rel":"update", - "method":"PATCH" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/40Y916089Y8324740", - "rel":"delete", - "method":"DELETE" - } - ] - }, - { - "id":"0EH40505U7160970P", - "url":"http://www.ebay.com/another_paypal_webhook", - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED", - "description":"A payment authorization was created" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED", - "description":"A payment authorization was voided" - } - ], - "links":[ - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"update", - "method":"PATCH" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"delete", - "method":"DELETE" - } - ] - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetEvent.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetEvent.json deleted file mode 100644 index 4bc244c..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetEvent.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "description":"Get a webhook event", - "title":"Get a webhook event", - "runnable":true, - "operationId":"event.get", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks-events/8PT597110X687430LKGECATA", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "id":"8PT597110X687430LKGECATA", - "create_time":"2013-06-25T21:41:28Z", - "resource_type":"authorization", - "event_type":"PAYMENT.AUTHORIZATION.CREATED", - "summary":"A payment authorization was created", - "resource":{ - "id":"2DC87612EK520411B", - "create_time":"2013-06-25T21:39:15Z", - "update_time":"2013-06-25T21:39:17Z", - "state":"authorized", - "amount":{ - "total":"7.47", - "currency":"USD", - "details":{ - "subtotal":"7.47" - } - }, - "parent_payment":"PAY-36246664YD343335CKHFA4AY", - "valid_until":"2013-07-24T21:39:15Z", - "links":[ - { - "href":"https://api.paypal.com/v1/payments/authorization/2DC87612EK520411B", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/payments/authorization/2DC87612EK520411B/capture", - "rel":"capture", - "method":"POST" - }, - { - "href":"https://api.paypal.com/v1/payments/authorization/2DC87612EK520411B/void", - "rel":"void", - "method":"POST" - }, - { - "href":"https://api.paypal.com/v1/payments/payment/PAY-36246664YD343335CKHFA4AY", - "rel":"parent_payment", - "method":"GET" - } - ] - }, - "links":[ - { - "href":"https://api.paypal.com/v1/notfications/webhooks-events/8PT597110X687430LKGECATA", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notfications/webhooks-events/8PT597110X687430LKGECATA/resend", - "rel":"resend", - "method":"POST" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetSubscribedEventTypes.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetSubscribedEventTypes.json deleted file mode 100644 index eb09260..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testGetSubscribedEventTypes.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "description":"Events subscribed for a webhook", - "title":"Events subscribed for a webhook", - "runnable":true, - "operationId":"webhook.subscribed-event-types.list", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks/0EH40505U7160970P/event-types", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED", - "description":"A payment authorization was created" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED", - "description":"A payment authorization was voided" - } - ] - } - } -} \ No newline at end of file diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testUpdate.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testUpdate.json deleted file mode 100644 index bc1a694..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/testUpdate.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "description":"Update a webhook", - "title":"Updated a webhook", - "runnable":true, - "operationId":"webhooks.update", - "user":{ - "scopes":[ - "https://uri.paypal.com/services/applications/webhooks" - ] - }, - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks/0EH40505U7160970P", - "method":"PATCH", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - }, - "body":[ - { - "op":"replace", - "path":"/url", - "value":"https://requestb.in/10ujt3c1" - }, - { - "op":"replace", - "path":"/event_types", - "value":[ - { - "name":"PAYMENT.SALE.REFUNDED" - } - ] - } - ] - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "id":"0EH40505U7160970P", - "url":"https://requestb.in/10ujt3c1", - "event_types":[ - { - "name":"PAYMENT.SALE.REFUNDED", - "description":"A sale payment was refunded" - } - ], - "links":[ - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"self", - "method":"GET" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"update", - "method":"PATCH" - }, - { - "href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P", - "rel":"delete", - "method":"DELETE" - } - ] - } - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/webhook_get_available_event_types.json b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/webhook_get_available_event_types.json deleted file mode 100644 index 04758d2..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Functional/resources/WebhookFunctionalTest/webhook_get_available_event_types.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description":"List of supported webhook events", - "title":"List of supported webhook events", - "runnable":true, - "operationId":"available-event-type.list", - "credentials":{ - "oauth":{ - "path":"/v1/oauth/token", - "clientId":"", - "clientSecret":"" - } - }, - "request":{ - "path":"v1/notifications/webhooks-event-types", - "method":"GET", - "headers":{ - "Content-Type":"application/json", - "Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn" - } - }, - "response":{ - "status":"200", - "headers":{ - "Content-Type":"application/json", - "Paypal-Debug-id":"0c444abc1d12d" - }, - "body":{ - "event_types":[ - { - "name":"PAYMENT.AUTHORIZATION.CREATED", - "description":"A payment authorization was created" - }, - { - "name":"PAYMENT.AUTHORIZATION.VOIDED", - "description":"A payment authorization was voided" - }, - { - "name":"PAYMENT.CAPTURE.COMPLETED", - "description":"A capture payment was completed" - }, - { - "name":"PAYMENT.CAPTURE.REFUNDED", - "description":"A capture payment was refunded" - }, - { - "name":"PAYMENT.SALE.COMPLETED", - "description":"A sale payment was completed" - }, - { - "name":"PAYMENT.SALE.REFUNDED", - "description":"A sale payment was refunded" - } - ] - } - } -} \ No newline at end of file diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Handler/OauthHandlerTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Handler/OauthHandlerTest.php deleted file mode 100644 index b36d625..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Handler/OauthHandlerTest.php +++ /dev/null @@ -1,72 +0,0 @@ -apiContext = new ApiContext( - new OAuthTokenCredential( - 'clientId', - 'clientSecret' - ) - ); - - } - - public function modeProvider() - { - return array( - array( array('mode' => 'sandbox') ), - array( array('mode' => 'live')), - array( array( 'mode' => 'sandbox','oauth.EndPoint' => 'http://localhost/')), - array( array('mode' => 'sandbox','service.EndPoint' => 'http://service.localhost/')) - ); - } - - - /** - * @dataProvider modeProvider - * @param $configs - */ - public function testGetEndpoint($configs) - { - $config = $configs + array( - 'cache.enabled' => true, - 'http.headers.header1' => 'header1value' - ); - $this->apiContext->setConfig($config); - $this->httpConfig = new PayPalHttpConfig(null, 'POST', $config); - $this->handler = new OauthHandler($this->apiContext); - $this->handler->handle($this->httpConfig, null, $this->config); - } - - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Rest/ApiContextTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Rest/ApiContextTest.php deleted file mode 100644 index 20b4547..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Rest/ApiContextTest.php +++ /dev/null @@ -1,37 +0,0 @@ -apiContext = new ApiContext(); - } - - public function testGetRequestId() - { - $requestId = $this->apiContext->getRequestId(); - $this->assertNotNull($requestId); - $this->assertEquals($requestId, $this->apiContext->getRequestId()); - } - - public function testResetRequestId() - { - $requestId = $this->apiContext->getRequestId(); - $newRequestId = $this->apiContext->resetRequestId(); - $this->assertNotNull($newRequestId); - $this->assertNotEquals($newRequestId, $requestId); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/ArgumentValidatorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/ArgumentValidatorTest.php deleted file mode 100644 index 02d373f..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/ArgumentValidatorTest.php +++ /dev/null @@ -1,51 +0,0 @@ -assertTrue(ArgumentValidator::validate($input, "Name")); - } - - /** - * - * @dataProvider invalidProvider - * @expectedException \InvalidArgumentException - */ - public function testInvalidDataValidate($input) - { - $this->assertTrue(ArgumentValidator::validate($input, "Name")); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/JsonValidatorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/JsonValidatorTest.php deleted file mode 100644 index 532a003..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/JsonValidatorTest.php +++ /dev/null @@ -1,57 +0,0 @@ - '23')), - array('{"json":"value, "bool":false, "int":1, "float": 0.123, "array": [{"json":"value, "bool":false, "int":1, "float": 0.123}"json":"value, "bool":false, "int":1, "float": 0.123} ]}') - ); - } - - /** - * - * @dataProvider positiveProvider - */ - public function testValidate($input) - { - $this->assertTrue(JsonValidator::validate($input)); - } - - /** - * - * @dataProvider invalidProvider - * @expectedException \InvalidArgumentException - */ - public function testInvalidJson($input) - { - JsonValidator::validate($input); - } - - /** - * - * @dataProvider invalidProvider - */ - public function testInvalidJsonSilent($input) - { - $this->assertFalse(JsonValidator::validate($input, true)); - } -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/NumericValidatorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/NumericValidatorTest.php deleted file mode 100644 index 360ea04..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/NumericValidatorTest.php +++ /dev/null @@ -1,62 +0,0 @@ -assertTrue(NumericValidator::validate($input, "Test Value")); - } - - /** - * - * @dataProvider invalidProvider - * @expectedException \InvalidArgumentException - */ - public function testValidateException($input) - { - NumericValidator::validate($input, "Test Value"); - } - -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/UrlValidatorTest.php b/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/UrlValidatorTest.php deleted file mode 100644 index d1268fd..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/PayPal/Test/Validation/UrlValidatorTest.php +++ /dev/null @@ -1,55 +0,0 @@ -add('PayPal\\Test', __DIR__); -if (!defined("PP_CONFIG_PATH")) { - define("PP_CONFIG_PATH", __DIR__); -} diff --git a/_sakura/vendor/paypal/rest-api-sdk-php/tests/sdk_config.ini b/_sakura/vendor/paypal/rest-api-sdk-php/tests/sdk_config.ini deleted file mode 100644 index 7167c96..0000000 --- a/_sakura/vendor/paypal/rest-api-sdk-php/tests/sdk_config.ini +++ /dev/null @@ -1,47 +0,0 @@ -;Account credentials from developer portal -[Account] -acct1.ClientId = AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS -acct1.ClientSecret = EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL - -acct2.ClientId = TestClientId -acct2.ClientSecret = TestClientSecret - -;Connection Information -[Http] -http.ConnectionTimeOut = 60 -http.Retry = 1 -;http.Proxy=http://[username:password]@hostname[:port][/path] - -mode=sandbox - -;Service Configuration -[Service] -service.EndPoint="https://api.sandbox.paypal.com" -; Uncomment this line for integrating with the live endpoint -; service.EndPoint="https://api.paypal.com" - - -;Logging Information -[Log] -log.LogEnabled=true - -; When using a relative path, the log file is created -; relative to the .php file that is the entry point -; for this request. You can also provide an absolute -; path here -log.FileName=PayPal.log - -; Logging level can be one of FINE, INFO, WARN or ERROR -; Logging is most verbose in the 'FINE' level and -; decreases as you proceed towards ERROR -log.LogLevel=DEBUG - -;Validation Configuration -[validation] -; If validation is set to strict, the PayPalModel would make sure that -; there are proper accessors (Getters and Setters) for each model -; objects. Accepted value is -; 'log' : logs the error message to logger only (default) -; 'strict' : throws a php notice message -; 'disable' : disable the validation -validation.level=strict diff --git a/_sakura/vendor/phpmailer/phpmailer/.gitignore b/_sakura/vendor/phpmailer/phpmailer/.gitignore deleted file mode 100644 index e1294ab..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -docs/phpdoc/ -test/message.txt -test/testbootstrap.php -test/*.pem -.idea -build/ -vendor/ diff --git a/_sakura/vendor/phpmailer/phpmailer/.scrutinizer.yml b/_sakura/vendor/phpmailer/phpmailer/.scrutinizer.yml deleted file mode 100644 index 3023280..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/.scrutinizer.yml +++ /dev/null @@ -1,132 +0,0 @@ -build: - environment: - php: '5.6.0' - -before_commands: - - "composer install --prefer-source" - -tools: - external_code_coverage: - enabled: true - timeout: 300 - filter: - excluded_paths: - - 'docs/*' - - 'examples/*' - - 'extras/*' - - 'test/*' - - 'vendor/*' - - php_code_coverage: - enabled: false - filter: - excluded_paths: - - 'docs/*' - - 'examples/*' - - 'extras/*' - - 'test/*' - - 'vendor/*' - - php_code_sniffer: - enabled: true - config: - standard: PSR2 - sniffs: - generic: - files: - one_class_per_file_sniff: false - filter: - excluded_paths: - - 'docs/*' - - 'examples/*' - - 'extras/*' - - 'test/*' - - 'vendor/*' - - # Copy/Paste Detector - php_cpd: - enabled: true - excluded_dirs: - - docs - - examples - - extras - - test - - vendor - - # PHP CS Fixer (http://http://cs.sensiolabs.org/). - php_cs_fixer: - enabled: true - config: - level: psr2 - filter: - excluded_paths: - - 'docs/*' - - 'examples/*' - - 'extras/*' - - 'test/*' - - 'vendor/*' - - # Analyzes the size and structure of a PHP project. - php_loc: - enabled: true - excluded_dirs: - - docs - - examples - - extras - - test - - vendor - - # PHP Mess Detector (http://phpmd.org). - php_mess_detector: - enabled: true - config: - rulesets: - - codesize - - unusedcode - - naming - - design - naming_rules: - short_variable: { minimum: 2 } - filter: - excluded_paths: - - 'docs/*' - - 'examples/*' - - 'extras/*' - - 'test/*' - - 'vendor/*' - - # Analyzes the size and structure of a PHP project. - php_pdepend: - enabled: true - excluded_dirs: - - docs - - examples - - extras - - test - - vendor - - # Runs Scrutinizer's PHP Analyzer Tool - # https://scrutinizer-ci.com/docs/tools/php/php-analyzer/config_reference - php_analyzer: - enabled: true - config: - checkstyle: - enabled: true - naming: - enabled: true - property_name: ^[_a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps - method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9_]*$ #Allow underscores & caps - parameter_name: ^[a-z][a-zA-Z0-9_]*$ # Allow underscores - local_variable: ^[a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps - exception_name: ^[a-zA-Z][a-zA-Z0-9]*Exception$ - isser_method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9]*$ #Allow underscores & caps - filter: - excluded_paths: - - 'docs/*' - - 'examples/*' - - 'extras/*' - - 'test/*' - - 'vendor/*' - - # Security Advisory Checker - sensiolabs_security_checker: true diff --git a/_sakura/vendor/phpmailer/phpmailer/.travis.yml b/_sakura/vendor/phpmailer/phpmailer/.travis.yml deleted file mode 100644 index c111d5e..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: php -php: - - 7.0 - - 5.6 - - 5.5 - - 5.4 - - 5.3 - - hhvm - -matrix: - allow_failures: - - php: hhvm - -before_install: - - sudo apt-get update -qq - - sudo apt-get install -y -qq postfix -before_script: - - sudo service postfix stop - - smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 & - - mkdir -p build/logs - - cd test - - cp testbootstrap-dist.php testbootstrap.php - - chmod +x fakesendmail.sh - - sudo mkdir -p /var/qmail/bin - - sudo cp fakesendmail.sh /var/qmail/bin/sendmail - - sudo cp fakesendmail.sh /usr/sbin/sendmail - - echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > $(php --ini|grep -m 1 "ini files in:"|cut -d ":" -f 2)/sendmail.ini -script: - - phpunit --configuration ../travis.phpunit.xml.dist -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml diff --git a/_sakura/vendor/phpmailer/phpmailer/LICENSE b/_sakura/vendor/phpmailer/phpmailer/LICENSE deleted file mode 100644 index 8e0763d..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/_sakura/vendor/phpmailer/phpmailer/PHPMailerAutoload.php b/_sakura/vendor/phpmailer/phpmailer/PHPMailerAutoload.php deleted file mode 100644 index eaa2e30..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/PHPMailerAutoload.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer SPL autoloader. - * @param string $classname The name of the class to load - */ -function PHPMailerAutoload($classname) -{ - //Can't use __DIR__ as it's only in PHP 5.3+ - $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; - if (is_readable($filename)) { - require $filename; - } -} - -if (version_compare(PHP_VERSION, '5.1.2', '>=')) { - //SPL autoloading was introduced in PHP 5.1.2 - if (version_compare(PHP_VERSION, '5.3.0', '>=')) { - spl_autoload_register('PHPMailerAutoload', true, true); - } else { - spl_autoload_register('PHPMailerAutoload'); - } -} else { - /** - * Fall back to traditional autoload for old PHP versions - * @param string $classname The name of the class to load - */ - function __autoload($classname) - { - PHPMailerAutoload($classname); - } -} diff --git a/_sakura/vendor/phpmailer/phpmailer/README.md b/_sakura/vendor/phpmailer/phpmailer/README.md deleted file mode 100644 index 0ecfa5d..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/README.md +++ /dev/null @@ -1,184 +0,0 @@ -![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png) - -# PHPMailer - A full-featured email creation and transfer class for PHP - -Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) -[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) -[![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) - -[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) - -## Class Features - -- Probably the world's most popular code for sending email from PHP! -- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more -- Integrated SMTP support - send without a local mail server -- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs -- Multipart/alternative emails for mail clients that do not read HTML email -- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings -- SMTP authentication with LOGIN, PLAIN, NTLM, CRAM-MD5 and Google's XOAUTH2 mechanisms over SSL and TLS transports -- Error messages in 47 languages! -- DKIM and S/MIME signing support -- Compatible with PHP 5.0 and later -- Much more! - -## Why you might need it - -Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments. - -Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong! -*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc. - -The PHP mail() function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server. - -## License - -This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license. Please read LICENSE for information on the -software availability and distribution. - -## Installation & loading - -PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), so just add this line to your `composer.json` file: - -```json -"phpmailer/phpmailer": "~5.2" -``` - -or - -```sh -composer require phpmailer/phpmailer -``` - -If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package. - -Alternatively, copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub. - -If you're not using composer's autoloader, PHPMailer provides an SPL-compatible autoloader, and that is the preferred way of loading the library - just `require '/path/to/PHPMailerAutoload.php';` and everything should work. The autoloader does not throw errors if it can't find classes so it prepends itself to the SPL list, allowing your own (or your framework's) autoloader to catch errors. SPL autoloading was introduced in PHP 5.1.0, so if you are using a version older than that you will need to require/include each class manually. - -PHPMailer does *not* declare a namespace because namespaces were only introduced in PHP 5.3. - -If you want to use Google's XOAUTH2 authentication mechanism, you need to be running at least PHP 5.4, and load the dependencies listed in `composer.json`. - -### Minimal installation - -While installing the entire package manually or with composer is simple, convenient and reliable, you may want to include only vital files in your project. At the very least you will need [class.phpmailer.php](class.phpmailer.php). If you're using SMTP, you'll need [class.smtp.php](class.smtp.php), and if you're using POP-before SMTP, you'll need [class.pop3.php](class.pop3.php). For all of these, we recommend you use [the autoloader](PHPMailerAutoload.php) too as otherwise you will either have to `require` all classes manually or use some other autoloader. You can skip the [language](language/) folder if you're not showing errors to users and can make do with English-only errors. You may need the additional classes in the [extras](extras/) folder if you are using those features, including NTLM authentication and ics generation. If you're using Google XOAUTH2 you will need `class.phpmaileroauth.php` and `class.oauth.php` classes too, as well as the composer dependencies. - -## A Simple Example - -```php -SMTPDebug = 3; // Enable verbose debug output - -$mail->isSMTP(); // Set mailer to use SMTP -$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers -$mail->SMTPAuth = true; // Enable SMTP authentication -$mail->Username = 'user@example.com'; // SMTP username -$mail->Password = 'secret'; // SMTP password -$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted -$mail->Port = 587; // TCP port to connect to - -$mail->setFrom('from@example.com', 'Mailer'); -$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient -$mail->addAddress('ellen@example.com'); // Name is optional -$mail->addReplyTo('info@example.com', 'Information'); -$mail->addCC('cc@example.com'); -$mail->addBCC('bcc@example.com'); - -$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments -$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name -$mail->isHTML(true); // Set email format to HTML - -$mail->Subject = 'Here is the subject'; -$mail->Body = 'This is the HTML message body in bold!'; -$mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; - -if(!$mail->send()) { - echo 'Message could not be sent.'; - echo 'Mailer Error: ' . $mail->ErrorInfo; -} else { - echo 'Message has been sent'; -} -``` - -You'll find plenty more to play with in the [examples](examples/) folder. - -That's it. You should now be ready to use PHPMailer! - -## Localization -PHPMailer defaults to English, but in the [language](language/) folder you'll find numerous (46 at the time of writing!) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: - -```php -// To load the French version -$mail->setLanguage('fr', '/optional/path/to/language/directory/'); -``` - -We welcome corrections and new languages - if you're looking for corrections to do, run the [phpmailerLangTest.php](test/phpmailerLangTest.php) script in the tests folder and it will show any missing translations. - -## Documentation - -Examples of how to use PHPMailer for common scenarios can be found in the [examples](examples/) folder. If you're looking for a good starting point, we recommend you start with [the gmail example](examples/gmail.phps). - -There are tips and a troubleshooting guide in the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated. - -Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/). - -You'll find some basic user-level docs in the [docs](docs/) folder, and you can generate complete API-level documentation using the [generatedocs.sh](docs/generatedocs.sh) shell script in the docs folder, though you'll need to install [PHPDocumentor](http://www.phpdoc.org) first. You may find [the unit tests](test/phpmailerTest.php) a good source of how to do various operations such as encryption. - -If the documentation doesn't cover what you need, search the [many questions on StackOverflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). - -## Tests - -There is a PHPUnit test script in the [test](test/) folder. - -Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) - -If this isn't passing, is there something you can do to help? - -## Contributing - -Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). - -We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. - -With the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone: - -```sh -git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git -``` - -Please *don't* use the SourceForge or Google Code projects any more. - -## Sponsorship - -Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system. - -Smartmessages email marketing - -Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. - -## Changelog - -See [changelog](changelog.md). - -## History -- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). -- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004. -- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. -- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer). -- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer. -- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub. - -### What's changed since moving from SourceForge? -- Official successor to the SourceForge and Google Code projects. -- Test suite. -- Continuous integration with Travis-CI. -- Composer support. -- Public development. -- Additional languages and language strings. -- CRAM-MD5 authentication support. -- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/_sakura/vendor/phpmailer/phpmailer/VERSION b/_sakura/vendor/phpmailer/phpmailer/VERSION deleted file mode 100644 index ba678f2..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.2.14 \ No newline at end of file diff --git a/_sakura/vendor/phpmailer/phpmailer/changelog.md b/_sakura/vendor/phpmailer/phpmailer/changelog.md deleted file mode 100644 index 486f328..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/changelog.md +++ /dev/null @@ -1,620 +0,0 @@ -# ChangeLog - -## Version 5.2.14 (Nov 1st 2015) -* Allow addresses with IDN (Internationalized Domain Name) in PHP 5.3+, thanks to @fbonzon -* Allow access to POP3 errors -* Make all POP3 private properties and methods protected -* **SECURITY** Fix vulnerability that allowed email addresses with line breaks (valid in RFC5322) to pass to SMTP, permitting message injection at the SMTP level. Mitigated in both the address validator and in the lower-level SMTP class. Thanks to Takeshi Terada. -* Updated Brazilian Portuguese translations (Thanks to @phelipealves) - -## Version 5.2.13 (Sep 14th 2015) -* Rename internal oauth class to avoid name clashes -* Improve Estonian translations - -## Version 5.2.12 (Sep 1st 2015) -* Fix incorrect composer package dependencies -* Skip existing embedded image `cid`s in `msgHTML` - -## Version 5.2.11 (Aug 31st 2015) -* Don't switch to quoted-printable for long lines if already using base64 -* Fixed Travis-CI config when run on PHP 7 -* Added Google XOAUTH2 authentication mechanism, thanks to @sherryl4george -* Add address parser for RFC822-format addresses -* Update MS Office MIME types -* Don't convert line breaks when using quoted-printable encoding -* Handle MS Exchange returning an invalid empty AUTH-type list in EHLO -* Don't set name or filename properties on MIME parts that don't have one - -## Version 5.2.10 (May 4th 2015) -* Add custom header getter -* Use `application/javascript` for .js attachments -* Improve RFC2821 compliance for timelimits, especially for end-of-data -* Add Azerbaijani translations (Thanks to @mirjalal) -* Minor code cleanup for robustness -* Add Indonesian translations (Thanks to @ceceprawiro) -* Avoid `error_log` Debugoutput naming clash -* Add ability to parse server capabilities in response to EHLO (useful for SendGrid etc) -* Amended default values for WordWrap to match RFC -* Remove html2text converter class (has incompatible license) -* Provide new mechanism for injecting html to text converters -* Improve pointers to docs and support in README -* Add example file upload script -* Refactor and major cleanup of EasyPeasyICS, now a lot more usable -* Make set() method simpler and more reliable -* Add Malay translation (Thanks to @nawawi) -* Add Bulgarian translation (Thanks to @mialy) -* Add Armenian translation (Thanks to Hrayr Grigoryan) -* Add Slovenian translation (Thanks to Klemen Tušar) -* More efficient word wrapping -* Add support for S/MIME signing with additional CA certificate (thanks to @IgitBuh) -* Fix incorrect MIME structure when using S/MIME signing and isMail() (#372) -* Improved checks and error messages for missing extensions -* Store and report SMTP errors more consistently -* Add MIME multipart preamble for better Outlook compatibility -* Enable TLS encryption automatically if the server offers it -* Provide detailed errors when individual recipients fail -* Report more errors when connecting -* Add extras classes to composer classmap -* Expose stream_context_create options via new SMTPOptions property -* Automatic encoding switch to quoted-printable if message lines are too long -* Add Korean translation (Thanks to @ChalkPE) -* Provide a pointer to troubleshooting docs on SMTP connection failure - -## Version 5.2.9 (Sept 25th 2014) -* **Important: The autoloader is no longer autoloaded by the PHPMailer class** -* Update html2text from https://github.com/mtibben/html2text -* Improve Arabic translations (Thanks to @tarekdj) -* Consistent handling of connection variables in SMTP and POP3 -* PHPDoc cleanup -* Update composer to use PHPUnit 4.1 -* Pass consistent params to callbacks -* More consistent handling of error states and debug output -* Use property defaults, remove constructors -* Remove unreachable code -* Use older regex validation pattern for troublesome PCRE library versions -* Improve PCRE detection in older PHP versions -* Handle debug output consistently, and always in UTF-8 -* Allow user-defined debug output method via a callable -* msgHTML now converts data URIs to embedded images -* SMTP::getLastReply() will now always be populated -* Improved example code in README -* Ensure long filenames in Content-Disposition are encoded correctly -* Simplify SMTP debug output mechanism, clarify levels with constants -* Add SMTP connection check example -* Simplify examples, don't use mysql* functions - -## Version 5.2.8 (May 14th 2014) -* Increase timeout to match RFC2821 section 4.5.3.2 and thus not fail greetdelays, fixes #104 -* Add timestamps to default debug output -* Add connection events and new level 3 to debug output options -* Chinese language update (Thanks to @binaryoung) -* Allow custom Mailer types (Thanks to @michield) -* Cope with spaces around SMTP host specs -* Fix processing of multiple hosts in connect string -* Added Galician translation (Thanks to @donatorouco) -* Autoloader now prepends -* Docs updates -* Add Latvian translation (Thanks to @eddsstudio) -* Add Belarusian translation (Thanks to @amaksymiuk) -* Make autoloader work better on older PHP versions -* Avoid double-encoding if mbstring is overloading mail() -* Add Portuguese translation (Thanks to @Jonadabe) -* Make quoted-printable encoder respect line ending setting -* Improve Chinese translation (Thanks to @PeterDaveHello) -* Add Georgian translation (Thanks to @akalongman) -* Add Greek translation (Thanks to @lenasterg) -* Fix serverHostname on PHP < 5.3 -* Improve performance of SMTP class -* Implement automatic 7bit downgrade -* Add Vietnamese translation (Thanks to @vinades) -* Improve example images, switch to PNG -* Add Croatian translation (Thanks to @hrvoj3e) -* Remove setting the Return-Path and deprecate the Return-path property - it's just wrong! -* Fix language file loading if CWD has changed (@stephandesouza) -* Add HTML5 email validation pattern -* Improve Turkish translations (Thanks to @yasinaydin) -* Improve Romanian translations (Thanks to @aflorea) -* Check php.ini for path to sendmail/qmail before using default -* Improve Farsi translation (Thanks to @MHM5000) -* Don't use quoted-printable encoding for multipart types -* Add Serbian translation (Thanks to ajevremovic at gmail.com) -* Remove useless PHP5 check -* Use SVG for build status badges -* Store MessageDate on creation -* Better default behaviour for validateAddress - -## Version 5.2.7 (September 12th 2013) -* Add Ukrainian translation from @Krezalis -* Support for do_verp -* Fix bug in CRAM-MD5 AUTH -* Propagate Debugoutput option to SMTP class (@Reblutus) -* Determine MIME type of attachments automatically -* Add cross-platform, multibyte-safe pathinfo replacement (with tests) and use it -* Add a new 'html' Debugoutput type -* Clean up SMTP debug output, remove embedded HTML -* Some small changes in header formatting to improve IETF msglint test results -* Update test_script to use some recently changed features, rename to code_generator -* Generated code actually works! -* Update SyntaxHighlighter -* Major overhaul and cleanup of example code -* New PHPMailer graphic -* msgHTML now uses RFC2392-compliant content ids -* Add line break normalization function and use it in msgHTML -* Don't set unnecessary reply-to addresses -* Make fakesendmail.sh a bit cleaner and safer -* Set a content-transfer-encoding on multiparts (fixes msglint error) -* Fix cid generation in msgHTML (Thanks to @digitalthought) -* Fix handling of multiple SMTP servers (Thanks to @NanoCaiordo) -* SMTP->connect() now supports stream context options (Thanks to @stanislavdavid) -* Add support for iCal event alternatives (Thanks to @reblutus) -* Update to Polish language file (Thanks to Krzysztof Kowalewski) -* Update to Norwegian language file (Thanks to @datagutten) -* Update to Hungarian language file (Thanks to @dominicus-75) -* Add Persian/Farsi translation from @jaii -* Make SMTPDebug property type match type in SMTP class -* Add unit tests for DKIM -* Major refactor of SMTP class -* Reformat to PSR-2 coding standard -* Introduce autoloader -* Allow overriding of SMTP class -* Overhaul of PHPDocs -* Fix broken Q-encoding -* Czech language update (Thanks to @nemelu) -* Removal of excess blank lines in messages -* Added fake POP server and unit tests for POP-before-SMTP - -## Version 5.2.6 (April 11th 2013) -* Reflect move to PHPMailer GitHub organisation at https://github.com/PHPMailer/PHPMailer -* Fix unbumped version numbers -* Update packagist.org with new location -* Clean up Changelog - -## Version 5.2.5 (April 6th 2013) -* First official release after move from Google Code -* Fixes for qmail when sending via mail() -* Merge in changes from Google code 5.2.4 release -* Minor coding standards cleanup in SMTP class -* Improved unit tests, now tests S/MIME signing -* Travis-CI support on GitHub, runs tests with fake SMTP server - -## Version 5.2.4 (February 19, 2013) -* Fix tag and version bug. -* un-deprecate isSMTP(), isMail(), IsSendmail() and isQmail(). -* Numerous translation updates - -## Version 5.2.3 (February 8, 2013) -* Fix issue with older PCREs and ValidateAddress() (Bugz: 124) -* Add CRAM-MD5 authentication, thanks to Elijah madden, https://github.com/okonomiyaki3000 -* Replacement of obsolete Quoted-Printable encoder with a much better implementation -* Composer package definition -* New language added: Hebrew - -## Version 5.2.2 (December 3, 2012) -* Some fixes and syncs from https://github.com/Synchro/PHPMailer -* Add Slovak translation, thanks to Michal Tinka - -## Version 5.2.2-rc2 (November 6, 2012) -* Fix SMTP server rotation (Bugz: 118) -* Allow override of autogen'ed 'Date' header (for Drupal's - og_mailinglist module) -* No whitespace after '-f' option (Bugz: 116) -* Work around potential warning (Bugz: 114) - -## Version 5.2.2-rc1 (September 28, 2012) -* Header encoding works with long lines (Bugz: 93) -* Turkish language update (Bugz: 94) -* undefined $pattern in EncodeQ bug squashed (Bugz: 98) -* use of mail() in safe_mode now works (Bugz: 96) -* ValidateAddress() now 'public static' so people can override the - default and use their own validation scheme. -* ValidateAddress() no longer uses broken FILTER_VALIDATE_EMAIL -* Added in AUTH PLAIN SMTP authentication - -## Version 5.2.2-beta2 (August 17, 2012) -* Fixed Postfix VERP support (Bugz: 92) -* Allow action_function callbacks to pass/use - the From address (passed as final param) -* Prevent inf look for get_lines() (Bugz: 77) -* New public var ($UseSendmailOptions). Only pass sendmail() - options iff we really are using sendmail or something sendmail - compatible. (Bugz: 75) -* default setting for LE returned to "\n" due to popular demand. - -## Version 5.2.2-beta1 (July 13, 2012) -* Expose PreSend() and PostSend() as public methods to allow - for more control if serializing message sending. -* GetSentMIMEMessage() only constructs the message copy when - needed. Save memory. -* Only pass params to mail() if the underlying MTA is - "sendmail" (as defined as "having the string sendmail - in its pathname") [#69] -* Attachments now work with Amazon SES and others [Bugz#70] -* Debug output now sent to stdout (via echo) or error_log [Bugz#5] -* New var: Debugoutput (for above) [Bugz#5] -* SMTP reads now Timeout aware (new var: Timeout=15) [Bugz#71] -* SMTP reads now can have a Timelimit associated with them - (new var: Timelimit=30)[Bugz#71] -* Fix quoting issue associated with charsets -* default setting for LE is now RFC compliant: "\r\n" -* Return-Path can now be user defined (new var: ReturnPath) - (the default is "" which implies no change from previous - behavior, which was to use either From or Sender) [Bugz#46] -* X-Mailer header can now be disabled (by setting to a - whitespace string, eg " ") [Bugz#66] -* Bugz closed: #68, #60, #42, #43, #59, #55, #66, #48, #49, - #52, #31, #41, #5. #70, #69 - -## Version 5.2.1 (January 16, 2012) -* Closed several bugs #5 -* Performance improvements -* MsgHTML() now returns the message as required. -* New method: GetSentMIMEMessage() (returns full copy of sent message) - -## Version 5.2 (July 19, 2011) -* protected MIME body and header -* better DKIM DNS Resource Record support -* better aly handling -* htmlfilter class added to extras -* moved to Apache Extras - -## Version 5.1 (October 20, 2009) -* fixed filename issue with AddStringAttachment (thanks to Tony) -* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in - addition to PHP mail() -* added DKIM digital signing functionality, new properties: - - DKIM_domain (sets the domain name) - - DKIM_private (holds DKIM private key) - - DKIM_passphrase (holds your DKIM passphrase) - - DKIM_selector (holds the DKIM "selector") - - DKIM_identity (holds the identifying email address) -* added callback function support - - callback function parameters include: - result, to, cc, bcc, subject and body - - see the test/test_callback.php file for usage. -* added "auto" identity functionality - - can automatically add: - - Return-path (if Sender not set) - - Reply-To (if ReplyTo not set) - - can be disabled: - - $mail->SetFrom('yourname@yourdomain.com','First Last',false); - - or by adding the $mail->Sender and/or $mail->ReplyTo properties - -Note: "auto" identity added to help with emails ending up in spam or junk boxes because of missing headers - -## Version 5.0.2 (May 24, 2009) -* Fix for missing attachments when inline graphics are present -* Fix for missing Cc in header when using SMTP (mail was sent, - but not displayed in header -- Cc receiver only saw email To: - line and no Cc line, but did get the email (To receiver - saw same) - -## Version 5.0.1 (April 05, 2009) -* Temporary fix for missing attachments - -## Version 5.0.0 (April 02, 2009) -With the release of this version, we are initiating a new version numbering -system to differentiate from the PHP4 version of PHPMailer. -Most notable in this release is fully object oriented code. - -### class.smtp.php: -* Refactored class.smtp.php to support new exception handling -* code size reduced from 29.2 Kb to 25.6 Kb -* Removed unnecessary functions from class.smtp.php: - - public function Expand($name) { - - public function Help($keyword="") { - - public function Noop() { - - public function Send($from) { - - public function SendOrMail($from) { - - public function Verify($name) { - -### class.phpmailer.php: -* Refactored class.phpmailer.php with new exception handling -* Changed processing functionality of Sendmail and Qmail so they cannot be - inadvertently used -* removed getFile() function, just became a simple wrapper for - file_get_contents() -* added check for PHP version (will gracefully exit if not at least PHP 5.0) -* enhanced code to check if an attachment source is the same as an embedded or - inline graphic source to eliminate duplicate attachments - -### New /test_script -We have written a test script you can use to test the script as part of your -installation. Once you press submit, the test script will send a multi-mime -email with either the message you type in or an HTML email with an inline -graphic. Two attachments are included in the email (one of the attachments -is also the inline graphic so you can see that only one copy of the graphic -is sent in the email). The test script will also display the functional -script that you can copy/paste to your editor to duplicate the functionality. - -### New examples -All new examples in both basic and advanced modes. Advanced examples show - Exception handling. - -### PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0 -All new documentation - -## Version 2.3 (November 06, 2008) -* added Arabic language (many thanks to Bahjat Al Mostafa) -* removed English language from language files and made it a default within - class.phpmailer.php - if no language is found, it will default to use - the english language translation -* fixed public/private declarations -* corrected line 1728, $basedir to $directory -* added $sign_cert_file to avoid improper duplicate use of $sign_key_file -* corrected $this->Hello on line 612 to $this->Helo -* changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user - if default is not acceptable -* removed trim() from return results in EncodeQP -* /test and three files it contained are removed from version 2.3 -* fixed phpunit.php for compliance with PHP5 -* changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg); -* We have removed the /phpdoc from the downloads. All documentation is now on - the http://phpmailer.codeworxtech.com website. - -## Version 2.2.1 () July 19 2008 -* fixed line 1092 in class.smtp.php (my apologies, error on my part) - -## Version 2.2 () July 15 2008 -* Fixed redirect issue (display of UTF-8 in thank you redirect) -* fixed error in getResponse function declaration (class.pop3.php) -* PHPMailer now PHP6 compliant -* fixed line 1092 in class.smtp.php (endless loop from missing = sign) - -## Version 2.1 (Wed, June 04 2008) -NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE APPRECIATED. - -* added S/MIME functionality (ability to digitally sign emails) - BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. - The "Signed Emails" functionality adds the Sign method to pass the private key - filename and the password to read it, and then email will be sent with - content-type multipart/signed and with the digital signature attached. -* fully compatible with E_STRICT error level - - Please note: - In about half the test environments this development version was subjected - to, an error was thrown for the date() functions used (line 1565 and 1569). - This is NOT a PHPMailer error, it is the result of an incorrectly configured - PHP5 installation. The fix is to modify your 'php.ini' file and include the - date.timezone = Etc/UTC (or your own zone) - directive, to your own server timezone - - If you do get this error, and are unable to access your php.ini file: - In your PHP script, add - `date_default_timezone_set('Etc/UTC');` - - do not try to use - `$myVar = date_default_timezone_get();` - as a test, it will throw an error. -* added ability to define path (mainly for embedded images) - function `MsgHTML($message,$basedir='')` ... where: - `$basedir` is the fully qualified path -* fixed `MsgHTML()` function: - - Embedded Images where images are specified by `://` will not be altered or embedded -* fixed the return value of SMTP exit code ( pclose ) -* addressed issue of multibyte characters in subject line and truncating -* added ability to have user specified Message ID - (default is still that PHPMailer create a unique Message ID) -* corrected unidentified message type to 'application/octet-stream' -* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al). -* added check for added attachments -* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny") - -## Version 2.1.0beta2 (Sun, Dec 02 2007) -* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon) -* finished all testing, all known bugs corrected, enhancements tested - -Note: will NOT work with PHP4. - -Please note, this is BETA software **DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS; INTENDED STRICTLY FOR TESTING** - -## Version 2.1.0beta1 -Please note, this is BETA software -** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS - INTENDED STRICTLY FOR TESTING - -## Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release -* implements new property to control VERP in class.smtp.php - example (requires instantiating class.smtp.php): - $mail->do_verp = true; -* POP-before-SMTP functionality included, thanks to Richard Davey - (see class.pop3.php & pop3_before_smtp_test.php for examples) -* included example showing how to use PHPMailer with GMAIL -* fixed the missing Cc in SendMail() and Mail() - -## Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release -* dramatically simplified using inline graphics ... it's fully automated and requires no user input -* added automatic document type detection for attachments and pictures -* added MsgHTML() function to replace Body tag for HTML emails -* fixed the SendMail security issues (input validation vulnerability) -* enhanced the AddAddresses functionality so that the "Name" portion is used in the email address -* removed the need to use the AltBody method (set from the HTML, or default text used) -* set the PHP Mail() function as the default (still support SendMail, SMTP Mail) -* removed the need to set the IsHTML property (set automatically) -* added Estonian language file by Indrek Päri -* added header injection patch -* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc. -* fixed warning message in SMTP get_lines method -* added TLS/SSL SMTP support. -* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7) -* Works with PHP installed as a module or as CGI-PHP -NOTE: will NOT work with PHP5 in E_STRICT error mode - -## Version 1.73 (Sun, Jun 10 2005) -* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf -* Now has a total of 20 translations -* Fixed alt attachments bug: http://tinyurl.com/98u9k - -## Version 1.72 (Wed, May 25 2004) -* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. -* Received: Removed this method because spam filter programs like - SpamAssassin reject this header. -* Fixed error count bug. -* SetLanguage default is now "language/". -* Fixed magic_quotes_runtime bug. - -## Version 1.71 (Tue, Jul 28 2003) -* Made several speed enhancements -* Added German and Italian translation files -* Fixed HELO/AUTH bugs on keep-alive connects -* Now provides an error message if language file does not load -* Fixed attachment EOL bug -* Updated some unclear documentation -* Added additional tests and improved others - -## Version 1.70 (Mon, Jun 20 2003) -* Added SMTP keep-alive support -* Added IsError method for error detection -* Added error message translation support (SetLanguage) -* Refactored many methods to increase library performance -* Hello now sends the newer EHLO message before HELO as per RFC 2821 -* Removed the boundary class and replaced it with GetBoundary -* Removed queue support methods -* New $Hostname variable -* New Message-ID header -* Received header reformat -* Helo variable default changed to $Hostname -* Removed extra spaces in Content-Type definition (#667182) -* Return-Path should be set to Sender when set -* Adds Q or B encoding to headers when necessary -* quoted-encoding should now encode NULs \000 -* Fixed encoding of body/AltBody (#553370) -* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC) -* Multiple bug fixes - -## Version 1.65 (Fri, Aug 09 2002) -* Fixed non-visible attachment bug (#585097) for Outlook -* SMTP connections are now closed after each transaction -* Fixed SMTP::Expand return value -* Converted SMTP class documentation to phpDocumentor format - -## Version 1.62 (Wed, Jun 26 2002) -* Fixed multi-attach bug -* Set proper word wrapping -* Reduced memory use with attachments -* Added more debugging -* Changed documentation to phpDocumentor format - -## Version 1.60 (Sat, Mar 30 2002) -* Sendmail pipe and address patch (Christian Holtje) -* Added embedded image and read confirmation support (A. Ognio) -* Added unit tests -* Added SMTP timeout support (*nix only) -* Added possibly temporary PluginDir variable for SMTP class -* Added LE message line ending variable -* Refactored boundary and attachment code -* Eliminated SMTP class warnings -* Added SendToQueue method for future queuing support - -## Version 1.54 (Wed, Dec 19 2001) -* Add some queuing support code -* Fixed a pesky multi/alt bug -* Messages are no longer forced to have "To" addresses - -## Version 1.50 (Thu, Nov 08 2001) -* Fix extra lines when not using SMTP mailer -* Set WordWrap variable to int with a zero default - -## Version 1.47 (Tue, Oct 16 2001) -* Fixed Received header code format -* Fixed AltBody order error -* Fixed alternate port warning - -## Version 1.45 (Tue, Sep 25 2001) -* Added enhanced SMTP debug support -* Added support for multiple ports on SMTP -* Added Received header for tracing -* Fixed AddStringAttachment encoding -* Fixed possible header name quote bug -* Fixed wordwrap() trim bug -* Couple other small bug fixes - -## Version 1.41 (Wed, Aug 22 2001) -* Fixed AltBody bug w/o attachments -* Fixed rfc_date() for certain mail servers - -## Version 1.40 (Sun, Aug 12 2001) -* Added multipart/alternative support (AltBody) -* Documentation update -* Fixed bug in Mercury MTA - -## Version 1.29 (Fri, Aug 03 2001) -* Added AddStringAttachment() method -* Added SMTP authentication support - -## Version 1.28 (Mon, Jul 30 2001) -* Fixed a typo in SMTP class -* Fixed header issue with Imail (win32) SMTP server -* Made fopen() calls for attachments use "rb" to fix win32 error - -## Version 1.25 (Mon, Jul 02 2001) -* Added RFC 822 date fix (Patrice) -* Added improved error handling by adding a $ErrorInfo variable -* Removed MailerDebug variable (obsolete with new error handler) - -## Version 1.20 (Mon, Jun 25 2001) -* Added quoted-printable encoding (Patrice) -* Set Version as public and removed PrintVersion() -* Changed phpdoc to only display public variables and methods - -## Version 1.19 (Thu, Jun 21 2001) -* Fixed MS Mail header bug -* Added fix for Bcc problem with mail(). *Does not work on Win32* - (See PHP bug report: http://www.php.net/bugs.php?id=11616) -* mail() no longer passes a fifth parameter when not needed - -## Version 1.15 (Fri, Jun 15 2001) -Note: these changes contributed by Patrice Fournier -* Changed all remaining \n to \r\n -* Bcc: header no longer written to message except - when sent directly to sendmail -* Added a small message to non-MIME compliant mail reader -* Added Sender variable to change the Sender email - used in -f for sendmail/mail and in 'MAIL FROM' for smtp mode -* Changed boundary setting to a place it will be set only once -* Removed transfer encoding for whole message when using multipart -* Message body now uses Encoding in multipart messages -* Can set encoding and type to attachments 7bit, 8bit - and binary attachment are sent as is, base64 are encoded -* Can set Encoding to base64 to send 8 bits body - through 7 bits servers - -## Version 1.10 (Tue, Jun 12 2001) -* Fixed win32 mail header bug (printed out headers in message body) - -## Version 1.09 (Fri, Jun 08 2001) -* Changed date header to work with Netscape mail programs -* Altered phpdoc documentation - -## Version 1.08 (Tue, Jun 05 2001) -* Added enhanced error-checking -* Added phpdoc documentation to source - -## Version 1.06 (Fri, Jun 01 2001) -* Added optional name for file attachments - -## Version 1.05 (Tue, May 29 2001) -* Code cleanup -* Eliminated sendmail header warning message -* Fixed possible SMTP error - -## Version 1.03 (Thu, May 24 2001) -* Fixed problem where qmail sends out duplicate messages - -## Version 1.02 (Wed, May 23 2001) -* Added multiple recipient and attachment Clear* methods -* Added Sendmail public variable -* Fixed problem with loading SMTP library multiple times - -## Version 0.98 (Tue, May 22 2001) -* Fixed problem with redundant mail hosts sending out multiple messages -* Added additional error handler code -* Added AddCustomHeader() function -* Added support for Microsoft mail client headers (affects priority) -* Fixed small bug with Mailer variable -* Added PrintVersion() function - -## Version 0.92 (Tue, May 15 2001) -* Changed file names to class.phpmailer.php and class.smtp.php to match - current PHP class trend. -* Fixed problem where body not being printed when a message is attached -* Several small bug fixes - -## Version 0.90 (Tue, April 17 2001) -* Initial public release diff --git a/_sakura/vendor/phpmailer/phpmailer/class.phpmailer.php b/_sakura/vendor/phpmailer/phpmailer/class.phpmailer.php deleted file mode 100644 index e4dd00b..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/class.phpmailer.php +++ /dev/null @@ -1,3883 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer - PHP email creation and transport class. - * @package PHPMailer - * @author Marcus Bointon (Synchro/coolbru) - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - */ -class PHPMailer -{ - /** - * The PHPMailer Version number. - * @var string - */ - public $Version = '5.2.14'; - - /** - * Email priority. - * Options: null (default), 1 = High, 3 = Normal, 5 = low. - * When null, the header is not set at all. - * @var integer - */ - public $Priority = null; - - /** - * The character set of the message. - * @var string - */ - public $CharSet = 'iso-8859-1'; - - /** - * The MIME Content-type of the message. - * @var string - */ - public $ContentType = 'text/plain'; - - /** - * The message encoding. - * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". - * @var string - */ - public $Encoding = '8bit'; - - /** - * Holds the most recent mailer error message. - * @var string - */ - public $ErrorInfo = ''; - - /** - * The From email address for the message. - * @var string - */ - public $From = 'root@localhost'; - - /** - * The From name of the message. - * @var string - */ - public $FromName = 'Root User'; - - /** - * The Sender email (Return-Path) of the message. - * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. - * @var string - */ - public $Sender = ''; - - /** - * The Return-Path of the message. - * If empty, it will be set to either From or Sender. - * @var string - * @deprecated Email senders should never set a return-path header; - * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. - * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference - */ - public $ReturnPath = ''; - - /** - * The Subject of the message. - * @var string - */ - public $Subject = ''; - - /** - * An HTML or plain text message body. - * If HTML then call isHTML(true). - * @var string - */ - public $Body = ''; - - /** - * The plain-text message body. - * This body can be read by mail clients that do not have HTML email - * capability such as mutt & Eudora. - * Clients that can read HTML will view the normal Body. - * @var string - */ - public $AltBody = ''; - - /** - * An iCal message part body. - * Only supported in simple alt or alt_inline message types - * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator - * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ - * @link http://kigkonsult.se/iCalcreator/ - * @var string - */ - public $Ical = ''; - - /** - * The complete compiled MIME message body. - * @access protected - * @var string - */ - protected $MIMEBody = ''; - - /** - * The complete compiled MIME message headers. - * @var string - * @access protected - */ - protected $MIMEHeader = ''; - - /** - * Extra headers that createHeader() doesn't fold in. - * @var string - * @access protected - */ - protected $mailHeader = ''; - - /** - * Word-wrap the message body to this number of chars. - * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. - * @var integer - */ - public $WordWrap = 0; - - /** - * Which method to use to send mail. - * Options: "mail", "sendmail", or "smtp". - * @var string - */ - public $Mailer = 'mail'; - - /** - * The path to the sendmail program. - * @var string - */ - public $Sendmail = '/usr/sbin/sendmail'; - - /** - * Whether mail() uses a fully sendmail-compatible MTA. - * One which supports sendmail's "-oi -f" options. - * @var boolean - */ - public $UseSendmailOptions = true; - - /** - * Path to PHPMailer plugins. - * Useful if the SMTP class is not in the PHP include path. - * @var string - * @deprecated Should not be needed now there is an autoloader. - */ - public $PluginDir = ''; - - /** - * The email address that a reading confirmation should be sent to, also known as read receipt. - * @var string - */ - public $ConfirmReadingTo = ''; - - /** - * The hostname to use in the Message-ID header and as default HELO string. - * If empty, PHPMailer attempts to find one with, in order, - * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value - * 'localhost.localdomain'. - * @var string - */ - public $Hostname = ''; - - /** - * An ID to be used in the Message-ID header. - * If empty, a unique id will be generated. - * @var string - */ - public $MessageID = ''; - - /** - * The message Date to be used in the Date header. - * If empty, the current date will be added. - * @var string - */ - public $MessageDate = ''; - - /** - * SMTP hosts. - * Either a single hostname or multiple semicolon-delimited hostnames. - * You can also specify a different port - * for each host by using this format: [hostname:port] - * (e.g. "smtp1.example.com:25;smtp2.example.com"). - * You can also specify encryption type, for example: - * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). - * Hosts will be tried in order. - * @var string - */ - public $Host = 'localhost'; - - /** - * The default SMTP server port. - * @var integer - * @TODO Why is this needed when the SMTP class takes care of it? - */ - public $Port = 25; - - /** - * The SMTP HELO of the message. - * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find - * one with the same method described above for $Hostname. - * @var string - * @see PHPMailer::$Hostname - */ - public $Helo = ''; - - /** - * What kind of encryption to use on the SMTP connection. - * Options: '', 'ssl' or 'tls' - * @var string - */ - public $SMTPSecure = ''; - - /** - * Whether to enable TLS encryption automatically if a server supports it, - * even if `SMTPSecure` is not set to 'tls'. - * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. - * @var boolean - */ - public $SMTPAutoTLS = true; - - /** - * Whether to use SMTP authentication. - * Uses the Username and Password properties. - * @var boolean - * @see PHPMailer::$Username - * @see PHPMailer::$Password - */ - public $SMTPAuth = false; - - /** - * Options array passed to stream_context_create when connecting via SMTP. - * @var array - */ - public $SMTPOptions = array(); - - /** - * SMTP username. - * @var string - */ - public $Username = ''; - - /** - * SMTP password. - * @var string - */ - public $Password = ''; - - /** - * SMTP auth type. - * Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5 - * @var string - */ - public $AuthType = ''; - - /** - * SMTP realm. - * Used for NTLM auth - * @var string - */ - public $Realm = ''; - - /** - * SMTP workstation. - * Used for NTLM auth - * @var string - */ - public $Workstation = ''; - - /** - * The SMTP server timeout in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @var integer - */ - public $Timeout = 300; - - /** - * SMTP class debug output mode. - * Debug output level. - * Options: - * * `0` No output - * * `1` Commands - * * `2` Data and commands - * * `3` As 2 plus connection status - * * `4` Low-level data output - * @var integer - * @see SMTP::$do_debug - */ - public $SMTPDebug = 0; - - /** - * How to handle debug output. - * Options: - * * `echo` Output plain-text as-is, appropriate for CLI - * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output - * * `error_log` Output to error log as configured in php.ini - * - * Alternatively, you can provide a callable expecting two params: a message string and the debug level: - * - * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; - * - * @var string|callable - * @see SMTP::$Debugoutput - */ - public $Debugoutput = 'echo'; - - /** - * Whether to keep SMTP connection open after each message. - * If this is set to true then to close the connection - * requires an explicit call to smtpClose(). - * @var boolean - */ - public $SMTPKeepAlive = false; - - /** - * Whether to split multiple to addresses into multiple messages - * or send them all in one message. - * @var boolean - */ - public $SingleTo = false; - - /** - * Storage for addresses when SingleTo is enabled. - * @var array - * @TODO This should really not be public - */ - public $SingleToArray = array(); - - /** - * Whether to generate VERP addresses on send. - * Only applicable when sending via SMTP. - * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path - * @link http://www.postfix.org/VERP_README.html Postfix VERP info - * @var boolean - */ - public $do_verp = false; - - /** - * Whether to allow sending messages with an empty body. - * @var boolean - */ - public $AllowEmpty = false; - - /** - * The default line ending. - * @note The default remains "\n". We force CRLF where we know - * it must be used via self::CRLF. - * @var string - */ - public $LE = "\n"; - - /** - * DKIM selector. - * @var string - */ - public $DKIM_selector = ''; - - /** - * DKIM Identity. - * Usually the email address used as the source of the email - * @var string - */ - public $DKIM_identity = ''; - - /** - * DKIM passphrase. - * Used if your key is encrypted. - * @var string - */ - public $DKIM_passphrase = ''; - - /** - * DKIM signing domain name. - * @example 'example.com' - * @var string - */ - public $DKIM_domain = ''; - - /** - * DKIM private key file path. - * @var string - */ - public $DKIM_private = ''; - - /** - * Callback Action function name. - * - * The function that handles the result of the send email action. - * It is called out by send() for each email sent. - * - * Value can be any php callable: http://www.php.net/is_callable - * - * Parameters: - * boolean $result result of the send action - * string $to email address of the recipient - * string $cc cc email addresses - * string $bcc bcc email addresses - * string $subject the subject - * string $body the email body - * string $from email address of sender - * @var string - */ - public $action_function = ''; - - /** - * What to put in the X-Mailer header. - * Options: An empty string for PHPMailer default, whitespace for none, or a string to use - * @var string - */ - public $XMailer = ''; - - /** - * An instance of the SMTP sender class. - * @var SMTP - * @access protected - */ - protected $smtp = null; - - /** - * The array of 'to' names and addresses. - * @var array - * @access protected - */ - protected $to = array(); - - /** - * The array of 'cc' names and addresses. - * @var array - * @access protected - */ - protected $cc = array(); - - /** - * The array of 'bcc' names and addresses. - * @var array - * @access protected - */ - protected $bcc = array(); - - /** - * The array of reply-to names and addresses. - * @var array - * @access protected - */ - protected $ReplyTo = array(); - - /** - * An array of all kinds of addresses. - * Includes all of $to, $cc, $bcc - * @var array - * @access protected - * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc - */ - protected $all_recipients = array(); - - /** - * An array of names and addresses queued for validation. - * In send(), valid and non duplicate entries are moved to $all_recipients - * and one of $to, $cc, or $bcc. - * This array is used only for addresses with IDN. - * @var array - * @access protected - * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc - * @see PHPMailer::$all_recipients - */ - protected $RecipientsQueue = array(); - - /** - * An array of reply-to names and addresses queued for validation. - * In send(), valid and non duplicate entries are moved to $ReplyTo. - * This array is used only for addresses with IDN. - * @var array - * @access protected - * @see PHPMailer::$ReplyTo - */ - protected $ReplyToQueue = array(); - - /** - * The array of attachments. - * @var array - * @access protected - */ - protected $attachment = array(); - - /** - * The array of custom headers. - * @var array - * @access protected - */ - protected $CustomHeader = array(); - - /** - * The most recent Message-ID (including angular brackets). - * @var string - * @access protected - */ - protected $lastMessageID = ''; - - /** - * The message's MIME type. - * @var string - * @access protected - */ - protected $message_type = ''; - - /** - * The array of MIME boundary strings. - * @var array - * @access protected - */ - protected $boundary = array(); - - /** - * The array of available languages. - * @var array - * @access protected - */ - protected $language = array(); - - /** - * The number of errors encountered. - * @var integer - * @access protected - */ - protected $error_count = 0; - - /** - * The S/MIME certificate file path. - * @var string - * @access protected - */ - protected $sign_cert_file = ''; - - /** - * The S/MIME key file path. - * @var string - * @access protected - */ - protected $sign_key_file = ''; - - /** - * The optional S/MIME extra certificates ("CA Chain") file path. - * @var string - * @access protected - */ - protected $sign_extracerts_file = ''; - - /** - * The S/MIME password for the key. - * Used only if the key is encrypted. - * @var string - * @access protected - */ - protected $sign_key_pass = ''; - - /** - * Whether to throw exceptions for errors. - * @var boolean - * @access protected - */ - protected $exceptions = false; - - /** - * Unique ID used for message ID and boundaries. - * @var string - * @access protected - */ - protected $uniqueid = ''; - - /** - * Error severity: message only, continue processing. - */ - const STOP_MESSAGE = 0; - - /** - * Error severity: message, likely ok to continue processing. - */ - const STOP_CONTINUE = 1; - - /** - * Error severity: message, plus full stop, critical error reached. - */ - const STOP_CRITICAL = 2; - - /** - * SMTP RFC standard line ending. - */ - const CRLF = "\r\n"; - - /** - * The maximum line length allowed by RFC 2822 section 2.1.1 - * @var integer - */ - const MAX_LINE_LENGTH = 998; - - /** - * Constructor. - * @param boolean $exceptions Should we throw external exceptions? - */ - public function __construct($exceptions = false) - { - $this->exceptions = (boolean)$exceptions; - } - - /** - * Destructor. - */ - public function __destruct() - { - //Close any open SMTP connection nicely - if ($this->Mailer == 'smtp') { - $this->smtpClose(); - } - } - - /** - * Call mail() in a safe_mode-aware fashion. - * Also, unless sendmail_path points to sendmail (or something that - * claims to be sendmail), don't pass params (not a perfect fix, - * but it will do) - * @param string $to To - * @param string $subject Subject - * @param string $body Message Body - * @param string $header Additional Header(s) - * @param string $params Params - * @access private - * @return boolean - */ - private function mailPassthru($to, $subject, $body, $header, $params) - { - //Check overloading of mail function to avoid double-encoding - if (ini_get('mbstring.func_overload') & 1) { - $subject = $this->secureHeader($subject); - } else { - $subject = $this->encodeHeader($this->secureHeader($subject)); - } - if (ini_get('safe_mode') || !($this->UseSendmailOptions)) { - $result = @mail($to, $subject, $body, $header); - } else { - $result = @mail($to, $subject, $body, $header, $params); - } - return $result; - } - - /** - * Output debugging info via user-defined method. - * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). - * @see PHPMailer::$Debugoutput - * @see PHPMailer::$SMTPDebug - * @param string $str - */ - protected function edebug($str) - { - if ($this->SMTPDebug <= 0) { - return; - } - //Avoid clash with built-in function names - if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { - call_user_func($this->Debugoutput, $str, $this->SMTPDebug); - return; - } - switch ($this->Debugoutput) { - case 'error_log': - //Don't output, just log - error_log($str); - break; - case 'html': - //Cleans up output a bit for a better looking, HTML-safe output - echo htmlentities( - preg_replace('/[\r\n]+/', '', $str), - ENT_QUOTES, - 'UTF-8' - ) - . "
\n"; - break; - case 'echo': - default: - //Normalize line breaks - $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - ) . "\n"; - } - } - - /** - * Sets message type to HTML or plain. - * @param boolean $isHtml True for HTML mode. - * @return void - */ - public function isHTML($isHtml = true) - { - if ($isHtml) { - $this->ContentType = 'text/html'; - } else { - $this->ContentType = 'text/plain'; - } - } - - /** - * Send messages using SMTP. - * @return void - */ - public function isSMTP() - { - $this->Mailer = 'smtp'; - } - - /** - * Send messages using PHP's mail() function. - * @return void - */ - public function isMail() - { - $this->Mailer = 'mail'; - } - - /** - * Send messages using $Sendmail. - * @return void - */ - public function isSendmail() - { - $ini_sendmail_path = ini_get('sendmail_path'); - - if (!stristr($ini_sendmail_path, 'sendmail')) { - $this->Sendmail = '/usr/sbin/sendmail'; - } else { - $this->Sendmail = $ini_sendmail_path; - } - $this->Mailer = 'sendmail'; - } - - /** - * Send messages using qmail. - * @return void - */ - public function isQmail() - { - $ini_sendmail_path = ini_get('sendmail_path'); - - if (!stristr($ini_sendmail_path, 'qmail')) { - $this->Sendmail = '/var/qmail/bin/qmail-inject'; - } else { - $this->Sendmail = $ini_sendmail_path; - } - $this->Mailer = 'qmail'; - } - - /** - * Add a "To" address. - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addAddress($address, $name = '') - { - return $this->addOrEnqueueAnAddress('to', $address, $name); - } - - /** - * Add a "CC" address. - * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addCC($address, $name = '') - { - return $this->addOrEnqueueAnAddress('cc', $address, $name); - } - - /** - * Add a "BCC" address. - * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addBCC($address, $name = '') - { - return $this->addOrEnqueueAnAddress('bcc', $address, $name); - } - - /** - * Add a "Reply-To" address. - * @param string $address The email address to reply to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addReplyTo($address, $name = '') - { - return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); - } - - /** - * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer - * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still - * be modified after calling this function), addition of such addresses is delayed until send(). - * Addresses that have been added already return false, but do not throw exceptions. - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected - */ - protected function addOrEnqueueAnAddress($kind, $address, $name) - { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (($pos = strrpos($address, '@')) === false) { - // At-sign is misssing. - $error_message = $this->lang('invalid_address') . $address; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - $params = array($kind, $address, $name); - // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. - if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { - if ($kind != 'Reply-To') { - if (!array_key_exists($address, $this->RecipientsQueue)) { - $this->RecipientsQueue[$address] = $params; - return true; - } - } else { - if (!array_key_exists($address, $this->ReplyToQueue)) { - $this->ReplyToQueue[$address] = $params; - return true; - } - } - return false; - } - // Immediately add standard addresses without IDN. - return call_user_func_array(array($this, 'addAnAddress'), $params); - } - - /** - * Add an address to one of the recipient arrays or to the ReplyTo array. - * Addresses that have been added already return false, but do not throw exceptions. - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected - */ - protected function addAnAddress($kind, $address, $name = '') - { - if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) { - $error_message = $this->lang('Invalid recipient kind: ') . $kind; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - if (!$this->validateAddress($address)) { - $error_message = $this->lang('invalid_address') . $address; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - if ($kind != 'Reply-To') { - if (!array_key_exists(strtolower($address), $this->all_recipients)) { - array_push($this->$kind, array($address, $name)); - $this->all_recipients[strtolower($address)] = true; - return true; - } - } else { - if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = array($address, $name); - return true; - } - } - return false; - } - - /** - * Parse and validate a string containing one or more RFC822-style comma-separated email addresses - * of the form "display name
" into an array of name/address pairs. - * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. - * Note that quotes in the name part are removed. - * @param string $addrstr The address list string - * @param bool $useimap Whether to use the IMAP extension to parse the list - * @return array - * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation - */ - public function parseAddresses($addrstr, $useimap = true) - { - $addresses = array(); - if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { - //Use this built-in parser if it's available - $list = imap_rfc822_parse_adrlist($addrstr, ''); - foreach ($list as $address) { - if ($address->host != '.SYNTAX-ERROR.') { - if ($this->validateAddress($address->mailbox . '@' . $address->host)) { - $addresses[] = array( - 'name' => (property_exists($address, 'personal') ? $address->personal : ''), - 'address' => $address->mailbox . '@' . $address->host - ); - } - } - } - } else { - //Use this simpler parser - $list = explode(',', $addrstr); - foreach ($list as $address) { - $address = trim($address); - //Is there a separate name part? - if (strpos($address, '<') === false) { - //No separate name, just use the whole thing - if ($this->validateAddress($address)) { - $addresses[] = array( - 'name' => '', - 'address' => $address - ); - } - } else { - list($name, $email) = explode('<', $address); - $email = trim(str_replace('>', '', $email)); - if ($this->validateAddress($email)) { - $addresses[] = array( - 'name' => trim(str_replace(array('"', "'"), '', $name)), - 'address' => $email - ); - } - } - } - } - return $addresses; - } - - /** - * Set the From and FromName properties. - * @param string $address - * @param string $name - * @param boolean $auto Whether to also set the Sender address, defaults to true - * @throws phpmailerException - * @return boolean - */ - public function setFrom($address, $name = '', $auto = true) - { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - // Don't validate now addresses with IDN. Will be done in send(). - if (($pos = strrpos($address, '@')) === false or - (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and - !$this->validateAddress($address)) { - $error_message = $this->lang('invalid_address') . $address; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - $this->From = $address; - $this->FromName = $name; - if ($auto) { - if (empty($this->Sender)) { - $this->Sender = $address; - } - } - return true; - } - - /** - * Return the Message-ID header of the last email. - * Technically this is the value from the last time the headers were created, - * but it's also the message ID of the last sent message except in - * pathological cases. - * @return string - */ - public function getLastMessageID() - { - return $this->lastMessageID; - } - - /** - * Check that a string looks like an email address. - * @param string $address The email address to check - * @param string $patternselect A selector for the validation pattern to use : - * * `auto` Pick best pattern automatically; - * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; - * * `pcre` Use old PCRE implementation; - * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; - * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. - * * `noregex` Don't use a regex: super fast, really dumb. - * @return boolean - * @static - * @access public - */ - public static function validateAddress($address, $patternselect = 'auto') - { - //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 - if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { - return false; - } - if (!$patternselect or $patternselect == 'auto') { - //Check this constant first so it works when extension_loaded() is disabled by safe mode - //Constant was added in PHP 5.2.4 - if (defined('PCRE_VERSION')) { - //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2 - if (version_compare(PCRE_VERSION, '8.0.3') >= 0) { - $patternselect = 'pcre8'; - } else { - $patternselect = 'pcre'; - } - } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) { - //Fall back to older PCRE - $patternselect = 'pcre'; - } else { - //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension - if (version_compare(PHP_VERSION, '5.2.0') >= 0) { - $patternselect = 'php'; - } else { - $patternselect = 'noregex'; - } - } - } - switch ($patternselect) { - case 'pcre8': - /** - * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. - * @link http://squiloople.com/2009/12/20/email-address-validation/ - * @copyright 2009-2010 Michael Rushton - * Feel free to use and redistribute this code. But please keep this copyright notice. - */ - return (boolean)preg_match( - '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . - '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . - '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . - '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . - '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . - '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . - '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . - '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . - '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', - $address - ); - case 'pcre': - //An older regex that doesn't need a recent PCRE - return (boolean)preg_match( - '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . - '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' . - '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' . - '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . - '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' . - '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . - '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' . - '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . - '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' . - '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', - $address - ); - case 'html5': - /** - * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. - * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) - */ - return (boolean)preg_match( - '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . - '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', - $address - ); - case 'noregex': - //No PCRE! Do something _very_ approximate! - //Check the address is 3 chars or longer and contains an @ that's not the first or last char - return (strlen($address) >= 3 - and strpos($address, '@') >= 1 - and strpos($address, '@') != strlen($address) - 1); - case 'php': - default: - return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL); - } - } - - /** - * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the - * "intl" and "mbstring" PHP extensions. - * @return bool "true" if required functions for IDN support are present - */ - public function idnSupported() - { - // @TODO: Write our own "idn_to_ascii" function for PHP <= 5.2. - return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); - } - - /** - * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. - * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. - * This function silently returns unmodified address if: - * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) - * - Conversion to punycode is impossible (e.g. required PHP functions are not available) - * or fails for any reason (e.g. domain has characters not allowed in an IDN) - * @see PHPMailer::$CharSet - * @param string $address The email address to convert - * @return string The encoded address in ASCII form - */ - public function punyencodeAddress($address) - { - // Verify we have required functions, CharSet, and at-sign. - if ($this->idnSupported() and - !empty($this->CharSet) and - ($pos = strrpos($address, '@')) !== false) { - $domain = substr($address, ++$pos); - // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. - if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { - $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); - if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? - idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : - idn_to_ascii($domain)) !== false) { - return substr($address, 0, $pos) . $punycode; - } - } - } - return $address; - } - - /** - * Create a message and send it. - * Uses the sending method specified by $Mailer. - * @throws phpmailerException - * @return boolean false on error - See the ErrorInfo property for details of the error. - */ - public function send() - { - try { - if (!$this->preSend()) { - return false; - } - return $this->postSend(); - } catch (phpmailerException $exc) { - $this->mailHeader = ''; - $this->setError($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - return false; - } - } - - /** - * Prepare a message for sending. - * @throws phpmailerException - * @return boolean - */ - public function preSend() - { - try { - $this->error_count = 0; // Reset errors - $this->mailHeader = ''; - - // Dequeue recipient and Reply-To addresses with IDN - foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { - $params[1] = $this->punyencodeAddress($params[1]); - call_user_func_array(array($this, 'addAnAddress'), $params); - } - if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); - } - - // Validate From, Sender, and ConfirmReadingTo addresses - foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) { - $this->$address_kind = trim($this->$address_kind); - if (empty($this->$address_kind)) { - continue; - } - $this->$address_kind = $this->punyencodeAddress($this->$address_kind); - if (!$this->validateAddress($this->$address_kind)) { - $error_message = $this->lang('invalid_address') . $this->$address_kind; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - } - - // Set whether the message is multipart/alternative - if (!empty($this->AltBody)) { - $this->ContentType = 'multipart/alternative'; - } - - $this->setMessageType(); - // Refuse to send an empty message unless we are specifically allowing it - if (!$this->AllowEmpty and empty($this->Body)) { - throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL); - } - - // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) - $this->MIMEHeader = ''; - $this->MIMEBody = $this->createBody(); - // createBody may have added some headers, so retain them - $tempheaders = $this->MIMEHeader; - $this->MIMEHeader = $this->createHeader(); - $this->MIMEHeader .= $tempheaders; - - // To capture the complete message when using mail(), create - // an extra header list which createHeader() doesn't fold in - if ($this->Mailer == 'mail') { - if (count($this->to) > 0) { - $this->mailHeader .= $this->addrAppend('To', $this->to); - } else { - $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); - } - $this->mailHeader .= $this->headerLine( - 'Subject', - $this->encodeHeader($this->secureHeader(trim($this->Subject))) - ); - } - - // Sign with DKIM if enabled - if (!empty($this->DKIM_domain) - && !empty($this->DKIM_private) - && !empty($this->DKIM_selector) - && file_exists($this->DKIM_private)) { - $header_dkim = $this->DKIM_Add( - $this->MIMEHeader . $this->mailHeader, - $this->encodeHeader($this->secureHeader($this->Subject)), - $this->MIMEBody - ); - $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF . - str_replace("\r\n", "\n", $header_dkim) . self::CRLF; - } - return true; - } catch (phpmailerException $exc) { - $this->setError($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - return false; - } - } - - /** - * Actually send a message. - * Send the email via the selected mechanism - * @throws phpmailerException - * @return boolean - */ - public function postSend() - { - try { - // Choose the mailer and send through it - switch ($this->Mailer) { - case 'sendmail': - case 'qmail': - return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); - case 'smtp': - return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); - case 'mail': - return $this->mailSend($this->MIMEHeader, $this->MIMEBody); - default: - $sendMethod = $this->Mailer.'Send'; - if (method_exists($this, $sendMethod)) { - return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); - } - - return $this->mailSend($this->MIMEHeader, $this->MIMEBody); - } - } catch (phpmailerException $exc) { - $this->setError($exc->getMessage()); - $this->edebug($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - } - return false; - } - - /** - * Send mail using the $Sendmail program. - * @param string $header The message headers - * @param string $body The message body - * @see PHPMailer::$Sendmail - * @throws phpmailerException - * @access protected - * @return boolean - */ - protected function sendmailSend($header, $body) - { - if ($this->Sender != '') { - if ($this->Mailer == 'qmail') { - $sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } else { - $sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } - } else { - if ($this->Mailer == 'qmail') { - $sendmail = sprintf('%s', escapeshellcmd($this->Sendmail)); - } else { - $sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail)); - } - } - if ($this->SingleTo) { - foreach ($this->SingleToArray as $toAddr) { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, 'To: ' . $toAddr . "\n"); - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - $this->doCallback( - ($result == 0), - array($toAddr), - $this->cc, - $this->bcc, - $this->Subject, - $body, - $this->From - ); - if ($result != 0) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - } else { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - $this->doCallback( - ($result == 0), - $this->to, - $this->cc, - $this->bcc, - $this->Subject, - $body, - $this->From - ); - if ($result != 0) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - return true; - } - - /** - * Send mail using the PHP mail() function. - * @param string $header The message headers - * @param string $body The message body - * @link http://www.php.net/manual/en/book.mail.php - * @throws phpmailerException - * @access protected - * @return boolean - */ - protected function mailSend($header, $body) - { - $toArr = array(); - foreach ($this->to as $toaddr) { - $toArr[] = $this->addrFormat($toaddr); - } - $to = implode(', ', $toArr); - - if (empty($this->Sender)) { - $params = ' '; - } else { - $params = sprintf('-f%s', $this->Sender); - } - if ($this->Sender != '' and !ini_get('safe_mode')) { - $old_from = ini_get('sendmail_from'); - ini_set('sendmail_from', $this->Sender); - } - $result = false; - if ($this->SingleTo && count($toArr) > 1) { - foreach ($toArr as $toAddr) { - $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); - } - } else { - $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); - $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); - } - if (isset($old_from)) { - ini_set('sendmail_from', $old_from); - } - if (!$result) { - throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL); - } - return true; - } - - /** - * Get an instance to use for SMTP operations. - * Override this function to load your own SMTP implementation - * @return SMTP - */ - public function getSMTPInstance() - { - if (!is_object($this->smtp)) { - $this->smtp = new SMTP; - } - return $this->smtp; - } - - /** - * Send mail via SMTP. - * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. - * Uses the PHPMailerSMTP class by default. - * @see PHPMailer::getSMTPInstance() to use a different class. - * @param string $header The message headers - * @param string $body The message body - * @throws phpmailerException - * @uses SMTP - * @access protected - * @return boolean - */ - protected function smtpSend($header, $body) - { - $bad_rcpt = array(); - if (!$this->smtpConnect($this->SMTPOptions)) { - throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); - } - if ('' == $this->Sender) { - $smtp_from = $this->From; - } else { - $smtp_from = $this->Sender; - } - if (!$this->smtp->mail($smtp_from)) { - $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); - throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); - } - - // Attempt to send to all recipients - foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { - foreach ($togroup as $to) { - if (!$this->smtp->recipient($to[0])) { - $error = $this->smtp->getError(); - $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']); - $isSent = false; - } else { - $isSent = true; - } - $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); - } - } - - // Only send the DATA command if we have viable recipients - if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { - throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL); - } - if ($this->SMTPKeepAlive) { - $this->smtp->reset(); - } else { - $this->smtp->quit(); - $this->smtp->close(); - } - //Create error message for any bad addresses - if (count($bad_rcpt) > 0) { - $errstr = ''; - foreach ($bad_rcpt as $bad) { - $errstr .= $bad['to'] . ': ' . $bad['error']; - } - throw new phpmailerException( - $this->lang('recipients_failed') . $errstr, - self::STOP_CONTINUE - ); - } - return true; - } - - /** - * Initiate a connection to an SMTP server. - * Returns false if the operation failed. - * @param array $options An array of options compatible with stream_context_create() - * @uses SMTP - * @access public - * @throws phpmailerException - * @return boolean - */ - public function smtpConnect($options = array()) - { - if (is_null($this->smtp)) { - $this->smtp = $this->getSMTPInstance(); - } - - // Already connected? - if ($this->smtp->connected()) { - return true; - } - - $this->smtp->setTimeout($this->Timeout); - $this->smtp->setDebugLevel($this->SMTPDebug); - $this->smtp->setDebugOutput($this->Debugoutput); - $this->smtp->setVerp($this->do_verp); - $hosts = explode(';', $this->Host); - $lastexception = null; - - foreach ($hosts as $hostentry) { - $hostinfo = array(); - if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { - // Not a valid host entry - continue; - } - // $hostinfo[2]: optional ssl or tls prefix - // $hostinfo[3]: the hostname - // $hostinfo[4]: optional port number - // The host string prefix can temporarily override the current setting for SMTPSecure - // If it's not specified, the default value is used - $prefix = ''; - $secure = $this->SMTPSecure; - $tls = ($this->SMTPSecure == 'tls'); - if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { - $prefix = 'ssl://'; - $tls = false; // Can't have SSL and TLS at the same time - $secure = 'ssl'; - } elseif ($hostinfo[2] == 'tls') { - $tls = true; - // tls doesn't use a prefix - $secure = 'tls'; - } - //Do we need the OpenSSL extension? - $sslext = defined('OPENSSL_ALGO_SHA1'); - if ('tls' === $secure or 'ssl' === $secure) { - //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled - if (!$sslext) { - throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); - } - } - $host = $hostinfo[3]; - $port = $this->Port; - $tport = (integer)$hostinfo[4]; - if ($tport > 0 and $tport < 65536) { - $port = $tport; - } - if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { - try { - if ($this->Helo) { - $hello = $this->Helo; - } else { - $hello = $this->serverHostname(); - } - $this->smtp->hello($hello); - //Automatically enable TLS encryption if: - // * it's not disabled - // * we have openssl extension - // * we are not already using SSL - // * the server offers STARTTLS - if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { - $tls = true; - } - if ($tls) { - if (!$this->smtp->startTLS()) { - throw new phpmailerException($this->lang('connect_host')); - } - // We must resend HELO after tls negotiation - $this->smtp->hello($hello); - } - if ($this->SMTPAuth) { - if (!$this->smtp->authenticate( - $this->Username, - $this->Password, - $this->AuthType, - $this->Realm, - $this->Workstation - ) - ) { - throw new phpmailerException($this->lang('authenticate')); - } - } - return true; - } catch (phpmailerException $exc) { - $lastexception = $exc; - $this->edebug($exc->getMessage()); - // We must have connected, but then failed TLS or Auth, so close connection nicely - $this->smtp->quit(); - } - } - } - // If we get here, all connection attempts have failed, so close connection hard - $this->smtp->close(); - // As we've caught all exceptions, just report whatever the last one was - if ($this->exceptions and !is_null($lastexception)) { - throw $lastexception; - } - return false; - } - - /** - * Close the active SMTP session if one exists. - * @return void - */ - public function smtpClose() - { - if ($this->smtp !== null) { - if ($this->smtp->connected()) { - $this->smtp->quit(); - $this->smtp->close(); - } - } - } - - /** - * Set the language for error messages. - * Returns false if it cannot load the language file. - * The default language is English. - * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") - * @param string $lang_path Path to the language file directory, with trailing separator (slash) - * @return boolean - * @access public - */ - public function setLanguage($langcode = 'en', $lang_path = '') - { - // Define full set of translatable strings in English - $PHPMAILER_LANG = array( - 'authenticate' => 'SMTP Error: Could not authenticate.', - 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', - 'data_not_accepted' => 'SMTP Error: data not accepted.', - 'empty_message' => 'Message body empty', - 'encoding' => 'Unknown encoding: ', - 'execute' => 'Could not execute: ', - 'file_access' => 'Could not access file: ', - 'file_open' => 'File Error: Could not open file: ', - 'from_failed' => 'The following From address failed: ', - 'instantiate' => 'Could not instantiate mail function.', - 'invalid_address' => 'Invalid address: ', - 'mailer_not_supported' => ' mailer is not supported.', - 'provide_address' => 'You must provide at least one recipient email address.', - 'recipients_failed' => 'SMTP Error: The following recipients failed: ', - 'signing' => 'Signing Error: ', - 'smtp_connect_failed' => 'SMTP connect() failed.', - 'smtp_error' => 'SMTP server error: ', - 'variable_set' => 'Cannot set or reset variable: ', - 'extension_missing' => 'Extension missing: ' - ); - if (empty($lang_path)) { - // Calculate an absolute path so it can work if CWD is not here - $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; - } - $foundlang = true; - $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; - // There is no English translation file - if ($langcode != 'en') { - // Make sure language file path is readable - if (!is_readable($lang_file)) { - $foundlang = false; - } else { - // Overwrite language-specific strings. - // This way we'll never have missing translation keys. - $foundlang = include $lang_file; - } - } - $this->language = $PHPMAILER_LANG; - return (boolean)$foundlang; // Returns false if language not found - } - - /** - * Get the array of strings for the current language. - * @return array - */ - public function getTranslations() - { - return $this->language; - } - - /** - * Create recipient headers. - * @access public - * @param string $type - * @param array $addr An array of recipient, - * where each recipient is a 2-element indexed array with element 0 containing an address - * and element 1 containing a name, like: - * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) - * @return string - */ - public function addrAppend($type, $addr) - { - $addresses = array(); - foreach ($addr as $address) { - $addresses[] = $this->addrFormat($address); - } - return $type . ': ' . implode(', ', $addresses) . $this->LE; - } - - /** - * Format an address for use in a message header. - * @access public - * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name - * like array('joe@example.com', 'Joe User') - * @return string - */ - public function addrFormat($addr) - { - if (empty($addr[1])) { // No name provided - return $this->secureHeader($addr[0]); - } else { - return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( - $addr[0] - ) . '>'; - } - } - - /** - * Word-wrap message. - * For use with mailers that do not automatically perform wrapping - * and for quoted-printable encoded messages. - * Original written by philippe. - * @param string $message The message to wrap - * @param integer $length The line length to wrap to - * @param boolean $qp_mode Whether to run in Quoted-Printable mode - * @access public - * @return string - */ - public function wrapText($message, $length, $qp_mode = false) - { - if ($qp_mode) { - $soft_break = sprintf(' =%s', $this->LE); - } else { - $soft_break = $this->LE; - } - // If utf-8 encoding is used, we will need to make sure we don't - // split multibyte characters when we wrap - $is_utf8 = (strtolower($this->CharSet) == 'utf-8'); - $lelen = strlen($this->LE); - $crlflen = strlen(self::CRLF); - - $message = $this->fixEOL($message); - //Remove a trailing line break - if (substr($message, -$lelen) == $this->LE) { - $message = substr($message, 0, -$lelen); - } - - //Split message into lines - $lines = explode($this->LE, $message); - //Message will be rebuilt in here - $message = ''; - foreach ($lines as $line) { - $words = explode(' ', $line); - $buf = ''; - $firstword = true; - foreach ($words as $word) { - if ($qp_mode and (strlen($word) > $length)) { - $space_left = $length - strlen($buf) - $crlflen; - if (!$firstword) { - if ($space_left > 20) { - $len = $space_left; - if ($is_utf8) { - $len = $this->utf8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == '=') { - $len--; - } elseif (substr($word, $len - 2, 1) == '=') { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - $buf .= ' ' . $part; - $message .= $buf . sprintf('=%s', self::CRLF); - } else { - $message .= $buf . $soft_break; - } - $buf = ''; - } - while (strlen($word) > 0) { - if ($length <= 0) { - break; - } - $len = $length; - if ($is_utf8) { - $len = $this->utf8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == '=') { - $len--; - } elseif (substr($word, $len - 2, 1) == '=') { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - - if (strlen($word) > 0) { - $message .= $part . sprintf('=%s', self::CRLF); - } else { - $buf = $part; - } - } - } else { - $buf_o = $buf; - if (!$firstword) { - $buf .= ' '; - } - $buf .= $word; - - if (strlen($buf) > $length and $buf_o != '') { - $message .= $buf_o . $soft_break; - $buf = $word; - } - } - $firstword = false; - } - $message .= $buf . self::CRLF; - } - - return $message; - } - - /** - * Find the last character boundary prior to $maxLength in a utf-8 - * quoted-printable encoded string. - * Original written by Colin Brown. - * @access public - * @param string $encodedText utf-8 QP text - * @param integer $maxLength Find the last character boundary prior to this length - * @return integer - */ - public function utf8CharBoundary($encodedText, $maxLength) - { - $foundSplitPos = false; - $lookBack = 3; - while (!$foundSplitPos) { - $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); - $encodedCharPos = strpos($lastChunk, '='); - if (false !== $encodedCharPos) { - // Found start of encoded character byte within $lookBack block. - // Check the encoded byte value (the 2 chars after the '=') - $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); - $dec = hexdec($hex); - if ($dec < 128) { - // Single byte character. - // If the encoded char was found at pos 0, it will fit - // otherwise reduce maxLength to start of the encoded char - if ($encodedCharPos > 0) { - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - } - $foundSplitPos = true; - } elseif ($dec >= 192) { - // First byte of a multi byte character - // Reduce maxLength to split at start of character - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec < 192) { - // Middle byte of a multi byte character, look further back - $lookBack += 3; - } - } else { - // No encoded character found - $foundSplitPos = true; - } - } - return $maxLength; - } - - /** - * Apply word wrapping to the message body. - * Wraps the message body to the number of chars set in the WordWrap property. - * You should only do this to plain-text bodies as wrapping HTML tags may break them. - * This is called automatically by createBody(), so you don't need to call it yourself. - * @access public - * @return void - */ - public function setWordWrap() - { - if ($this->WordWrap < 1) { - return; - } - - switch ($this->message_type) { - case 'alt': - case 'alt_inline': - case 'alt_attach': - case 'alt_inline_attach': - $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); - break; - default: - $this->Body = $this->wrapText($this->Body, $this->WordWrap); - break; - } - } - - /** - * Assemble message headers. - * @access public - * @return string The assembled headers - */ - public function createHeader() - { - $result = ''; - - if ($this->MessageDate == '') { - $this->MessageDate = self::rfcDate(); - } - $result .= $this->headerLine('Date', $this->MessageDate); - - // To be created automatically by mail() - if ($this->SingleTo) { - if ($this->Mailer != 'mail') { - foreach ($this->to as $toaddr) { - $this->SingleToArray[] = $this->addrFormat($toaddr); - } - } - } else { - if (count($this->to) > 0) { - if ($this->Mailer != 'mail') { - $result .= $this->addrAppend('To', $this->to); - } - } elseif (count($this->cc) == 0) { - $result .= $this->headerLine('To', 'undisclosed-recipients:;'); - } - } - - $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); - - // sendmail and mail() extract Cc from the header before sending - if (count($this->cc) > 0) { - $result .= $this->addrAppend('Cc', $this->cc); - } - - // sendmail and mail() extract Bcc from the header before sending - if (( - $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' - ) - and count($this->bcc) > 0 - ) { - $result .= $this->addrAppend('Bcc', $this->bcc); - } - - if (count($this->ReplyTo) > 0) { - $result .= $this->addrAppend('Reply-To', $this->ReplyTo); - } - - // mail() sets the subject itself - if ($this->Mailer != 'mail') { - $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); - } - - if ($this->MessageID != '') { - $this->lastMessageID = $this->MessageID; - } else { - $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); - } - $result .= $this->headerLine('Message-ID', $this->lastMessageID); - if (!is_null($this->Priority)) { - $result .= $this->headerLine('X-Priority', $this->Priority); - } - if ($this->XMailer == '') { - $result .= $this->headerLine( - 'X-Mailer', - 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)' - ); - } else { - $myXmailer = trim($this->XMailer); - if ($myXmailer) { - $result .= $this->headerLine('X-Mailer', $myXmailer); - } - } - - if ($this->ConfirmReadingTo != '') { - $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); - } - - // Add custom headers - foreach ($this->CustomHeader as $header) { - $result .= $this->headerLine( - trim($header[0]), - $this->encodeHeader(trim($header[1])) - ); - } - if (!$this->sign_key_file) { - $result .= $this->headerLine('MIME-Version', '1.0'); - $result .= $this->getMailMIME(); - } - - return $result; - } - - /** - * Get the message MIME type headers. - * @access public - * @return string - */ - public function getMailMIME() - { - $result = ''; - $ismultipart = true; - switch ($this->message_type) { - case 'inline': - $result .= $this->headerLine('Content-Type', 'multipart/related;'); - $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'attach': - case 'inline_attach': - case 'alt_attach': - case 'alt_inline_attach': - $result .= $this->headerLine('Content-Type', 'multipart/mixed;'); - $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'alt': - case 'alt_inline': - $result .= $this->headerLine('Content-Type', 'multipart/alternative;'); - $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - default: - // Catches case 'plain': and case '': - $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); - $ismultipart = false; - break; - } - // RFC1341 part 5 says 7bit is assumed if not specified - if ($this->Encoding != '7bit') { - // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE - if ($ismultipart) { - if ($this->Encoding == '8bit') { - $result .= $this->headerLine('Content-Transfer-Encoding', '8bit'); - } - // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible - } else { - $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); - } - } - - if ($this->Mailer != 'mail') { - $result .= $this->LE; - } - - return $result; - } - - /** - * Returns the whole MIME message. - * Includes complete headers and body. - * Only valid post preSend(). - * @see PHPMailer::preSend() - * @access public - * @return string - */ - public function getSentMIMEMessage() - { - return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody; - } - - /** - * Assemble the message body. - * Returns an empty string on failure. - * @access public - * @throws phpmailerException - * @return string The assembled message body - */ - public function createBody() - { - $body = ''; - //Create unique IDs and preset boundaries - $this->uniqueid = md5(uniqid(time())); - $this->boundary[1] = 'b1_' . $this->uniqueid; - $this->boundary[2] = 'b2_' . $this->uniqueid; - $this->boundary[3] = 'b3_' . $this->uniqueid; - - if ($this->sign_key_file) { - $body .= $this->getMailMIME() . $this->LE; - } - - $this->setWordWrap(); - - $bodyEncoding = $this->Encoding; - $bodyCharSet = $this->CharSet; - //Can we do a 7-bit downgrade? - if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { - $bodyEncoding = '7bit'; - $bodyCharSet = 'us-ascii'; - } - //If lines are too long, and we're not already using an encoding that will shorten them, - //change to quoted-printable transfer encoding - if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { - $this->Encoding = 'quoted-printable'; - $bodyEncoding = 'quoted-printable'; - } - - $altBodyEncoding = $this->Encoding; - $altBodyCharSet = $this->CharSet; - //Can we do a 7-bit downgrade? - if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { - $altBodyEncoding = '7bit'; - $altBodyCharSet = 'us-ascii'; - } - //If lines are too long, change to quoted-printable transfer encoding - if (self::hasLineLongerThanMax($this->AltBody)) { - $altBodyEncoding = 'quoted-printable'; - } - //Use this as a preamble in all multipart message types - $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE; - switch ($this->message_type) { - case 'inline': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[1]); - break; - case 'attach': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - case 'inline_attach': - $body .= $mimepre; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/related;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[2]); - $body .= $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - case 'alt': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - if (!empty($this->Ical)) { - $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', ''); - $body .= $this->encodeString($this->Ical, $this->Encoding); - $body .= $this->LE . $this->LE; - } - $body .= $this->endBoundary($this->boundary[1]); - break; - case 'alt_inline': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/related;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[2]); - $body .= $this->LE; - $body .= $this->endBoundary($this->boundary[1]); - break; - case 'alt_attach': - $body .= $mimepre; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->endBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - case 'alt_inline_attach': - $body .= $mimepre; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->textLine('--' . $this->boundary[2]); - $body .= $this->headerLine('Content-Type', 'multipart/related;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[3]); - $body .= $this->LE; - $body .= $this->endBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - default: - // catch case 'plain' and case '' - $body .= $this->encodeString($this->Body, $bodyEncoding); - break; - } - - if ($this->isError()) { - $body = ''; - } elseif ($this->sign_key_file) { - try { - if (!defined('PKCS7_TEXT')) { - throw new phpmailerException($this->lang('extension_missing') . 'openssl'); - } - // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1 - $file = tempnam(sys_get_temp_dir(), 'mail'); - if (false === file_put_contents($file, $body)) { - throw new phpmailerException($this->lang('signing') . ' Could not write temp file'); - } - $signed = tempnam(sys_get_temp_dir(), 'signed'); - //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 - if (empty($this->sign_extracerts_file)) { - $sign = @openssl_pkcs7_sign( - $file, - $signed, - 'file://' . realpath($this->sign_cert_file), - array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), - null - ); - } else { - $sign = @openssl_pkcs7_sign( - $file, - $signed, - 'file://' . realpath($this->sign_cert_file), - array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), - null, - PKCS7_DETACHED, - $this->sign_extracerts_file - ); - } - if ($sign) { - @unlink($file); - $body = file_get_contents($signed); - @unlink($signed); - //The message returned by openssl contains both headers and body, so need to split them up - $parts = explode("\n\n", $body, 2); - $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; - $body = $parts[1]; - } else { - @unlink($file); - @unlink($signed); - throw new phpmailerException($this->lang('signing') . openssl_error_string()); - } - } catch (phpmailerException $exc) { - $body = ''; - if ($this->exceptions) { - throw $exc; - } - } - } - return $body; - } - - /** - * Return the start of a message boundary. - * @access protected - * @param string $boundary - * @param string $charSet - * @param string $contentType - * @param string $encoding - * @return string - */ - protected function getBoundary($boundary, $charSet, $contentType, $encoding) - { - $result = ''; - if ($charSet == '') { - $charSet = $this->CharSet; - } - if ($contentType == '') { - $contentType = $this->ContentType; - } - if ($encoding == '') { - $encoding = $this->Encoding; - } - $result .= $this->textLine('--' . $boundary); - $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); - $result .= $this->LE; - // RFC1341 part 5 says 7bit is assumed if not specified - if ($encoding != '7bit') { - $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); - } - $result .= $this->LE; - - return $result; - } - - /** - * Return the end of a message boundary. - * @access protected - * @param string $boundary - * @return string - */ - protected function endBoundary($boundary) - { - return $this->LE . '--' . $boundary . '--' . $this->LE; - } - - /** - * Set the message type. - * PHPMailer only supports some preset message types, - * not arbitrary MIME structures. - * @access protected - * @return void - */ - protected function setMessageType() - { - $type = array(); - if ($this->alternativeExists()) { - $type[] = 'alt'; - } - if ($this->inlineImageExists()) { - $type[] = 'inline'; - } - if ($this->attachmentExists()) { - $type[] = 'attach'; - } - $this->message_type = implode('_', $type); - if ($this->message_type == '') { - $this->message_type = 'plain'; - } - } - - /** - * Format a header line. - * @access public - * @param string $name - * @param string $value - * @return string - */ - public function headerLine($name, $value) - { - return $name . ': ' . $value . $this->LE; - } - - /** - * Return a formatted mail line. - * @access public - * @param string $value - * @return string - */ - public function textLine($value) - { - return $value . $this->LE; - } - - /** - * Add an attachment from a path on the filesystem. - * Returns false if the file could not be found or read. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @param string $disposition Disposition to use - * @throws phpmailerException - * @return boolean - */ - public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') - { - try { - if (!@is_file($path)) { - throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE); - } - - // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($path); - } - - $filename = basename($path); - if ($name == '') { - $name = $filename; - } - - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => $disposition, - 7 => 0 - ); - - } catch (phpmailerException $exc) { - $this->setError($exc->getMessage()); - $this->edebug($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - return false; - } - return true; - } - - /** - * Return the array of attachments. - * @return array - */ - public function getAttachments() - { - return $this->attachment; - } - - /** - * Attach all file, string, and binary attachments to the message. - * Returns an empty string on failure. - * @access protected - * @param string $disposition_type - * @param string $boundary - * @return string - */ - protected function attachAll($disposition_type, $boundary) - { - // Return text of body - $mime = array(); - $cidUniq = array(); - $incl = array(); - - // Add all attachments - foreach ($this->attachment as $attachment) { - // Check if it is a valid disposition_filter - if ($attachment[6] == $disposition_type) { - // Check for string attachment - $string = ''; - $path = ''; - $bString = $attachment[5]; - if ($bString) { - $string = $attachment[0]; - } else { - $path = $attachment[0]; - } - - $inclhash = md5(serialize($attachment)); - if (in_array($inclhash, $incl)) { - continue; - } - $incl[] = $inclhash; - $name = $attachment[2]; - $encoding = $attachment[3]; - $type = $attachment[4]; - $disposition = $attachment[6]; - $cid = $attachment[7]; - if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) { - continue; - } - $cidUniq[$cid] = true; - - $mime[] = sprintf('--%s%s', $boundary, $this->LE); - //Only include a filename property if we have one - if (!empty($name)) { - $mime[] = sprintf( - 'Content-Type: %s; name="%s"%s', - $type, - $this->encodeHeader($this->secureHeader($name)), - $this->LE - ); - } else { - $mime[] = sprintf( - 'Content-Type: %s%s', - $type, - $this->LE - ); - } - // RFC1341 part 5 says 7bit is assumed if not specified - if ($encoding != '7bit') { - $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE); - } - - if ($disposition == 'inline') { - $mime[] = sprintf('Content-ID: <%s>%s', $cid, $this->LE); - } - - // If a filename contains any of these chars, it should be quoted, - // but not otherwise: RFC2183 & RFC2045 5.1 - // Fixes a warning in IETF's msglint MIME checker - // Allow for bypassing the Content-Disposition header totally - if (!(empty($disposition))) { - $encoded_name = $this->encodeHeader($this->secureHeader($name)); - if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $encoded_name)) { - $mime[] = sprintf( - 'Content-Disposition: %s; filename="%s"%s', - $disposition, - $encoded_name, - $this->LE . $this->LE - ); - } else { - if (!empty($encoded_name)) { - $mime[] = sprintf( - 'Content-Disposition: %s; filename=%s%s', - $disposition, - $encoded_name, - $this->LE . $this->LE - ); - } else { - $mime[] = sprintf( - 'Content-Disposition: %s%s', - $disposition, - $this->LE . $this->LE - ); - } - } - } else { - $mime[] = $this->LE; - } - - // Encode as string attachment - if ($bString) { - $mime[] = $this->encodeString($string, $encoding); - if ($this->isError()) { - return ''; - } - $mime[] = $this->LE . $this->LE; - } else { - $mime[] = $this->encodeFile($path, $encoding); - if ($this->isError()) { - return ''; - } - $mime[] = $this->LE . $this->LE; - } - } - } - - $mime[] = sprintf('--%s--%s', $boundary, $this->LE); - - return implode('', $mime); - } - - /** - * Encode a file attachment in requested format. - * Returns an empty string on failure. - * @param string $path The full path to the file - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @throws phpmailerException - * @access protected - * @return string - */ - protected function encodeFile($path, $encoding = 'base64') - { - try { - if (!is_readable($path)) { - throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); - } - $magic_quotes = get_magic_quotes_runtime(); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime(false); - } else { - //Doesn't exist in PHP 5.4, but we don't need to check because - //get_magic_quotes_runtime always returns false in 5.4+ - //so it will never get here - ini_set('magic_quotes_runtime', false); - } - } - $file_buffer = file_get_contents($path); - $file_buffer = $this->encodeString($file_buffer, $encoding); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } else { - ini_set('magic_quotes_runtime', $magic_quotes); - } - } - return $file_buffer; - } catch (Exception $exc) { - $this->setError($exc->getMessage()); - return ''; - } - } - - /** - * Encode a string in requested format. - * Returns an empty string on failure. - * @param string $str The text to encode - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @access public - * @return string - */ - public function encodeString($str, $encoding = 'base64') - { - $encoded = ''; - switch (strtolower($encoding)) { - case 'base64': - $encoded = chunk_split(base64_encode($str), 76, $this->LE); - break; - case '7bit': - case '8bit': - $encoded = $this->fixEOL($str); - // Make sure it ends with a line break - if (substr($encoded, -(strlen($this->LE))) != $this->LE) { - $encoded .= $this->LE; - } - break; - case 'binary': - $encoded = $str; - break; - case 'quoted-printable': - $encoded = $this->encodeQP($str); - break; - default: - $this->setError($this->lang('encoding') . $encoding); - break; - } - return $encoded; - } - - /** - * Encode a header string optimally. - * Picks shortest of Q, B, quoted-printable or none. - * @access public - * @param string $str - * @param string $position - * @return string - */ - public function encodeHeader($str, $position = 'text') - { - $matchcount = 0; - switch (strtolower($position)) { - case 'phrase': - if (!preg_match('/[\200-\377]/', $str)) { - // Can't use addslashes as we don't know the value of magic_quotes_sybase - $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { - return ($encoded); - } else { - return ("\"$encoded\""); - } - } - $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); - break; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'comment': - $matchcount = preg_match_all('/[()"]/', $str, $matches); - // Intentional fall-through - case 'text': - default: - $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); - break; - } - - //There are no chars that need encoding - if ($matchcount == 0) { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); - // Try to select the encoding which should produce the shortest output - if ($matchcount > strlen($str) / 3) { - // More than a third of the content will need encoding, so B encoding will be most efficient - $encoding = 'B'; - if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) { - // Use a custom function which correctly encodes and wraps long - // multibyte strings without breaking lines within a character - $encoded = $this->base64EncodeWrapMB($str, "\n"); - } else { - $encoded = base64_encode($str); - $maxlen -= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); - } - } else { - $encoding = 'Q'; - $encoded = $this->encodeQ($str, $position); - $encoded = $this->wrapText($encoded, $maxlen, true); - $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded)); - } - - $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - - return $encoded; - } - - /** - * Check if a string contains multi-byte characters. - * @access public - * @param string $str multi-byte text to wrap encode - * @return boolean - */ - public function hasMultiBytes($str) - { - if (function_exists('mb_strlen')) { - return (strlen($str) > mb_strlen($str, $this->CharSet)); - } else { // Assume no multibytes (we can't handle without mbstring functions anyway) - return false; - } - } - - /** - * Does a string contain any 8-bit chars (in any charset)? - * @param string $text - * @return boolean - */ - public function has8bitChars($text) - { - return (boolean)preg_match('/[\x80-\xFF]/', $text); - } - - /** - * Encode and wrap long multibyte strings for mail headers - * without breaking lines within a character. - * Adapted from a function by paravoid - * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 - * @access public - * @param string $str multi-byte text to wrap encode - * @param string $linebreak string to use as linefeed/end-of-line - * @return string - */ - public function base64EncodeWrapMB($str, $linebreak = null) - { - $start = '=?' . $this->CharSet . '?B?'; - $end = '?='; - $encoded = ''; - if ($linebreak === null) { - $linebreak = $this->LE; - } - - $mb_length = mb_strlen($str, $this->CharSet); - // Each line must have length <= 75, including $start and $end - $length = 75 - strlen($start) - strlen($end); - // Average multi-byte ratio - $ratio = $mb_length / strlen($str); - // Base64 has a 4:3 ratio - $avgLength = floor($length * $ratio * .75); - - for ($i = 0; $i < $mb_length; $i += $offset) { - $lookBack = 0; - do { - $offset = $avgLength - $lookBack; - $chunk = mb_substr($str, $i, $offset, $this->CharSet); - $chunk = base64_encode($chunk); - $lookBack++; - } while (strlen($chunk) > $length); - $encoded .= $chunk . $linebreak; - } - - // Chomp the last linefeed - $encoded = substr($encoded, 0, -strlen($linebreak)); - return $encoded; - } - - /** - * Encode a string in quoted-printable format. - * According to RFC2045 section 6.7. - * @access public - * @param string $string The text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @return string - * @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment - */ - public function encodeQP($string, $line_max = 76) - { - // Use native function if it's available (>= PHP5.3) - if (function_exists('quoted_printable_encode')) { - return quoted_printable_encode($string); - } - // Fall back to a pure PHP implementation - $string = str_replace( - array('%20', '%0D%0A.', '%0D%0A', '%'), - array(' ', "\r\n=2E", "\r\n", '='), - rawurlencode($string) - ); - return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); - } - - /** - * Backward compatibility wrapper for an old QP encoding function that was removed. - * @see PHPMailer::encodeQP() - * @access public - * @param string $string - * @param integer $line_max - * @param boolean $space_conv - * @return string - * @deprecated Use encodeQP instead. - */ - public function encodeQPphp( - $string, - $line_max = 76, - /** @noinspection PhpUnusedParameterInspection */ $space_conv = false - ) { - return $this->encodeQP($string, $line_max); - } - - /** - * Encode a string using Q encoding. - * @link http://tools.ietf.org/html/rfc2047 - * @param string $str the text to encode - * @param string $position Where the text is going to be used, see the RFC for what that means - * @access public - * @return string - */ - public function encodeQ($str, $position = 'text') - { - // There should not be any EOL in the string - $pattern = ''; - $encoded = str_replace(array("\r", "\n"), '', $str); - switch (strtolower($position)) { - case 'phrase': - // RFC 2047 section 5.3 - $pattern = '^A-Za-z0-9!*+\/ -'; - break; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'comment': - // RFC 2047 section 5.2 - $pattern = '\(\)"'; - // intentional fall-through - // for this reason we build the $pattern without including delimiters and [] - case 'text': - default: - // RFC 2047 section 5.1 - // Replace every high ascii, control, =, ? and _ characters - $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; - break; - } - $matches = array(); - if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { - // If the string contains an '=', make sure it's the first thing we replace - // so as to avoid double-encoding - $eqkey = array_search('=', $matches[0]); - if (false !== $eqkey) { - unset($matches[0][$eqkey]); - array_unshift($matches[0], '='); - } - foreach (array_unique($matches[0]) as $char) { - $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); - } - } - // Replace every spaces to _ (more readable than =20) - return str_replace(' ', '_', $encoded); - } - - /** - * Add a string or binary attachment (non-filesystem). - * This method can be used to attach ascii or binary data, - * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @param string $disposition Disposition to use - * @return void - */ - public function addStringAttachment( - $string, - $filename, - $encoding = 'base64', - $type = '', - $disposition = 'attachment' - ) { - // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($filename); - } - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $filename, - 2 => basename($filename), - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => $disposition, - 7 => 0 - ); - } - - /** - * Add an embedded (inline) attachment from a file. - * This can include images, sounds, and just about any other document type. - * These differ from 'regular' attachments in that they are intended to be - * displayed inline with the message, not just attached for download. - * This is used in HTML messages that embed the images - * the HTML refers to using the $cid value. - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment; Use this to reference - * the content when using an embedded image in HTML. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File MIME type. - * @param string $disposition Disposition to use - * @return boolean True on successfully adding an attachment - */ - public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') - { - if (!@is_file($path)) { - $this->setError($this->lang('file_access') . $path); - return false; - } - - // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($path); - } - - $filename = basename($path); - if ($name == '') { - $name = $filename; - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => $disposition, - 7 => $cid - ); - return true; - } - - /** - * Add an embedded stringified attachment. - * This can include images, sounds, and just about any other document type. - * Be sure to set the $type to an image type for images: - * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. - * @param string $string The attachment binary data. - * @param string $cid Content ID of the attachment; Use this to reference - * the content when using an embedded image in HTML. - * @param string $name - * @param string $encoding File encoding (see $Encoding). - * @param string $type MIME type. - * @param string $disposition Disposition to use - * @return boolean True on successfully adding an attachment - */ - public function addStringEmbeddedImage( - $string, - $cid, - $name = '', - $encoding = 'base64', - $type = '', - $disposition = 'inline' - ) { - // If a MIME type is not specified, try to work it out from the name - if ($type == '' and !empty($name)) { - $type = self::filenameToType($name); - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $name, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => $disposition, - 7 => $cid - ); - return true; - } - - /** - * Check if an inline attachment is present. - * @access public - * @return boolean - */ - public function inlineImageExists() - { - foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'inline') { - return true; - } - } - return false; - } - - /** - * Check if an attachment (non-inline) is present. - * @return boolean - */ - public function attachmentExists() - { - foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'attachment') { - return true; - } - } - return false; - } - - /** - * Check if this message has an alternative body set. - * @return boolean - */ - public function alternativeExists() - { - return !empty($this->AltBody); - } - - /** - * Clear queued addresses of given kind. - * @access protected - * @param string $kind 'to', 'cc', or 'bcc' - * @return void - */ - public function clearQueuedAddresses($kind) - { - $RecipientsQueue = $this->RecipientsQueue; - foreach ($RecipientsQueue as $address => $params) { - if ($params[0] == $kind) { - unset($this->RecipientsQueue[$address]); - } - } - } - - /** - * Clear all To recipients. - * @return void - */ - public function clearAddresses() - { - foreach ($this->to as $to) { - unset($this->all_recipients[strtolower($to[0])]); - } - $this->to = array(); - $this->clearQueuedAddresses('to'); - } - - /** - * Clear all CC recipients. - * @return void - */ - public function clearCCs() - { - foreach ($this->cc as $cc) { - unset($this->all_recipients[strtolower($cc[0])]); - } - $this->cc = array(); - $this->clearQueuedAddresses('cc'); - } - - /** - * Clear all BCC recipients. - * @return void - */ - public function clearBCCs() - { - foreach ($this->bcc as $bcc) { - unset($this->all_recipients[strtolower($bcc[0])]); - } - $this->bcc = array(); - $this->clearQueuedAddresses('bcc'); - } - - /** - * Clear all ReplyTo recipients. - * @return void - */ - public function clearReplyTos() - { - $this->ReplyTo = array(); - $this->ReplyToQueue = array(); - } - - /** - * Clear all recipient types. - * @return void - */ - public function clearAllRecipients() - { - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); - $this->all_recipients = array(); - $this->RecipientsQueue = array(); - } - - /** - * Clear all filesystem, string, and binary attachments. - * @return void - */ - public function clearAttachments() - { - $this->attachment = array(); - } - - /** - * Clear all custom headers. - * @return void - */ - public function clearCustomHeaders() - { - $this->CustomHeader = array(); - } - - /** - * Add an error message to the error container. - * @access protected - * @param string $msg - * @return void - */ - protected function setError($msg) - { - $this->error_count++; - if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { - $lasterror = $this->smtp->getError(); - if (!empty($lasterror['error'])) { - $msg .= $this->lang('smtp_error') . $lasterror['error']; - if (!empty($lasterror['detail'])) { - $msg .= ' Detail: '. $lasterror['detail']; - } - if (!empty($lasterror['smtp_code'])) { - $msg .= ' SMTP code: ' . $lasterror['smtp_code']; - } - if (!empty($lasterror['smtp_code_ex'])) { - $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; - } - } - } - $this->ErrorInfo = $msg; - } - - /** - * Return an RFC 822 formatted date. - * @access public - * @return string - * @static - */ - public static function rfcDate() - { - // Set the time zone to whatever the default is to avoid 500 errors - // Will default to UTC if it's not set properly in php.ini - date_default_timezone_set(@date_default_timezone_get()); - return date('D, j M Y H:i:s O'); - } - - /** - * Get the server hostname. - * Returns 'localhost.localdomain' if unknown. - * @access protected - * @return string - */ - protected function serverHostname() - { - $result = 'localhost.localdomain'; - if (!empty($this->Hostname)) { - $result = $this->Hostname; - } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { - $result = $_SERVER['SERVER_NAME']; - } elseif (function_exists('gethostname') && gethostname() !== false) { - $result = gethostname(); - } elseif (php_uname('n') !== false) { - $result = php_uname('n'); - } - return $result; - } - - /** - * Get an error message in the current language. - * @access protected - * @param string $key - * @return string - */ - protected function lang($key) - { - if (count($this->language) < 1) { - $this->setLanguage('en'); // set the default language - } - - if (array_key_exists($key, $this->language)) { - if ($key == 'smtp_connect_failed') { - //Include a link to troubleshooting docs on SMTP connection failure - //this is by far the biggest cause of support questions - //but it's usually not PHPMailer's fault. - return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; - } - return $this->language[$key]; - } else { - //Return the key as a fallback - return $key; - } - } - - /** - * Check if an error occurred. - * @access public - * @return boolean True if an error did occur. - */ - public function isError() - { - return ($this->error_count > 0); - } - - /** - * Ensure consistent line endings in a string. - * Changes every end of line from CRLF, CR or LF to $this->LE. - * @access public - * @param string $str String to fixEOL - * @return string - */ - public function fixEOL($str) - { - // Normalise to \n - $nstr = str_replace(array("\r\n", "\r"), "\n", $str); - // Now convert LE as needed - if ($this->LE !== "\n") { - $nstr = str_replace("\n", $this->LE, $nstr); - } - return $nstr; - } - - /** - * Add a custom header. - * $name value can be overloaded to contain - * both header name and value (name:value) - * @access public - * @param string $name Custom header name - * @param string $value Header value - * @return void - */ - public function addCustomHeader($name, $value = null) - { - if ($value === null) { - // Value passed in as name:value - $this->CustomHeader[] = explode(':', $name, 2); - } else { - $this->CustomHeader[] = array($name, $value); - } - } - - /** - * Returns all custom headers. - * @return array - */ - public function getCustomHeaders() - { - return $this->CustomHeader; - } - - /** - * Create a message from an HTML string. - * Automatically makes modifications for inline images and backgrounds - * and creates a plain-text version by converting the HTML. - * Overwrites any existing values in $this->Body and $this->AltBody - * @access public - * @param string $message HTML message string - * @param string $basedir baseline directory for path - * @param boolean|callable $advanced Whether to use the internal HTML to text converter - * or your own custom converter @see PHPMailer::html2text() - * @return string $message - */ - public function msgHTML($message, $basedir = '', $advanced = false) - { - preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); - if (array_key_exists(2, $images)) { - foreach ($images[2] as $imgindex => $url) { - // Convert data URIs into embedded images - if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { - $data = substr($url, strpos($url, ',')); - if ($match[2]) { - $data = base64_decode($data); - } else { - $data = rawurldecode($data); - } - $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { - $message = str_replace( - $images[0][$imgindex], - $images[1][$imgindex] . '="cid:' . $cid . '"', - $message - ); - } - } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) { - // Do not change urls for absolute images (thanks to corvuscorax) - // Do not change urls that are already inline images - $filename = basename($url); - $directory = dirname($url); - if ($directory == '.') { - $directory = ''; - } - $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { - $basedir .= '/'; - } - if (strlen($directory) > 1 && substr($directory, -1) != '/') { - $directory .= '/'; - } - if ($this->addEmbeddedImage( - $basedir . $directory . $filename, - $cid, - $filename, - 'base64', - self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION)) - ) - ) { - $message = preg_replace( - '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', - $images[1][$imgindex] . '="cid:' . $cid . '"', - $message - ); - } - } - } - } - $this->isHTML(true); - // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better - $this->Body = $this->normalizeBreaks($message); - $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); - if (empty($this->AltBody)) { - $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . - self::CRLF . self::CRLF; - } - return $this->Body; - } - - /** - * Convert an HTML string into plain text. - * This is used by msgHTML(). - * Note - older versions of this function used a bundled advanced converter - * which was been removed for license reasons in #232 - * Example usage: - * - * // Use default conversion - * $plain = $mail->html2text($html); - * // Use your own custom converter - * $plain = $mail->html2text($html, function($html) { - * $converter = new MyHtml2text($html); - * return $converter->get_text(); - * }); - * - * @param string $html The HTML text to convert - * @param boolean|callable $advanced Any boolean value to use the internal converter, - * or provide your own callable for custom conversion. - * @return string - */ - public function html2text($html, $advanced = false) - { - if (is_callable($advanced)) { - return call_user_func($advanced, $html); - } - return html_entity_decode( - trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), - ENT_QUOTES, - $this->CharSet - ); - } - - /** - * Get the MIME type for a file extension. - * @param string $ext File extension - * @access public - * @return string MIME type of file. - * @static - */ - public static function _mime_types($ext = '') - { - $mimes = array( - 'xl' => 'application/excel', - 'js' => 'application/javascript', - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'bin' => 'application/macbinary', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', - 'class' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'dms' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php3' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mpga' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'eml' => 'message/rfc822', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', - 'shtml' => 'text/html', - 'log' => 'text/plain', - 'text' => 'text/plain', - 'txt' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'vcf' => 'text/vcard', - 'vcard' => 'text/vcard', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mov' => 'video/quicktime', - 'qt' => 'video/quicktime', - 'rv' => 'video/vnd.rn-realvideo', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie' - ); - if (array_key_exists(strtolower($ext), $mimes)) { - return $mimes[strtolower($ext)]; - } - return 'application/octet-stream'; - } - - /** - * Map a file name to a MIME type. - * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. - * @param string $filename A file name or full path, does not need to exist as a file - * @return string - * @static - */ - public static function filenameToType($filename) - { - // In case the path is a URL, strip any query string before getting extension - $qpos = strpos($filename, '?'); - if (false !== $qpos) { - $filename = substr($filename, 0, $qpos); - } - $pathinfo = self::mb_pathinfo($filename); - return self::_mime_types($pathinfo['extension']); - } - - /** - * Multi-byte-safe pathinfo replacement. - * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. - * Works similarly to the one in PHP >= 5.2.0 - * @link http://www.php.net/manual/en/function.pathinfo.php#107461 - * @param string $path A filename or path, does not need to exist as a file - * @param integer|string $options Either a PATHINFO_* constant, - * or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 - * @return string|array - * @static - */ - public static function mb_pathinfo($path, $options = null) - { - $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''); - $pathinfo = array(); - if (preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo)) { - if (array_key_exists(1, $pathinfo)) { - $ret['dirname'] = $pathinfo[1]; - } - if (array_key_exists(2, $pathinfo)) { - $ret['basename'] = $pathinfo[2]; - } - if (array_key_exists(5, $pathinfo)) { - $ret['extension'] = $pathinfo[5]; - } - if (array_key_exists(3, $pathinfo)) { - $ret['filename'] = $pathinfo[3]; - } - } - switch ($options) { - case PATHINFO_DIRNAME: - case 'dirname': - return $ret['dirname']; - case PATHINFO_BASENAME: - case 'basename': - return $ret['basename']; - case PATHINFO_EXTENSION: - case 'extension': - return $ret['extension']; - case PATHINFO_FILENAME: - case 'filename': - return $ret['filename']; - default: - return $ret; - } - } - - /** - * Set or reset instance properties. - * You should avoid this function - it's more verbose, less efficient, more error-prone and - * harder to debug than setting properties directly. - * Usage Example: - * `$mail->set('SMTPSecure', 'tls');` - * is the same as: - * `$mail->SMTPSecure = 'tls';` - * @access public - * @param string $name The property name to set - * @param mixed $value The value to set the property to - * @return boolean - * @TODO Should this not be using the __set() magic function? - */ - public function set($name, $value = '') - { - if (property_exists($this, $name)) { - $this->$name = $value; - return true; - } else { - $this->setError($this->lang('variable_set') . $name); - return false; - } - } - - /** - * Strip newlines to prevent header injection. - * @access public - * @param string $str - * @return string - */ - public function secureHeader($str) - { - return trim(str_replace(array("\r", "\n"), '', $str)); - } - - /** - * Normalize line breaks in a string. - * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. - * Defaults to CRLF (for message bodies) and preserves consecutive breaks. - * @param string $text - * @param string $breaktype What kind of line break to use, defaults to CRLF - * @return string - * @access public - * @static - */ - public static function normalizeBreaks($text, $breaktype = "\r\n") - { - return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); - } - - /** - * Set the public and private key files and password for S/MIME signing. - * @access public - * @param string $cert_filename - * @param string $key_filename - * @param string $key_pass Password for private key - * @param string $extracerts_filename Optional path to chain certificate - */ - public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') - { - $this->sign_cert_file = $cert_filename; - $this->sign_key_file = $key_filename; - $this->sign_key_pass = $key_pass; - $this->sign_extracerts_file = $extracerts_filename; - } - - /** - * Quoted-Printable-encode a DKIM header. - * @access public - * @param string $txt - * @return string - */ - public function DKIM_QP($txt) - { - $line = ''; - for ($i = 0; $i < strlen($txt); $i++) { - $ord = ord($txt[$i]); - if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { - $line .= $txt[$i]; - } else { - $line .= '=' . sprintf('%02X', $ord); - } - } - return $line; - } - - /** - * Generate a DKIM signature. - * @access public - * @param string $signHeader - * @throws phpmailerException - * @return string - */ - public function DKIM_Sign($signHeader) - { - if (!defined('PKCS7_TEXT')) { - if ($this->exceptions) { - throw new phpmailerException($this->lang('extension_missing') . 'openssl'); - } - return ''; - } - $privKeyStr = file_get_contents($this->DKIM_private); - if ($this->DKIM_passphrase != '') { - $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); - } else { - $privKey = $privKeyStr; - } - if (openssl_sign($signHeader, $signature, $privKey)) { - return base64_encode($signature); - } - return ''; - } - - /** - * Generate a DKIM canonicalization header. - * @access public - * @param string $signHeader Header - * @return string - */ - public function DKIM_HeaderC($signHeader) - { - $signHeader = preg_replace('/\r\n\s+/', ' ', $signHeader); - $lines = explode("\r\n", $signHeader); - foreach ($lines as $key => $line) { - list($heading, $value) = explode(':', $line, 2); - $heading = strtolower($heading); - $value = preg_replace('/\s+/', ' ', $value); // Compress useless spaces - $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value - } - $signHeader = implode("\r\n", $lines); - return $signHeader; - } - - /** - * Generate a DKIM canonicalization body. - * @access public - * @param string $body Message Body - * @return string - */ - public function DKIM_BodyC($body) - { - if ($body == '') { - return "\r\n"; - } - // stabilize line endings - $body = str_replace("\r\n", "\n", $body); - $body = str_replace("\n", "\r\n", $body); - // END stabilize line endings - while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { - $body = substr($body, 0, strlen($body) - 2); - } - return $body; - } - - /** - * Create the DKIM header and body in a new message header. - * @access public - * @param string $headers_line Header lines - * @param string $subject Subject - * @param string $body Body - * @return string - */ - public function DKIM_Add($headers_line, $subject, $body) - { - $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms - $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body - $DKIMquery = 'dns/txt'; // Query method - $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) - $subject_header = "Subject: $subject"; - $headers = explode($this->LE, $headers_line); - $from_header = ''; - $to_header = ''; - $current = ''; - foreach ($headers as $header) { - if (strpos($header, 'From:') === 0) { - $from_header = $header; - $current = 'from_header'; - } elseif (strpos($header, 'To:') === 0) { - $to_header = $header; - $current = 'to_header'; - } else { - if (!empty($$current) && strpos($header, ' =?') === 0) { - $$current .= $header; - } else { - $current = ''; - } - } - } - $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); - $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); - $subject = str_replace( - '|', - '=7C', - $this->DKIM_QP($subject_header) - ); // Copied header fields (dkim-quoted-printable) - $body = $this->DKIM_BodyC($body); - $DKIMlen = strlen($body); // Length of body - $DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1 hash of body - if ('' == $this->DKIM_identity) { - $ident = ''; - } else { - $ident = ' i=' . $this->DKIM_identity . ';'; - } - $dkimhdrs = 'DKIM-Signature: v=1; a=' . - $DKIMsignatureType . '; q=' . - $DKIMquery . '; l=' . - $DKIMlen . '; s=' . - $this->DKIM_selector . - ";\r\n" . - "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . - "\th=From:To:Subject;\r\n" . - "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . - "\tz=$from\r\n" . - "\t|$to\r\n" . - "\t|$subject;\r\n" . - "\tbh=" . $DKIMb64 . ";\r\n" . - "\tb="; - $toSign = $this->DKIM_HeaderC( - $from_header . "\r\n" . - $to_header . "\r\n" . - $subject_header . "\r\n" . - $dkimhdrs - ); - $signed = $this->DKIM_Sign($toSign); - return $dkimhdrs . $signed . "\r\n"; - } - - /** - * Detect if a string contains a line longer than the maximum line length allowed. - * @param string $str - * @return boolean - * @static - */ - public static function hasLineLongerThanMax($str) - { - //+2 to include CRLF line break for a 1000 total - return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str); - } - - /** - * Allows for public read access to 'to' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getToAddresses() - { - return $this->to; - } - - /** - * Allows for public read access to 'cc' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getCcAddresses() - { - return $this->cc; - } - - /** - * Allows for public read access to 'bcc' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getBccAddresses() - { - return $this->bcc; - } - - /** - * Allows for public read access to 'ReplyTo' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getReplyToAddresses() - { - return $this->ReplyTo; - } - - /** - * Allows for public read access to 'all_recipients' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getAllRecipientAddresses() - { - return $this->all_recipients; - } - - /** - * Perform a callback. - * @param boolean $isSent - * @param array $to - * @param array $cc - * @param array $bcc - * @param string $subject - * @param string $body - * @param string $from - */ - protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) - { - if (!empty($this->action_function) && is_callable($this->action_function)) { - $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); - call_user_func_array($this->action_function, $params); - } - } -} - -/** - * PHPMailer exception handler - * @package PHPMailer - */ -class phpmailerException extends Exception -{ - /** - * Prettify error message output - * @return string - */ - public function errorMessage() - { - $errorMsg = '' . $this->getMessage() . "
\n"; - return $errorMsg; - } -} diff --git a/_sakura/vendor/phpmailer/phpmailer/class.phpmaileroauth.php b/_sakura/vendor/phpmailer/phpmailer/class.phpmaileroauth.php deleted file mode 100644 index f9cd7b4..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/class.phpmaileroauth.php +++ /dev/null @@ -1,196 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailerOAuth - PHPMailer subclass adding OAuth support. - * @package PHPMailer - * @author @sherryl4george - * @author Marcus Bointon (@Synchro) - */ -class PHPMailerOAuth extends PHPMailer -{ - /** - * The OAuth user's email address - * @var string - */ - public $oauthUserEmail = ''; - - /** - * The OAuth refresh token - * @var string - */ - public $oauthRefreshToken = ''; - - /** - * The OAuth client ID - * @var string - */ - public $oauthClientId = ''; - - /** - * The OAuth client secret - * @var string - */ - public $oauthClientSecret = ''; - - /** - * An instance of the PHPMailerOAuthGoogle class. - * @var PHPMailerOAuthGoogle - * @access protected - */ - protected $oauth = null; - - /** - * Get a PHPMailerOAuthGoogle instance to use. - * @return PHPMailerOAuthGoogle - */ - public function getOAUTHInstance() - { - if (!is_object($this->oauth)) { - $this->oauth = new PHPMailerOAuthGoogle( - $this->oauthUserEmail, - $this->oauthClientSecret, - $this->oauthClientId, - $this->oauthRefreshToken - ); - } - return $this->oauth; - } - - /** - * Initiate a connection to an SMTP server. - * Overrides the original smtpConnect method to add support for OAuth. - * @param array $options An array of options compatible with stream_context_create() - * @uses SMTP - * @access public - * @return bool - */ - public function smtpConnect($options = array()) - { - if (is_null($this->smtp)) { - $this->smtp = $this->getSMTPInstance(); - } - - if (is_null($this->oauth)) { - $this->oauth = $this->getOAUTHInstance(); - } - - // Already connected? - if ($this->smtp->connected()) { - return true; - } - - $this->smtp->setTimeout($this->Timeout); - $this->smtp->setDebugLevel($this->SMTPDebug); - $this->smtp->setDebugOutput($this->Debugoutput); - $this->smtp->setVerp($this->do_verp); - $hosts = explode(';', $this->Host); - $lastexception = null; - - foreach ($hosts as $hostentry) { - $hostinfo = array(); - if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { - // Not a valid host entry - continue; - } - // $hostinfo[2]: optional ssl or tls prefix - // $hostinfo[3]: the hostname - // $hostinfo[4]: optional port number - // The host string prefix can temporarily override the current setting for SMTPSecure - // If it's not specified, the default value is used - $prefix = ''; - $secure = $this->SMTPSecure; - $tls = ($this->SMTPSecure == 'tls'); - if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { - $prefix = 'ssl://'; - $tls = false; // Can't have SSL and TLS at the same time - $secure = 'ssl'; - } elseif ($hostinfo[2] == 'tls') { - $tls = true; - // tls doesn't use a prefix - $secure = 'tls'; - } - //Do we need the OpenSSL extension? - $sslext = defined('OPENSSL_ALGO_SHA1'); - if ('tls' === $secure or 'ssl' === $secure) { - //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled - if (!$sslext) { - throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); - } - } - $host = $hostinfo[3]; - $port = $this->Port; - $tport = (integer)$hostinfo[4]; - if ($tport > 0 and $tport < 65536) { - $port = $tport; - } - if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { - try { - if ($this->Helo) { - $hello = $this->Helo; - } else { - $hello = $this->serverHostname(); - } - $this->smtp->hello($hello); - //Automatically enable TLS encryption if: - // * it's not disabled - // * we have openssl extension - // * we are not already using SSL - // * the server offers STARTTLS - if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { - $tls = true; - } - if ($tls) { - if (!$this->smtp->startTLS()) { - throw new phpmailerException($this->lang('connect_host')); - } - // We must resend HELO after tls negotiation - $this->smtp->hello($hello); - } - if ($this->SMTPAuth) { - if (!$this->smtp->authenticate( - $this->Username, - $this->Password, - $this->AuthType, - $this->Realm, - $this->Workstation, - $this->oauth - ) - ) { - throw new phpmailerException($this->lang('authenticate')); - } - } - return true; - } catch (phpmailerException $exc) { - $lastexception = $exc; - $this->edebug($exc->getMessage()); - // We must have connected, but then failed TLS or Auth, so close connection nicely - $this->smtp->quit(); - } - } - } - // If we get here, all connection attempts have failed, so close connection hard - $this->smtp->close(); - // As we've caught all exceptions, just report whatever the last one was - if ($this->exceptions and !is_null($lastexception)) { - throw $lastexception; - } - return false; - } -} diff --git a/_sakura/vendor/phpmailer/phpmailer/class.phpmaileroauthgoogle.php b/_sakura/vendor/phpmailer/phpmailer/class.phpmaileroauthgoogle.php deleted file mode 100644 index ab6292b..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/class.phpmaileroauthgoogle.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailerOAuthGoogle - Wrapper for League OAuth2 Google provider. - * @package PHPMailer - * @author @sherryl4george - * @author Marcus Bointon (@Synchro) - * @link https://github.com/thephpleague/oauth2-client - */ -class PHPMailerOAuthGoogle -{ - private $oauthUserEmail = ''; - private $oauthRefreshToken = ''; - private $oauthClientId = ''; - private $oauthClientSecret = ''; - - /** - * @param string $UserEmail - * @param string $ClientSecret - * @param string $ClientId - * @param string $RefreshToken - */ - public function __construct( - $UserEmail, - $ClientSecret, - $ClientId, - $RefreshToken - ) { - $this->oauthClientId = $ClientId; - $this->oauthClientSecret = $ClientSecret; - $this->oauthRefreshToken = $RefreshToken; - $this->oauthUserEmail = $UserEmail; - } - - private function getProvider() { - return new League\OAuth2\Client\Provider\Google([ - 'clientId' => $this->oauthClientId, - 'clientSecret' => $this->oauthClientSecret - ]); - } - - private function getGrant() - { - return new \League\OAuth2\Client\Grant\RefreshToken(); - } - - private function getToken() - { - $provider = $this->getProvider(); - $grant = $this->getGrant(); - return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]); - } - - public function getOauth64() - { - $token = $this->getToken(); - return base64_encode("user=" . $this->oauthUserEmail . "\001auth=Bearer " . $token . "\001\001"); - } -} diff --git a/_sakura/vendor/phpmailer/phpmailer/class.pop3.php b/_sakura/vendor/phpmailer/phpmailer/class.pop3.php deleted file mode 100644 index 403b573..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/class.pop3.php +++ /dev/null @@ -1,407 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer POP-Before-SMTP Authentication Class. - * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. - * Does not support APOP. - * @package PHPMailer - * @author Richard Davey (original author) - * @author Marcus Bointon (Synchro/coolbru) - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - */ -class POP3 -{ - /** - * The POP3 PHPMailer Version number. - * @var string - * @access public - */ - public $Version = '5.2.14'; - - /** - * Default POP3 port number. - * @var integer - * @access public - */ - public $POP3_PORT = 110; - - /** - * Default timeout in seconds. - * @var integer - * @access public - */ - public $POP3_TIMEOUT = 30; - - /** - * POP3 Carriage Return + Line Feed. - * @var string - * @access public - * @deprecated Use the constant instead - */ - public $CRLF = "\r\n"; - - /** - * Debug display level. - * Options: 0 = no, 1+ = yes - * @var integer - * @access public - */ - public $do_debug = 0; - - /** - * POP3 mail server hostname. - * @var string - * @access public - */ - public $host; - - /** - * POP3 port number. - * @var integer - * @access public - */ - public $port; - - /** - * POP3 Timeout Value in seconds. - * @var integer - * @access public - */ - public $tval; - - /** - * POP3 username - * @var string - * @access public - */ - public $username; - - /** - * POP3 password. - * @var string - * @access public - */ - public $password; - - /** - * Resource handle for the POP3 connection socket. - * @var resource - * @access protected - */ - protected $pop_conn; - - /** - * Are we connected? - * @var boolean - * @access protected - */ - protected $connected = false; - - /** - * Error container. - * @var array - * @access protected - */ - protected $errors = array(); - - /** - * Line break constant - */ - const CRLF = "\r\n"; - - /** - * Simple static wrapper for all-in-one POP before SMTP - * @param $host - * @param integer|boolean $port The port number to connect to - * @param integer|boolean $timeout The timeout value - * @param string $username - * @param string $password - * @param integer $debug_level - * @return boolean - */ - public static function popBeforeSmtp( - $host, - $port = false, - $timeout = false, - $username = '', - $password = '', - $debug_level = 0 - ) { - $pop = new POP3; - return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); - } - - /** - * Authenticate with a POP3 server. - * A connect, login, disconnect sequence - * appropriate for POP-before SMTP authorisation. - * @access public - * @param string $host The hostname to connect to - * @param integer|boolean $port The port number to connect to - * @param integer|boolean $timeout The timeout value - * @param string $username - * @param string $password - * @param integer $debug_level - * @return boolean - */ - public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) - { - $this->host = $host; - // If no port value provided, use default - if (false === $port) { - $this->port = $this->POP3_PORT; - } else { - $this->port = (integer)$port; - } - // If no timeout value provided, use default - if (false === $timeout) { - $this->tval = $this->POP3_TIMEOUT; - } else { - $this->tval = (integer)$timeout; - } - $this->do_debug = $debug_level; - $this->username = $username; - $this->password = $password; - // Reset the error log - $this->errors = array(); - // connect - $result = $this->connect($this->host, $this->port, $this->tval); - if ($result) { - $login_result = $this->login($this->username, $this->password); - if ($login_result) { - $this->disconnect(); - return true; - } - } - // We need to disconnect regardless of whether the login succeeded - $this->disconnect(); - return false; - } - - /** - * Connect to a POP3 server. - * @access public - * @param string $host - * @param integer|boolean $port - * @param integer $tval - * @return boolean - */ - public function connect($host, $port = false, $tval = 30) - { - // Are we already connected? - if ($this->connected) { - return true; - } - - //On Windows this will raise a PHP Warning error if the hostname doesn't exist. - //Rather than suppress it with @fsockopen, capture it cleanly instead - set_error_handler(array($this, 'catchWarning')); - - if (false === $port) { - $port = $this->POP3_PORT; - } - - // connect to the POP3 server - $this->pop_conn = fsockopen( - $host, // POP3 Host - $port, // Port # - $errno, // Error Number - $errstr, // Error Message - $tval - ); // Timeout (seconds) - // Restore the error handler - restore_error_handler(); - - // Did we connect? - if (false === $this->pop_conn) { - // It would appear not... - $this->setError(array( - 'error' => "Failed to connect to server $host on port $port", - 'errno' => $errno, - 'errstr' => $errstr - )); - return false; - } - - // Increase the stream time-out - stream_set_timeout($this->pop_conn, $tval, 0); - - // Get the POP3 server response - $pop3_response = $this->getResponse(); - // Check for the +OK - if ($this->checkResponse($pop3_response)) { - // The connection is established and the POP3 server is talking - $this->connected = true; - return true; - } - return false; - } - - /** - * Log in to the POP3 server. - * Does not support APOP (RFC 2828, 4949). - * @access public - * @param string $username - * @param string $password - * @return boolean - */ - public function login($username = '', $password = '') - { - if (!$this->connected) { - $this->setError('Not connected to POP3 server'); - } - if (empty($username)) { - $username = $this->username; - } - if (empty($password)) { - $password = $this->password; - } - - // Send the Username - $this->sendString("USER $username" . self::CRLF); - $pop3_response = $this->getResponse(); - if ($this->checkResponse($pop3_response)) { - // Send the Password - $this->sendString("PASS $password" . self::CRLF); - $pop3_response = $this->getResponse(); - if ($this->checkResponse($pop3_response)) { - return true; - } - } - return false; - } - - /** - * Disconnect from the POP3 server. - * @access public - */ - public function disconnect() - { - $this->sendString('QUIT'); - //The QUIT command may cause the daemon to exit, which will kill our connection - //So ignore errors here - try { - @fclose($this->pop_conn); - } catch (Exception $e) { - //Do nothing - }; - } - - /** - * Get a response from the POP3 server. - * $size is the maximum number of bytes to retrieve - * @param integer $size - * @return string - * @access protected - */ - protected function getResponse($size = 128) - { - $response = fgets($this->pop_conn, $size); - if ($this->do_debug >= 1) { - echo "Server -> Client: $response"; - } - return $response; - } - - /** - * Send raw data to the POP3 server. - * @param string $string - * @return integer - * @access protected - */ - protected function sendString($string) - { - if ($this->pop_conn) { - if ($this->do_debug >= 2) { //Show client messages when debug >= 2 - echo "Client -> Server: $string"; - } - return fwrite($this->pop_conn, $string, strlen($string)); - } - return 0; - } - - /** - * Checks the POP3 server response. - * Looks for for +OK or -ERR. - * @param string $string - * @return boolean - * @access protected - */ - protected function checkResponse($string) - { - if (substr($string, 0, 3) !== '+OK') { - $this->setError(array( - 'error' => "Server reported an error: $string", - 'errno' => 0, - 'errstr' => '' - )); - return false; - } else { - return true; - } - } - - /** - * Add an error to the internal error store. - * Also display debug output if it's enabled. - * @param $error - * @access protected - */ - protected function setError($error) - { - $this->errors[] = $error; - if ($this->do_debug >= 1) { - echo '
';
-            foreach ($this->errors as $error) {
-                print_r($error);
-            }
-            echo '
'; - } - } - - /** - * Get an array of error messages, if any. - * @return array - */ - public function getErrors() - { - return $this->errors; - } - - /** - * POP3 connection error handler. - * @param integer $errno - * @param string $errstr - * @param string $errfile - * @param integer $errline - * @access protected - */ - protected function catchWarning($errno, $errstr, $errfile, $errline) - { - $this->setError(array( - 'error' => "Connecting to the POP3 server raised a PHP warning: ", - 'errno' => $errno, - 'errstr' => $errstr, - 'errfile' => $errfile, - 'errline' => $errline - )); - } -} diff --git a/_sakura/vendor/phpmailer/phpmailer/class.smtp.php b/_sakura/vendor/phpmailer/phpmailer/class.smtp.php deleted file mode 100644 index 2e32e2f..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/class.smtp.php +++ /dev/null @@ -1,1181 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer RFC821 SMTP email transport class. - * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. - * @package PHPMailer - * @author Chris Ryan - * @author Marcus Bointon - */ -class SMTP -{ - /** - * The PHPMailer SMTP version number. - * @var string - */ - const VERSION = '5.2.14'; - - /** - * SMTP line break constant. - * @var string - */ - const CRLF = "\r\n"; - - /** - * The SMTP port to use if one is not specified. - * @var integer - */ - const DEFAULT_SMTP_PORT = 25; - - /** - * The maximum line length allowed by RFC 2822 section 2.1.1 - * @var integer - */ - const MAX_LINE_LENGTH = 998; - - /** - * Debug level for no output - */ - const DEBUG_OFF = 0; - - /** - * Debug level to show client -> server messages - */ - const DEBUG_CLIENT = 1; - - /** - * Debug level to show client -> server and server -> client messages - */ - const DEBUG_SERVER = 2; - - /** - * Debug level to show connection status, client -> server and server -> client messages - */ - const DEBUG_CONNECTION = 3; - - /** - * Debug level to show all messages - */ - const DEBUG_LOWLEVEL = 4; - - /** - * The PHPMailer SMTP Version number. - * @var string - * @deprecated Use the `VERSION` constant instead - * @see SMTP::VERSION - */ - public $Version = '5.2.14'; - - /** - * SMTP server port number. - * @var integer - * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead - * @see SMTP::DEFAULT_SMTP_PORT - */ - public $SMTP_PORT = 25; - - /** - * SMTP reply line ending. - * @var string - * @deprecated Use the `CRLF` constant instead - * @see SMTP::CRLF - */ - public $CRLF = "\r\n"; - - /** - * Debug output level. - * Options: - * * self::DEBUG_OFF (`0`) No debug output, default - * * self::DEBUG_CLIENT (`1`) Client commands - * * self::DEBUG_SERVER (`2`) Client commands and server responses - * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status - * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages - * @var integer - */ - public $do_debug = self::DEBUG_OFF; - - /** - * How to handle debug output. - * Options: - * * `echo` Output plain-text as-is, appropriate for CLI - * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output - * * `error_log` Output to error log as configured in php.ini - * - * Alternatively, you can provide a callable expecting two params: a message string and the debug level: - * - * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; - * - * @var string|callable - */ - public $Debugoutput = 'echo'; - - /** - * Whether to use VERP. - * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path - * @link http://www.postfix.org/VERP_README.html Info on VERP - * @var boolean - */ - public $do_verp = false; - - /** - * The timeout value for connection, in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. - * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 - * @var integer - */ - public $Timeout = 300; - - /** - * How long to wait for commands to complete, in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @var integer - */ - public $Timelimit = 300; - - /** - * The socket for the server connection. - * @var resource - */ - protected $smtp_conn; - - /** - * Error information, if any, for the last SMTP command. - * @var array - */ - protected $error = array( - 'error' => '', - 'detail' => '', - 'smtp_code' => '', - 'smtp_code_ex' => '' - ); - - /** - * The reply the server sent to us for HELO. - * If null, no HELO string has yet been received. - * @var string|null - */ - protected $helo_rply = null; - - /** - * The set of SMTP extensions sent in reply to EHLO command. - * Indexes of the array are extension names. - * Value at index 'HELO' or 'EHLO' (according to command that was sent) - * represents the server name. In case of HELO it is the only element of the array. - * Other values can be boolean TRUE or an array containing extension options. - * If null, no HELO/EHLO string has yet been received. - * @var array|null - */ - protected $server_caps = null; - - /** - * The most recent reply received from the server. - * @var string - */ - protected $last_reply = ''; - - /** - * Output debugging info via a user-selected method. - * @see SMTP::$Debugoutput - * @see SMTP::$do_debug - * @param string $str Debug string to output - * @param integer $level The debug level of this message; see DEBUG_* constants - * @return void - */ - protected function edebug($str, $level = 0) - { - if ($level > $this->do_debug) { - return; - } - //Avoid clash with built-in function names - if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { - call_user_func($this->Debugoutput, $str, $this->do_debug); - return; - } - switch ($this->Debugoutput) { - case 'error_log': - //Don't output, just log - error_log($str); - break; - case 'html': - //Cleans up output a bit for a better looking, HTML-safe output - echo htmlentities( - preg_replace('/[\r\n]+/', '', $str), - ENT_QUOTES, - 'UTF-8' - ) - . "
\n"; - break; - case 'echo': - default: - //Normalize line breaks - $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - )."\n"; - } - } - - /** - * Connect to an SMTP server. - * @param string $host SMTP server IP or host name - * @param integer $port The port number to connect to - * @param integer $timeout How long to wait for the connection to open - * @param array $options An array of options for stream_context_create() - * @access public - * @return boolean - */ - public function connect($host, $port = null, $timeout = 30, $options = array()) - { - static $streamok; - //This is enabled by default since 5.0.0 but some providers disable it - //Check this once and cache the result - if (is_null($streamok)) { - $streamok = function_exists('stream_socket_client'); - } - // Clear errors to avoid confusion - $this->setError(''); - // Make sure we are __not__ connected - if ($this->connected()) { - // Already connected, generate error - $this->setError('Already connected to a server'); - return false; - } - if (empty($port)) { - $port = self::DEFAULT_SMTP_PORT; - } - // Connect to the SMTP server - $this->edebug( - "Connection: opening to $host:$port, timeout=$timeout, options=".var_export($options, true), - self::DEBUG_CONNECTION - ); - $errno = 0; - $errstr = ''; - if ($streamok) { - $socket_context = stream_context_create($options); - //Suppress errors; connection failures are handled at a higher level - $this->smtp_conn = @stream_socket_client( - $host . ":" . $port, - $errno, - $errstr, - $timeout, - STREAM_CLIENT_CONNECT, - $socket_context - ); - } else { - //Fall back to fsockopen which should work in more places, but is missing some features - $this->edebug( - "Connection: stream_socket_client not available, falling back to fsockopen", - self::DEBUG_CONNECTION - ); - $this->smtp_conn = fsockopen( - $host, - $port, - $errno, - $errstr, - $timeout - ); - } - // Verify we connected properly - if (!is_resource($this->smtp_conn)) { - $this->setError( - 'Failed to connect to server', - $errno, - $errstr - ); - $this->edebug( - 'SMTP ERROR: ' . $this->error['error'] - . ": $errstr ($errno)", - self::DEBUG_CLIENT - ); - return false; - } - $this->edebug('Connection: opened', self::DEBUG_CONNECTION); - // SMTP server can take longer to respond, give longer timeout for first read - // Windows does not have support for this timeout function - if (substr(PHP_OS, 0, 3) != 'WIN') { - $max = ini_get('max_execution_time'); - // Don't bother if unlimited - if ($max != 0 && $timeout > $max) { - @set_time_limit($timeout); - } - stream_set_timeout($this->smtp_conn, $timeout, 0); - } - // Get any announcement - $announce = $this->get_lines(); - $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); - return true; - } - - /** - * Initiate a TLS (encrypted) session. - * @access public - * @return boolean - */ - public function startTLS() - { - if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { - return false; - } - // Begin encrypted connection - if (!stream_socket_enable_crypto( - $this->smtp_conn, - true, - STREAM_CRYPTO_METHOD_TLS_CLIENT - )) { - return false; - } - return true; - } - - /** - * Perform SMTP authentication. - * Must be run after hello(). - * @see hello() - * @param string $username The user name - * @param string $password The password - * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2) - * @param string $realm The auth realm for NTLM - * @param string $workstation The auth workstation for NTLM - * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) - * @return bool True if successfully authenticated.* @access public - */ - public function authenticate( - $username, - $password, - $authtype = null, - $realm = '', - $workstation = '', - $OAuth = null - ) { - if (!$this->server_caps) { - $this->setError('Authentication is not allowed before HELO/EHLO'); - return false; - } - - if (array_key_exists('EHLO', $this->server_caps)) { - // SMTP extensions are available. Let's try to find a proper authentication method - - if (!array_key_exists('AUTH', $this->server_caps)) { - $this->setError('Authentication is not allowed at this stage'); - // 'at this stage' means that auth may be allowed after the stage changes - // e.g. after STARTTLS - return false; - } - - self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL); - self::edebug( - 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), - self::DEBUG_LOWLEVEL - ); - - if (empty($authtype)) { - foreach (array('LOGIN', 'CRAM-MD5', 'NTLM', 'PLAIN', 'XOAUTH2') as $method) { - if (in_array($method, $this->server_caps['AUTH'])) { - $authtype = $method; - break; - } - } - if (empty($authtype)) { - $this->setError('No supported authentication methods found'); - return false; - } - self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL); - } - - if (!in_array($authtype, $this->server_caps['AUTH'])) { - $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); - return false; - } - } elseif (empty($authtype)) { - $authtype = 'LOGIN'; - } - switch ($authtype) { - case 'PLAIN': - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { - return false; - } - // Send encoded username and password - if (!$this->sendCommand( - 'User & Password', - base64_encode("\0" . $username . "\0" . $password), - 235 - ) - ) { - return false; - } - break; - case 'LOGIN': - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { - return false; - } - if (!$this->sendCommand("Username", base64_encode($username), 334)) { - return false; - } - if (!$this->sendCommand("Password", base64_encode($password), 235)) { - return false; - } - break; - case 'XOAUTH2': - //If the OAuth Instance is not set. Can be a case when PHPMailer is used - //instead of PHPMailerOAuth - if (is_null($OAuth)) { - return false; - } - $oauth = $OAuth->getOauth64(); - - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { - return false; - } - break; - case 'NTLM': - /* - * ntlm_sasl_client.php - * Bundled with Permission - * - * How to telnet in windows: - * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx - * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication - */ - require_once 'extras/ntlm_sasl_client.php'; - $temp = new stdClass; - $ntlm_client = new ntlm_sasl_client_class; - //Check that functions are available - if (!$ntlm_client->Initialize($temp)) { - $this->setError($temp->error); - $this->edebug( - 'You need to enable some modules in your php.ini file: ' - . $this->error['error'], - self::DEBUG_CLIENT - ); - return false; - } - //msg1 - $msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1 - - if (!$this->sendCommand( - 'AUTH NTLM', - 'AUTH NTLM ' . base64_encode($msg1), - 334 - ) - ) { - return false; - } - //Though 0 based, there is a white space after the 3 digit number - //msg2 - $challenge = substr($this->last_reply, 3); - $challenge = base64_decode($challenge); - $ntlm_res = $ntlm_client->NTLMResponse( - substr($challenge, 24, 8), - $password - ); - //msg3 - $msg3 = $ntlm_client->TypeMsg3( - $ntlm_res, - $username, - $realm, - $workstation - ); - // send encoded username - return $this->sendCommand('Username', base64_encode($msg3), 235); - case 'CRAM-MD5': - // Start authentication - if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { - return false; - } - // Get the challenge - $challenge = base64_decode(substr($this->last_reply, 4)); - - // Build the response - $response = $username . ' ' . $this->hmac($challenge, $password); - - // send encoded credentials - return $this->sendCommand('Username', base64_encode($response), 235); - default: - $this->setError("Authentication method \"$authtype\" is not supported"); - return false; - } - return true; - } - - /** - * Calculate an MD5 HMAC hash. - * Works like hash_hmac('md5', $data, $key) - * in case that function is not available - * @param string $data The data to hash - * @param string $key The key to hash with - * @access protected - * @return string - */ - protected function hmac($data, $key) - { - if (function_exists('hash_hmac')) { - return hash_hmac('md5', $data, $key); - } - - // The following borrowed from - // http://php.net/manual/en/function.mhash.php#27225 - - // RFC 2104 HMAC implementation for php. - // Creates an md5 HMAC. - // Eliminates the need to install mhash to compute a HMAC - // by Lance Rushing - - $bytelen = 64; // byte length for md5 - if (strlen($key) > $bytelen) { - $key = pack('H*', md5($key)); - } - $key = str_pad($key, $bytelen, chr(0x00)); - $ipad = str_pad('', $bytelen, chr(0x36)); - $opad = str_pad('', $bytelen, chr(0x5c)); - $k_ipad = $key ^ $ipad; - $k_opad = $key ^ $opad; - - return md5($k_opad . pack('H*', md5($k_ipad . $data))); - } - - /** - * Check connection state. - * @access public - * @return boolean True if connected. - */ - public function connected() - { - if (is_resource($this->smtp_conn)) { - $sock_status = stream_get_meta_data($this->smtp_conn); - if ($sock_status['eof']) { - // The socket is valid but we are not connected - $this->edebug( - 'SMTP NOTICE: EOF caught while checking if connected', - self::DEBUG_CLIENT - ); - $this->close(); - return false; - } - return true; // everything looks good - } - return false; - } - - /** - * Close the socket and clean up the state of the class. - * Don't use this function without first trying to use QUIT. - * @see quit() - * @access public - * @return void - */ - public function close() - { - $this->setError(''); - $this->server_caps = null; - $this->helo_rply = null; - if (is_resource($this->smtp_conn)) { - // close the connection and cleanup - fclose($this->smtp_conn); - $this->smtp_conn = null; //Makes for cleaner serialization - $this->edebug('Connection: closed', self::DEBUG_CONNECTION); - } - } - - /** - * Send an SMTP DATA command. - * Issues a data command and sends the msg_data to the server, - * finializing the mail transaction. $msg_data is the message - * that is to be send with the headers. Each header needs to be - * on a single line followed by a with the message headers - * and the message body being separated by and additional . - * Implements rfc 821: DATA - * @param string $msg_data Message data to send - * @access public - * @return boolean - */ - public function data($msg_data) - { - //This will use the standard timelimit - if (!$this->sendCommand('DATA', 'DATA', 354)) { - return false; - } - - /* The server is ready to accept data! - * According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF) - * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into - * smaller lines to fit within the limit. - * We will also look for lines that start with a '.' and prepend an additional '.'. - * NOTE: this does not count towards line-length limit. - */ - - // Normalize line breaks before exploding - $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data)); - - /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field - * of the first line (':' separated) does not contain a space then it _should_ be a header and we will - * process all lines before a blank line as headers. - */ - - $field = substr($lines[0], 0, strpos($lines[0], ':')); - $in_headers = false; - if (!empty($field) && strpos($field, ' ') === false) { - $in_headers = true; - } - - foreach ($lines as $line) { - $lines_out = array(); - if ($in_headers and $line == '') { - $in_headers = false; - } - //Break this line up into several smaller lines if it's too long - //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), - while (isset($line[self::MAX_LINE_LENGTH])) { - //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on - //so as to avoid breaking in the middle of a word - $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); - //Deliberately matches both false and 0 - if (!$pos) { - //No nice break found, add a hard break - $pos = self::MAX_LINE_LENGTH - 1; - $lines_out[] = substr($line, 0, $pos); - $line = substr($line, $pos); - } else { - //Break at the found point - $lines_out[] = substr($line, 0, $pos); - //Move along by the amount we dealt with - $line = substr($line, $pos + 1); - } - //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 - if ($in_headers) { - $line = "\t" . $line; - } - } - $lines_out[] = $line; - - //Send the lines to the server - foreach ($lines_out as $line_out) { - //RFC2821 section 4.5.2 - if (!empty($line_out) and $line_out[0] == '.') { - $line_out = '.' . $line_out; - } - $this->client_send($line_out . self::CRLF); - } - } - - //Message data has been sent, complete the command - //Increase timelimit for end of DATA command - $savetimelimit = $this->Timelimit; - $this->Timelimit = $this->Timelimit * 2; - $result = $this->sendCommand('DATA END', '.', 250); - //Restore timelimit - $this->Timelimit = $savetimelimit; - return $result; - } - - /** - * Send an SMTP HELO or EHLO command. - * Used to identify the sending server to the receiving server. - * This makes sure that client and server are in a known state. - * Implements RFC 821: HELO - * and RFC 2821 EHLO. - * @param string $host The host name or IP to connect to - * @access public - * @return boolean - */ - public function hello($host = '') - { - //Try extended hello first (RFC 2821) - return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); - } - - /** - * Send an SMTP HELO or EHLO command. - * Low-level implementation used by hello() - * @see hello() - * @param string $hello The HELO string - * @param string $host The hostname to say we are - * @access protected - * @return boolean - */ - protected function sendHello($hello, $host) - { - $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); - $this->helo_rply = $this->last_reply; - if ($noerror) { - $this->parseHelloFields($hello); - } else { - $this->server_caps = null; - } - return $noerror; - } - - /** - * Parse a reply to HELO/EHLO command to discover server extensions. - * In case of HELO, the only parameter that can be discovered is a server name. - * @access protected - * @param string $type - 'HELO' or 'EHLO' - */ - protected function parseHelloFields($type) - { - $this->server_caps = array(); - $lines = explode("\n", $this->last_reply); - - foreach ($lines as $n => $s) { - //First 4 chars contain response code followed by - or space - $s = trim(substr($s, 4)); - if (empty($s)) { - continue; - } - $fields = explode(' ', $s); - if (!empty($fields)) { - if (!$n) { - $name = $type; - $fields = $fields[0]; - } else { - $name = array_shift($fields); - switch ($name) { - case 'SIZE': - $fields = ($fields ? $fields[0] : 0); - break; - case 'AUTH': - if (!is_array($fields)) { - $fields = array(); - } - break; - default: - $fields = true; - } - } - $this->server_caps[$name] = $fields; - } - } - } - - /** - * Send an SMTP MAIL command. - * Starts a mail transaction from the email address specified in - * $from. Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more recipient - * commands may be called followed by a data command. - * Implements rfc 821: MAIL FROM: - * @param string $from Source address of this message - * @access public - * @return boolean - */ - public function mail($from) - { - $useVerp = ($this->do_verp ? ' XVERP' : ''); - return $this->sendCommand( - 'MAIL FROM', - 'MAIL FROM:<' . $from . '>' . $useVerp, - 250 - ); - } - - /** - * Send an SMTP QUIT command. - * Closes the socket if there is no error or the $close_on_error argument is true. - * Implements from rfc 821: QUIT - * @param boolean $close_on_error Should the connection close if an error occurs? - * @access public - * @return boolean - */ - public function quit($close_on_error = true) - { - $noerror = $this->sendCommand('QUIT', 'QUIT', 221); - $err = $this->error; //Save any error - if ($noerror or $close_on_error) { - $this->close(); - $this->error = $err; //Restore any error from the quit command - } - return $noerror; - } - - /** - * Send an SMTP RCPT command. - * Sets the TO argument to $toaddr. - * Returns true if the recipient was accepted false if it was rejected. - * Implements from rfc 821: RCPT TO: - * @param string $address The address the message is being sent to - * @access public - * @return boolean - */ - public function recipient($address) - { - return $this->sendCommand( - 'RCPT TO', - 'RCPT TO:<' . $address . '>', - array(250, 251) - ); - } - - /** - * Send an SMTP RSET command. - * Abort any transaction that is currently in progress. - * Implements rfc 821: RSET - * @access public - * @return boolean True on success. - */ - public function reset() - { - return $this->sendCommand('RSET', 'RSET', 250); - } - - /** - * Send a command to an SMTP server and check its return code. - * @param string $command The command name - not sent to the server - * @param string $commandstring The actual command to send - * @param integer|array $expect One or more expected integer success codes - * @access protected - * @return boolean True on success. - */ - protected function sendCommand($command, $commandstring, $expect) - { - if (!$this->connected()) { - $this->setError("Called $command without being connected"); - return false; - } - //Reject line breaks in all commands - if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { - $this->setError("Command '$command' contained line breaks"); - return false; - } - $this->client_send($commandstring . self::CRLF); - - $this->last_reply = $this->get_lines(); - // Fetch SMTP code and possible error code explanation - $matches = array(); - if (preg_match("/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/", $this->last_reply, $matches)) { - $code = $matches[1]; - $code_ex = (count($matches) > 2 ? $matches[2] : null); - // Cut off error code from each response line - $detail = preg_replace( - "/{$code}[ -]".($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m", - '', - $this->last_reply - ); - } else { - // Fall back to simple parsing if regex fails - $code = substr($this->last_reply, 0, 3); - $code_ex = null; - $detail = substr($this->last_reply, 4); - } - - $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); - - if (!in_array($code, (array)$expect)) { - $this->setError( - "$command command failed", - $detail, - $code, - $code_ex - ); - $this->edebug( - 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, - self::DEBUG_CLIENT - ); - return false; - } - - $this->setError(''); - return true; - } - - /** - * Send an SMTP SAML command. - * Starts a mail transaction from the email address specified in $from. - * Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more recipient - * commands may be called followed by a data command. This command - * will send the message to the users terminal if they are logged - * in and send them an email. - * Implements rfc 821: SAML FROM: - * @param string $from The address the message is from - * @access public - * @return boolean - */ - public function sendAndMail($from) - { - return $this->sendCommand('SAML', "SAML FROM:$from", 250); - } - - /** - * Send an SMTP VRFY command. - * @param string $name The name to verify - * @access public - * @return boolean - */ - public function verify($name) - { - return $this->sendCommand('VRFY', "VRFY $name", array(250, 251)); - } - - /** - * Send an SMTP NOOP command. - * Used to keep keep-alives alive, doesn't actually do anything - * @access public - * @return boolean - */ - public function noop() - { - return $this->sendCommand('NOOP', 'NOOP', 250); - } - - /** - * Send an SMTP TURN command. - * This is an optional command for SMTP that this class does not support. - * This method is here to make the RFC821 Definition complete for this class - * and _may_ be implemented in future - * Implements from rfc 821: TURN - * @access public - * @return boolean - */ - public function turn() - { - $this->setError('The SMTP TURN command is not implemented'); - $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); - return false; - } - - /** - * Send raw data to the server. - * @param string $data The data to send - * @access public - * @return integer|boolean The number of bytes sent to the server or false on error - */ - public function client_send($data) - { - $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); - return fwrite($this->smtp_conn, $data); - } - - /** - * Get the latest error. - * @access public - * @return array - */ - public function getError() - { - return $this->error; - } - - /** - * Get SMTP extensions available on the server - * @access public - * @return array|null - */ - public function getServerExtList() - { - return $this->server_caps; - } - - /** - * A multipurpose method - * The method works in three ways, dependent on argument value and current state - * 1. HELO/EHLO was not sent - returns null and set up $this->error - * 2. HELO was sent - * $name = 'HELO': returns server name - * $name = 'EHLO': returns boolean false - * $name = any string: returns null and set up $this->error - * 3. EHLO was sent - * $name = 'HELO'|'EHLO': returns server name - * $name = any string: if extension $name exists, returns boolean True - * or its options. Otherwise returns boolean False - * In other words, one can use this method to detect 3 conditions: - * - null returned: handshake was not or we don't know about ext (refer to $this->error) - * - false returned: the requested feature exactly not exists - * - positive value returned: the requested feature exists - * @param string $name Name of SMTP extension or 'HELO'|'EHLO' - * @return mixed - */ - public function getServerExt($name) - { - if (!$this->server_caps) { - $this->setError('No HELO/EHLO was sent'); - return null; - } - - // the tight logic knot ;) - if (!array_key_exists($name, $this->server_caps)) { - if ($name == 'HELO') { - return $this->server_caps['EHLO']; - } - if ($name == 'EHLO' || array_key_exists('EHLO', $this->server_caps)) { - return false; - } - $this->setError('HELO handshake was used. Client knows nothing about server extensions'); - return null; - } - - return $this->server_caps[$name]; - } - - /** - * Get the last reply from the server. - * @access public - * @return string - */ - public function getLastReply() - { - return $this->last_reply; - } - - /** - * Read the SMTP server's response. - * Either before eof or socket timeout occurs on the operation. - * With SMTP we can tell if we have more lines to read if the - * 4th character is '-' symbol. If it is a space then we don't - * need to read anything else. - * @access protected - * @return string - */ - protected function get_lines() - { - // If the connection is bad, give up straight away - if (!is_resource($this->smtp_conn)) { - return ''; - } - $data = ''; - $endtime = 0; - stream_set_timeout($this->smtp_conn, $this->Timeout); - if ($this->Timelimit > 0) { - $endtime = time() + $this->Timelimit; - } - while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { - $str = @fgets($this->smtp_conn, 515); - $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL); - $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); - $data .= $str; - // If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen - if ((isset($str[3]) and $str[3] == ' ')) { - break; - } - // Timed-out? Log and break - $info = stream_get_meta_data($this->smtp_conn); - if ($info['timed_out']) { - $this->edebug( - 'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)', - self::DEBUG_LOWLEVEL - ); - break; - } - // Now check if reads took too long - if ($endtime and time() > $endtime) { - $this->edebug( - 'SMTP -> get_lines(): timelimit reached ('. - $this->Timelimit . ' sec)', - self::DEBUG_LOWLEVEL - ); - break; - } - } - return $data; - } - - /** - * Enable or disable VERP address generation. - * @param boolean $enabled - */ - public function setVerp($enabled = false) - { - $this->do_verp = $enabled; - } - - /** - * Get VERP address generation mode. - * @return boolean - */ - public function getVerp() - { - return $this->do_verp; - } - - /** - * Set error messages and codes. - * @param string $message The error message - * @param string $detail Further detail on the error - * @param string $smtp_code An associated SMTP error code - * @param string $smtp_code_ex Extended SMTP code - */ - protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') - { - $this->error = array( - 'error' => $message, - 'detail' => $detail, - 'smtp_code' => $smtp_code, - 'smtp_code_ex' => $smtp_code_ex - ); - } - - /** - * Set debug output method. - * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it. - */ - public function setDebugOutput($method = 'echo') - { - $this->Debugoutput = $method; - } - - /** - * Get debug output method. - * @return string - */ - public function getDebugOutput() - { - return $this->Debugoutput; - } - - /** - * Set debug output level. - * @param integer $level - */ - public function setDebugLevel($level = 0) - { - $this->do_debug = $level; - } - - /** - * Get debug output level. - * @return integer - */ - public function getDebugLevel() - { - return $this->do_debug; - } - - /** - * Set SMTP timeout. - * @param integer $timeout - */ - public function setTimeout($timeout = 0) - { - $this->Timeout = $timeout; - } - - /** - * Get SMTP timeout. - * @return integer - */ - public function getTimeout() - { - return $this->Timeout; - } -} diff --git a/_sakura/vendor/phpmailer/phpmailer/composer.json b/_sakura/vendor/phpmailer/phpmailer/composer.json deleted file mode 100644 index 9521a12..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "phpmailer/phpmailer", - "type": "library", - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpdocumentor/phpdocumentor": "*", - "phpunit/phpunit": "4.7.*" - }, - "suggest": { - "league/oauth2-client": "Needed for XOAUTH2 authentication", - "league/oauth2-google": "Needed for Gmail XOAUTH2" - }, - "autoload": { - "classmap": [ - "class.phpmailer.php", - "class.phpmaileroauth.php", - "class.phpmaileroauthgoogle.php", - "class.smtp.php", - "class.pop3.php", - "extras/EasyPeasyICS.php", - "extras/ntlm_sasl_client.php" - ] - }, - "license": "LGPL-2.1" -} diff --git a/_sakura/vendor/phpmailer/phpmailer/composer.lock b/_sakura/vendor/phpmailer/phpmailer/composer.lock deleted file mode 100644 index 15a841d..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/composer.lock +++ /dev/null @@ -1,3458 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "0eb36ae77d61050323a94e312176ea66", - "packages": [], - "packages-dev": [ - { - "name": "cilex/cilex", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/Cilex/Cilex.git", - "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Cilex/Cilex/zipball/7acd965a609a56d0345e8b6071c261fbdb926cb5", - "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5", - "shasum": "" - }, - "require": { - "cilex/console-service-provider": "1.*", - "php": ">=5.3.3", - "pimple/pimple": "~1.0", - "symfony/finder": "~2.1", - "symfony/process": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*", - "symfony/validator": "~2.1" - }, - "suggest": { - "monolog/monolog": ">=1.0.0", - "symfony/validator": ">=1.0.0", - "symfony/yaml": ">=1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Cilex": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "description": "The PHP micro-framework for Command line tools based on the Symfony2 Components", - "homepage": "http://cilex.github.com", - "keywords": [ - "cli", - "microframework" - ], - "time": "2014-03-29 14:03:13" - }, - { - "name": "cilex/console-service-provider", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/Cilex/console-service-provider.git", - "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/25ee3d1875243d38e1a3448ff94bdf944f70d24e", - "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "pimple/pimple": "1.*@dev", - "symfony/console": "~2.1" - }, - "require-dev": { - "cilex/cilex": "1.*@dev", - "silex/silex": "1.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Cilex\\Provider\\Console": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - }, - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "description": "Console Service Provider", - "keywords": [ - "cilex", - "console", - "pimple", - "service-provider", - "silex" - ], - "time": "2012-12-19 10:50:58" - }, - { - "name": "container-interop/container-interop", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "time": "2014-12-30 15:22:37" - }, - { - "name": "doctrine/annotations", - "version": "v1.2.7", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2015-08-31 12:32:49" - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09 13:34:57" - }, - { - "name": "erusev/parsedown", - "version": "1.5.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "0e89e3714bda18973184d30646306bb0a482bd96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/0e89e3714bda18973184d30646306bb0a482bd96", - "reference": "0e89e3714bda18973184d30646306bb0a482bd96", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2015-08-03 09:24:05" - }, - { - "name": "herrera-io/json", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-json.git", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "justinrainbow/json-schema": ">=1.0,<2.0-dev", - "php": ">=5.3.3", - "seld/jsonlint": ">=1.0,<2.0-dev" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/json_version.php" - ], - "psr-0": { - "Herrera\\Json": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" - } - ], - "description": "A library for simplifying JSON linting and validation.", - "homepage": "http://herrera-io.github.com/php-json", - "keywords": [ - "json", - "lint", - "schema", - "validate" - ], - "time": "2013-10-30 16:51:34" - }, - { - "name": "herrera-io/phar-update", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-phar-update.git", - "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", - "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", - "shasum": "" - }, - "require": { - "herrera-io/json": "1.*", - "kherge/version": "1.*", - "php": ">=5.3.3" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/constants.php" - ], - "psr-0": { - "Herrera\\Phar\\Update": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" - } - ], - "description": "A library for self-updating Phars.", - "homepage": "http://herrera-io.github.com/php-phar-update", - "keywords": [ - "phar", - "update" - ], - "time": "2013-10-30 17:23:01" - }, - { - "name": "jms/metadata", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/metadata.git", - "reference": "22b72455559a25777cfd28c4ffda81ff7639f353" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353", - "reference": "22b72455559a25777cfd28c4ffda81ff7639f353", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "doctrine/cache": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5.x-dev" - } - }, - "autoload": { - "psr-0": { - "Metadata\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache" - ], - "authors": [ - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Class/method/property metadata management in PHP", - "keywords": [ - "annotations", - "metadata", - "xml", - "yaml" - ], - "time": "2014-07-12 07:13:19" - }, - { - "name": "jms/parser-lib", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/parser-lib.git", - "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d", - "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d", - "shasum": "" - }, - "require": { - "phpoption/phpoption": ">=0.9,<2.0-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "description": "A library for easily creating recursive-descent parsers.", - "time": "2012-11-18 18:08:43" - }, - { - "name": "jms/serializer", - "version": "0.16.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/serializer.git", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "jms/metadata": "~1.1", - "jms/parser-lib": "1.*", - "php": ">=5.3.2", - "phpcollection/phpcollection": "~0.1" - }, - "require-dev": { - "doctrine/orm": "~2.1", - "doctrine/phpcr-odm": "~1.0.1", - "jackalope/jackalope-doctrine-dbal": "1.0.*", - "propel/propel1": "~1.7", - "symfony/filesystem": "2.*", - "symfony/form": "~2.1", - "symfony/translation": "~2.0", - "symfony/validator": "~2.0", - "symfony/yaml": "2.*", - "twig/twig": ">=1.8,<2.0-dev" - }, - "suggest": { - "symfony/yaml": "Required if you'd like to serialize data to YAML format." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.15-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\Serializer": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", - "homepage": "http://jmsyst.com/libs/serializer", - "keywords": [ - "deserialization", - "jaxb", - "json", - "serialization", - "xml" - ], - "time": "2014-03-18 08:39:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "1.4.4", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "8dc9b9d85ab639ca60ab4608b34c1279d6ae7bce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/8dc9b9d85ab639ca60ab4608b34c1279d6ae7bce", - "reference": "8dc9b9d85ab639ca60ab4608b34c1279d6ae7bce", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "json-schema/json-schema-test-suite": "1.1.0", - "phpdocumentor/phpdocumentor": "~2", - "phpunit/phpunit": "~3.7" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "JsonSchema": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2015-07-14 16:29:50" - }, - { - "name": "kherge/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/Version.git", - "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30", - "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "KevinGH\\Version": "src/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "me@kevingh.com", - "homepage": "http://www.kevingh.com/" - } - ], - "description": "A parsing and comparison library for semantic versioning.", - "homepage": "http://github.com/kherge/Version", - "time": "2012-08-16 17:13:03" - }, - { - "name": "monolog/monolog", - "version": "1.17.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "0524c87587ab85bc4c2d6f5b41253ccb930a5422" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/0524c87587ab85bc4c2d6f5b41253ccb930a5422", - "reference": "0524c87587ab85bc4c2d6f5b41253ccb930a5422", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "~0.11", - "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "raven/raven": "Allow sending log messages to a Sentry server", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.16.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2015-08-31 09:17:37" - }, - { - "name": "nikic/php-parser", - "version": "v0.9.5", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "autoload": { - "psr-0": { - "PHPParser": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2014-07-23 18:24:17" - }, - { - "name": "phpcollection/phpcollection", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83", - "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83", - "shasum": "" - }, - "require": { - "phpoption/phpoption": "1.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "PhpCollection": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "General-Purpose Collection Library for PHP", - "keywords": [ - "collection", - "list", - "map", - "sequence", - "set" - ], - "time": "2014-03-11 13:46:42" - }, - { - "name": "phpdocumentor/fileset", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Fileset.git", - "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Fileset/zipball/bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", - "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/finder": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Fileset component for collecting a set of files given directories and file paths", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "files", - "fileset", - "phpdoc" - ], - "time": "2013-08-06 21:07:42" - }, - { - "name": "phpdocumentor/graphviz", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/GraphViz.git", - "reference": "aa243118c8a055fc853c02802e8503c5435862f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/aa243118c8a055fc853c02802e8503c5435862f7", - "reference": "aa243118c8a055fc853c02802e8503c5435862f7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2014-07-19 06:52:59" - }, - { - "name": "phpdocumentor/phpdocumentor", - "version": "v2.8.5", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/phpDocumentor2.git", - "reference": "adfb4affa80e8cc0134616f2d2d264dd25c243eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/adfb4affa80e8cc0134616f2d2d264dd25c243eb", - "reference": "adfb4affa80e8cc0134616f2d2d264dd25c243eb", - "shasum": "" - }, - "require": { - "cilex/cilex": "~1.0", - "erusev/parsedown": "~1.0", - "herrera-io/phar-update": "1.0.3", - "jms/serializer": "~0.12", - "monolog/monolog": "~1.6", - "php": ">=5.3.3", - "phpdocumentor/fileset": "~1.0", - "phpdocumentor/graphviz": "~1.0", - "phpdocumentor/reflection": "~1.0", - "phpdocumentor/reflection-docblock": "~2.0", - "symfony/config": "~2.3", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.0", - "symfony/stopwatch": "~2.3", - "symfony/validator": "~2.2", - "twig/twig": "~1.3", - "zendframework/zend-cache": "~2.1", - "zendframework/zend-config": "~2.1", - "zendframework/zend-filter": "~2.1", - "zendframework/zend-i18n": "~2.1", - "zendframework/zend-serializer": "~2.1", - "zendframework/zend-servicemanager": "~2.1", - "zendframework/zend-stdlib": "~2.1", - "zetacomponents/document": ">=1.3.1" - }, - "require-dev": { - "behat/behat": "~3.0", - "mikey179/vfsstream": "~1.2", - "mockery/mockery": "~0.9@dev", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.4", - "symfony/expression-language": "~2.4" - }, - "suggest": { - "ext-twig": "Enabling the twig extension improves the generation of twig based templates.", - "ext-xslcache": "Enabling the XSLCache extension improves the generation of xml based templates." - }, - "bin": [ - "bin/phpdoc.php", - "bin/phpdoc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "2.9-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/" - ], - "Cilex\\Provider": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Documentation Generator for PHP", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "api", - "application", - "dga", - "documentation", - "phpdoc" - ], - "time": "2015-07-28 06:36:40" - }, - { - "name": "phpdocumentor/reflection", - "version": "1.0.7", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Reflection.git", - "reference": "fc40c3f604ac2287eb5c314174d5109b2c699372" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/fc40c3f604ac2287eb5c314174d5109b2c699372", - "reference": "fc40c3f604ac2287eb5c314174d5109b2c699372", - "shasum": "" - }, - "require": { - "nikic/php-parser": "~0.9.4", - "php": ">=5.3.3", - "phpdocumentor/reflection-docblock": "~2.0", - "psr/log": "~1.0" - }, - "require-dev": { - "behat/behat": "~2.4", - "mockery/mockery": "~0.8", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/", - "tests/mocks/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Reflection library to do Static Analysis for PHP Projects", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2014-11-14 11:43:04" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03 12:10:50" - }, - { - "name": "phpoption/phpoption", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-0": { - "PhpOption\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "time": "2015-07-25 16:39:46" - }, - { - "name": "phpspec/prophecy", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2015-08-13 10:07:40" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2d7c03c0e4e080901b8f33b2897b0577be18a13c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2d7c03c0e4e080901b8f33b2897b0577be18a13c", - "reference": "2d7c03c0e4e080901b8f33b2897b0577be18a13c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-08-04 03:42:39" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2015-06-21 13:08:43" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2015-06-21 08:01:12" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3ab72c62e550370a6cd5dc873e1a04ab57562f5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3ab72c62e550370a6cd5dc873e1a04ab57562f5b", - "reference": "3ab72c62e550370a6cd5dc873e1a04ab57562f5b", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-08-16 08:51:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.7.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9b97f9d807b862c2de2a36e86690000801c85724" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b97f9d807b862c2de2a36e86690000801c85724", - "reference": "9b97f9d807b862c2de2a36e86690000801c85724", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-07-13 11:28:34" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "5e2645ad49d196e020b85598d7c97e482725786a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a", - "reference": "5e2645ad49d196e020b85598d7c97e482725786a", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-08-19 09:14:08" - }, - { - "name": "pimple/pimple", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2013-11-22 08:30:29" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-07-26 15:48:44" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/environment", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2015-08-03 06:14:51" - }, - { - "name": "sebastian/exporter", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2015-06-21 07:55:53" - }, - { - "name": "sebastian/global-state", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2014-10-06 09:23:50" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" - }, - { - "name": "seld/jsonlint", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "time": "2015-01-04 21:18:15" - }, - { - "name": "symfony/config", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/6c905bbed1e728226de656e4c07d620dfe9e80d9", - "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" - }, - { - "name": "symfony/console", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/d6cf02fe73634c96677e428f840704bfbcaec29e", - "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2015-07-28 15:18:12" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", - "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2015-06-18 19:21:56" - }, - { - "name": "symfony/filesystem", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", - "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" - }, - { - "name": "symfony/finder", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/ae0f363277485094edc04c9f3cbe595b183b78e4", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" - }, - { - "name": "symfony/process", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/48aeb0e48600321c272955132d7606ab0a49adb3", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2015-07-01 11:25:50" - }, - { - "name": "symfony/stopwatch", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "b07a866719bbac5294c67773340f97b871733310" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/b07a866719bbac5294c67773340f97b871733310", - "reference": "b07a866719bbac5294c67773340f97b871733310", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2015-07-01 18:23:16" - }, - { - "name": "symfony/translation", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "c8dc34cc936152c609cdd722af317e4239d10dd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/c8dc34cc936152c609cdd722af317e4239d10dd6", - "reference": "c8dc34cc936152c609cdd722af317e4239d10dd6", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.7", - "symfony/intl": "~2.3", - "symfony/phpunit-bridge": "~2.7", - "symfony/yaml": "~2.2" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" - }, - { - "name": "symfony/validator", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Validator.git", - "reference": "646df03e635a8a232804274401449ccdf5f03cad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Validator/zipball/646df03e635a8a232804274401449ccdf5f03cad", - "reference": "646df03e635a8a232804274401449ccdf5f03cad", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/translation": "~2.4" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "egulias/email-validator": "~1.2,>=1.2.1", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.1", - "symfony/intl": "~2.3", - "symfony/phpunit-bridge": "~2.7", - "symfony/property-access": "~2.3", - "symfony/yaml": "~2.0,>=2.0.5" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/config": "", - "symfony/expression-language": "For using the 2.4 Expression validator", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For using the 2.4 Validator API", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Validator\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Validator Component", - "homepage": "https://symfony.com", - "time": "2015-07-31 06:49:15" - }, - { - "name": "symfony/yaml", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "71340e996171474a53f3d29111d046be4ad8a0ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/71340e996171474a53f3d29111d046be4ad8a0ff", - "reference": "71340e996171474a53f3d29111d046be4ad8a0ff", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-07-28 14:07:07" - }, - { - "name": "twig/twig", - "version": "v1.21.1", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "ca8d3aa90b6a01c82e07909fe815d6b443e75a23" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ca8d3aa90b6a01c82e07909fe815d6b443e75a23", - "reference": "ca8d3aa90b6a01c82e07909fe815d6b443e75a23", - "shasum": "" - }, - "require": { - "php": ">=5.2.7" - }, - "require-dev": { - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.21-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2015-08-26 08:58:31" - }, - { - "name": "zendframework/zend-cache", - "version": "2.5.2", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-cache.git", - "reference": "325afc68d4381cf8b95288ebb9b1d38dc32ed579" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/325afc68d4381cf8b95288ebb9b1d38dc32ed579", - "reference": "325afc68d4381cf8b95288ebb9b1d38dc32ed579", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-session": "~2.5" - }, - "suggest": { - "ext-apcu": "APCU, to use the APC storage adapter", - "ext-dba": "DBA, to use the DBA storage adapter", - "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter", - "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", - "ext-mongo": "Mongo, to use MongoDb storage adapter", - "ext-redis": "Redis, to use Redis storage adapter", - "ext-wincache": "WinCache, to use the WinCache storage adapter", - "ext-xcache": "XCache, to use the XCache storage adapter", - "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-session": "Zend\\Session component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a generic way to cache any data", - "homepage": "https://github.com/zendframework/zend-cache", - "keywords": [ - "cache", - "zf2" - ], - "time": "2015-07-16 18:44:41" - }, - { - "name": "zendframework/zend-config", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-config.git", - "reference": "ec49b1df1bdd9772df09dc2f612fbfc279bf4c27" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-config/zipball/ec49b1df1bdd9772df09dc2f612fbfc279bf4c27", - "reference": "ec49b1df1bdd9772df09dc2f612fbfc279bf4c27", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-i18n": "~2.5", - "zendframework/zend-json": "~2.5", - "zendframework/zend-mvc": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-filter": "Zend\\Filter component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", - "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Config\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a nested object property based user interface for accessing this configuration data within application code", - "homepage": "https://github.com/zendframework/zend-config", - "keywords": [ - "config", - "zf2" - ], - "time": "2015-06-03 15:32:00" - }, - { - "name": "zendframework/zend-eventmanager", - "version": "2.5.2", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "135af03d07fd048c322259aab6611d2be290475c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/135af03d07fd048c322259aab6611d2be290475c", - "reference": "135af03d07fd048c322259aab6611d2be290475c", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-eventmanager", - "keywords": [ - "eventmanager", - "zf2" - ], - "time": "2015-07-16 19:00:49" - }, - { - "name": "zendframework/zend-filter", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-filter.git", - "reference": "93e6990a198e6cdd811064083acac4693f4b29ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/93e6990a198e6cdd811064083acac4693f4b29ae", - "reference": "93e6990a198e6cdd811064083acac4693f4b29ae", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-crypt": "~2.5", - "zendframework/zend-i18n": "~2.5", - "zendframework/zend-loader": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-uri": "~2.5" - }, - "suggest": { - "zendframework/zend-crypt": "Zend\\Crypt component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Filter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a set of commonly needed data filters", - "homepage": "https://github.com/zendframework/zend-filter", - "keywords": [ - "filter", - "zf2" - ], - "time": "2015-06-03 15:32:01" - }, - { - "name": "zendframework/zend-i18n", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-i18n.git", - "reference": "509271eb7947e4aabebfc376104179cffea42696" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/509271eb7947e4aabebfc376104179cffea42696", - "reference": "509271eb7947e4aabebfc376104179cffea42696", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-cache": "~2.5", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-validator": "~2.5", - "zendframework/zend-view": "~2.5" - }, - "suggest": { - "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP", - "zendframework/zend-cache": "Zend\\Cache component", - "zendframework/zend-config": "Zend\\Config component", - "zendframework/zend-eventmanager": "You should install this package to use the events in the translator", - "zendframework/zend-filter": "You should install this package to use the provided filters", - "zendframework/zend-resources": "Translation resources", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-validator": "You should install this package to use the provided validators", - "zendframework/zend-view": "You should install this package to use the provided view helpers" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\I18n\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-i18n", - "keywords": [ - "i18n", - "zf2" - ], - "time": "2015-06-03 15:32:01" - }, - { - "name": "zendframework/zend-json", - "version": "2.5.2", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-json.git", - "reference": "4a3add6505fd8618728239d8ce35f182dfbdac02" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-json/zipball/4a3add6505fd8618728239d8ce35f182dfbdac02", - "reference": "4a3add6505fd8618728239d8ce35f182dfbdac02", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-http": "~2.5", - "zendframework/zend-server": "~2.5", - "zendframework/zendxml": "~1.0" - }, - "suggest": { - "zendframework/zend-http": "Zend\\Http component", - "zendframework/zend-server": "Zend\\Server component", - "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Json\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", - "homepage": "https://github.com/zendframework/zend-json", - "keywords": [ - "json", - "zf2" - ], - "time": "2015-08-05 14:45:17" - }, - { - "name": "zendframework/zend-math", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-math.git", - "reference": "9f02a1ac4d3374d3332c80f9215deec9c71558fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-math/zipball/9f02a1ac4d3374d3332c80f9215deec9c71558fc", - "reference": "9f02a1ac4d3374d3332c80f9215deec9c71558fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "ircmaxell/random-lib": "~1.1", - "phpunit/phpunit": "~4.0", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "ext-bcmath": "If using the bcmath functionality", - "ext-gmp": "If using the gmp functionality", - "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", - "zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Math\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-math", - "keywords": [ - "math", - "zf2" - ], - "time": "2015-06-03 15:32:02" - }, - { - "name": "zendframework/zend-serializer", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-serializer.git", - "reference": "b7208eb17dc4a4fb3a660b85e6c4af035eeed40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/b7208eb17dc4a4fb3a660b85e6c4af035eeed40c", - "reference": "b7208eb17dc4a4fb3a660b85e6c4af035eeed40c", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-json": "~2.5", - "zendframework/zend-math": "~2.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-servicemanager": "To support plugin manager support" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Serializer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", - "homepage": "https://github.com/zendframework/zend-serializer", - "keywords": [ - "serializer", - "zf2" - ], - "time": "2015-06-03 15:32:02" - }, - { - "name": "zendframework/zend-servicemanager", - "version": "2.6.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-servicemanager.git", - "reference": "1dc33f23bd0a7f4d8ba743b915fae523d356027a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/1dc33f23bd0a7f4d8ba743b915fae523d356027a", - "reference": "1dc33f23bd0a7f4d8ba743b915fae523d356027a", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "~1.0", - "php": ">=5.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-di": "~2.5", - "zendframework/zend-mvc": "~2.5" - }, - "suggest": { - "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", - "zendframework/zend-di": "Zend\\Di component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev", - "dev-develop": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-servicemanager", - "keywords": [ - "servicemanager", - "zf2" - ], - "time": "2015-07-23 21:49:08" - }, - { - "name": "zendframework/zend-stdlib", - "version": "2.6.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "a35758803fc9051ec1aff43989e679b6b451b1b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/a35758803fc9051ec1aff43989e679b6b451b1b4", - "reference": "a35758803fc9051ec1aff43989e679b6b451b1b4", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev", - "dev-develop": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-stdlib", - "keywords": [ - "stdlib", - "zf2" - ], - "time": "2015-07-21 17:08:05" - }, - { - "name": "zetacomponents/base", - "version": "1.9", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Base.git", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Base/zipball/f20df24e8de3e48b6b69b2503f917e457281e687", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687", - "shasum": "" - }, - "require-dev": { - "zetacomponents/unit-test": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sergey Alexeev" - }, - { - "name": "Sebastian Bergmann" - }, - { - "name": "Jan Borsodi" - }, - { - "name": "Raymond Bosman" - }, - { - "name": "Frederik Holljen" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Vadym Savchuk" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", - "homepage": "https://github.com/zetacomponents", - "time": "2014-09-19 03:28:34" - }, - { - "name": "zetacomponents/document", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Document.git", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "shasum": "" - }, - "require": { - "zetacomponents/base": "*" - }, - "require-dev": { - "zetacomponents/unit-test": "dev-master" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sebastian Bergmann" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.", - "homepage": "https://github.com/zetacomponents", - "time": "2013-12-19 11:40:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.0.0" - }, - "platform-dev": [] -} diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt b/_sakura/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt deleted file mode 100644 index 461ea50..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt +++ /dev/null @@ -1,17 +0,0 @@ -NEW CALLBACK FUNCTION: -====================== - -We have had requests for a method to process the results of sending emails -through PHPMailer. In this new release, we have implemented a callback -function that passes the results of each email sent (to, cc, and/or bcc). -We have provided an example that echos the results back to the screen. The -callback function can be used for any purpose. With minor modifications, the -callback function can be used to create CSV logs, post results to databases, -etc. - -Please review the test.php script for the example. - -It's pretty straight forward. - -Enjoy! -Andy diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt b/_sakura/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt deleted file mode 100644 index 2ad10f1..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt +++ /dev/null @@ -1,55 +0,0 @@ -CREATE DKIM KEYS and DNS Resource Record: -========================================= - -To create DomainKeys Identified Mail keys, visit: -http://dkim.worxware.com/ -... read the information, fill in the form, and download the ZIP file -containing the public key, private key, DNS Resource Record and instructions -to add to your DNS Zone Record, and the PHPMailer code to enable DKIM -digital signing. - -/*** PROTECT YOUR PRIVATE & PUBLIC KEYS ***/ - -You need to protect your DKIM private and public keys from being viewed or -accessed. Add protection to your .htaccess file as in this example: - -# secure htkeyprivate file - - order allow,deny - deny from all - - -# secure htkeypublic file - - order allow,deny - deny from all - - -(the actual .htaccess additions are in the ZIP file sent back to you from -http://dkim.worxware.com/ - -A few notes on using DomainKey Identified Mail (DKIM): - -You do not need to use PHPMailer to DKIM sign emails IF: -- you enable DomainKey support and add the DNS resource record -- you use your outbound mail server - -If you are a third-party emailer that works on behalf of domain owners to -send their emails from your own server: -- you absolutely have to DKIM sign outbound emails -- the domain owner has to add the DNS resource record to match the - private key, public key, selector, identity, and domain that you create -- use caution with the "selector" ... at least one "selector" will already - exist in the DNS Zone Record of the domain at the domain owner's server - you need to ensure that the "selector" you use is unique -Note: since the IP address will not match the domain owner's DNS Zone record -you can be certain that email providers that validate based on DomainKey will -check the domain owner's DNS Zone record for your DNS resource record. Before -sending out emails on behalf of domain owners, ensure they have entered the -DNS resource record you provided them. - -Enjoy! -Andy - -PS. if you need additional information about DKIM, please see: -http://www.dkim.org/info/dkim-faq.html diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt b/_sakura/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt deleted file mode 100644 index 128b2d9..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt +++ /dev/null @@ -1,17 +0,0 @@ -If you are having problems connecting or sending emails through your SMTP server, the SMTP class can provide more information about the processing/errors taking place. -Use the debug functionality of the class to see what's going on in your connections. To do that, set the debug level in your script. For example: - -$mail->SMTPDebug = 1; -$mail->isSMTP(); // telling the class to use SMTP -$mail->SMTPAuth = true; // enable SMTP authentication -$mail->Port = 26; // set the SMTP port -$mail->Host = "mail.yourhost.com"; // SMTP server -$mail->Username = "name@yourhost.com"; // SMTP account username -$mail->Password = "your password"; // SMTP account password - -Notes on this: -$mail->SMTPDebug = 0; ... will disable debugging (you can also leave this out completely, 0 is the default) -$mail->SMTPDebug = 1; ... will echo errors and server responses -$mail->SMTPDebug = 2; ... will echo errors, server responses and client messages - -And finally, don't forget to disable debugging before going into production. diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/extending.html b/_sakura/vendor/phpmailer/phpmailer/docs/extending.html deleted file mode 100644 index 4466a1d..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/extending.html +++ /dev/null @@ -1,128 +0,0 @@ - - -Examples using phpmailer - - - - -

Examples using PHPMailer

- -

1. Advanced Example

-

- -This demonstrates sending multiple email messages with binary attachments -from a MySQL database using multipart/alternative messages.

- -

-require 'PHPMailerAutoload.php';
-
-$mail = new PHPMailer();
-
-$mail->setFrom('list@example.com', 'List manager');
-$mail->Host   = 'smtp1.example.com;smtp2.example.com';
-$mail->Mailer = 'smtp';
-
-@mysqli_connect('localhost','root','password');
-@mysqli_select_db("my_company");
-$query = "SELECT full_name, email, photo FROM employee";
-$result = @mysqli_query($query);
-
-while ($row = mysqli_fetch_assoc($result))
-{
-    // HTML body
-    $body  = "Hello <font size=\"4\">" . $row['full_name'] . "</font>, <p>";
-    $body .= "<i>Your</i> personal photograph to this message.<p>";
-    $body .= "Sincerely, <br>";
-    $body .= "phpmailer List manager";
-
-    // Plain text body (for mail clients that cannot read HTML)
-    $text_body  = 'Hello ' . $row['full_name'] . ", \n\n";
-    $text_body .= "Your personal photograph to this message.\n\n";
-    $text_body .= "Sincerely, \n";
-    $text_body .= 'phpmailer List manager';
-
-    $mail->Body    = $body;
-    $mail->AltBody = $text_body;
-    $mail->addAddress($row['email'], $row['full_name']);
-    $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg');
-
-    if(!$mail->send())
-        echo "There has been a mail error sending to " . $row['email'] . "<br>";
-
-    // Clear all addresses and attachments for next loop
-    $mail->clearAddresses();
-    $mail->clearAttachments();
-}
-
-

- -

2. Extending PHPMailer

-

- -Extending classes with inheritance is one of the most -powerful features of object-oriented programming. It allows you to make changes to the -original class for your own personal use without hacking the original -classes, and it's very easy to do: - -

-Here's a class that extends the phpmailer class and sets the defaults -for the particular site:
-PHP include file: my_phpmailer.php -

- -

-require 'PHPMailerAutoload.php';
-
-class my_phpmailer extends PHPMailer {
-    // Set default variables for all new objects
-    public $From     = 'from@example.com';
-    public $FromName = 'Mailer';
-    public $Host     = 'smtp1.example.com;smtp2.example.com';
-    public $Mailer   = 'smtp';                         // Alternative to isSMTP()
-    public $WordWrap = 75;
-
-    // Replace the default debug output function
-    protected function edebug($msg) {
-        print('My Site Error');
-        print('Description:');
-        printf('%s', $msg);
-        exit;
-    }
-
-    //Extend the send function
-    public function send() {
-        $this->Subject = '[Yay for me!] '.$this->Subject;
-        return parent::send()
-    }
-
-    // Create an additional function
-    public function do_something($something) {
-        // Place your new code here
-    }
-}
-
-
-Now here's a normal PHP page in the site, which will have all the defaults set above:
- -
-require 'my_phpmailer.php';
-
-// Instantiate your new class
-$mail = new my_phpmailer;
-
-// Now you only need to add the necessary stuff
-$mail->addAddress('josh@example.com', 'Josh Adams');
-$mail->Subject = 'Here is the subject';
-$mail->Body    = 'This is the message body';
-$mail->addAttachment('c:/temp/11-10-00.zip', 'new_name.zip');  // optional name
-
-if(!$mail->send())
-{
-   echo 'There was an error sending the message';
-   exit;
-}
-
-echo 'Message was sent successfully';
-
- - diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/faq.html b/_sakura/vendor/phpmailer/phpmailer/docs/faq.html deleted file mode 100644 index 7033a14..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/faq.html +++ /dev/null @@ -1,28 +0,0 @@ - - -PHPMailer FAQ - - -

PHPMailer FAQ

-
    -
  • Q: I am concerned that using include files will take up too much - processing time on my computer. How can I make it run faster?
    - A: PHP by itself is fairly fast, but it recompiles scripts every time they are run, which takes up valuable - computer resources. You can bypass this by using an opcode cache which compiles - PHP code and store it in memory to reduce overhead immensely. APC - (Alternative PHP Cache) is a free opcode cache extension in the PECL library.
  • -
  • Q: Which mailer gives me the best performance?
    - A: On a single machine the sendmail (or Qmail) is fastest overall. - Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP. - If you do not have a local mail server (as is typical on Windows), SMTP is your only option.
  • -
  • Q: When I try to attach a file with on my server I get a - "Could not find {file} on filesystem error". Why is this?
    - A: If you are using a Unix machine this is probably because the user - running your web server does not have read access to the directory in question. If you are using Windows, - then the problem is probably that you have used single backslashes to denote directories (\). - A single backslash has a special meaning to PHP so these are not - valid. Instead use double backslashes ("\\") or a single forward - slash ("/").
  • -
- - diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/generatedocs.sh b/_sakura/vendor/phpmailer/phpmailer/docs/generatedocs.sh deleted file mode 100644 index 9da1ddf..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/generatedocs.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Regenerate PHPMailer documentation -# Run from within the docs folder -rm -rf phpdoc/* -phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/,vendor/,language/ --sourcecode --force --title PHPMailer --template="clean" -# You can merge regenerated docs into a separate docs working copy without messing up the git status like so: -# rsync -a --delete --exclude ".git" --exclude "phpdoc-cache-*/" --exclude "README.md" phpdoc/ ../../phpmailer-docs -# After updating docs, push/PR them to the phpmailer gh-pages branch: https://github.com/PHPMailer/PHPMailer/tree/gh-pages diff --git a/_sakura/vendor/phpmailer/phpmailer/docs/pop3_article.txt b/_sakura/vendor/phpmailer/phpmailer/docs/pop3_article.txt deleted file mode 100644 index fb90b9c..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/docs/pop3_article.txt +++ /dev/null @@ -1,50 +0,0 @@ -This is built for PHP Mailer 1.72 and was not tested with any previous version. It was developed under PHP 4.3.11 (E_ALL). It works under PHP 5 and 5.1 with E_ALL, but not in Strict mode due to var deprecation (but then neither does PHP Mailer either!). It follows the RFC 1939 standard explicitly and is fully commented. - -With that noted, here is how to implement it: - -I didn't want to modify the PHP Mailer classes at all, so you will have to include/require this class along with the base one. It can sit quite happily in the phpmailer directory. - -When you need it, create your POP3 object - -Right before I invoke PHP Mailer I activate the POP3 authorisation. POP3 before SMTP is a process whereby you login to your web hosts POP3 mail server BEFORE sending out any emails via SMTP. The POP3 logon 'verifies' your ability to send email by SMTP, which typically otherwise blocks you. On my web host (Pair Networks) a single POP3 logon is enough to 'verify' you for 90 minutes. Here is some sample PHP code that activates the POP3 logon and then sends an email via PHP Mailer: - -authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1); -$mail = new PHPMailer(); $mail->SMTPDebug = 2; $mail->isSMTP(); -$mail->isHTML(false); $mail->Host = 'relay.example.com'; -$mail->From = 'mailer@example.com'; -$mail->FromName = 'Example Mailer'; -$mail->Subject = 'My subject'; -$mail->Body = 'Hello world'; -$mail->addAddress('rich@corephp.co.uk', 'Richard Davey'); -if (!$mail->send()) { - echo $mail->ErrorInfo; -} -?> - -The PHP Mailer parts of this code should be obvious to anyone who has used PHP Mailer before. One thing to note - you almost certainly will not need to use SMTP Authentication *and* POP3 before SMTP together. The Authorisation method is a proxy method to all of the others within that class. There are connect, Logon and disconnect methods available, but I wrapped them in the single Authorisation one to make things easier. -The Parameters - -The authorise parameters are as follows: - -$pop->authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1); - - 1. pop3.example.com - The POP3 Mail Server Name (hostname or IP address) - 2. 110 - The POP3 Port on which to connect (default is usually 110, but check with your host) - 3. 30 - A connection time-out value (in seconds) - 4. mailer - The POP3 Username required to logon - 5. password - The POP3 Password required to logon - 6. 1 - The class debug level (0 = off, 1+ = debug output is echoed to the browser) - -Final Comments + the Download - -1) This class does not support APOP connections. This is only because I did not have an APOP server to test with, but if you'd like to see that added just contact me. - -2) Opening and closing lots of POP3 connections can be quite a resource/network drain. If you need to send a whole batch of emails then just perform the authentication once at the start, and then loop through your mail sending script. Providing this process doesn't take longer than the verification period lasts on your POP3 server, you should be fine. With my host that period is 90 minutes, i.e. plenty of time. - -3) If you have heavy requirements for this script (i.e. send a LOT of email on a frequent basis) then I would advise seeking out an alternative sending method (direct SMTP ideally). If this isn't possible then you could modify this class so the 'last authorised' date is recorded somewhere (MySQL, Flat file, etc) meaning you only open a new connection if the old one has expired, saving you precious overhead. - -4) There are lots of other POP3 classes for PHP available. However most of them implement the full POP3 command set, where-as this one is purely for authentication, and much lighter as a result. However using any of the other POP3 classes to just logon to your server would have the same net result. At the end of the day, use whatever method you feel most comfortable with. -Download - -My thanks to Chris Ryan for the inspiration (even if indirectly, via his SMTP class) diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/code_generator.phps b/_sakura/vendor/phpmailer/phpmailer/examples/code_generator.phps deleted file mode 100644 index 2345856..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/code_generator.phps +++ /dev/null @@ -1,597 +0,0 @@ -CharSet = 'utf-8'; -ini_set('default_charset', 'UTF-8'); -$mail->Debugoutput = $CFG['smtp_debugoutput']; -$example_code .= "\n\n\$mail = new PHPMailer(true);"; -$example_code .= "\n\$mail->CharSet = 'utf-8';"; -$example_code .= "\nini_set('default_charset', 'UTF-8');"; - -class phpmailerAppException extends phpmailerException -{ -} - -$example_code .= "\n\nclass phpmailerAppException extends phpmailerException {}"; -$example_code .= "\n\ntry {"; - -try { - if (isset($_POST["submit"]) && $_POST['submit'] == "Submit") { - $to = $_POST['To_Email']; - if (!PHPMailer::validateAddress($to)) { - throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!"); - } - - $example_code .= "\n\$to = '{$_POST['To_Email']}';"; - $example_code .= "\nif(!PHPMailer::validateAddress(\$to)) {"; - $example_code .= "\n throw new phpmailerAppException(\"Email address \" . " . - "\$to . \" is invalid -- aborting!\");"; - $example_code .= "\n}"; - - switch ($_POST['test_type']) { - case 'smtp': - $mail->isSMTP(); // telling the class to use SMTP - $mail->SMTPDebug = (integer)$_POST['smtp_debug']; - $mail->Host = $_POST['smtp_server']; // SMTP server - $mail->Port = (integer)$_POST['smtp_port']; // set the SMTP port - if ($_POST['smtp_secure']) { - $mail->SMTPSecure = strtolower($_POST['smtp_secure']); - } - $mail->SMTPAuth = array_key_exists('smtp_authenticate', $_POST); // enable SMTP authentication? - if (array_key_exists('smtp_authenticate', $_POST)) { - $mail->Username = $_POST['authenticate_username']; // SMTP account username - $mail->Password = $_POST['authenticate_password']; // SMTP account password - } - - $example_code .= "\n\$mail->isSMTP();"; - $example_code .= "\n\$mail->SMTPDebug = " . $_POST['smtp_debug'] . ";"; - $example_code .= "\n\$mail->Host = \"" . $_POST['smtp_server'] . "\";"; - $example_code .= "\n\$mail->Port = \"" . $_POST['smtp_port'] . "\";"; - $example_code .= "\n\$mail->SMTPSecure = \"" . strtolower($_POST['smtp_secure']) . "\";"; - $example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists( - 'smtp_authenticate', - $_POST - ) ? 'true' : 'false') . ";"; - if (array_key_exists('smtp_authenticate', $_POST)) { - $example_code .= "\n\$mail->Username = \"" . $_POST['authenticate_username'] . "\";"; - $example_code .= "\n\$mail->Password = \"" . $_POST['authenticate_password'] . "\";"; - } - break; - case 'mail': - $mail->isMail(); // telling the class to use PHP's mail() - $example_code .= "\n\$mail->isMail();"; - break; - case 'sendmail': - $mail->isSendmail(); // telling the class to use Sendmail - $example_code .= "\n\$mail->isSendmail();"; - break; - case 'qmail': - $mail->isQmail(); // telling the class to use Qmail - $example_code .= "\n\$mail->isQmail();"; - break; - default: - throw new phpmailerAppException('Invalid test_type provided'); - } - - try { - if ($_POST['From_Name'] != '') { - $mail->addReplyTo($_POST['From_Email'], $_POST['From_Name']); - $mail->setFrom($_POST['From_Email'], $_POST['From_Name']); - - $example_code .= "\n\$mail->addReplyTo(\"" . - $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; - $example_code .= "\n\$mail->setFrom(\"" . - $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; - } else { - $mail->addReplyTo($_POST['From_Email']); - $mail->setFrom($_POST['From_Email'], $_POST['From_Email']); - - $example_code .= "\n\$mail->addReplyTo(\"" . $_POST['From_Email'] . "\");"; - $example_code .= "\n\$mail->setFrom(\"" . - $_POST['From_Email'] . "\", \"" . $_POST['From_Email'] . "\");"; - } - - if ($_POST['To_Name'] != '') { - $mail->addAddress($to, $_POST['To_Name']); - $example_code .= "\n\$mail->addAddress(\"$to\", \"" . $_POST['To_Name'] . "\");"; - } else { - $mail->addAddress($to); - $example_code .= "\n\$mail->addAddress(\"$to\");"; - } - - if ($_POST['bcc_Email'] != '') { - $indiBCC = explode(" ", $_POST['bcc_Email']); - foreach ($indiBCC as $key => $value) { - $mail->addBCC($value); - $example_code .= "\n\$mail->addBCC(\"$value\");"; - } - } - - if ($_POST['cc_Email'] != '') { - $indiCC = explode(" ", $_POST['cc_Email']); - foreach ($indiCC as $key => $value) { - $mail->addCC($value); - $example_code .= "\n\$mail->addCC(\"$value\");"; - } - } - } catch (phpmailerException $e) { //Catch all kinds of bad addressing - throw new phpmailerAppException($e->getMessage()); - } - $mail->Subject = $_POST['Subject'] . ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')'; - $example_code .= "\n\$mail->Subject = \"" . $_POST['Subject'] . - ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')";'; - - if ($_POST['Message'] == '') { - $body = file_get_contents('contents.html'); - } else { - $body = $_POST['Message']; - } - - $example_code .= "\n\$body = <<<'EOT'\n" . htmlentities($body) . "\nEOT;"; - - $mail->WordWrap = 78; // set word wrap to the RFC2822 limit - $mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images - - $example_code .= "\n\$mail->WordWrap = 78;"; - $example_code .= "\n\$mail->msgHTML(\$body, dirname(__FILE__), true); //Create message bodies and embed images"; - - $mail->addAttachment('images/phpmailer_mini.png', 'phpmailer_mini.png'); // optional name - $mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name - $example_code .= "\n\$mail->addAttachment('images/phpmailer_mini.png'," . - "'phpmailer_mini.png'); // optional name"; - $example_code .= "\n\$mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name"; - - $example_code .= "\n\ntry {"; - $example_code .= "\n \$mail->send();"; - $example_code .= "\n \$results_messages[] = \"Message has been sent using " . - strtoupper($_POST['test_type']) . "\";"; - $example_code .= "\n}"; - $example_code .= "\ncatch (phpmailerException \$e) {"; - $example_code .= "\n throw new phpmailerAppException('Unable to send to: ' . \$to. ': '.\$e->getMessage());"; - $example_code .= "\n}"; - - try { - $mail->send(); - $results_messages[] = "Message has been sent using " . strtoupper($_POST["test_type"]); - } catch (phpmailerException $e) { - throw new phpmailerAppException("Unable to send to: " . $to . ': ' . $e->getMessage()); - } - } -} catch (phpmailerAppException $e) { - $results_messages[] = $e->errorMessage(); -} -$example_code .= "\n}"; -$example_code .= "\ncatch (phpmailerAppException \$e) {"; -$example_code .= "\n \$results_messages[] = \$e->errorMessage();"; -$example_code .= "\n}"; -$example_code .= "\n\nif (count(\$results_messages) > 0) {"; -$example_code .= "\n echo \"

Run results

\\n\";"; -$example_code .= "\n echo \"
    \\n\";"; -$example_code .= "\nforeach (\$results_messages as \$result) {"; -$example_code .= "\n echo \"
  • \$result
  • \\n\";"; -$example_code .= "\n}"; -$example_code .= "\necho \"
\\n\";"; -$example_code .= "\n}"; -?> - - - - PHPMailer Test Page - - - - - - - - -"; - echo exit("ERROR: Wrong PHP version. Must be PHP 5 or above."); -} - -if (count($results_messages) > 0) { - echo '

Run results

'; - echo '
    '; - foreach ($results_messages as $result) { - echo "
  • $result
  • "; - } - echo '
'; -} - -if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - echo "
\n"; - echo "
Script:\n"; - echo "
\n";
-    echo $example_code;
-    echo "\n
\n"; - echo "\n
\n"; -} -?> -
-
-
-
- Mail Details - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
-
Test will include two attachments.
-
-
-
-
- Mail Test Specs - - - - - -
Test Type -
- - - required> -
-
- - - required> -
-
- - - required> -
-
- - - required> -
-
-
"> - SMTP Specific Options: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - value=""> -
- -
- -
-
-
-
-
- -
-
- -
- -
-
-
- - diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/contents.html b/_sakura/vendor/phpmailer/phpmailer/examples/contents.html deleted file mode 100644 index dc3fc66..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/contents.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - PHPMailer Test - - -
-

This is a test of PHPMailer.

-
- PHPMailer rocks -
-

This example uses HTML.

-

ISO-8859-1 text:

-
- - diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/contentsutf8.html b/_sakura/vendor/phpmailer/phpmailer/examples/contentsutf8.html deleted file mode 100644 index 81a2024..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/contentsutf8.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PHPMailer Test - - -
-

This is a test of PHPMailer.

-
- PHPMailer rocks -
-

This example uses HTML.

-

Chinese text: 郵件內容為空

-

Russian text: Пустое тело сообщения

-

Armenian text: Հաղորդագրությունը դատարկ է

-

Czech text: Prázdné tělo zprávy

-
- - diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/exceptions.phps b/_sakura/vendor/phpmailer/phpmailer/examples/exceptions.phps deleted file mode 100644 index 0e941e7..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/exceptions.phps +++ /dev/null @@ -1,35 +0,0 @@ -setFrom('from@example.com', 'First Last'); - //Set an alternative reply-to address - $mail->addReplyTo('replyto@example.com', 'First Last'); - //Set who the message is to be sent to - $mail->addAddress('whoto@example.com', 'John Doe'); - //Set the subject line - $mail->Subject = 'PHPMailer Exceptions test'; - //Read an HTML message body from an external file, convert referenced images to embedded, - //and convert the HTML into a basic plain-text alternative body - $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); - //Replace the plain text body with one created manually - $mail->AltBody = 'This is a plain-text message body'; - //Attach an image file - $mail->addAttachment('images/phpmailer_mini.png'); - //send the message - //Note that we don't need check the response from this because it will throw an exception if it has trouble - $mail->send(); - echo "Message sent!"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/gmail.phps b/_sakura/vendor/phpmailer/phpmailer/examples/gmail.phps deleted file mode 100644 index b3cc02d..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/gmail.phps +++ /dev/null @@ -1,75 +0,0 @@ -isSMTP(); - -//Enable SMTP debugging -// 0 = off (for production use) -// 1 = client messages -// 2 = client and server messages -$mail->SMTPDebug = 2; - -//Ask for HTML-friendly debug output -$mail->Debugoutput = 'html'; - -//Set the hostname of the mail server -$mail->Host = 'smtp.gmail.com'; -// use -// $mail->Host = gethostbyname('smtp.gmail.com'); -// if your network does not support SMTP over IPv6 - -//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission -$mail->Port = 587; - -//Set the encryption system to use - ssl (deprecated) or tls -$mail->SMTPSecure = 'tls'; - -//Whether to use SMTP authentication -$mail->SMTPAuth = true; - -//Username to use for SMTP authentication - use full email address for gmail -$mail->Username = "username@gmail.com"; - -//Password to use for SMTP authentication -$mail->Password = "yourpassword"; - -//Set who the message is to be sent from -$mail->setFrom('from@example.com', 'First Last'); - -//Set an alternative reply-to address -$mail->addReplyTo('replyto@example.com', 'First Last'); - -//Set who the message is to be sent to -$mail->addAddress('whoto@example.com', 'John Doe'); - -//Set the subject line -$mail->Subject = 'PHPMailer GMail SMTP test'; - -//Read an HTML message body from an external file, convert referenced images to embedded, -//convert HTML into a basic plain-text alternative body -$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); - -//Replace the plain text body with one created manually -$mail->AltBody = 'This is a plain-text message body'; - -//Attach an image file -$mail->addAttachment('images/phpmailer_mini.png'); - -//send the message, check for errors -if (!$mail->send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps b/_sakura/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps deleted file mode 100644 index d64483a..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps +++ /dev/null @@ -1,85 +0,0 @@ -isSMTP(); - -//Enable SMTP debugging -// 0 = off (for production use) -// 1 = client messages -// 2 = client and server messages -$mail->SMTPDebug = 0; - -//Ask for HTML-friendly debug output -$mail->Debugoutput = 'html'; - -//Set the hostname of the mail server -$mail->Host = 'smtp.gmail.com'; - -//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission -$mail->Port = 587; - -//Set the encryption system to use - ssl (deprecated) or tls -$mail->SMTPSecure = 'tls'; - -//Whether to use SMTP authentication -$mail->SMTPAuth = true; - -//Set AuthType -$mail->AuthType = 'XOAUTH2'; - -//User Email to use for SMTP authentication - Use the same Email used in Google Developer Console -$mail->oauthUserEmail = "someone@gmail.com"; - -//Obtained From Google Developer Console -$mail->oauthClientId = "RANDOMCHARS-----duv1n2.apps.googleusercontent.com"; - -//Obtained From Google Developer Console -$mail->oauthClientSecret = "RANDOMCHARS-----lGyjPcRtvP"; - -//Obtained By running get_oauth_token.php after setting up APP in Google Developer Console. -//Set Redirect URI in Developer Console as [https/http]:////get_oauth_token.php -// eg: http://localhost/phpmail/get_oauth_token.php -$mail->oauthRefreshToken = "RANDOMCHARS-----DWxgOvPT003r-yFUV49TQYag7_Aod7y0"; - -//Set who the message is to be sent from -//For gmail, this generally needs to be the same as the user you logged in as -$mail->setFrom('from@example.com', 'First Last'); - -//Set who the message is to be sent to -$mail->addAddress('whoto@example.com', 'John Doe'); - -//Set the subject line -$mail->Subject = 'PHPMailer GMail SMTP test'; - -//Read an HTML message body from an external file, convert referenced images to embedded, -//convert HTML into a basic plain-text alternative body -$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); - -//Replace the plain text body with one created manually -$mail->AltBody = 'This is a plain-text message body'; - -//Attach an image file -$mail->addAttachment('images/phpmailer_mini.png'); - -//send the message, check for errors -if (!$mail->send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/images/phpmailer.png b/_sakura/vendor/phpmailer/phpmailer/examples/images/phpmailer.png deleted file mode 100644 index 9bdd83c..0000000 Binary files a/_sakura/vendor/phpmailer/phpmailer/examples/images/phpmailer.png and /dev/null differ diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png b/_sakura/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png deleted file mode 100644 index e6915f4..0000000 Binary files a/_sakura/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png and /dev/null differ diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/index.html b/_sakura/vendor/phpmailer/phpmailer/examples/index.html deleted file mode 100644 index bbb830d..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - PHPMailer Examples - - -

PHPMailer code examplesPHPMailer logo

-

This folder contains a collection of examples of using PHPMailer.

-

About testing email sending

-

When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:

-
    -
  • FakeSMTP, a Java desktop app with the ability to show an SMTP log and save messages to a folder.
  • -
  • FakeEmail, a Python-based fake mail server with a web interface.
  • -
  • smtp-sink, part of the Postfix mail server, so you probably already have this installed. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
  • -
  • smtp4dev, a dummy SMTP server for Windows.
  • -
  • fakesendmail.sh, part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
  • -
  • msglint, not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
  • -
-
-

Security note

-

Before running these examples you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - please don't do that! Similarly, don't leave your passwords in these files as they will be visible to the world!

-
-

code_generator.phps

-

This script is a simple code generator - fill in the form and hit submit, and it will use when you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps. If you need to get going quickly, this is probably the best place to start.

-

mail.phps

-

This script is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.

-

exceptions.phps

-

The same as the mail example, but shows how to use PHPMailer's optional exceptions for error handling.

-

smtp.phps

-

A simple example sending using SMTP with authentication.

-

smtp_no_auth.phps

-

A simple example sending using SMTP without authentication.

-

sendmail.phps

-

A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.

-

gmail.phps

-

Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.

-

pop_before_smtp.phps

-

Before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a POP3 protocol client, so it can carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP first.

-

mailing_list.phps

-

This is a somewhat naïve example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.

-
-

smtp_check.phps

-

This is an example showing how to use the SMTP class by itself (without PHPMailer) to check an SMTP connection.

-
-

Most of these examples use the 'example.com' domain. This domain is reserved by IANA for illustrative purposes, as documented in RFC 2606. Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!

- - diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/mail.phps b/_sakura/vendor/phpmailer/phpmailer/examples/mail.phps deleted file mode 100644 index 8e129f4..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/mail.phps +++ /dev/null @@ -1,31 +0,0 @@ -setFrom('from@example.com', 'First Last'); -//Set an alternative reply-to address -$mail->addReplyTo('replyto@example.com', 'First Last'); -//Set who the message is to be sent to -$mail->addAddress('whoto@example.com', 'John Doe'); -//Set the subject line -$mail->Subject = 'PHPMailer mail() test'; -//Read an HTML message body from an external file, convert referenced images to embedded, -//convert HTML into a basic plain-text alternative body -$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); -//Replace the plain text body with one created manually -$mail->AltBody = 'This is a plain-text message body'; -//Attach an image file -$mail->addAttachment('images/phpmailer_mini.png'); - -//send the message, check for errors -if (!$mail->send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/mailing_list.phps b/_sakura/vendor/phpmailer/phpmailer/examples/mailing_list.phps deleted file mode 100644 index 8644bb5..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/mailing_list.phps +++ /dev/null @@ -1,59 +0,0 @@ -isSMTP(); -$mail->Host = 'smtp.example.com'; -$mail->SMTPAuth = true; -$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead -$mail->Port = 25; -$mail->Username = 'yourname@example.com'; -$mail->Password = 'yourpassword'; -$mail->setFrom('list@example.com', 'List manager'); -$mail->addReplyTo('list@example.com', 'List manager'); - -$mail->Subject = "PHPMailer Simple database mailing list test"; - -//Same body for all messages, so set this before the sending loop -//If you generate a different body for each recipient (e.g. you're using a templating system), -//set it inside the loop -$mail->msgHTML($body); -//msgHTML also sets AltBody, but if you want a custom one, set it afterwards -$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; - -//Connect to the database and select the recipients from your mailing list that have not yet been sent to -//You'll need to alter this to match your database -$mysql = mysqli_connect('localhost', 'username', 'password'); -mysqli_select_db($mysql, 'mydb'); -$result = mysqli_query($mysql, 'SELECT full_name, email, photo FROM mailinglist WHERE sent = false'); - -foreach ($result as $row) { //This iterator syntax only works in PHP 5.4+ - $mail->addAddress($row['email'], $row['full_name']); - if (!empty($row['photo'])) { - $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB - } - - if (!$mail->send()) { - echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '
'; - break; //Abandon sending - } else { - echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "@", $row['email']) . ')
'; - //Mark it as sent in the DB - mysqli_query( - $mysql, - "UPDATE mailinglist SET sent = true WHERE email = '" . - mysqli_real_escape_string($mysql, $row['email']) . "'" - ); - } - // Clear all addresses and attachments for next loop - $mail->clearAddresses(); - $mail->clearAttachments(); -} diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps b/_sakura/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps deleted file mode 100644 index 164dfe8..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps +++ /dev/null @@ -1,54 +0,0 @@ -isSMTP(); - //Enable SMTP debugging - // 0 = off (for production use) - // 1 = client messages - // 2 = client and server messages - $mail->SMTPDebug = 2; - //Ask for HTML-friendly debug output - $mail->Debugoutput = 'html'; - //Set the hostname of the mail server - $mail->Host = "mail.example.com"; - //Set the SMTP port number - likely to be 25, 465 or 587 - $mail->Port = 25; - //Whether to use SMTP authentication - $mail->SMTPAuth = false; - //Set who the message is to be sent from - $mail->setFrom('from@example.com', 'First Last'); - //Set an alternative reply-to address - $mail->addReplyTo('replyto@example.com', 'First Last'); - //Set who the message is to be sent to - $mail->addAddress('whoto@example.com', 'John Doe'); - //Set the subject line - $mail->Subject = 'PHPMailer POP-before-SMTP test'; - //Read an HTML message body from an external file, convert referenced images to embedded, - //and convert the HTML into a basic plain-text alternative body - $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); - //Replace the plain text body with one created manually - $mail->AltBody = 'This is a plain-text message body'; - //Attach an image file - $mail->addAttachment('images/phpmailer_mini.png'); - //send the message - //Note that we don't need check the response from this because it will throw an exception if it has trouble - $mail->send(); - echo "Message sent!"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js b/_sakura/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js deleted file mode 100644 index ebdb9c9..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js +++ /dev/null @@ -1,664 +0,0 @@ -// XRegExp 1.5.1 -// (c) 2007-2012 Steven Levithan -// MIT License -// -// Provides an augmented, extensible, cross-browser implementation of regular expressions, -// including support for additional syntax, flags, and methods - -var XRegExp; - -if (XRegExp) { - // Avoid running twice, since that would break references to native globals - throw Error("can't load XRegExp twice in the same frame"); -} - -// Run within an anonymous function to protect variables and avoid new globals -(function (undefined) { - - //--------------------------------- - // Constructor - //--------------------------------- - - // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native - // regular expression in that additional syntax and flags are supported and cross-browser - // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and - // converts to type XRegExp - XRegExp = function (pattern, flags) { - var output = [], - currScope = XRegExp.OUTSIDE_CLASS, - pos = 0, - context, tokenResult, match, chr, regex; - - if (XRegExp.isRegExp(pattern)) { - if (flags !== undefined) - throw TypeError("can't supply flags when constructing one RegExp from another"); - return clone(pattern); - } - // Tokens become part of the regex construction process, so protect against infinite - // recursion when an XRegExp is constructed within a token handler or trigger - if (isInsideConstructor) - throw Error("can't call the XRegExp constructor within token definition functions"); - - flags = flags || ""; - context = { // `this` object for custom tokens - hasNamedCapture: false, - captureNames: [], - hasFlag: function (flag) {return flags.indexOf(flag) > -1;}, - setFlag: function (flag) {flags += flag;} - }; - - while (pos < pattern.length) { - // Check for custom tokens at the current position - tokenResult = runTokens(pattern, pos, currScope, context); - - if (tokenResult) { - output.push(tokenResult.output); - pos += (tokenResult.match[0].length || 1); - } else { - // Check for native multicharacter metasequences (excluding character classes) at - // the current position - if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) { - output.push(match[0]); - pos += match[0].length; - } else { - chr = pattern.charAt(pos); - if (chr === "[") - currScope = XRegExp.INSIDE_CLASS; - else if (chr === "]") - currScope = XRegExp.OUTSIDE_CLASS; - // Advance position one character - output.push(chr); - pos++; - } - } - } - - regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, "")); - regex._xregexp = { - source: pattern, - captureNames: context.hasNamedCapture ? context.captureNames : null - }; - return regex; - }; - - - //--------------------------------- - // Public properties - //--------------------------------- - - XRegExp.version = "1.5.1"; - - // Token scope bitflags - XRegExp.INSIDE_CLASS = 1; - XRegExp.OUTSIDE_CLASS = 2; - - - //--------------------------------- - // Private variables - //--------------------------------- - - var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, - flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags - quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, - isInsideConstructor = false, - tokens = [], - // Copy native globals for reference ("native" is an ES3 reserved keyword) - nativ = { - exec: RegExp.prototype.exec, - test: RegExp.prototype.test, - match: String.prototype.match, - replace: String.prototype.replace, - split: String.prototype.split - }, - compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups - compliantLastIndexIncrement = function () { - var x = /^/g; - nativ.test.call(x, ""); - return !x.lastIndex; - }(), - hasNativeY = RegExp.prototype.sticky !== undefined, - nativeTokens = {}; - - // `nativeTokens` match native multicharacter metasequences only (including deprecated octals, - // excluding character classes) - nativeTokens[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/; - nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/; - - - //--------------------------------- - // Public methods - //--------------------------------- - - // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by - // the XRegExp library and can be used to create XRegExp plugins. This function is intended for - // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can - // be disabled by `XRegExp.freezeTokens` - XRegExp.addToken = function (regex, handler, scope, trigger) { - tokens.push({ - pattern: clone(regex, "g" + (hasNativeY ? "y" : "")), - handler: handler, - scope: scope || XRegExp.OUTSIDE_CLASS, - trigger: trigger || null - }); - }; - - // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag - // combination has previously been cached, the cached copy is returned; otherwise the newly - // created regex is cached - XRegExp.cache = function (pattern, flags) { - var key = pattern + "/" + (flags || ""); - return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags)); - }; - - // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh - // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global` - // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve - // special properties required for named capture - XRegExp.copyAsGlobal = function (regex) { - return clone(regex, "g"); - }; - - // Accepts a string; returns the string with regex metacharacters escaped. The returned string - // can safely be used at any point within a regex to match the provided literal string. Escaped - // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace - XRegExp.escape = function (str) { - return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }; - - // Accepts a string to search, regex to search with, position to start the search within the - // string (default: 0), and an optional Boolean indicating whether matches must start at-or- - // after the position or at the specified position only. This function ignores the `lastIndex` - // of the provided regex in its own handling, but updates the property for compatibility - XRegExp.execAt = function (str, regex, pos, anchored) { - var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")), - match; - r2.lastIndex = pos = pos || 0; - match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.) - if (anchored && match && match.index !== pos) - match = null; - if (regex.global) - regex.lastIndex = match ? r2.lastIndex : 0; - return match; - }; - - // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing - // syntax and flag changes. Should be run after XRegExp and any plugins are loaded - XRegExp.freezeTokens = function () { - XRegExp.addToken = function () { - throw Error("can't run addToken after freezeTokens"); - }; - }; - - // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object. - // Note that this is also `true` for regex literals and regexes created by the `XRegExp` - // constructor. This works correctly for variables created in another frame, when `instanceof` - // and `constructor` checks would fail to work as intended - XRegExp.isRegExp = function (o) { - return Object.prototype.toString.call(o) === "[object RegExp]"; - }; - - // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to - // iterate over regex matches compared to the traditional approaches of subverting - // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop - XRegExp.iterate = function (str, regex, callback, context) { - var r2 = clone(regex, "g"), - i = -1, match; - while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) - if (regex.global) - regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback` - callback.call(context, match, ++i, str, regex); - if (r2.lastIndex === match.index) - r2.lastIndex++; - } - if (regex.global) - regex.lastIndex = 0; - }; - - // Accepts a string and an array of regexes; returns the result of using each successive regex - // to search within the matches of the previous regex. The array of regexes can also contain - // objects with `regex` and `backref` properties, in which case the named or numbered back- - // references specified are passed forward to the next regex or returned. E.g.: - // var xregexpImgFileNames = XRegExp.matchChain(html, [ - // {regex: /]+)>/i, backref: 1}, // tag attributes - // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values - // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths - // /[^\/]+$/ // filenames (strip directory paths) - // ]); - XRegExp.matchChain = function (str, chain) { - return function recurseChain (values, level) { - var item = chain[level].regex ? chain[level] : {regex: chain[level]}, - regex = clone(item.regex, "g"), - matches = [], i; - for (i = 0; i < values.length; i++) { - XRegExp.iterate(values[i], regex, function (match) { - matches.push(item.backref ? (match[item.backref] || "") : match[0]); - }); - } - return ((level === chain.length - 1) || !matches.length) ? - matches : recurseChain(matches, level + 1); - }([str], 0); - }; - - - //--------------------------------- - // New RegExp prototype methods - //--------------------------------- - - // Accepts a context object and arguments array; returns the result of calling `exec` with the - // first value in the arguments array. the context is ignored but is accepted for congruity - // with `Function.prototype.apply` - RegExp.prototype.apply = function (context, args) { - return this.exec(args[0]); - }; - - // Accepts a context object and string; returns the result of calling `exec` with the provided - // string. the context is ignored but is accepted for congruity with `Function.prototype.call` - RegExp.prototype.call = function (context, str) { - return this.exec(str); - }; - - - //--------------------------------- - // Overriden native methods - //--------------------------------- - - // Adds named capture support (with backreferences returned as `result.name`), and fixes two - // cross-browser issues per ES3: - // - Captured values for nonparticipating capturing groups should be returned as `undefined`, - // rather than the empty string. - // - `lastIndex` should not be incremented after zero-length matches. - RegExp.prototype.exec = function (str) { - var match, name, r2, origLastIndex; - if (!this.global) - origLastIndex = this.lastIndex; - match = nativ.exec.apply(this, arguments); - if (match) { - // Fix browsers whose `exec` methods don't consistently return `undefined` for - // nonparticipating capturing groups - if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { - r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", "")); - // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed - // matching due to characters outside the match - nativ.replace.call((str + "").slice(match.index), r2, function () { - for (var i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) - match[i] = undefined; - } - }); - } - // Attach named capture properties - if (this._xregexp && this._xregexp.captureNames) { - for (var i = 1; i < match.length; i++) { - name = this._xregexp.captureNames[i - 1]; - if (name) - match[name] = match[i]; - } - } - // Fix browsers that increment `lastIndex` after zero-length matches - if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) - this.lastIndex--; - } - if (!this.global) - this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) - return match; - }; - - // Fix browser bugs in native method - RegExp.prototype.test = function (str) { - // Use the native `exec` to skip some processing overhead, even though the altered - // `exec` would take care of the `lastIndex` fixes - var match, origLastIndex; - if (!this.global) - origLastIndex = this.lastIndex; - match = nativ.exec.call(this, str); - // Fix browsers that increment `lastIndex` after zero-length matches - if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) - this.lastIndex--; - if (!this.global) - this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) - return !!match; - }; - - // Adds named capture support and fixes browser bugs in native method - String.prototype.match = function (regex) { - if (!XRegExp.isRegExp(regex)) - regex = RegExp(regex); // Native `RegExp` - if (regex.global) { - var result = nativ.match.apply(this, arguments); - regex.lastIndex = 0; // Fix IE bug - return result; - } - return regex.exec(this); // Run the altered `exec` - }; - - // Adds support for `${n}` tokens for named and numbered backreferences in replacement text, - // and provides named backreferences to replacement functions as `arguments[0].name`. Also - // fixes cross-browser differences in replacement text syntax when performing a replacement - // using a nonregex search value, and the value of replacement regexes' `lastIndex` property - // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary - // third (`flags`) parameter - String.prototype.replace = function (search, replacement) { - var isRegex = XRegExp.isRegExp(search), - captureNames, result, str, origLastIndex; - - // There are too many combinations of search/replacement types/values and browser bugs that - // preclude passing to native `replace`, so don't try - //if (...) - // return nativ.replace.apply(this, arguments); - - if (isRegex) { - if (search._xregexp) - captureNames = search._xregexp.captureNames; // Array or `null` - if (!search.global) - origLastIndex = search.lastIndex; - } else { - search = search + ""; // Type conversion - } - - if (Object.prototype.toString.call(replacement) === "[object Function]") { - result = nativ.replace.call(this + "", search, function () { - if (captureNames) { - // Change the `arguments[0]` string primitive to a String object which can store properties - arguments[0] = new String(arguments[0]); - // Store named backreferences on `arguments[0]` - for (var i = 0; i < captureNames.length; i++) { - if (captureNames[i]) - arguments[0][captureNames[i]] = arguments[i + 1]; - } - } - // Update `lastIndex` before calling `replacement` (fix browsers) - if (isRegex && search.global) - search.lastIndex = arguments[arguments.length - 2] + arguments[0].length; - return replacement.apply(null, arguments); - }); - } else { - str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`) - result = nativ.replace.call(str, search, function () { - var args = arguments; // Keep this function's `arguments` available through closure - return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) { - // Numbered backreference (without delimiters) or special variable - if ($1) { - switch ($1) { - case "$": return "$"; - case "&": return args[0]; - case "`": return args[args.length - 1].slice(0, args[args.length - 2]); - case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length); - // Numbered backreference - default: - // What does "$10" mean? - // - Backreference 10, if 10 or more capturing groups exist - // - Backreference 1 followed by "0", if 1-9 capturing groups exist - // - Otherwise, it's the string "$10" - // Also note: - // - Backreferences cannot be more than two digits (enforced by `replacementToken`) - // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01" - // - There is no "$0" token ("$&" is the entire match) - var literalNumbers = ""; - $1 = +$1; // Type conversion; drop leading zero - if (!$1) // `$1` was "0" or "00" - return $0; - while ($1 > args.length - 3) { - literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers; - $1 = Math.floor($1 / 10); // Drop the last digit - } - return ($1 ? args[$1] || "" : "$") + literalNumbers; - } - // Named backreference or delimited numbered backreference - } else { - // What does "${n}" mean? - // - Backreference to numbered capture n. Two differences from "$n": - // - n can be more than two digits - // - Backreference 0 is allowed, and is the entire match - // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture - // - Otherwise, it's the string "${n}" - var n = +$2; // Type conversion; drop leading zeros - if (n <= args.length - 3) - return args[n]; - n = captureNames ? indexOf(captureNames, $2) : -1; - return n > -1 ? args[n + 1] : $0; - } - }); - }); - } - - if (isRegex) { - if (search.global) - search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows) - else - search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) - } - - return result; - }; - - // A consistent cross-browser, ES3 compliant `split` - String.prototype.split = function (s /* separator */, limit) { - // If separator `s` is not a regex, use the native `split` - if (!XRegExp.isRegExp(s)) - return nativ.split.apply(this, arguments); - - var str = this + "", // Type conversion - output = [], - lastLastIndex = 0, - match, lastLength; - - // Behavior for `limit`: if it's... - // - `undefined`: No limit - // - `NaN` or zero: Return an empty array - // - A positive number: Use `Math.floor(limit)` - // - A negative number: No limit - // - Other: Type-convert, then use the above rules - if (limit === undefined || +limit < 0) { - limit = Infinity; - } else { - limit = Math.floor(+limit); - if (!limit) - return []; - } - - // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero - // and restore it to its original value when we're done using the regex - s = XRegExp.copyAsGlobal(s); - - while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) - if (s.lastIndex > lastLastIndex) { - output.push(str.slice(lastLastIndex, match.index)); - - if (match.length > 1 && match.index < str.length) - Array.prototype.push.apply(output, match.slice(1)); - - lastLength = match[0].length; - lastLastIndex = s.lastIndex; - - if (output.length >= limit) - break; - } - - if (s.lastIndex === match.index) - s.lastIndex++; - } - - if (lastLastIndex === str.length) { - if (!nativ.test.call(s, "") || lastLength) - output.push(""); - } else { - output.push(str.slice(lastLastIndex)); - } - - return output.length > limit ? output.slice(0, limit) : output; - }; - - - //--------------------------------- - // Private helper functions - //--------------------------------- - - // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp` - // instance with a fresh `lastIndex` (set to zero), preserving properties required for named - // capture. Also allows adding new flags in the process of copying the regex - function clone (regex, additionalFlags) { - if (!XRegExp.isRegExp(regex)) - throw TypeError("type RegExp expected"); - var x = regex._xregexp; - regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || "")); - if (x) { - regex._xregexp = { - source: x.source, - captureNames: x.captureNames ? x.captureNames.slice(0) : null - }; - } - return regex; - } - - function getNativeFlags (regex) { - return (regex.global ? "g" : "") + - (regex.ignoreCase ? "i" : "") + - (regex.multiline ? "m" : "") + - (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 - (regex.sticky ? "y" : ""); - } - - function runTokens (pattern, index, scope, context) { - var i = tokens.length, - result, match, t; - // Protect against constructing XRegExps within token handler and trigger functions - isInsideConstructor = true; - // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws - try { - while (i--) { // Run in reverse order - t = tokens[i]; - if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) { - t.pattern.lastIndex = index; - match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc. - if (match && match.index === index) { - result = { - output: t.handler.call(context, match, scope), - match: match - }; - break; - } - } - } - } catch (err) { - throw err; - } finally { - isInsideConstructor = false; - } - return result; - } - - function indexOf (array, item, from) { - if (Array.prototype.indexOf) // Use the native array method if available - return array.indexOf(item, from); - for (var i = from || 0; i < array.length; i++) { - if (array[i] === item) - return i; - } - return -1; - } - - - //--------------------------------- - // Built-in tokens - //--------------------------------- - - // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the - // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS` - - // Comment pattern: (?# ) - XRegExp.addToken( - /\(\?#[^)]*\)/, - function (match) { - // Keep tokens separated unless the following token is a quantifier - return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; - } - ); - - // Capturing group (match the opening parenthesis only). - // Required for support of named capturing groups - XRegExp.addToken( - /\((?!\?)/, - function () { - this.captureNames.push(null); - return "("; - } - ); - - // Named capturing group (match the opening delimiter only): (? - XRegExp.addToken( - /\(\?<([$\w]+)>/, - function (match) { - this.captureNames.push(match[1]); - this.hasNamedCapture = true; - return "("; - } - ); - - // Named backreference: \k - XRegExp.addToken( - /\\k<([\w$]+)>/, - function (match) { - var index = indexOf(this.captureNames, match[1]); - // Keep backreferences separate from subsequent literal numbers. Preserve back- - // references to named groups that are undefined at this point as literal strings - return index > -1 ? - "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") : - match[0]; - } - ); - - // Empty character class: [] or [^] - XRegExp.addToken( - /\[\^?]/, - function (match) { - // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. - // (?!) should work like \b\B, but is unreliable in Firefox - return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; - } - ); - - // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx) - // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc. - XRegExp.addToken( - /^\(\?([imsx]+)\)/, - function (match) { - this.setFlag(match[1]); - return ""; - } - ); - - // Whitespace and comments, in free-spacing (aka extended) mode only - XRegExp.addToken( - /(?:\s+|#.*)+/, - function (match) { - // Keep tokens separated unless the following token is a quantifier - return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; - }, - XRegExp.OUTSIDE_CLASS, - function () {return this.hasFlag("x");} - ); - - // Dot, in dotall (aka singleline) mode only - XRegExp.addToken( - /\./, - function () {return "[\\s\\S]";}, - XRegExp.OUTSIDE_CLASS, - function () {return this.hasFlag("s");} - ); - - - //--------------------------------- - // Backward compatibility - //--------------------------------- - - // Uncomment the following block for compatibility with XRegExp 1.0-1.2: - /* - XRegExp.matchWithinChain = XRegExp.matchChain; - RegExp.prototype.addFlags = function (s) {return clone(this, s);}; - RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;}; - RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);}; - RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;}; - */ - -})(); - diff --git a/_sakura/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js b/_sakura/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js deleted file mode 100644 index 9f5942e..0000000 --- a/_sakura/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js +++ /dev/null @@ -1,122 +0,0 @@ -(function() { - -var sh = SyntaxHighlighter; - -/** - * Provides functionality to dynamically load only the brushes that a needed to render the current page. - * - * There are two syntaxes that autoload understands. For example: - * - * SyntaxHighlighter.autoloader( - * [ 'applescript', 'Scripts/shBrushAppleScript.js' ], - * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ] - * ); - * - * or a more easily comprehendable one: - * - * SyntaxHighlighter.autoloader( - * 'applescript Scripts/shBrushAppleScript.js', - * 'actionscript3 as3 Scripts/shBrushAS3.js' - * ); - */ -sh.autoloader = function() -{ - var list = arguments, - elements = sh.findElements(), - brushes = {}, - scripts = {}, - all = SyntaxHighlighter.all, - allCalled = false, - allParams = null, - i - ; - - SyntaxHighlighter.all = function(params) - { - allParams = params; - allCalled = true; - }; - - function addBrush(aliases, url) - { - for (var i = 0; i < aliases.length; i++) - brushes[aliases[i]] = url; - }; - - function getAliases(item) - { - return item.pop - ? item - : item.split(/\s+/) - ; - } - - // create table of aliases and script urls - for (i = 0; i < list.length; i++) - { - var aliases = getAliases(list[i]), - url = aliases.pop() - ; - - addBrush(aliases, url); - } - - // dynamically add