diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..76fc885b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ + + +| Questions | Answers +| ------------- | ------------------------------------------------------- +| Description? | Please be specific when describing the PR.
Every detail helps: versions, browser/server configuration, specific module/theme, etc. Feel free to add more information below this table. +| Type? | bug fix / improvement / new feature / refacto / critical +| BC breaks? | yes / no +| Deprecations? | yes / no +| Fixed ticket? | Fixes #{issue number here}. +| How to test? | Please indicate how to best verify that this PR is correct. + + diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 00000000..049e8ecd --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,90 @@ +name: Coding Standart +on: [pull_request] +jobs: + # Check there is no syntax errors in the project + php-linter: + name: PHP Syntax check 5.6|7.2|7.3 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: PHP syntax checker 5.6 + uses: prestashop/github-action-php-lint/5.6@master + with: + folder-to-exclude: "! -path \"./202/*\" ! -path \"./vendor/*\"" + + - name: PHP syntax checker 7.2 + uses: prestashop/github-action-php-lint/7.2@master + with: + folder-to-exclude: "! -path \"./202/*\" ! -path \"./vendor/*\"" + + - name: PHP syntax checker 7.3 + uses: prestashop/github-action-php-lint/7.3@master + with: + folder-to-exclude: "! -path \"./202/*\" ! -path \"./vendor/*\"" + + # Check the PHP code follow the coding standards + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: vendor + key: php-${{ hashFiles('composer.lock') }} + + - name: Install dependencies + run: composer update + + - name: Run PHP-CS-Fixer + run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff + + # Run PHPStan against the module and a PrestaShop release + phpstan: + name: PHPStan + runs-on: ubuntu-latest + strategy: + matrix: + presta-versions: ['1.7.4.0', 'latest'] + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + + # Add vendor folder in cache to make next builds faster + - name: Cache vendor folder + uses: actions/cache@v1 + with: + path: vendor + key: php-${{ hashFiles('composer.lock') }} + + # Add composer local folder in cache to make next builds faster + - name: Cache composer folder + uses: actions/cache@v1 + with: + path: ~/.composer/cache + key: php-composer-cache + + - run: composer update + + # Docker images prestashop/prestashop may be used, even if the shop remains uninstalled + - name: Pull PrestaShop files (Tag ${{ matrix.presta-versions }}) + run: docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:${{ matrix.presta-versions }} + + # Clear previous instance of the module in the PrestaShop volume + - name: Clear previous module + run: docker exec -t temp-ps rm -rf /var/www/html/modules/stripe_official + + # Run a container for PHPStan, having access to the module content and PrestaShop sources. + # This tool is outside the composer.json because of the compatibility with PHP 5.6 + - name : Run PHPStan + run: docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/stripe_official -e _PS_ROOT_DIR_=/var/www/html --workdir=/var/www/html/modules/stripe_official phpstan/phpstan:0.12 analyse --configuration=/var/www/html/modules/stripe_official/202/phpstan/phpstan.neon diff --git a/.gitignore b/.gitignore index 0eb4a224..6b106329 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ composer.lock # Ignore cache folder used by linters. /.cache +.php_cs.cache + +!.htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 00000000..54bc99ea --- /dev/null +++ b/.htaccess @@ -0,0 +1,16 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + Allow from all + + + +# Apache 2.4 + + Require all denied + + Require all granted + + diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 00000000..110ba88c --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,11 @@ +setUsingCache(true) + ->getFinder() + ->in(__DIR__) + ->exclude(['vendor', 'node_modules', '202/shoppingfeed', '202/guzzlehttp']); + +return $config; diff --git a/202/.htaccess b/202/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/202/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/202/bootstrap.php b/202/bootstrap.php index df6c004f..95fe1c23 100644 --- a/202/bootstrap.php +++ b/202/bootstrap.php @@ -1,22 +1,43 @@ + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) + */ ini_set('memory_limit', '200M'); define('TOT_SHARED_DIR', getenv('TOT_SHARED_DIR')); -$loader = require TOT_SHARED_DIR.'/vendor/autoload.php'; +$loader = require TOT_SHARED_DIR . '/vendor/autoload.php'; $basedir = '/var/www/html/'; -require_once($basedir.'config/config.inc.php'); +require_once $basedir . 'config/config.inc.php'; //session_start(); if (defined('_PS_ADMIN_DIR_')) { -$context = \Context::getContext(); -$context->employee = new \Employee(1); -Cache::store('isLoggedBack1', true); + $context = \Context::getContext(); + $context->employee = new \Employee(1); + Cache::store('isLoggedBack1', true); -require_once($basedir.'bb/init.php'); + require_once $basedir . 'bb/init.php'; } else { - -require_once($basedir.'init.php'); + require_once $basedir . 'init.php'; } diff --git a/202/build.xml b/202/build.xml index 43ebb71c..d4f6af28 100644 --- a/202/build.xml +++ b/202/build.xml @@ -5,7 +5,7 @@ - + diff --git a/202/build/backend.php b/202/build/backend.php deleted file mode 100644 index 5cb0647b..00000000 --- a/202/build/backend.php +++ /dev/null @@ -1,7185 +0,0 @@ -setData(array ( - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/ApiConnection.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApiResponse.php' => - array ( - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => - array ( - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Recipient.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - 54 => - array ( - ), - 55 => NULL, - 64 => - array ( - ), - 65 => NULL, - 74 => - array ( - ), - 75 => NULL, - 85 => - array ( - ), - 86 => - array ( - ), - 87 => - array ( - ), - 88 => - array ( - ), - 89 => - array ( - ), - 90 => - array ( - ), - 91 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Token.php' => - array ( - 30 => - array ( - ), - 31 => NULL, - 41 => - array ( - ), - 42 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Charge.php' => - array ( - 51 => - array ( - ), - 52 => NULL, - 62 => - array ( - ), - 63 => NULL, - 73 => - array ( - ), - 74 => NULL, - 85 => - array ( - ), - 86 => NULL, - 95 => - array ( - ), - 96 => NULL, - 106 => - array ( - ), - 107 => - array ( - ), - 108 => - array ( - ), - 109 => - array ( - ), - 110 => NULL, - 120 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 123 => - array ( - ), - 124 => NULL, - 164 => - array ( - ), - 165 => - array ( - ), - 166 => - array ( - ), - 167 => - array ( - ), - 168 => - array ( - ), - 169 => NULL, - 178 => - array ( - ), - 179 => - array ( - ), - 180 => - array ( - ), - 181 => - array ( - ), - 182 => - array ( - ), - 183 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/SingletonApiResource.php' => - array ( - 14 => - array ( - ), - 15 => - array ( - ), - 16 => - array ( - ), - 17 => - array ( - ), - 18 => NULL, - 25 => - array ( - ), - 26 => - array ( - ), - 34 => - array ( - ), - 35 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Source.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ThreeDSecure.php' => - array ( - 12 => - array ( - ), - 13 => NULL, - 23 => - array ( - ), - 24 => NULL, - ), - '/var/www/html/modules/stripe_official/stripe_official.php' => - array ( - 16 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 18 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 19 => - array ( - ), - 20 => NULL, - 68 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 69 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 70 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 71 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 72 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 73 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 74 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 75 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 78 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 79 => - array ( - ), - 80 => - array ( - ), - 82 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 84 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 85 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 86 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 87 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 88 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 89 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 90 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 93 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 94 => - array ( - ), - 95 => - array ( - ), - 96 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 100 => - array ( - ), - 103 => - array ( - ), - 104 => - array ( - ), - 105 => - array ( - ), - 106 => - array ( - ), - 107 => - array ( - ), - 108 => - array ( - ), - 109 => - array ( - ), - 110 => - array ( - ), - 111 => - array ( - ), - 112 => - array ( - ), - 113 => - array ( - ), - 115 => - array ( - ), - 116 => - array ( - ), - 119 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 124 => - array ( - ), - 125 => - array ( - ), - 126 => NULL, - 129 => - array ( - ), - 130 => - array ( - ), - 131 => NULL, - 133 => - array ( - ), - 134 => - array ( - ), - 135 => - array ( - ), - 136 => - array ( - ), - 137 => - array ( - ), - 138 => - array ( - ), - 139 => - array ( - ), - 140 => - array ( - ), - 141 => - array ( - ), - 142 => - array ( - ), - 143 => - array ( - ), - 144 => - array ( - ), - 145 => - array ( - ), - 146 => - array ( - ), - 147 => - array ( - ), - 148 => NULL, - 153 => - array ( - ), - 154 => - array ( - ), - 156 => - array ( - ), - 157 => - array ( - ), - 158 => - array ( - ), - 159 => - array ( - ), - 160 => - array ( - ), - 161 => - array ( - ), - 162 => NULL, - 170 => - array ( - ), - 171 => - array ( - ), - 172 => - array ( - ), - 173 => - array ( - ), - 174 => - array ( - ), - 175 => - array ( - ), - 176 => - array ( - ), - 177 => - array ( - ), - 178 => - array ( - ), - 180 => - array ( - ), - 181 => - array ( - ), - 182 => - array ( - ), - 183 => - array ( - ), - 184 => - array ( - ), - 185 => - array ( - ), - 186 => - array ( - ), - 187 => - array ( - ), - 188 => - array ( - ), - 189 => - array ( - ), - 190 => - array ( - ), - 191 => - array ( - ), - 192 => - array ( - ), - 193 => - array ( - ), - 194 => - array ( - ), - 195 => NULL, - 201 => - array ( - ), - 202 => - array ( - ), - 217 => - array ( - ), - 218 => - array ( - ), - 220 => - array ( - ), - 221 => NULL, - 225 => - array ( - ), - 226 => NULL, - 230 => - array ( - ), - 231 => NULL, - 235 => - array ( - ), - 236 => NULL, - 240 => - array ( - ), - 241 => NULL, - 245 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 246 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 247 => NULL, - 248 => - array ( - ), - 249 => NULL, - 261 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 262 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 263 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 264 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 265 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 266 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 268 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 269 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 270 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 271 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 272 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 274 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 275 => NULL, - 286 => - array ( - ), - 287 => - array ( - ), - 288 => NULL, - 289 => - array ( - ), - 290 => NULL, - 301 => - array ( - ), - 302 => - array ( - ), - 303 => - array ( - ), - 305 => - array ( - ), - 306 => - array ( - ), - 307 => - array ( - ), - 308 => - array ( - ), - 309 => - array ( - ), - 311 => - array ( - ), - 312 => - array ( - ), - 313 => - array ( - ), - 315 => - array ( - ), - 316 => NULL, - 320 => - array ( - ), - 322 => - array ( - ), - 323 => - array ( - ), - 324 => - array ( - ), - 325 => - array ( - ), - 326 => - array ( - ), - 327 => - array ( - ), - 328 => - array ( - ), - 329 => - array ( - ), - 331 => - array ( - ), - 333 => - array ( - ), - 334 => - array ( - ), - 335 => - array ( - ), - 336 => - array ( - ), - 337 => - array ( - ), - 338 => - array ( - ), - 339 => NULL, - 340 => - array ( - ), - 342 => - array ( - ), - 343 => NULL, - 350 => - array ( - ), - 353 => - array ( - ), - 354 => - array ( - ), - 355 => - array ( - ), - 356 => - array ( - ), - 357 => - array ( - ), - 358 => - array ( - ), - 359 => - array ( - ), - 360 => - array ( - ), - 364 => - array ( - ), - 365 => - array ( - ), - 366 => - array ( - ), - 368 => - array ( - ), - 369 => - array ( - ), - 374 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 375 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 376 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 377 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 378 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 379 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 380 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 382 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 383 => - array ( - ), - 384 => - array ( - ), - 385 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 388 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 389 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 390 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 391 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 392 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 393 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 395 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 396 => - array ( - ), - 397 => - array ( - ), - 398 => - array ( - ), - 399 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 400 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 403 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 404 => NULL, - 408 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 409 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 411 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 412 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 413 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 414 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 415 => NULL, - 417 => - array ( - ), - 418 => NULL, - 422 => - array ( - ), - 424 => - array ( - ), - 425 => - array ( - ), - 426 => - array ( - ), - 427 => - array ( - ), - 428 => - array ( - ), - 430 => - array ( - ), - 431 => NULL, - 442 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 443 => - array ( - ), - 444 => - array ( - ), - 445 => - array ( - ), - 446 => - array ( - ), - 447 => - array ( - ), - 448 => - array ( - ), - 449 => - array ( - ), - 450 => - array ( - ), - 451 => - array ( - ), - 452 => - array ( - ), - 454 => - array ( - ), - 455 => - array ( - ), - 456 => - array ( - ), - 457 => - array ( - ), - 458 => - array ( - ), - 459 => - array ( - ), - 460 => - array ( - ), - 461 => - array ( - ), - 462 => - array ( - ), - 463 => - array ( - ), - 464 => - array ( - ), - 466 => - array ( - ), - 468 => - array ( - ), - 469 => - array ( - ), - 470 => - array ( - ), - 471 => - array ( - ), - 472 => - array ( - ), - 473 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 484 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 485 => - array ( - ), - 486 => - array ( - ), - 487 => - array ( - ), - 488 => - array ( - ), - 489 => - array ( - ), - 491 => - array ( - ), - 492 => - array ( - ), - 494 => - array ( - ), - 496 => - array ( - ), - 498 => - array ( - ), - 499 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 510 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 511 => - array ( - ), - 512 => - array ( - ), - 513 => - array ( - ), - 514 => - array ( - ), - 515 => - array ( - ), - 516 => - array ( - ), - 519 => - array ( - ), - 520 => - array ( - ), - 521 => - array ( - ), - 522 => - array ( - ), - 523 => - array ( - ), - 524 => - array ( - ), - 525 => - array ( - ), - 528 => - array ( - ), - 529 => - array ( - ), - 530 => - array ( - ), - 531 => - array ( - ), - 532 => - array ( - ), - 534 => - array ( - ), - 535 => - array ( - ), - 536 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 548 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 550 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 551 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 552 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 555 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 557 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 558 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 559 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 560 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 563 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 566 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 569 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 572 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 574 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 575 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 576 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 578 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 579 => NULL, - 585 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 599 => - array ( - ), - 600 => - array ( - ), - 601 => - array ( - ), - 602 => - array ( - ), - 604 => - array ( - ), - 605 => - array ( - ), - 606 => - array ( - ), - 608 => - array ( - ), - 609 => - array ( - ), - 612 => - array ( - ), - 613 => - array ( - ), - 614 => - array ( - ), - 615 => - array ( - ), - 616 => - array ( - ), - 617 => - array ( - ), - 618 => - array ( - ), - 619 => - array ( - ), - 621 => - array ( - ), - 622 => - array ( - ), - 623 => - array ( - ), - 625 => - array ( - ), - 626 => - array ( - ), - 629 => - array ( - ), - 630 => - array ( - ), - 631 => - array ( - ), - 632 => - array ( - ), - 633 => - array ( - ), - 636 => - array ( - ), - 637 => - array ( - ), - 638 => - array ( - ), - 639 => - array ( - ), - 640 => - array ( - ), - 641 => - array ( - ), - 644 => - array ( - ), - 645 => - array ( - ), - 646 => - array ( - ), - 648 => - array ( - ), - 650 => - array ( - ), - 651 => - array ( - ), - 653 => - array ( - ), - 654 => - array ( - ), - 655 => - array ( - ), - 656 => - array ( - ), - 657 => - array ( - ), - 659 => - array ( - ), - 665 => - array ( - ), - 666 => - array ( - ), - 667 => - array ( - ), - 668 => - array ( - ), - 669 => - array ( - ), - 670 => - array ( - ), - 671 => - array ( - ), - 672 => - array ( - ), - 673 => - array ( - ), - 674 => - array ( - ), - 675 => - array ( - ), - 676 => - array ( - ), - 677 => - array ( - ), - 678 => - array ( - ), - 680 => - array ( - ), - 681 => - array ( - ), - 682 => NULL, - 686 => - array ( - ), - 687 => - array ( - ), - 689 => - array ( - ), - 690 => - array ( - ), - 692 => - array ( - ), - 694 => - array ( - ), - 695 => - array ( - ), - 696 => - array ( - ), - 697 => - array ( - ), - 699 => - array ( - ), - 700 => - array ( - ), - 701 => - array ( - ), - 702 => - array ( - ), - 703 => - array ( - ), - 704 => - array ( - ), - 705 => - array ( - ), - 706 => - array ( - ), - 707 => - array ( - ), - 709 => - array ( - ), - 710 => - array ( - ), - 711 => - array ( - ), - 715 => - array ( - ), - 716 => - array ( - ), - 717 => - array ( - ), - 718 => - array ( - ), - 720 => - array ( - ), - 721 => - array ( - ), - 722 => - array ( - ), - 723 => - array ( - ), - 724 => - array ( - ), - 725 => - array ( - ), - 726 => - array ( - ), - 727 => - array ( - ), - 728 => - array ( - ), - 729 => - array ( - ), - 730 => - array ( - ), - 732 => - array ( - ), - 733 => - array ( - ), - 734 => - array ( - ), - 737 => - array ( - ), - 738 => - array ( - ), - 739 => - array ( - ), - 740 => - array ( - ), - 741 => - array ( - ), - 742 => NULL, - 743 => - array ( - ), - 744 => - array ( - ), - 745 => - array ( - ), - 746 => - array ( - ), - 747 => - array ( - ), - 748 => - array ( - ), - 749 => - array ( - ), - 750 => - array ( - ), - 751 => - array ( - ), - 752 => - array ( - ), - 753 => - array ( - ), - 754 => - array ( - ), - 755 => - array ( - ), - 756 => - array ( - ), - 758 => NULL, - 763 => - array ( - ), - 764 => - array ( - ), - 765 => NULL, - 768 => - array ( - ), - 769 => - array ( - ), - 771 => - array ( - ), - 772 => - array ( - ), - 773 => - array ( - ), - 774 => - array ( - ), - 776 => - array ( - ), - 778 => - array ( - ), - 779 => - array ( - ), - 780 => - array ( - ), - 781 => - array ( - ), - 782 => - array ( - ), - 783 => - array ( - ), - 784 => - array ( - ), - 785 => - array ( - ), - 787 => - array ( - ), - 788 => - array ( - ), - 790 => - array ( - ), - 791 => - array ( - ), - 792 => - array ( - ), - 793 => - array ( - ), - 794 => - array ( - ), - 795 => - array ( - ), - 796 => - array ( - ), - 797 => - array ( - ), - 798 => - array ( - ), - 801 => - array ( - ), - 802 => - array ( - ), - 806 => - array ( - ), - 807 => - array ( - ), - 808 => NULL, - 812 => - array ( - ), - 813 => - array ( - ), - 815 => - array ( - ), - 816 => - array ( - ), - 817 => - array ( - ), - 818 => - array ( - ), - 819 => - array ( - ), - 820 => - array ( - ), - 823 => - array ( - ), - 825 => - array ( - ), - 826 => - array ( - ), - 827 => - array ( - ), - 828 => - array ( - ), - 829 => - array ( - ), - 830 => - array ( - ), - 831 => - array ( - ), - 832 => - array ( - ), - 834 => - array ( - ), - 835 => - array ( - ), - 837 => - array ( - ), - 838 => - array ( - ), - 839 => - array ( - ), - 840 => - array ( - ), - 842 => - array ( - ), - 843 => - array ( - ), - 844 => - array ( - ), - 845 => - array ( - ), - 846 => - array ( - ), - 848 => - array ( - ), - 849 => - array ( - ), - 850 => - array ( - ), - 851 => - array ( - ), - 852 => - array ( - ), - 862 => - array ( - ), - 863 => - array ( - ), - 864 => - array ( - ), - 866 => - array ( - ), - 867 => - array ( - ), - 868 => - array ( - ), - 869 => - array ( - ), - 870 => - array ( - ), - 874 => - array ( - ), - 875 => - array ( - ), - 876 => - array ( - ), - 877 => - array ( - ), - 878 => - array ( - ), - 879 => - array ( - ), - 880 => - array ( - ), - 881 => - array ( - ), - 882 => - array ( - ), - 883 => - array ( - ), - 884 => - array ( - ), - 885 => - array ( - ), - 886 => - array ( - ), - 887 => - array ( - ), - 889 => - array ( - ), - 891 => - array ( - ), - 892 => - array ( - ), - 893 => - array ( - ), - 894 => - array ( - ), - 896 => - array ( - ), - 897 => - array ( - ), - 898 => - array ( - ), - 901 => - array ( - ), - 903 => - array ( - ), - 904 => - array ( - ), - 905 => - array ( - ), - 906 => - array ( - ), - 907 => - array ( - ), - 914 => - array ( - ), - 915 => - array ( - ), - 916 => - array ( - ), - 917 => NULL, - 918 => - array ( - ), - 922 => - array ( - ), - 923 => - array ( - ), - 924 => - array ( - ), - 925 => - array ( - ), - 926 => - array ( - ), - 928 => - array ( - ), - 929 => - array ( - ), - 930 => - array ( - ), - 932 => - array ( - ), - 933 => - array ( - ), - 935 => - array ( - ), - 937 => - array ( - ), - 938 => - array ( - ), - 939 => - array ( - ), - 940 => - array ( - ), - 942 => - array ( - ), - 943 => NULL, - 944 => - array ( - ), - 951 => - array ( - ), - 952 => - array ( - ), - 953 => - array ( - ), - 954 => - array ( - ), - 956 => - array ( - ), - 957 => - array ( - ), - 958 => - array ( - ), - 959 => - array ( - ), - 961 => - array ( - ), - 962 => - array ( - ), - 963 => - array ( - ), - 964 => - array ( - ), - 965 => - array ( - ), - 966 => - array ( - ), - 968 => - array ( - ), - 969 => - array ( - ), - 972 => - array ( - ), - 973 => - array ( - ), - 974 => - array ( - ), - 975 => - array ( - ), - 976 => - array ( - ), - 977 => - array ( - ), - 978 => - array ( - ), - 979 => - array ( - ), - 981 => - array ( - ), - 983 => - array ( - ), - 985 => - array ( - ), - 986 => - array ( - ), - 987 => - array ( - ), - 988 => - array ( - ), - 989 => - array ( - ), - 990 => - array ( - ), - 991 => - array ( - ), - 992 => - array ( - ), - 993 => - array ( - ), - 994 => - array ( - ), - 995 => - array ( - ), - 996 => - array ( - ), - 997 => - array ( - ), - 998 => - array ( - ), - 999 => - array ( - ), - 1001 => - array ( - ), - 1003 => - array ( - ), - 1004 => - array ( - ), - 1006 => - array ( - ), - 1007 => - array ( - ), - 1008 => - array ( - ), - 1009 => - array ( - ), - 1010 => - array ( - ), - 1011 => - array ( - ), - 1012 => - array ( - ), - 1013 => - array ( - ), - 1014 => - array ( - ), - 1016 => - array ( - ), - 1017 => - array ( - ), - 1018 => - array ( - ), - 1019 => - array ( - ), - 1021 => - array ( - ), - 1023 => - array ( - ), - 1024 => - array ( - ), - 1025 => - array ( - ), - 1026 => - array ( - ), - 1027 => - array ( - ), - 1028 => - array ( - ), - 1029 => - array ( - ), - 1030 => - array ( - ), - 1031 => - array ( - ), - 1032 => - array ( - ), - 1033 => - array ( - ), - 1035 => - array ( - ), - 1036 => - array ( - ), - 1037 => - array ( - ), - 1039 => - array ( - ), - 1040 => NULL, - 1041 => - array ( - ), - 1045 => - array ( - ), - 1046 => - array ( - ), - 1048 => - array ( - ), - 1050 => - array ( - ), - 1053 => - array ( - ), - 1054 => - array ( - ), - 1056 => - array ( - ), - 1058 => - array ( - ), - 1059 => NULL, - 1071 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1072 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1073 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1074 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1075 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1082 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1083 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1084 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1085 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1086 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1087 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1088 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1089 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1090 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1091 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1092 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1093 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1094 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1102 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1103 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1104 => - array ( - ), - 1105 => - array ( - ), - 1106 => - array ( - ), - 1107 => - array ( - ), - 1109 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1110 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1111 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1112 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1113 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1115 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1116 => - array ( - ), - 1117 => - array ( - ), - 1118 => - array ( - ), - 1119 => - array ( - ), - 1120 => - array ( - ), - 1121 => - array ( - ), - 1122 => - array ( - ), - 1123 => - array ( - ), - 1124 => - array ( - ), - 1125 => - array ( - ), - 1128 => - array ( - ), - 1129 => - array ( - ), - 1130 => - array ( - ), - 1131 => - array ( - ), - 1132 => - array ( - ), - 1133 => - array ( - ), - 1134 => - array ( - ), - 1135 => - array ( - ), - 1136 => - array ( - ), - 1137 => - array ( - ), - 1138 => - array ( - ), - 1139 => - array ( - ), - 1140 => - array ( - ), - 1141 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1143 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1144 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1145 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1146 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1147 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1148 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1149 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1156 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1158 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1159 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1161 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1163 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1165 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1166 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1169 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1170 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1171 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1172 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1173 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1175 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1177 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1178 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1179 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1180 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1181 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1182 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1185 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1186 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1187 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1188 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1190 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1191 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1192 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1193 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1194 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1195 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1197 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1198 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1199 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1200 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1201 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1202 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1203 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1205 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1206 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1208 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1209 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1210 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1212 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1214 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1215 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1216 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1217 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1218 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1219 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1221 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1223 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1224 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1225 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1227 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1229 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1230 => - array ( - ), - 1231 => - array ( - ), - 1232 => - array ( - ), - 1233 => - array ( - ), - 1234 => - array ( - ), - 1235 => - array ( - ), - 1236 => - array ( - ), - 1237 => - array ( - ), - 1240 => - array ( - ), - 1241 => - array ( - ), - 1242 => - array ( - ), - 1243 => - array ( - ), - 1244 => - array ( - ), - 1245 => - array ( - ), - 1246 => - array ( - ), - 1247 => - array ( - ), - 1248 => - array ( - ), - 1249 => - array ( - ), - 1250 => - array ( - ), - 1251 => - array ( - ), - 1252 => - array ( - ), - 1253 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1255 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1256 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1257 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1259 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1260 => NULL, - 1267 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1268 => NULL, - 1280 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1281 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1282 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1283 => - array ( - ), - 1284 => - array ( - ), - 1285 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1287 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1288 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1289 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1290 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1291 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1292 => NULL, - 1304 => - array ( - ), - 1306 => - array ( - ), - 1307 => - array ( - ), - 1308 => - array ( - ), - 1310 => - array ( - ), - 1311 => NULL, - 1322 => - array ( - ), - 1323 => - array ( - ), - 1324 => NULL, - 1325 => - array ( - ), - 1326 => NULL, - 1337 => - array ( - ), - 1338 => - array ( - ), - 1339 => NULL, - 1340 => - array ( - ), - 1341 => NULL, - 1352 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1353 => NULL, - 1364 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1365 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1366 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1367 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1368 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1369 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1370 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1371 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1372 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1373 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1375 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1376 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1377 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1379 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1380 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1381 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1383 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1384 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1385 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1386 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1387 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1388 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1389 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1390 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1392 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 1393 => NULL, - 1400 => - array ( - ), - 1401 => - array ( - ), - 1402 => - array ( - ), - 1403 => - array ( - ), - 1404 => - array ( - ), - 1405 => - array ( - ), - 1407 => - array ( - ), - 1408 => - array ( - ), - 1409 => - array ( - ), - 1411 => - array ( - ), - 1412 => - array ( - ), - 1413 => - array ( - ), - 1415 => - array ( - ), - 1416 => - array ( - ), - 1417 => - array ( - ), - 1418 => - array ( - ), - 1419 => - array ( - ), - 1420 => - array ( - ), - 1421 => - array ( - ), - 1422 => - array ( - ), - 1423 => - array ( - ), - 1425 => - array ( - ), - 1426 => NULL, - 1430 => - array ( - ), - 1431 => - array ( - ), - 1432 => NULL, - 1433 => - array ( - ), - 1435 => NULL, - 1439 => - array ( - ), - 1440 => - array ( - ), - 1441 => NULL, - 1442 => - array ( - ), - 1444 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Permission.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/StripeObject.php' => - array ( - 28 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 29 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 30 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 31 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 33 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 35 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 36 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 43 => - array ( - ), - 44 => NULL, - 53 => - array ( - ), - 54 => - array ( - ), - 65 => - array ( - ), - 66 => - array ( - ), - 67 => - array ( - ), - 68 => - array ( - ), - 70 => - array ( - ), - 71 => - array ( - ), - 72 => - array ( - ), - 73 => - array ( - ), - 74 => - array ( - ), - 75 => - array ( - ), - 76 => - array ( - ), - 77 => - array ( - ), - 78 => - array ( - ), - 80 => - array ( - ), - 81 => - array ( - ), - 82 => - array ( - ), - 83 => - array ( - ), - 88 => - array ( - ), - 89 => - array ( - ), - 90 => - array ( - ), - 91 => - array ( - ), - 92 => - array ( - ), - 93 => - array ( - ), - 94 => NULL, - 96 => - array ( - ), - 97 => - array ( - ), - 98 => - array ( - ), - 99 => - array ( - ), - 101 => - array ( - ), - 103 => - array ( - ), - 104 => - array ( - ), - 105 => - array ( - ), - 106 => - array ( - ), - 110 => - array ( - ), - 111 => NULL, - 114 => - array ( - ), - 115 => - array ( - ), - 116 => - array ( - ), - 117 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 123 => - array ( - ), - 124 => - array ( - ), - 125 => - array ( - ), - 126 => - array ( - ), - 127 => - array ( - ), - 128 => - array ( - ), - 129 => - array ( - ), - 130 => - array ( - ), - 131 => - array ( - ), - 132 => - array ( - ), - 133 => - array ( - ), - 134 => - array ( - ), - 135 => NULL, - 136 => - array ( - ), - 137 => - array ( - ), - 138 => - array ( - ), - 140 => NULL, - 145 => - array ( - ), - 146 => - array ( - ), - 150 => - array ( - ), - 151 => NULL, - 155 => - array ( - ), - 156 => - array ( - ), - 159 => - array ( - ), - 160 => NULL, - 164 => - array ( - ), - 165 => NULL, - 177 => - array ( - ), - 178 => - array ( - ), - 179 => - array ( - ), - 180 => NULL, - 191 => - array ( - ), - 192 => - array ( - ), - 193 => - array ( - ), - 195 => - array ( - ), - 200 => - array ( - ), - 201 => - array ( - ), - 202 => - array ( - ), - 203 => - array ( - ), - 206 => - array ( - ), - 207 => - array ( - ), - 208 => - array ( - ), - 209 => NULL, - 211 => - array ( - ), - 212 => - array ( - ), - 214 => - array ( - ), - 215 => - array ( - ), - 216 => - array ( - ), - 217 => NULL, - 219 => - array ( - ), - 220 => - array ( - ), - 221 => - array ( - ), - 222 => - array ( - ), - 225 => - array ( - ), - 226 => - array ( - ), - 227 => - array ( - ), - 228 => - array ( - ), - 236 => - array ( - ), - 237 => - array ( - ), - 238 => - array ( - ), - 239 => - array ( - ), - 240 => - array ( - ), - 241 => - array ( - ), - 242 => - array ( - ), - 244 => - array ( - ), - 245 => - array ( - ), - 246 => - array ( - ), - 249 => - array ( - ), - 250 => - array ( - ), - 251 => - array ( - ), - 252 => - array ( - ), - 253 => - array ( - ), - 254 => - array ( - ), - 255 => - array ( - ), - 256 => - array ( - ), - 257 => - array ( - ), - 258 => - array ( - ), - 260 => - array ( - ), - 261 => NULL, - 265 => - array ( - ), - 266 => NULL, - 270 => - array ( - ), - 271 => - array ( - ), - 272 => NULL, - 273 => - array ( - ), - 275 => NULL, - 279 => - array ( - ), - 280 => - array ( - ), - 281 => NULL, - 285 => - array ( - ), - 286 => - array ( - ), - 287 => NULL, - 288 => - array ( - ), - 290 => NULL, - 293 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ExternalAccount.php' => - array ( - 18 => - array ( - ), - 19 => - array ( - ), - 20 => - array ( - ), - 21 => - array ( - ), - 22 => - array ( - ), - 23 => - array ( - ), - 24 => NULL, - 26 => - array ( - ), - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => - array ( - ), - 32 => - array ( - ), - 33 => - array ( - ), - 34 => - array ( - ), - 35 => - array ( - ), - 36 => - array ( - ), - 37 => - array ( - ), - 38 => - array ( - ), - 39 => - array ( - ), - 42 => - array ( - ), - 43 => - array ( - ), - 45 => - array ( - ), - 46 => - array ( - ), - 47 => - array ( - ), - 48 => NULL, - 58 => - array ( - ), - 59 => NULL, - 68 => - array ( - ), - 69 => NULL, - 79 => - array ( - ), - 80 => - array ( - ), - 81 => - array ( - ), - 82 => - array ( - ), - 83 => - array ( - ), - 84 => NULL, - 85 => - array ( - ), - 86 => - array ( - ), - 88 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApplicationFee.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 43 => - array ( - ), - 44 => NULL, - 54 => - array ( - ), - 55 => NULL, - 65 => - array ( - ), - 66 => - array ( - ), - 67 => - array ( - ), - 68 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/HttpClient/CurlClient.php' => - array ( - 17 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 18 => - array ( - ), - 19 => - array ( - ), - 20 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 21 => - array ( - ), - 22 => - array ( - ), - 31 => - array ( - ), - 32 => - array ( - ), - 33 => - array ( - ), - 34 => - array ( - ), - 35 => NULL, - 54 => - array ( - ), - 55 => - array ( - ), - 59 => - array ( - ), - 60 => NULL, - 72 => - array ( - ), - 73 => - array ( - ), - 74 => NULL, - 78 => - array ( - ), - 79 => - array ( - ), - 80 => NULL, - 84 => - array ( - ), - 85 => NULL, - 89 => - array ( - ), - 90 => NULL, - 96 => - array ( - ), - 97 => - array ( - ), - 99 => - array ( - ), - 100 => - array ( - ), - 101 => - array ( - ), - 102 => - array ( - ), - 103 => - array ( - ), - 104 => NULL, - 105 => - array ( - ), - 106 => - array ( - ), - 107 => - array ( - ), - 109 => - array ( - ), - 110 => - array ( - ), - 111 => - array ( - ), - 113 => - array ( - ), - 114 => NULL, - 115 => - array ( - ), - 116 => - array ( - ), - 117 => - array ( - ), - 118 => - array ( - ), - 119 => - array ( - ), - 120 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 123 => - array ( - ), - 124 => - array ( - ), - 125 => - array ( - ), - 126 => - array ( - ), - 127 => - array ( - ), - 128 => - array ( - ), - 129 => - array ( - ), - 130 => - array ( - ), - 134 => - array ( - ), - 137 => - array ( - ), - 138 => - array ( - ), - 139 => NULL, - 140 => - array ( - ), - 141 => - array ( - ), - 142 => - array ( - ), - 143 => - array ( - ), - 157 => - array ( - ), - 159 => - array ( - ), - 160 => - array ( - ), - 161 => - array ( - ), - 162 => - array ( - ), - 163 => - array ( - ), - 164 => - array ( - ), - 165 => - array ( - ), - 166 => - array ( - ), - 167 => - array ( - ), - 168 => - array ( - ), - 170 => - array ( - ), - 171 => - array ( - ), - 173 => - array ( - ), - 174 => - array ( - ), - 175 => - array ( - ), - 177 => - array ( - ), - 178 => - array ( - ), - 179 => - array ( - ), - 181 => - array ( - ), - 182 => - array ( - ), - 183 => - array ( - ), - 185 => - array ( - ), - 186 => - array ( - ), - 187 => - array ( - ), - 188 => - array ( - ), - 189 => - array ( - ), - 190 => - array ( - ), - 192 => - array ( - ), - 193 => - array ( - ), - 194 => - array ( - ), - 195 => - array ( - ), - 196 => - array ( - ), - 197 => - array ( - ), - 199 => - array ( - ), - 200 => - array ( - ), - 201 => - array ( - ), - 202 => NULL, - 212 => - array ( - ), - 213 => - array ( - ), - 214 => - array ( - ), - 215 => - array ( - ), - 217 => - array ( - ), - 218 => - array ( - ), - 219 => - array ( - ), - 220 => - array ( - ), - 221 => - array ( - ), - 224 => - array ( - ), - 225 => - array ( - ), - 226 => - array ( - ), - 227 => - array ( - ), - 229 => - array ( - ), - 230 => - array ( - ), - 231 => - array ( - ), - 233 => - array ( - ), - 234 => - array ( - ), - 235 => NULL, - 239 => - array ( - ), - 240 => NULL, - 252 => - array ( - ), - 253 => - array ( - ), - 254 => NULL, - 256 => - array ( - ), - 257 => - array ( - ), - 258 => - array ( - ), - 259 => - array ( - ), - 260 => NULL, - 262 => - array ( - ), - 263 => - array ( - ), - 264 => - array ( - ), - 265 => - array ( - ), - 266 => - array ( - ), - 268 => - array ( - ), - 270 => - array ( - ), - 271 => - array ( - ), - 272 => - array ( - ), - 273 => - array ( - ), - 274 => - array ( - ), - 275 => - array ( - ), - 276 => - array ( - ), - 278 => - array ( - ), - 280 => - array ( - ), - 281 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/AttachedObject.php' => - array ( - 21 => - array ( - ), - 23 => - array ( - ), - 24 => - array ( - ), - 25 => - array ( - ), - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Invoice.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - 54 => - array ( - ), - 55 => NULL, - 65 => - array ( - ), - 66 => - array ( - ), - 67 => - array ( - ), - 68 => - array ( - ), - 69 => - array ( - ), - 70 => NULL, - 79 => - array ( - ), - 80 => NULL, - 87 => - array ( - ), - 88 => - array ( - ), - 89 => - array ( - ), - 90 => - array ( - ), - 91 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/AutoPagingIterator.php' => - array ( - 14 => - array ( - ), - 15 => - array ( - ), - 16 => - array ( - ), - 21 => - array ( - ), - 25 => - array ( - ), - 26 => - array ( - ), - 28 => - array ( - ), - 29 => NULL, - 33 => - array ( - ), - 34 => NULL, - 38 => - array ( - ), - 39 => - array ( - ), - 42 => - array ( - ), - 43 => - array ( - ), - 44 => - array ( - ), - 45 => - array ( - ), - 46 => - array ( - ), - 47 => - array ( - ), - 48 => - array ( - ), - 49 => - array ( - ), - 50 => - array ( - ), - 52 => - array ( - ), - 53 => - array ( - ), - 57 => - array ( - ), - 58 => - array ( - ), - 59 => - array ( - ), - 60 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BitcoinTransaction.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Plan.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 43 => - array ( - ), - 44 => NULL, - 54 => - array ( - ), - 55 => NULL, - 64 => - array ( - ), - 65 => NULL, - 75 => - array ( - ), - 76 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/init.php' => - array ( - 4 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 7 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 8 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 9 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 10 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 13 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 14 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 17 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 18 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 19 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 20 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 21 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 22 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 23 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 24 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 27 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 28 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 29 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 30 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 31 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 32 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 33 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 34 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 37 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 38 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 39 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 40 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 41 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 42 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 43 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 44 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 45 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 46 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 47 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 48 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 49 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 50 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 51 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 52 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 53 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 54 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 55 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 56 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 57 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 58 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 59 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 60 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 61 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 62 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 63 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 64 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 65 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 66 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 67 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 68 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 69 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 70 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 71 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/HttpClient/ClientInterface.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApiResource.php' => - array ( - 16 => - array ( - ), - 17 => NULL, - 24 => - array ( - ), - 25 => - array ( - ), - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => - array ( - ), - 32 => - array ( - ), - 33 => - array ( - ), - 34 => - array ( - ), - 35 => - array ( - ), - 36 => NULL, - 44 => - array ( - ), - 46 => - array ( - ), - 47 => - array ( - ), - 48 => - array ( - ), - 50 => - array ( - ), - 51 => - array ( - ), - 52 => - array ( - ), - 53 => - array ( - ), - 54 => - array ( - ), - 55 => - array ( - ), - 56 => - array ( - ), - 57 => - array ( - ), - 58 => - array ( - ), - 59 => - array ( - ), - 60 => NULL, - 67 => - array ( - ), - 68 => - array ( - ), - 76 => - array ( - ), - 77 => - array ( - ), - 79 => - array ( - ), - 80 => - array ( - ), - 81 => NULL, - 82 => - array ( - ), - 83 => - array ( - ), - 84 => - array ( - ), - 85 => - array ( - ), - 86 => NULL, - 93 => - array ( - ), - 94 => NULL, - 98 => - array ( - ), - 101 => - array ( - ), - 102 => - array ( - ), - 103 => - array ( - ), - 104 => - array ( - ), - 105 => NULL, - 106 => - array ( - ), - 110 => - array ( - ), - 111 => - array ( - ), - 112 => - array ( - ), - 113 => - array ( - ), - 114 => NULL, - 118 => - array ( - ), - 119 => - array ( - ), - 120 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 123 => - array ( - ), - 124 => - array ( - ), - 125 => - array ( - ), - 126 => - array ( - ), - 127 => NULL, - 131 => - array ( - ), - 132 => - array ( - ), - 133 => - array ( - ), - 134 => - array ( - ), - 135 => NULL, - 139 => - array ( - ), - 140 => - array ( - ), - 142 => - array ( - ), - 143 => - array ( - ), - 144 => - array ( - ), - 145 => - array ( - ), - 146 => - array ( - ), - 147 => - array ( - ), - 148 => NULL, - 149 => - array ( - ), - 150 => - array ( - ), - 151 => - array ( - ), - 152 => NULL, - 156 => - array ( - ), - 157 => - array ( - ), - 158 => - array ( - ), - 160 => - array ( - ), - 161 => - array ( - ), - 162 => - array ( - ), - 163 => - array ( - ), - 164 => NULL, - 175 => - array ( - ), - 176 => - array ( - ), - 177 => - array ( - ), - 179 => - array ( - ), - 180 => - array ( - ), - 181 => - array ( - ), - 182 => - array ( - ), - 183 => NULL, - 187 => - array ( - ), - 188 => - array ( - ), - 189 => - array ( - ), - 190 => - array ( - ), - 191 => - array ( - ), - 192 => - array ( - ), - 193 => - array ( - ), - 194 => NULL, - 198 => - array ( - ), - 200 => - array ( - ), - 201 => - array ( - ), - 202 => - array ( - ), - 203 => - array ( - ), - 204 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApplicationFeeRefund.php' => - array ( - 17 => - array ( - ), - 18 => - array ( - ), - 19 => - array ( - ), - 20 => - array ( - ), - 22 => - array ( - ), - 24 => - array ( - ), - 25 => NULL, - 26 => - array ( - ), - 27 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => - array ( - ), - 32 => - array ( - ), - 33 => NULL, - 42 => - array ( - ), - 43 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApiRequestor.php' => - array ( - 20 => - array ( - ), - 21 => - array ( - ), - 22 => - array ( - ), - 23 => - array ( - ), - 24 => - array ( - ), - 25 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => - array ( - ), - 32 => - array ( - ), - 33 => - array ( - ), - 34 => - array ( - ), - 35 => - array ( - ), - 36 => - array ( - ), - 37 => - array ( - ), - 38 => - array ( - ), - 39 => - array ( - ), - 40 => - array ( - ), - 41 => NULL, - 42 => - array ( - ), - 44 => NULL, - 57 => - array ( - ), - 58 => - array ( - ), - 59 => - array ( - ), - 60 => - array ( - ), - 61 => - array ( - ), - 62 => - array ( - ), - 64 => - array ( - ), - 65 => - array ( - ), - 66 => - array ( - ), - 67 => - array ( - ), - 68 => NULL, - 89 => - array ( - ), - 90 => - array ( - ), - 91 => - array ( - ), - 92 => - array ( - ), - 93 => NULL, - 95 => - array ( - ), - 96 => - array ( - ), - 97 => - array ( - ), - 98 => - array ( - ), - 101 => - array ( - ), - 104 => - array ( - ), - 105 => - array ( - ), - 106 => NULL, - 109 => - array ( - ), - 110 => - array ( - ), - 111 => - array ( - ), - 112 => - array ( - ), - 113 => - array ( - ), - 114 => - array ( - ), - 115 => - array ( - ), - 116 => - array ( - ), - 117 => - array ( - ), - 118 => - array ( - ), - 119 => - array ( - ), - 120 => - array ( - ), - 121 => - array ( - ), - 122 => NULL, - 126 => - array ( - ), - 127 => - array ( - ), - 128 => - array ( - ), - 129 => - array ( - ), - 130 => - array ( - ), - 131 => - array ( - ), - 132 => - array ( - ), - 133 => - array ( - ), - 134 => - array ( - ), - 135 => NULL, - 136 => - array ( - ), - 138 => NULL, - 142 => - array ( - ), - 144 => - array ( - ), - 146 => - array ( - ), - 147 => - array ( - ), - 148 => - array ( - ), - 149 => - array ( - ), - 151 => - array ( - ), - 152 => - array ( - ), - 153 => - array ( - ), - 154 => - array ( - ), - 155 => - array ( - ), - 156 => - array ( - ), - 157 => - array ( - ), - 158 => - array ( - ), - 159 => - array ( - ), - 160 => - array ( - ), - 161 => - array ( - ), - 162 => - array ( - ), - 165 => - array ( - ), - 166 => - array ( - ), - 167 => - array ( - ), - 168 => - array ( - ), - 169 => - array ( - ), - 170 => NULL, - 174 => - array ( - ), - 175 => - array ( - ), - 176 => - array ( - ), - 177 => - array ( - ), - 179 => - array ( - ), - 182 => - array ( - ), - 183 => - array ( - ), - 184 => - array ( - ), - 185 => NULL, - 187 => - array ( - ), - 188 => - array ( - ), - 189 => - array ( - ), - 190 => - array ( - ), - 191 => - array ( - ), - 192 => - array ( - ), - 194 => - array ( - ), - 195 => - array ( - ), - 196 => - array ( - ), - 198 => - array ( - ), - 199 => - array ( - ), - 200 => - array ( - ), - 201 => - array ( - ), - 202 => - array ( - ), - 203 => - array ( - ), - 204 => - array ( - ), - 205 => - array ( - ), - 206 => - array ( - ), - 207 => - array ( - ), - 209 => - array ( - ), - 210 => - array ( - ), - 211 => - array ( - ), - 212 => - array ( - ), - 215 => - array ( - ), - 216 => - array ( - ), - 218 => - array ( - ), - 219 => - array ( - ), - 220 => - array ( - ), - 222 => - array ( - ), - 223 => - array ( - ), - 224 => - array ( - ), - 225 => - array ( - ), - 226 => - array ( - ), - 228 => - array ( - ), - 229 => - array ( - ), - 230 => NULL, - 234 => - array ( - ), - 235 => - array ( - ), - 237 => - array ( - ), - 238 => NULL, - 240 => - array ( - ), - 241 => - array ( - ), - 242 => - array ( - ), - 244 => - array ( - ), - 245 => NULL, - 247 => - array ( - ), - 249 => - array ( - ), - 250 => NULL, - 251 => - array ( - ), - 253 => NULL, - 258 => - array ( - ), - 259 => - array ( - ), - 260 => - array ( - ), - 261 => - array ( - ), - 262 => - array ( - ), - 265 => - array ( - ), - 266 => - array ( - ), - 267 => - array ( - ), - 268 => - array ( - ), - 269 => NULL, - 273 => - array ( - ), - 274 => - array ( - ), - 278 => - array ( - ), - 279 => - array ( - ), - 280 => - array ( - ), - 281 => - array ( - ), - 282 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Card.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Authentication.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/InvalidRequest.php' => - array ( - 15 => - array ( - ), - 16 => - array ( - ), - 17 => - array ( - ), - 21 => - array ( - ), - 22 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Collection.php' => - array ( - 21 => - array ( - ), - 22 => - array ( - ), - 26 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => NULL, - 35 => - array ( - ), - 37 => - array ( - ), - 38 => - array ( - ), - 39 => - array ( - ), - 40 => NULL, - 44 => - array ( - ), - 46 => - array ( - ), - 47 => - array ( - ), - 48 => - array ( - ), - 49 => - array ( - ), - 50 => - array ( - ), - 51 => - array ( - ), - 53 => - array ( - ), - 54 => - array ( - ), - 55 => - array ( - ), - 56 => NULL, - 66 => - array ( - ), - 67 => NULL, - 71 => - array ( - ), - 72 => - array ( - ), - 73 => - array ( - ), - 74 => NULL, - 76 => - array ( - ), - 79 => - array ( - ), - 80 => - array ( - ), - 82 => - array ( - ), - 83 => - array ( - ), - 85 => - array ( - ), - 86 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/SubscriptionItem.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - 53 => - array ( - ), - 54 => NULL, - 65 => - array ( - ), - 66 => NULL, - 75 => - array ( - ), - 76 => NULL, - 86 => - array ( - ), - 87 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Stripe.php' => - array ( - 40 => - array ( - ), - 41 => NULL, - 50 => - array ( - ), - 51 => - array ( - ), - 59 => - array ( - ), - 60 => NULL, - 67 => - array ( - ), - 68 => - array ( - ), - 75 => - array ( - ), - 76 => NULL, - 83 => - array ( - ), - 84 => - array ( - ), - 92 => - array ( - ), - 93 => NULL, - 101 => - array ( - ), - 102 => - array ( - ), - 109 => - array ( - ), - 110 => NULL, - 119 => - array ( - ), - 120 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 123 => - array ( - ), - 124 => - array ( - ), - 125 => - array ( - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/Set.php' => - array ( - 14 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 15 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 16 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 17 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 18 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 22 => - array ( - ), - 23 => NULL, - 27 => - array ( - ), - 28 => - array ( - ), - 32 => - array ( - ), - 33 => - array ( - ), - 37 => - array ( - ), - 38 => NULL, - 42 => - array ( - ), - 43 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Coupon.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 43 => - array ( - ), - 44 => NULL, - 54 => - array ( - ), - 55 => NULL, - 64 => - array ( - ), - 65 => NULL, - 75 => - array ( - ), - 76 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Product.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 43 => - array ( - ), - 44 => NULL, - 53 => - array ( - ), - 54 => NULL, - 64 => - array ( - ), - 65 => NULL, - 75 => - array ( - ), - 76 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Transfer.php' => - array ( - 47 => - array ( - ), - 48 => NULL, - 58 => - array ( - ), - 59 => NULL, - 69 => - array ( - ), - 70 => NULL, - 81 => - array ( - ), - 82 => NULL, - 89 => - array ( - ), - 90 => - array ( - ), - 91 => - array ( - ), - 92 => - array ( - ), - 93 => NULL, - 100 => - array ( - ), - 101 => - array ( - ), - 102 => - array ( - ), - 103 => - array ( - ), - 104 => NULL, - 113 => - array ( - ), - 114 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/RequestOptions.php' => - array ( - 14 => - array ( - ), - 15 => - array ( - ), - 16 => - array ( - ), - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => - array ( - ), - 31 => - array ( - ), - 32 => - array ( - ), - 33 => NULL, - 43 => - array ( - ), - 44 => - array ( - ), - 45 => NULL, - 47 => - array ( - ), - 48 => - array ( - ), - 49 => NULL, - 51 => - array ( - ), - 52 => - array ( - ), - 53 => NULL, - 55 => - array ( - ), - 56 => - array ( - ), - 57 => - array ( - ), - 58 => - array ( - ), - 59 => - array ( - ), - 60 => - array ( - ), - 61 => - array ( - ), - 62 => - array ( - ), - 63 => - array ( - ), - 64 => - array ( - ), - 65 => - array ( - ), - 66 => - array ( - ), - 67 => - array ( - ), - 68 => - array ( - ), - 69 => - array ( - ), - 70 => - array ( - ), - 71 => NULL, - 75 => - array ( - ), - 76 => - array ( - ), - 77 => - array ( - ), - 78 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Dispute.php' => - array ( - 35 => - array ( - ), - 36 => NULL, - 46 => - array ( - ), - 47 => NULL, - 58 => - array ( - ), - 59 => NULL, - 68 => - array ( - ), - 69 => NULL, - 78 => - array ( - ), - 79 => - array ( - ), - 80 => - array ( - ), - 81 => - array ( - ), - 82 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/AlipayAccount.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BitcoinReceiver.php' => - array ( - 18 => - array ( - ), - 19 => NULL, - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 30 => NULL, - 31 => - array ( - ), - 32 => - array ( - ), - 33 => - array ( - ), - 34 => - array ( - ), - 35 => - array ( - ), - 37 => NULL, - 47 => - array ( - ), - 48 => NULL, - 58 => - array ( - ), - 59 => NULL, - 69 => - array ( - ), - 70 => NULL, - 80 => - array ( - ), - 81 => - array ( - ), - 82 => - array ( - ), - 83 => - array ( - ), - 84 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/CountrySpec.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/SKU.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 43 => - array ( - ), - 44 => NULL, - 53 => - array ( - ), - 54 => NULL, - 64 => - array ( - ), - 65 => NULL, - 75 => - array ( - ), - 76 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Event.php' => - array ( - 30 => - array ( - ), - 31 => NULL, - 41 => - array ( - ), - 42 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/Util.php' => - array ( - 19 => - array ( - ), - 20 => - array ( - ), - 21 => NULL, - 24 => - array ( - ), - 25 => - array ( - ), - 26 => - array ( - ), - 27 => NULL, - 28 => - array ( - ), - 29 => - array ( - ), - 30 => NULL, - 40 => - array ( - ), - 41 => - array ( - ), - 43 => - array ( - ), - 44 => - array ( - ), - 45 => NULL, - 46 => - array ( - ), - 47 => - array ( - ), - 48 => - array ( - ), - 49 => - array ( - ), - 50 => - array ( - ), - 51 => - array ( - ), - 53 => - array ( - ), - 54 => - array ( - ), - 55 => NULL, - 67 => - array ( - ), - 68 => - array ( - ), - 69 => - array ( - ), - 70 => - array ( - ), - 71 => - array ( - ), - 72 => - array ( - ), - 73 => - array ( - ), - 74 => - array ( - ), - 75 => - array ( - ), - 76 => - array ( - ), - 77 => - array ( - ), - 78 => - array ( - ), - 79 => - array ( - ), - 80 => - array ( - ), - 81 => - array ( - ), - 82 => - array ( - ), - 83 => - array ( - ), - 84 => - array ( - ), - 85 => - array ( - ), - 86 => - array ( - ), - 87 => - array ( - ), - 88 => - array ( - ), - 89 => - array ( - ), - 90 => - array ( - ), - 91 => - array ( - ), - 92 => - array ( - ), - 93 => - array ( - ), - 94 => - array ( - ), - 95 => - array ( - ), - 96 => - array ( - ), - 97 => - array ( - ), - 98 => - array ( - ), - 99 => - array ( - ), - 100 => - array ( - ), - 101 => - array ( - ), - 102 => - array ( - ), - 103 => - array ( - ), - 104 => - array ( - ), - 105 => - array ( - ), - 106 => - array ( - ), - 107 => - array ( - ), - 108 => - array ( - ), - 109 => - array ( - ), - 110 => - array ( - ), - 111 => - array ( - ), - 113 => - array ( - ), - 114 => NULL, - 115 => - array ( - ), - 117 => NULL, - 127 => - array ( - ), - 128 => - array ( - ), - 130 => - array ( - ), - 131 => - array ( - ), - 132 => - array ( - ), - 133 => - array ( - ), - 134 => - array ( - ), - 135 => - array ( - ), - 136 => - array ( - ), - 138 => - array ( - ), - 139 => - array ( - ), - 140 => NULL, - 141 => - array ( - ), - 143 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Api.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Order.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 43 => - array ( - ), - 44 => NULL, - 53 => - array ( - ), - 54 => NULL, - 64 => - array ( - ), - 65 => NULL, - 72 => - array ( - ), - 73 => - array ( - ), - 74 => - array ( - ), - 75 => - array ( - ), - 76 => NULL, - 83 => - array ( - ), - 84 => - array ( - ), - 85 => - array ( - ), - 86 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Refund.php' => - array ( - 33 => - array ( - ), - 34 => NULL, - 45 => - array ( - ), - 46 => NULL, - 56 => - array ( - ), - 57 => NULL, - 67 => - array ( - ), - 68 => NULL, - 77 => - array ( - ), - 78 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/JsonSerializable.php' => - array ( - 6 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - 10 => - array ( - 0 => 'TestAdmin::testPageConfig', - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Account.php' => - array ( - 41 => - array ( - ), - 42 => - array ( - ), - 43 => NULL, - 44 => - array ( - ), - 46 => NULL, - 56 => - array ( - ), - 57 => - array ( - ), - 58 => - array ( - ), - 59 => - array ( - ), - 60 => - array ( - ), - 61 => NULL, - 71 => - array ( - ), - 72 => NULL, - 83 => - array ( - ), - 84 => NULL, - 93 => - array ( - ), - 94 => NULL, - 104 => - array ( - ), - 105 => NULL, - 115 => - array ( - ), - 116 => - array ( - ), - 117 => - array ( - ), - 118 => - array ( - ), - 119 => NULL, - 129 => - array ( - ), - 130 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/RateLimit.php' => - array ( - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApplePayDomain.php' => - array ( - 19 => - array ( - ), - 20 => NULL, - 30 => - array ( - ), - 31 => NULL, - 41 => - array ( - ), - 42 => NULL, - 52 => - array ( - ), - 53 => NULL, - 63 => - array ( - ), - 64 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Card.php' => - array ( - 16 => - array ( - ), - 17 => - array ( - ), - 18 => - array ( - ), - 24 => - array ( - ), - 25 => - array ( - ), - 29 => - array ( - ), - 30 => NULL, - 34 => - array ( - ), - 35 => NULL, - 39 => - array ( - ), - 40 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Subscription.php' => - array ( - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - 53 => - array ( - ), - 54 => NULL, - 65 => - array ( - ), - 66 => NULL, - 75 => - array ( - ), - 76 => NULL, - 85 => - array ( - ), - 86 => NULL, - 93 => - array ( - ), - 94 => - array ( - ), - 95 => - array ( - ), - 96 => - array ( - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/TransferReversal.php' => - array ( - 26 => - array ( - ), - 27 => - array ( - ), - 28 => - array ( - ), - 29 => - array ( - ), - 31 => - array ( - ), - 33 => - array ( - ), - 34 => NULL, - 35 => - array ( - ), - 36 => - array ( - ), - 38 => - array ( - ), - 39 => - array ( - ), - 40 => - array ( - ), - 41 => - array ( - ), - 42 => NULL, - 51 => - array ( - ), - 52 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Base.php' => - array ( - 16 => - array ( - ), - 17 => - array ( - ), - 18 => - array ( - ), - 19 => - array ( - ), - 20 => - array ( - ), - 21 => - array ( - ), - 23 => - array ( - ), - 24 => - array ( - ), - 25 => - array ( - ), - 26 => - array ( - ), - 30 => - array ( - ), - 31 => NULL, - 35 => - array ( - ), - 36 => NULL, - 40 => - array ( - ), - 41 => NULL, - 45 => - array ( - ), - 46 => NULL, - 50 => - array ( - ), - 51 => NULL, - 55 => - array ( - ), - 56 => - array ( - ), - 57 => - array ( - ), - 58 => - array ( - ), - 59 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BalanceTransaction.php' => - array ( - 33 => - array ( - ), - 34 => NULL, - 44 => - array ( - ), - 45 => NULL, - 55 => - array ( - ), - 56 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/FileUpload.php' => - array ( - 21 => - array ( - ), - 22 => NULL, - 26 => - array ( - ), - 27 => NULL, - 37 => - array ( - ), - 38 => NULL, - 48 => - array ( - ), - 49 => NULL, - 59 => - array ( - ), - 60 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Customer.php' => - array ( - 37 => - array ( - ), - 38 => NULL, - 48 => - array ( - ), - 49 => NULL, - 59 => - array ( - ), - 60 => NULL, - 71 => - array ( - ), - 72 => NULL, - 81 => - array ( - ), - 82 => NULL, - 92 => - array ( - ), - 93 => NULL, - 102 => - array ( - ), - 103 => - array ( - ), - 104 => - array ( - ), - 105 => - array ( - ), - 106 => - array ( - ), - 107 => - array ( - ), - 108 => NULL, - 117 => - array ( - ), - 118 => - array ( - ), - 119 => - array ( - ), - 120 => - array ( - ), - 121 => - array ( - ), - 122 => - array ( - ), - 123 => NULL, - 132 => - array ( - ), - 133 => - array ( - ), - 134 => - array ( - ), - 135 => - array ( - ), - 136 => - array ( - ), - 137 => - array ( - ), - 138 => NULL, - 147 => - array ( - ), - 148 => - array ( - ), - 149 => - array ( - ), - 150 => - array ( - ), - 151 => - array ( - ), - 152 => - array ( - ), - 153 => NULL, - 162 => - array ( - ), - 163 => - array ( - ), - 164 => - array ( - ), - 165 => - array ( - ), - 166 => NULL, - 175 => - array ( - ), - 176 => - array ( - ), - 177 => - array ( - ), - 178 => - array ( - ), - 179 => NULL, - 186 => - array ( - ), - 187 => - array ( - ), - 188 => - array ( - ), - 189 => - array ( - ), - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/InvoiceItem.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - 42 => - array ( - ), - 43 => NULL, - 54 => - array ( - ), - 55 => NULL, - 64 => - array ( - ), - 65 => NULL, - 75 => - array ( - ), - 76 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/OrderReturn.php' => - array ( - 20 => - array ( - ), - 21 => NULL, - 31 => - array ( - ), - 32 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BankAccount.php' => - array ( - 20 => - array ( - ), - 21 => - array ( - ), - 22 => - array ( - ), - 23 => - array ( - ), - 24 => NULL, - ), - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Balance.php' => - array ( - 24 => - array ( - ), - 25 => NULL, - ), -)); -$coverage->setTests(array ( - 'TestAdmin::testPageConfig' => - array ( - 'size' => 'unknown', - 'status' => 0, - ), -)); - -$filter = $coverage->filter(); -$filter->setBlacklistedFiles(array ( - '/202/vendor/phpunit/php-file-iterator/src/Facade.php' => true, - '/202/vendor/phpunit/php-file-iterator/src/Factory.php' => true, - '/202/vendor/phpunit/php-file-iterator/src/Iterator.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php' => true, - '/202/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php' => true, - '/202/vendor/phpunit/php-timer/src/Timer.php' => true, - '/202/vendor/phpunit/php-token-stream/src/Token.php' => true, - '/202/vendor/phpunit/php-token-stream/src/Token/Stream.php' => true, - '/202/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php' => true, - '/202/vendor/phpunit/phpunit/src/Exception.php' => true, - '/202/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php' => true, - '/202/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php' => true, - '/202/vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php' => true, - '/202/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php' => true, - '/202/vendor/phpunit/phpunit/src/Extensions/TestDecorator.php' => true, - '/202/vendor/phpunit/phpunit/src/Extensions/TicketListener.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/Assert.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/TestCase.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/TestListener.php' => true, - '/202/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Assert.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/AssertionFailedError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/CodeCoverageException.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/And.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Error.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Error/Notice.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Error/Warning.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Exception.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/IncompleteTestError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/OutputError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/RiskyTest.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/RiskyTestError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/SkippedTest.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/SkippedTestError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/SyntheticError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Test.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/TestCase.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/TestFailure.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/TestListener.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/TestResult.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/TestSuite.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php' => true, - '/202/vendor/phpunit/phpunit/src/Framework/Warning.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Exception.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Filter/Group.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Filter/Group/Include.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Filter/Test.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php' => true, - '/202/vendor/phpunit/phpunit/src/Runner/Version.php' => true, - '/202/vendor/phpunit/phpunit/src/TextUI/Command.php' => true, - '/202/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php' => true, - '/202/vendor/phpunit/phpunit/src/TextUI/TestRunner.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Blacklist.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Configuration.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/ErrorHandler.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Fileloader.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Filesystem.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Filter.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Getopt.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/GlobalState.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/InvalidArgumentHelper.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Log/JSON.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Log/JUnit.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Log/TAP.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/PHP.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/PHP/Default.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/PHP/Windows.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Printer.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Regex.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/String.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Test.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/TestSuiteIterator.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/Type.php' => true, - '/202/vendor/phpunit/phpunit/src/Util/XML.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php' => true, - '/202/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php' => true, - '/202/vendor/phpunit/php-text-template/src/Template.php' => true, - '/202/vendor/symfony/yaml/Command/LintCommand.php' => true, - '/202/vendor/symfony/yaml/Dumper.php' => true, - '/202/vendor/symfony/yaml/Escaper.php' => true, - '/202/vendor/symfony/yaml/Exception/DumpException.php' => true, - '/202/vendor/symfony/yaml/Exception/ExceptionInterface.php' => true, - '/202/vendor/symfony/yaml/Exception/ParseException.php' => true, - '/202/vendor/symfony/yaml/Exception/RuntimeException.php' => true, - '/202/vendor/symfony/yaml/Inline.php' => true, - '/202/vendor/symfony/yaml/Parser.php' => true, - '/202/vendor/symfony/yaml/Tag/TaggedValue.php' => true, - '/202/vendor/symfony/yaml/Tests/Command/LintCommandTest.php' => true, - '/202/vendor/symfony/yaml/Tests/DumperTest.php' => true, - '/202/vendor/symfony/yaml/Tests/InlineTest.php' => true, - '/202/vendor/symfony/yaml/Tests/ParseExceptionTest.php' => true, - '/202/vendor/symfony/yaml/Tests/ParserTest.php' => true, - '/202/vendor/symfony/yaml/Tests/YamlTest.php' => true, - '/202/vendor/symfony/yaml/Unescaper.php' => true, - '/202/vendor/symfony/yaml/Yaml.php' => true, - '/202/vendor/sebastian/diff/src/Chunk.php' => true, - '/202/vendor/sebastian/diff/src/Diff.php' => true, - '/202/vendor/sebastian/diff/src/Differ.php' => true, - '/202/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php' => true, - '/202/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php' => true, - '/202/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php' => true, - '/202/vendor/sebastian/diff/src/Line.php' => true, - '/202/vendor/sebastian/diff/src/Parser.php' => true, - '/202/vendor/sebastian/environment/src/Console.php' => true, - '/202/vendor/sebastian/environment/src/Runtime.php' => true, - '/202/vendor/sebastian/comparator/src/ArrayComparator.php' => true, - '/202/vendor/sebastian/comparator/src/Comparator.php' => true, - '/202/vendor/sebastian/comparator/src/ComparisonFailure.php' => true, - '/202/vendor/sebastian/comparator/src/DOMNodeComparator.php' => true, - '/202/vendor/sebastian/comparator/src/DateTimeComparator.php' => true, - '/202/vendor/sebastian/comparator/src/DoubleComparator.php' => true, - '/202/vendor/sebastian/comparator/src/ExceptionComparator.php' => true, - '/202/vendor/sebastian/comparator/src/Factory.php' => true, - '/202/vendor/sebastian/comparator/src/MockObjectComparator.php' => true, - '/202/vendor/sebastian/comparator/src/NumericComparator.php' => true, - '/202/vendor/sebastian/comparator/src/ObjectComparator.php' => true, - '/202/vendor/sebastian/comparator/src/ResourceComparator.php' => true, - '/202/vendor/sebastian/comparator/src/ScalarComparator.php' => true, - '/202/vendor/sebastian/comparator/src/SplObjectStorageComparator.php' => true, - '/202/vendor/sebastian/comparator/src/TypeComparator.php' => true, - '/202/vendor/sebastian/exporter/src/Exporter.php' => true, - '/202/vendor/sebastian/global-state/src/Blacklist.php' => true, - '/202/vendor/sebastian/global-state/src/CodeExporter.php' => true, - '/202/vendor/sebastian/global-state/src/Exception.php' => true, - '/202/vendor/sebastian/global-state/src/Restorer.php' => true, - '/202/vendor/sebastian/global-state/src/RuntimeException.php' => true, - '/202/vendor/sebastian/global-state/src/Snapshot.php' => true, - '/202/vendor/sebastian/recursion-context/src/Context.php' => true, - '/202/vendor/sebastian/recursion-context/src/Exception.php' => true, - '/202/vendor/sebastian/recursion-context/src/InvalidArgumentException.php' => true, - '/202/vendor/sebastian/version/src/Version.php' => true, - '/202/vendor/composer/ClassLoader.php' => true, - '/202/vendor/composer/autoload_classmap.php' => true, - '/202/vendor/composer/autoload_namespaces.php' => true, - '/202/vendor/composer/autoload_psr4.php' => true, - '/202/vendor/composer/autoload_real.php' => true, - '/202/vendor/composer/autoload_static.php' => true, - '/202/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php' => true, - '/202/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php' => true, - '/202/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php' => true, - '/202/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php' => true, - '/202/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php' => true, - '/202/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Prophet.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php' => true, - '/202/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php' => true, -)); -$filter->setWhitelistedFiles(array ( - '/var/www/html/modules/stripe_official/confirmation_3d.php' => true, - '/var/www/html/modules/stripe_official/controllers/front/ajax.php' => true, - '/var/www/html/modules/stripe_official/controllers/front/validation.php' => true, - '/var/www/html/modules/stripe_official/controllers/front/webhook.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/build.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/init.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Account.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/AlipayAccount.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApiRequestor.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApiResource.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApiResponse.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApplePayDomain.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApplicationFee.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ApplicationFeeRefund.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/AttachedObject.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Balance.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BalanceTransaction.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BankAccount.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BitcoinReceiver.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/BitcoinTransaction.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Card.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Charge.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Collection.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/CountrySpec.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Coupon.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Customer.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Dispute.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Api.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/ApiConnection.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Authentication.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Base.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Card.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/InvalidRequest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/Permission.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Error/RateLimit.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Event.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ExternalAccount.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/FileUpload.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/HttpClient/ClientInterface.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/HttpClient/CurlClient.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Invoice.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/InvoiceItem.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/JsonSerializable.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Order.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/OrderReturn.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Plan.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Product.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Recipient.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Refund.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/SKU.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/SingletonApiResource.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Source.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Stripe.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/StripeObject.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Subscription.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/SubscriptionItem.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/ThreeDSecure.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Token.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Transfer.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/TransferReversal.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/AutoPagingIterator.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/RequestOptions.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/Set.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/lib/Util/Util.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/AccountTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ApiRequestorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ApplePayDomainTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ApplicationFeeRefundTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ApplicationFeeTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/AuthenticationErrorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/BalanceTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/BalanceTransactionTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/BankAccountTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/BitcoinReceiverTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/CardErrorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ChargeTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/CollectionTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/CountrySpecTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/CouponTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/CurlClientTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/CustomerTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/DiscountTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/DisputeTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ErrorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ExternalAccountTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/FileUploadTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/InvalidRequestErrorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/InvoiceTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/PermissionsErrorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/PlanTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ProductTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/RateLimitErrorTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/RecipientTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/RefundTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/RequestOptionsTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/SourceTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/StripeObjectTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/SubscriptionItemTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/SubscriptionTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/TestCase.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/ThreeDSecureTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/TokenTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/TransferReversalTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/TransferTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/UtilTest.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/bootstrap.no_autoload.php' => true, - '/var/www/html/modules/stripe_official/libraries/sdk/stripe/tests/bootstrap.php' => true, - '/var/www/html/modules/stripe_official/refresh.php' => true, - '/var/www/html/modules/stripe_official/stripe_official.php' => true, -)); - -return $coverage; \ No newline at end of file diff --git a/202/docker/Dockerfile b/202/docker/Dockerfile index dad79f3e..b15b6ec4 100644 --- a/202/docker/Dockerfile +++ b/202/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM 202ecommerce/prestashop:1.7.8.3 +FROM 202ecommerce/prestashop:1.7.8.7 RUN rm -Rf var/www/html/modules/stripe_official/ diff --git a/202/license/license.txt b/202/license/license.txt new file mode 100644 index 00000000..40bc9f1b --- /dev/null +++ b/202/license/license.txt @@ -0,0 +1,23 @@ +/** + * 2007-2022 Stripe + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. + * + * @author 202-ecommerce + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) + */ diff --git a/202/phpstan/phpstan.neon b/202/phpstan/phpstan.neon new file mode 100644 index 00000000..a3f319fd --- /dev/null +++ b/202/phpstan/phpstan.neon @@ -0,0 +1,18 @@ +includes: + - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon + +parameters: + paths: + # We consider that the extension file will be stored the folder test/phpstan + # From Phpstan 0.12, paths are relative to the .neon file. + - ../../../../var/cache/prod/class_index.php + - ../../stripe_official.php + - ../../classes + - ../../controllers + - ../../upgrade + - ../../translations + ignoreErrors: + excludePaths: + + reportUnmatchedIgnoredErrors: false + level: 1 diff --git a/202/tests/testAdmin.php b/202/tests/testAdmin.php index 01b4793d..a5aa424e 100644 --- a/202/tests/testAdmin.php +++ b/202/tests/testAdmin.php @@ -7,7 +7,6 @@ */ use Tot\Tests\Entity\Module; -use Tot\Tests\Tools\Db; use Tot\Tests\TotTestCase; /** @@ -15,7 +14,6 @@ */ class TestAdmin extends TotTestCase { - /** * @desc: setup of Phpunit */ @@ -25,7 +23,6 @@ public function setUp() if (is_object($this->stripe->module) && !$this->stripe->module->isInstalled('stripe_official')) { $this->stripe->module->install(); } - } /** @@ -33,21 +30,22 @@ public function setUp() */ public function testPageConfig() { - //$_GET['controller'] = 'AdminModules'; - //$_GET['configure'] = 'stripe_official'; - //$_GET['token'] = '6c813dd7e398d06deb0d92b4d99dfd60'; - $context = Context::getContext(); - $controller = new AdminModulesController(); - $context->controller = $controller; - $context->smarty->addTemplateDir(array( - 'default' => _PS_ROOT_DIR_.'/bb/themes/default/template/', - )); + //$_GET['controller'] = 'AdminModules'; + //$_GET['configure'] = 'stripe_official'; + //$_GET['token'] = '6c813dd7e398d06deb0d92b4d99dfd60'; + $context = Context::getContext(); + $controller = new AdminModulesController(); + $context->controller = $controller; + $context->smarty->addTemplateDir([ + 'default' => _PS_ROOT_DIR_ . '/bb/themes/default/template/', + ]); unset($_POST); try { $display = $this->stripe->module->getContent(); echo $display; } catch (Exception $ex) { $this->assertRegExp('/xxx/', $ex->getMessage()); + return; } } diff --git a/202/tests/testBackAdmin.php b/202/tests/testBackAdmin.php index c46a2f10..0a48106c 100644 --- a/202/tests/testBackAdmin.php +++ b/202/tests/testBackAdmin.php @@ -7,7 +7,6 @@ */ use Tot\Tests\Entity\Module; -use Tot\Tests\Tools\Db; use Tot\Tests\TotTestCase; /** @@ -15,7 +14,6 @@ */ class TestBackAdmin extends TotTestCase { - /** * @desc: setup of Phpunit */ @@ -25,7 +23,6 @@ public function setUp() if (is_object($this->stripe->module) && !$this->stripe->module->isInstalled('stripe_official')) { $this->stripe->module->install(); } - } /** @@ -33,21 +30,22 @@ public function setUp() */ public function testPageConfig() { - //$_GET['controller'] = 'AdminModules'; - //$_GET['configure'] = 'stripe_official'; - //$_GET['token'] = '6c813dd7e398d06deb0d92b4d99dfd60'; - $context = Context::getContext(); - $controller = new AdminModulesController(); - $context->controller = $controller; - $context->smarty->addTemplateDir(array( - 'default' => _PS_ROOT_DIR_.'/bb/themes/default/template/', - )); + //$_GET['controller'] = 'AdminModules'; + //$_GET['configure'] = 'stripe_official'; + //$_GET['token'] = '6c813dd7e398d06deb0d92b4d99dfd60'; + $context = Context::getContext(); + $controller = new AdminModulesController(); + $context->controller = $controller; + $context->smarty->addTemplateDir([ + 'default' => _PS_ROOT_DIR_ . '/bb/themes/default/template/', + ]); unset($_POST); try { $display = $this->stripe->module->getContent(); echo $display; } catch (Exception $ex) { $this->assertRegExp('/xxx/', $ex->getMessage()); + return; } } diff --git a/Readme.md b/Readme.md index 497be97c..d928bff1 100644 --- a/Readme.md +++ b/Readme.md @@ -1,3 +1,5 @@ +[![Coding Standart](https://github.com/202-ecommerce/stripe_official/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/202-ecommerce/stripe_official/actions/workflows/php.yml) + # Stripe Official ## About @@ -96,3 +98,24 @@ That's it: you have contributed to this open-source project! Congratulations! [3]: https://help.github.com/articles/using-pull-requests [4]: https://support.stripe.com/questions/upgrade-your-stripe-integration-from-tls-1-0-to-tls-1-2 [composer-doc]: https://getcomposer.org/doc/04-schema.md + +### Command line launched by GitHub actions + +Please launch these command line before submitting a Pull Request. + +#### phpcs fixer + +```bash +~$ vendor/bin/php-cs-fixer --fix +``` +#### phpstan + +You need a docker container to launch phpstan: + +``` +# create the prestashop container +~$ docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop + +# launch phpstan +~$ docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/stripe_official -e _PS_ROOT_DIR_=/var/www/html --workdir=/var/www/html/modules/stripe_official phpstan/phpstan:0.12 analyse --configuration=/var/www/html/modules/stripe_official/202/phpstan/phpstan.neon +``` diff --git a/_dev/.htaccess b/_dev/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/_dev/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/_dev/js/PSTabs.js b/_dev/js/PSTabs.js index ec523703..ba0d107a 100644 --- a/_dev/js/PSTabs.js +++ b/_dev/js/PSTabs.js @@ -1,5 +1,5 @@ /** - * 2007-2019 PrestaShop + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -17,9 +17,9 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @author MIT license - * @copyright Copyright 2014, Codrops - * @license Commercial license + * @author 202-ecommerce + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) */ ;(function(window) { diff --git a/_dev/js/admin.js b/_dev/js/admin.js index 2d7c220f..40bc9f1b 100644 --- a/_dev/js/admin.js +++ b/_dev/js/admin.js @@ -1,23 +1,23 @@ /** + * 2007-2022 Stripe + * * NOTICE OF LICENSE * - * This source file is subject to a commercial license from SARL 202 ecommerce - * Use, copy, modification or distribution of this source file without written - * license agreement from the SARL 202 ecommerce is strictly forbidden. - * In order to obtain a license, please contact us: tech@202-ecommerce.com - * ........................................................................... - * INFORMATION SUR LA LICENCE D'UTILISATION + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER * - * L'utilisation de ce fichier source est soumise a une licence commerciale - * concedee par la societe 202 ecommerce - * Toute utilisation, reproduction, modification ou distribution du present - * fichier source sans contrat de licence ecrit de la part de la SARL 202 ecommerce est - * expressement interdite. - * Pour obtenir une licence, veuillez contacter 202-ecommerce - * ........................................................................... + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. * * @author 202-ecommerce - * @copyright Copyright (c) 202-ecommerce - * @license Commercial license + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) */ - diff --git a/_dev/js/back.js b/_dev/js/back.js index c17f26f7..700eab7a 100644 --- a/_dev/js/back.js +++ b/_dev/js/back.js @@ -1,5 +1,5 @@ /** - * 2007-2019 PrestaShop + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ $(document).ready(function () { diff --git a/_dev/js/faq.js b/_dev/js/faq.js index 59cc14ac..9cd51e6c 100644 --- a/_dev/js/faq.js +++ b/_dev/js/faq.js @@ -1,5 +1,5 @@ /** - * 2007-2019 PrestaShop + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ $(function () { diff --git a/_dev/js/index.php b/_dev/js/index.php deleted file mode 100755 index ca02f66c..00000000 --- a/_dev/js/index.php +++ /dev/null @@ -1,33 +0,0 @@ - - * ........................................................................... - * - * @author 202-ecommerce - * @copyright Copyright (c) 202-ecommerce - * @license Commercial license - */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/_dev/js/payments.js b/_dev/js/payments.js index 44c65d74..b164f0d9 100644 --- a/_dev/js/payments.js +++ b/_dev/js/payments.js @@ -1,5 +1,5 @@ /** - * 2007-2019 PrestaShop + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ $(function(){ diff --git a/_dev/js/stripeCard.js b/_dev/js/stripeCard.js index d43cdf0e..c3027702 100644 --- a/_dev/js/stripeCard.js +++ b/_dev/js/stripeCard.js @@ -1,5 +1,5 @@ /** - * 2007-2020 PrestaShop + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ $(function(){ diff --git a/_dev/scss/_started.scss b/_dev/scss/_started.scss index a5c46134..76668f8e 100644 --- a/_dev/scss/_started.scss +++ b/_dev/scss/_started.scss @@ -1,3 +1,27 @@ +/** + * 2007-2022 Stripe + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. + * + * @author 202-ecommerce + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) + */ + .stripe-module-wrapper { margin: 0 auto; overflow: hidden; diff --git a/_dev/scss/_tabs.scss b/_dev/scss/_tabs.scss index d20db16b..891a73ee 100644 --- a/_dev/scss/_tabs.scss +++ b/_dev/scss/_tabs.scss @@ -1,24 +1,25 @@ /** + * 2007-2022 Stripe + * * NOTICE OF LICENSE * - * This source file is subject to a commercial license from SARL 202 ecommerce - * Use, copy, modification or distribution of this source file without written - * license agreement from the SARL 202 ecommerce is strictly forbidden. - * In order to obtain a license, please contact us: tech@202-ecommerce.com - * ........................................................................... - * INFORMATION SUR LA LICENCE D'UTILISATION + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER * - * L'utilisation de ce fichier source est soumise a une licence commerciale - * concedee par la societe 202 ecommerce - * Toute utilisation, reproduction, modification ou distribution du present - * fichier source sans contrat de licence ecrit de la part de la SARL 202 ecommerce est - * expressement interdite. - * Pour obtenir une licence, veuillez contacter 202-ecommerce - * ........................................................................... + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. * * @author 202-ecommerce - * @copyright Copyright (c) 202-ecommerce - * @license Commercial license + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) */ .tabs nav a { diff --git a/_dev/scss/admin.scss b/_dev/scss/admin.scss index ad7bf5e0..fed73438 100644 --- a/_dev/scss/admin.scss +++ b/_dev/scss/admin.scss @@ -1,24 +1,25 @@ -/* +/** + * 2007-2022 Stripe + * * NOTICE OF LICENSE * - * This source file is subject to a commercial license from SARL 202 ecommerce - * Use, copy, modification or distribution of this source file without written - * license agreement from the SARL 202 ecommerce is strictly forbidden. - * In order to obtain a license, please contact us: tech@202-ecommerce.com - * ........................................................................... - * INFORMATION SUR LA LICENCE D'UTILISATION + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER * - * L'utilisation de ce fichier source est soumise a une licence commerciale - * concedee par la societe 202 ecommerce - * Toute utilisation, reproduction, modification ou distribution du present - * fichier source sans contrat de licence ecrit de la part de la SARL 202 ecommerce est - * expressement interdite. - * Pour obtenir une licence, veuillez contacter 202-ecommerce - * ........................................................................... + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. * * @author 202-ecommerce - * @copyright Copyright (c) 202-ecommerce - * @license Commercial license + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) */ // Admin stylesheet diff --git a/_dev/scss/checkout.scss b/_dev/scss/checkout.scss index 494f9381..539f16cd 100644 --- a/_dev/scss/checkout.scss +++ b/_dev/scss/checkout.scss @@ -1,3 +1,26 @@ +/** + * 2007-2022 Stripe + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. + * + * @author 202-ecommerce + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) + */ #stripe-card-element { padding: 6px 12px; margin-bottom: 8px; @@ -46,7 +69,7 @@ #HOOK_PAYMENT .ideal-submit-button { position: relative; display: inline-block; - width: 210px; + width: 260px; padding: 5px 7px; margin-bottom: 15px; font-weight: bold; @@ -93,21 +116,15 @@ } .stripe-payment-form .stripe-card-cvc, .stripe-payment-form .stripe-card-expiry { - width: 122px; - max-width: 122px; display: inline-block; padding: 3px 1px !important; } -#stripe-card-number { - width: 250px; -} - #stripe-card-cvc, #stripe-card-expiry, #stripe-card-postalcode { - width: 122px; - max-width: 122px; + width: 127px; + max-width: 127px; } #stripe-card-number, @@ -119,7 +136,7 @@ padding: 3px; box-sizing: border-box; font-size: 15px; - width: 250px; + width: 260px; background-color: #ffffff; position: relative; } @@ -134,7 +151,7 @@ form#stripe-card-payment img.card_logo { width: 50px; height: auto; display: inline-block; - margin: 0px 10px; + margin: 0 10px; } form#stripe-card-payment #cards-logos { @@ -170,7 +187,7 @@ form#stripe-card-payment #cards-logos { .stripe-submit-button { position: relative; display: inline-block; - width: 250px; + width: 260px; padding: 5px 7px; margin-bottom: 15px; font-weight: bold; @@ -199,7 +216,7 @@ form#stripe-card-payment #cards-logos { padding: 3px; box-sizing: border-box; font-size: 15px; - width: 250px; + width: 260px; background-color: #ffffff; position: relative; display: block; @@ -225,8 +242,8 @@ form#stripe-card-payment #cards-logos { } #stripe-card-payment .label16 { - padding: 0px; - letter-spacing: 0px; + padding: 0; + letter-spacing: 0; color: #777777; font-size: 14px; font-weight: normal; diff --git a/classes/.htaccess b/classes/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/classes/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/classes/StripeCapture.php b/classes/StripeCapture.php index a4e9e51d..36aec3fa 100755 --- a/classes/StripeCapture.php +++ b/classes/StripeCapture.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class StripeCapture extends ObjectModel { /** @var string */ @@ -39,34 +38,34 @@ class StripeCapture extends ObjectModel /** * @see ObjectModel::$definition */ - public static $definition = array( - 'table' => 'stripe_capture', - 'primary' => 'id_stripe_capture', - 'fields' => array( - 'id_payment_intent' => array( - 'type' => ObjectModel::TYPE_STRING, + public static $definition = [ + 'table' => 'stripe_capture', + 'primary' => 'id_stripe_capture', + 'fields' => [ + 'id_payment_intent' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 40, - ), - 'id_order' => array( - 'type' => ObjectModel::TYPE_INT, + 'size' => 40, + ], + 'id_order' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', 'size' => 10, - ), - 'expired' => array( - 'type' => ObjectModel::TYPE_BOOL, + ], + 'expired' => [ + 'type' => ObjectModel::TYPE_BOOL, 'validate' => 'isBool', - ), - 'date_catch' => array( - 'type' => ObjectModel::TYPE_DATE, + ], + 'date_catch' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - 'date_authorize' => array( - 'type' => ObjectModel::TYPE_DATE, + ], + 'date_authorize' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - ), - ); + ], + ], + ]; public function setIdPaymentIntent($id_payment_intent) { diff --git a/classes/StripeCard.php b/classes/StripeCard.php index 25e98da0..22b5dd14 100755 --- a/classes/StripeCard.php +++ b/classes/StripeCard.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; @@ -59,8 +59,9 @@ public function save($null_values = false, $auto_date = true) 'customer' => $this->stripe_customer_key, ]); } catch (PrestaShopException $e) { - $this->_error[] = (string)$e->getMessage(); - ProcessLoggerHandler::logError('Save card - '.(string)$e->getMessage(), null, null, 'StripeCard'); + $this->_error[] = (string) $e->getMessage(); + ProcessLoggerHandler::logError('Save card - ' . (string) $e->getMessage(), null, null, 'StripeCard'); + return false; } @@ -75,8 +76,9 @@ public function delete() ); $payment_method->detach(); } catch (PrestaShopException $e) { - $this->_error[] = (string)$e->getMessage(); - ProcessLoggerHandler::logError('Delete card - '.(string)$e->getMessage(), null, null, 'StripeCard'); + $this->_error[] = (string) $e->getMessage(); + ProcessLoggerHandler::logError('Delete card - ' . (string) $e->getMessage(), null, null, 'StripeCard'); + return false; } @@ -91,8 +93,9 @@ public function getAllCustomerCards() 'type' => 'card', ]); } catch (Exception $e) { - ProcessLoggerHandler::logError('getAllCustomerCards - '.(string)$e->getMessage(), null, null, 'StripeCard'); - return array(); + ProcessLoggerHandler::logError('getAllCustomerCards - ' . (string) $e->getMessage(), null, null, 'StripeCard'); + + return []; } return $allCards->data; diff --git a/classes/StripeCustomer.php b/classes/StripeCustomer.php index 946d5fe0..6ffc2298 100755 --- a/classes/StripeCustomer.php +++ b/classes/StripeCustomer.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class StripeCustomer extends ObjectModel { /** @var int */ @@ -35,27 +34,27 @@ class StripeCustomer extends ObjectModel /** * @see ObjectModel::$definition */ - public static $definition = array( - 'table' => 'stripe_customer', - 'primary' => 'id_stripe_customer', - 'fields' => array( - 'id_customer' => array( - 'type' => ObjectModel::TYPE_INT, + public static $definition = [ + 'table' => 'stripe_customer', + 'primary' => 'id_stripe_customer', + 'fields' => [ + 'id_customer' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', 'size' => 10, - ), - 'stripe_customer_key' => array( - 'type' => ObjectModel::TYPE_STRING, + ], + 'stripe_customer_key' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 50, - ), - 'id_account' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 50, + ], + 'id_account' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 50, - ), - ), - ); + 'size' => 50, + ], + ], + ]; public function setIdCustomer($id_customer) { @@ -92,11 +91,11 @@ public function getCustomerById($id_customer, $id_account) $query = new DbQuery(); $query->select('*'); $query->from(static::$definition['table']); - $query->where('id_customer = '.pSQL($id_customer)); - $query->where('id_account = "'.pSQL($id_account).'"'); + $query->where('id_customer = ' . pSQL((int) $id_customer)); + $query->where('id_account = "' . pSQL((int) $id_account) . '"'); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query->build()); - if ($result == false) { + if (empty($result) === true) { return $this; } @@ -107,19 +106,34 @@ public function getCustomerById($id_customer, $id_account) public function stripeCustomerExists($email, $stripe_customer_id) { - $customersList = \Stripe\Customer::all( - [ - 'email' => $email, - 'limit' => 100 - ] - ); - - foreach ($customersList as $customer) { - if ($customer['id'] == $stripe_customer_id) { - return true; - } + try { + $customer = \Stripe\Customer::retrieve( + $stripe_customer_id + ); + + return $email === $customer->email; + } catch (Exception $e) { + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::openLogger(self::class); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError($e->getMessage()); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + + return false; } + } - return false; + public function getStripeCustomerCards() + { + try { + return \Stripe\Customer::allPaymentMethods( + $this->stripe_customer_key, + ['type' => 'card'] + ); + } catch (Exception $e) { + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::openLogger(self::class); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError($e->getMessage()); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + + return false; + } } } diff --git a/classes/StripeDispute.php b/classes/StripeDispute.php index 2a5b9a48..a7a88ee7 100644 --- a/classes/StripeDispute.php +++ b/classes/StripeDispute.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - -use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; - class StripeDispute extends ObjectModel { /** @var string */ diff --git a/classes/StripeEvent.php b/classes/StripeEvent.php index fcce1e11..afb5c356 100755 --- a/classes/StripeEvent.php +++ b/classes/StripeEvent.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class StripeEvent extends ObjectModel { const CREATED_STATUS = 'CREATED'; @@ -35,59 +34,60 @@ class StripeEvent extends ObjectModel const REQUIRES_ACTION_STATUS = 'REQUIRES_ACTION'; /** - * @var string $id_payment_intent + * @var string */ public $id_payment_intent; /** - * @var string $status + * @var string */ public $status; /** - * @var DateTime $date_add + * @var DateTime */ public $date_add; /** - * @var bool $is_processed + * @var bool */ public $is_processed; /** - * @var $flow_type + * @var */ public $flow_type = 'webhook'; /** - * @var array $definition + * @var array + * * @see ObjectModel::$definition */ - public static $definition = array( - 'table' => 'stripe_event', - 'primary' => 'id_stripe_event', - 'fields' => array( - 'id_payment_intent' => array( - 'type' => ObjectModel::TYPE_STRING, + public static $definition = [ + 'table' => 'stripe_event', + 'primary' => 'id_stripe_event', + 'fields' => [ + 'id_payment_intent' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 40, - ), - 'status' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 40, + ], + 'status' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 30, - ), - 'date_add' => array( - 'type' => ObjectModel::TYPE_DATE, + 'size' => 30, + ], + 'date_add' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - 'is_processed' => array( - 'type' => ObjectModel::TYPE_BOOL, + ], + 'is_processed' => [ + 'type' => ObjectModel::TYPE_BOOL, 'validate' => 'isBool', - ), - 'flow_type' => array( - 'type' => ObjectModel::TYPE_STRING, + ], + 'flow_type' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 30, - ), - ), - ); + 'size' => 30, + ], + ], + ]; public function setIdPaymentIntent($id_payment_intent) { @@ -181,8 +181,7 @@ public function getEventByPaymentIntentNStatus($paymentIntent, $status) public static function getStatusAssociatedToChargeType($chargeType) { - switch ($chargeType) - { + switch ($chargeType) { case 'charge.succeeded': case 'succeeded': return StripeEvent::AUTHORIZED_STATUS; @@ -218,8 +217,7 @@ public static function getStatusAssociatedToChargeType($chargeType) public static function getTransitionStatusByNewStatus($newStatus) { - switch ($newStatus) - { + switch ($newStatus) { case StripeEvent::REQUIRES_ACTION_STATUS: return [ StripeEvent::CREATED_STATUS, diff --git a/classes/StripeIdempotencyKey.php b/classes/StripeIdempotencyKey.php index a1ae6a29..e7bdd277 100644 --- a/classes/StripeIdempotencyKey.php +++ b/classes/StripeIdempotencyKey.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class StripeIdempotencyKey extends ObjectModel { /** @var int */ @@ -35,27 +34,27 @@ class StripeIdempotencyKey extends ObjectModel /** * @see ObjectModel::$definition */ - public static $definition = array( - 'table' => 'stripe_idempotency_key', - 'primary' => 'id_idempotency_key', - 'fields' => array( - 'id_cart' => array( - 'type' => ObjectModel::TYPE_INT, + public static $definition = [ + 'table' => 'stripe_idempotency_key', + 'primary' => 'id_idempotency_key', + 'fields' => [ + 'id_cart' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', - 'size' => 10, - ), - 'idempotency_key' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 10, + ], + 'idempotency_key' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 255, - ), - 'id_payment_intent' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 255, + ], + 'id_payment_intent' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 255, - ), - ), - ); + 'size' => 255, + ], + ], + ]; public function setIdCart($id_cart) { @@ -92,7 +91,7 @@ public function getByIdCart($id_cart) $query = new DbQuery(); $query->select('*'); $query->from(static::$definition['table']); - $query->where('id_cart = '.pSQL($id_cart)); + $query->where('id_cart = ' . pSQL((int) $id_cart)); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query->build()); if ($result == false) { @@ -109,7 +108,7 @@ public function getByIdPaymentIntent($id_payment_intent) $query = new DbQuery(); $query->select('*'); $query->from(static::$definition['table']); - $query->where('id_payment_intent = "'.pSQL($id_payment_intent).'"'); + $query->where('id_payment_intent = "' . pSQL($id_payment_intent) . '"'); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query->build()); if ($result == false) { @@ -127,12 +126,12 @@ public function getByIdPaymentIntent($id_payment_intent) */ public function createNewOne($id_cart, $datasIntent) { - $idempotency_key = $id_cart.'_'.uniqid(); + $idempotency_key = $id_cart . '_' . uniqid(); $intent = \Stripe\PaymentIntent::create( $datasIntent, [ - 'idempotency_key' => $idempotency_key + 'idempotency_key' => $idempotency_key, ] ); @@ -146,8 +145,8 @@ public function createNewOne($id_cart, $datasIntent) $paymentIntent->setStatus($intent->status); $paymentIntent->setAmount($intent->amount); $paymentIntent->setCurrency($intent->currency); - $paymentIntent->setDateAdd(date("Y-m-d H:i:s", $intent->created)); - $paymentIntent->setDateUpd(date("Y-m-d H:i:s", $intent->created)); + $paymentIntent->setDateAdd(date('Y-m-d H:i:s', $intent->created)); + $paymentIntent->setDateUpd(date('Y-m-d H:i:s', $intent->created)); $paymentIntent->save(false, false); return $intent; @@ -166,7 +165,7 @@ public function updateIntentData($intentData) $paymentIntent->setStatus($intent->status); $paymentIntent->setAmount($intent->amount); $paymentIntent->setCurrency($intent->currency); - $paymentIntent->setDateUpd(date("Y-m-d H:i:s")); + $paymentIntent->setDateUpd(date('Y-m-d H:i:s')); $paymentIntent->save(false, false); return $intent; diff --git a/classes/StripePayment.php b/classes/StripePayment.php index bb9dbb5d..c56819a7 100644 --- a/classes/StripePayment.php +++ b/classes/StripePayment.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class StripePayment extends ObjectModel { /** @var string */ @@ -59,86 +58,86 @@ class StripePayment extends ObjectModel /** * @see ObjectModel::$definition */ - public static $definition = array( - 'table' => 'stripe_payment', - 'primary' => 'id_payment', - 'fields' => array( - 'id_stripe' => array( - 'type' => ObjectModel::TYPE_STRING, + public static $definition = [ + 'table' => 'stripe_payment', + 'primary' => 'id_payment', + 'fields' => [ + 'id_stripe' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 255, - ), - 'id_payment_intent' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 255, + ], + 'id_payment_intent' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 255, - ), - 'name' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 255, + ], + 'name' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 255, - ), - 'id_cart' => array( - 'type' => ObjectModel::TYPE_INT, + 'size' => 255, + ], + 'id_cart' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', 'size' => 10, - ), - 'last4' => array( - 'type' => ObjectModel::TYPE_INT, + ], + 'last4' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', - 'size' => 4, - ), - 'type' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 4, + ], + 'type' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 20, - ), - 'amount' => array( - 'type' => ObjectModel::TYPE_FLOAT, + 'size' => 20, + ], + 'amount' => [ + 'type' => ObjectModel::TYPE_FLOAT, 'validate' => 'isFloat', 'size' => 10, - 'scale' => 2 - ), - 'refund' => array( - 'type' => ObjectModel::TYPE_FLOAT, + 'scale' => 2, + ], + 'refund' => [ + 'type' => ObjectModel::TYPE_FLOAT, 'validate' => 'isFloat', 'size' => 10, - 'scale' => 2 - ), - 'currency' => array( - 'type' => ObjectModel::TYPE_STRING, + 'scale' => 2, + ], + 'currency' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 3, - ), - 'result' => array( - 'type' => ObjectModel::TYPE_INT, + 'size' => 3, + ], + 'result' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', - 'size' => 1, - ), - 'state' => array( - 'type' => ObjectModel::TYPE_INT, + 'size' => 1, + ], + 'state' => [ + 'type' => ObjectModel::TYPE_INT, 'validate' => 'isInt', - 'size' => 1, - ), - 'voucher_url' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 1, + ], + 'voucher_url' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 255, - ), - 'voucher_expire' => array( - 'type' => ObjectModel::TYPE_DATE, + 'size' => 255, + ], + 'voucher_expire' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - 'voucher_validate' => array( - 'type' => ObjectModel::TYPE_DATE, + ], + 'voucher_validate' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - 'date_add' => array( - 'type' => ObjectModel::TYPE_DATE, + ], + 'date_add' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - ), - ); + ], + ], + ]; public function setIdStripe($id_stripe) { @@ -295,7 +294,7 @@ public function getStripePaymentByCart($id_cart) $query = new DbQuery(); $query->select('*'); $query->from(static::$definition['table']); - $query->where('id_cart = ' . (int)$id_cart); + $query->where('id_cart = ' . (int) $id_cart); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query->build()); if ($result == false) { @@ -367,10 +366,10 @@ public function getDashboardUrl() break; } - $url_dashboard = array( - 'charge' => 'https://dashboard.stripe.com/'.$url_type.'payments/'.$this->id_stripe, - 'paymentIntent' => 'https://dashboard.stripe.com/'.$url_type.'payments/'.$this->id_payment_intent - ); + $url_dashboard = [ + 'charge' => 'https://dashboard.stripe.com/' . $url_type . 'payments/' . $this->id_stripe, + 'paymentIntent' => 'https://dashboard.stripe.com/' . $url_type . 'payments/' . $this->id_payment_intent, + ]; return $url_dashboard; } diff --git a/classes/StripePaymentIntent.php b/classes/StripePaymentIntent.php index 58866b92..3f704ca3 100644 --- a/classes/StripePaymentIntent.php +++ b/classes/StripePaymentIntent.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class StripePaymentIntent extends ObjectModel { /** @var string */ @@ -41,41 +40,41 @@ class StripePaymentIntent extends ObjectModel /** * @see ObjectModel::$definition */ - public static $definition = array( - 'table' => 'stripe_payment_intent', - 'primary' => 'id_stripe_payment_intent', - 'fields' => array( - 'id_payment_intent' => array( - 'type' => ObjectModel::TYPE_STRING, + public static $definition = [ + 'table' => 'stripe_payment_intent', + 'primary' => 'id_stripe_payment_intent', + 'fields' => [ + 'id_payment_intent' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 40, - ), - 'status' => array( - 'type' => ObjectModel::TYPE_STRING, + 'size' => 40, + ], + 'status' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 30, - ), - 'amount' => array( - 'type' => ObjectModel::TYPE_FLOAT, + 'size' => 30, + ], + 'amount' => [ + 'type' => ObjectModel::TYPE_FLOAT, 'validate' => 'isFloat', 'size' => 10, - 'scale' => 2 - ), - 'currency' => array( - 'type' => ObjectModel::TYPE_STRING, + 'scale' => 2, + ], + 'currency' => [ + 'type' => ObjectModel::TYPE_STRING, 'validate' => 'isString', - 'size' => 3, - ), - 'date_add' => array( - 'type' => ObjectModel::TYPE_DATE, + 'size' => 3, + ], + 'date_add' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - 'date_upd' => array( - 'type' => ObjectModel::TYPE_DATE, + ], + 'date_upd' => [ + 'type' => ObjectModel::TYPE_DATE, 'validate' => 'isDate', - ), - ), - ); + ], + ], + ]; public function setIdPaymentIntent($id_payment_intent) { @@ -145,7 +144,7 @@ public function findByIdPaymentIntent($idPaymentIntent) $query = new DbQuery(); $query->select('*'); $query->from(self::$definition['table']); - $query->where('id_payment_intent = "'. pSQL($idPaymentIntent) .'"'); + $query->where('id_payment_intent = "' . pSQL($idPaymentIntent) . '"'); $data = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query->build()); if (!$data) { diff --git a/classes/StripeWebhook.php b/classes/StripeWebhook.php index dc3177e3..2d4c1332 100755 --- a/classes/StripeWebhook.php +++ b/classes/StripeWebhook.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; @@ -30,20 +30,12 @@ class StripeWebhook extends ObjectModel public static function create() { try { - $context = Context::getContext(); $shopGroupId = Stripe_official::getShopGroupIdContext(); $shopId = Stripe_official::getShopIdContext(); $stripeAccount = \Stripe\Account::retrieve(); $webhookEndpoint = \Stripe\WebhookEndpoint::create([ - 'url' => $context->link->getModuleLink( - 'stripe_official', - 'webhook', - array(), - true, - Configuration::get('PS_LANG_DEFAULT'), - $shopId ?: Configuration::get('PS_SHOP_DEFAULT') - ), + 'url' => Stripe_official::getWebhookUrl(), 'enabled_events' => Stripe_official::$webhook_events, ]); @@ -54,11 +46,12 @@ public static function create() return true; } catch (Exception $e) { ProcessLoggerHandler::logError( - 'Create webhook endpoint - '.(string)$e->getMessage(), + 'Create webhook endpoint - ' . (string) $e->getMessage(), null, null, 'StripeWebhook' ); + return false; } } @@ -68,16 +61,17 @@ public static function getWebhookList() try { return \Stripe\WebhookEndpoint::all( [ - 'limit' => 16 + 'limit' => 16, ] ); } catch (Exception $e) { ProcessLoggerHandler::logError( - 'getWebhookList - '.(string)$e->getMessage(), + 'getWebhookList - ' . (string) $e->getMessage(), null, null, 'StripeWebhook' ); + return false; } } @@ -85,6 +79,7 @@ public static function getWebhookList() public static function countWebhooksList() { $list = self::getWebhookList(); + return count($list->data); } @@ -97,14 +92,7 @@ public static function webhookCanBeRegistered() } $webhooksList = self::getWebhookList(); - $webhookUrl = $context->link->getModuleLink( - 'stripe_official', - 'webhook', - array(), - true, - Configuration::get('PS_LANG_DEFAULT'), - Stripe_official::getShopIdContext() ?: Configuration::get('PS_SHOP_DEFAULT') - ); + $webhookUrl = Stripe_official::getWebhookUrl(); $webhookExists = false; foreach ($webhooksList->data as $webhook) { diff --git a/classes/actions/ConfigurationActions.php b/classes/actions/ConfigurationActions.php index c7f732ed..4a0a2c12 100755 --- a/classes/actions/ConfigurationActions.php +++ b/classes/actions/ConfigurationActions.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe_officialClasslib\Actions\DefaultActions; -use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; -use Stripe_officialClasslib\Registry; class ConfigurationActions extends DefaultActions { @@ -41,10 +39,10 @@ public function registerKeys() $this->module = $this->conveyor['module']; $shopGroupId = Stripe_official::getShopGroupIdContext(); $shopId = Stripe_official::getShopIdContext(); - $mode = Configuration::get(Stripe_official::MODE,null, $shopGroupId, $shopId); - $secretKeyLive = Configuration::get(Stripe_official::KEY,null, $shopGroupId, $shopId); - $secretKeyTest = Configuration::get(Stripe_official::TEST_KEY,null, $shopGroupId, $shopId); - $webhookId = Configuration::get(Stripe_official::WEBHOOK_ID,null, $shopGroupId, $shopId); + $mode = Configuration::get(Stripe_official::MODE, null, $shopGroupId, $shopId); + $secretKeyLive = Configuration::get(Stripe_official::KEY, null, $shopGroupId, $shopId); + $secretKeyTest = Configuration::get(Stripe_official::TEST_KEY, null, $shopGroupId, $shopId); + $webhookId = Configuration::get(Stripe_official::WEBHOOK_ID, null, $shopGroupId, $shopId); /* If mode has changed delete webhook of previous mode */ if (Tools::getValue(Stripe_official::MODE) != $mode && $webhookId @@ -133,7 +131,7 @@ public function registerSaveCard() $shopGroupId = Stripe_official::getShopGroupIdContext(); $shopId = Stripe_official::getShopIdContext(); if (!Tools::getValue('save_card')) { - Configuration::updateValue(Stripe_official::SAVE_CARD, null,false, $shopGroupId, $shopId); + Configuration::updateValue(Stripe_official::SAVE_CARD, null, false, $shopGroupId, $shopId); } else { Configuration::updateValue(Stripe_official::SAVE_CARD, Tools::getValue('save_card'), false, $shopGroupId, $shopId); Configuration::updateValue(Stripe_official::ASK_CUSTOMER, Tools::getValue('ask_customer'), false, $shopGroupId, $shopId); @@ -196,8 +194,8 @@ public function registerWebhookSignature() $this->context = $this->conveyor['context']; $shopGroupId = Stripe_official::getShopGroupIdContext(); $shopId = Stripe_official::getShopIdContext(); - $webhookSignature = Configuration::get(Stripe_official::WEBHOOK_SIGNATURE,null, $shopGroupId, $shopId); - $webhookId = Configuration::get(Stripe_official::WEBHOOK_ID,null, $shopGroupId, $shopId); + $webhookSignature = Configuration::get(Stripe_official::WEBHOOK_SIGNATURE, null, $shopGroupId, $shopId); + $webhookId = Configuration::get(Stripe_official::WEBHOOK_ID, null, $shopGroupId, $shopId); $webhookConfError = false; /* Check if webhook_id and webhook_signature have been defined */ @@ -207,7 +205,7 @@ public function registerWebhookSignature() /* Check if webhook access is write */ try { $webhookEndpoint = \Stripe\WebhookEndpoint::retrieve($webhookId); - $webhookUrlExpected = $this->context->link->getModuleLink('stripe_official', 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Stripe_official::getShopIdContext() ?: Configuration::get('PS_SHOP_DEFAULT')); + $webhookUrlExpected = Stripe_official::getWebhookUrl(); $webhookUpdateData = []; /* Check if webhook configuration is wrong */ @@ -225,11 +223,12 @@ public function registerWebhookSignature() } else { $eventError = true; } - if ($eventError) + if ($eventError) { $webhookUpdateData['enabled_events'] = Stripe_official::$webhook_events; + } if (!empty($webhookUpdateData)) { - $secretKey = Configuration::get(Stripe_official::MODE,null, $shopGroupId, $shopId) ? Configuration::get(Stripe_official::TEST_KEY,null, $shopGroupId, $shopId) : Configuration::get(Stripe_official::KEY,null, $shopGroupId, $shopId); + $secretKey = Configuration::get(Stripe_official::MODE, null, $shopGroupId, $shopId) ? Configuration::get(Stripe_official::TEST_KEY, null, $shopGroupId, $shopId) : Configuration::get(Stripe_official::KEY, null, $shopGroupId, $shopId); $stripeClient = new \Stripe\StripeClient($secretKey); $stripeClient->webhookEndpoints->update($webhookId, $webhookUpdateData); } @@ -242,7 +241,7 @@ public function registerWebhookSignature() $webhooksList = StripeWebhook::getWebhookList(); foreach ($webhooksList as $webhookEndpoint) { - if ($webhookEndpoint->url == $this->context->link->getModuleLink('stripe_official', 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Stripe_official::getShopIdContext() ?: Configuration::get('PS_SHOP_DEFAULT'))) { + if ($webhookEndpoint->url == Stripe_official::getWebhookUrl()) { $webhookEndpoint->delete(); } } diff --git a/classes/actions/ValidationOrderActions.php b/classes/actions/ValidationOrderActions.php index f0d852ee..f8df50da 100755 --- a/classes/actions/ValidationOrderActions.php +++ b/classes/actions/ValidationOrderActions.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe_officialClasslib\Actions\DefaultActions; use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; -use Stripe_officialClasslib\Registry; class ValidationOrderActions extends DefaultActions { @@ -45,7 +44,7 @@ public function prepareFlowNone() $intent = \Stripe\PaymentIntent::retrieve($this->conveyor['paymentIntent']); ProcessLoggerHandler::logInfo( - '$intent : '.$intent, + '$intent : ' . $intent, null, null, 'ValidationOrderActions - prepareFlowNone' @@ -85,12 +84,13 @@ public function prepareFlowNone() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - prepareFlowNone' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -113,8 +113,9 @@ public function prepareFlowRedirect() ProcessLoggerHandler::closeLogger(); if ($sourceRetrieve->status == 'failed') { - ProcessLoggerHandler::logInfo($source . " => status failed", 'Cart', $this->context->cart->id); + ProcessLoggerHandler::logInfo($source . ' => status failed', 'Cart', $this->context->cart->id); ProcessLoggerHandler::closeLogger(); + return false; } @@ -128,11 +129,11 @@ public function prepareFlowRedirect() $amount = $amount * 100; } - $response = \Stripe\Charge::create(array( + $response = \Stripe\Charge::create([ 'amount' => $amount, 'currency' => $this->context->currency->iso_code, 'source' => $source, - )); + ]); return false; @@ -154,12 +155,13 @@ public function prepareFlowRedirect() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - prepareFlowRedirect' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -209,12 +211,13 @@ public function prepareFlowRedirectPaymentIntent() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - prepareFlowRedirectPaymentIntent' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -230,14 +233,14 @@ public function updatePaymentIntent() try { $amount = $this->conveyor['amount']; if (strstr($this->conveyor['chargeId'], 'ch_')) { - $amount = $amount*100; + $amount = $amount * 100; } $paymentIntent = new StripePaymentIntent(); $paymentIntent->findByIdPaymentIntent($this->conveyor['paymentIntent']); $paymentIntent->setAmount($amount); $paymentIntent->setStatus($this->conveyor['status']); - $paymentIntent->setDateUpd(date("Y-m-d H:i:s")); + $paymentIntent->setDateUpd(date('Y-m-d H:i:s')); $paymentIntent->update(); @@ -250,12 +253,13 @@ public function updatePaymentIntent() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - updatePaymentIntent' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -268,7 +272,7 @@ public function updatePaymentIntent() */ public function createOrder() { - $this->conveyor['isAlreadyOrdered'] = (bool)Order::getOrderByCartId((int)$this->conveyor['id_cart']); + $this->conveyor['isAlreadyOrdered'] = (bool) Order::getOrderByCartId((int) $this->conveyor['id_cart']); if ($this->conveyor['isAlreadyOrdered']) { ProcessLoggerHandler::logInfo( @@ -277,6 +281,7 @@ public function createOrder() null, 'ValidationOrderActions - createOrder' ); + return true; } @@ -288,7 +293,7 @@ public function createOrder() return false; } - $message = 'Stripe Transaction ID: '.$this->conveyor['paymentIntent']; + $message = 'Stripe Transaction ID: ' . $this->conveyor['paymentIntent']; if (strpos($this->conveyor['token'], 'pm_') !== false) { $this->conveyor['payment_method'] = \Stripe\PaymentMethod::retrieve($this->conveyor['token']); @@ -300,7 +305,7 @@ public function createOrder() $this->conveyor['datas']['owner'] = $this->conveyor['source']->owner->name; } - $this->conveyor['cart'] = new Cart((int)$this->conveyor['id_cart']); + $this->conveyor['cart'] = new Cart((int) $this->conveyor['id_cart']); $paid = $this->conveyor['amount']; @@ -336,7 +341,7 @@ public function createOrder() $this->context->country = new Country($addressDelivery->id_country); ProcessLoggerHandler::logInfo( - 'Paid Amount => '.$paid, + 'Paid Amount => ' . $paid, null, null, 'ValidationOrderActions - createOrder' @@ -344,14 +349,14 @@ public function createOrder() $this->module->validateOrder( $this->conveyor['cart']->id, - (int)$orderStatus, + (int) $orderStatus, $paid, sprintf( $this->module->l('%s via Stripe', 'ValidationOrderActions'), Tools::ucfirst(Stripe_official::$paymentMethods[$this->conveyor['datas']['type']]['name']) ), $message, - array(), + [], null, false, $this->conveyor['cart']->secure_key @@ -370,13 +375,15 @@ public function createOrder() // capture payment for card if no catch and authorize enabled $intent = \Stripe\PaymentIntent::retrieve($this->conveyor['paymentIntent']); ProcessLoggerHandler::logInfo( - 'payment method => '.$intent->payment_method_types[0], + 'payment method => ' . $intent->payment_method_types[0], null, null, 'ValidationOrderActions - createOrder' ); - if ($intent->payment_method_types[0] == 'card' && Configuration::get(Stripe_official::CATCHANDAUTHORIZE) == null) { + if ($intent->payment_method_types[0] == 'card' + && $intent->capture_method != 'automatic' + && Configuration::get(Stripe_official::CATCHANDAUTHORIZE) == null) { ProcessLoggerHandler::logInfo( 'Capturing card', null, @@ -389,7 +396,7 @@ public function createOrder() $amount = $this->module->isZeroDecimalCurrency($currency->iso_code) ? $order->getTotalPaid() : $order->getTotalPaid() * 100; ProcessLoggerHandler::logInfo( - 'Capture Amount => '.$amount, + 'Capture Amount => ' . $amount, null, null, 'ValidationOrderActions - createOrder' @@ -399,7 +406,7 @@ public function createOrder() if ($amount != $paid) { ProcessLoggerHandler::logInfo( - 'Fix invalid amount "'.$amount.'" to "'.$paid, + 'Fix invalid amount "' . $amount . '" to "' . $paid, null, null, 'ValidationOrderActions - createOrder' @@ -409,6 +416,7 @@ public function createOrder() if (!$this->module->captureFunds($amount, $this->conveyor['paymentIntent'])) { ProcessLoggerHandler::closeLogger(); + return false; } @@ -425,14 +433,14 @@ public function createOrder() \Stripe\PaymentIntent::update( $this->conveyor['paymentIntent'], [ - 'description' => $this->context->shop->name.' '.$order->reference + 'description' => $this->context->shop->name . ' ' . $order->reference, ] ); } else { \Stripe\Charge::update( $this->conveyor['chargeId'], [ - 'description' => $this->context->shop->name.' '.$order->reference + 'description' => $this->context->shop->name . ' ' . $order->reference, ] ); } @@ -455,12 +463,13 @@ public function createOrder() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - createOrder' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -475,27 +484,29 @@ public function sendMail() } $dir_mail = false; - if (file_exists(dirname(__FILE__).'/../../mails/'.$this->context->language->iso_code.'/oxxo.txt') && - file_exists(dirname(__FILE__).'/../../mails/'.$this->context->language->iso_code.'/oxxo.html')) { - $dir_mail = dirname(__FILE__).'/../../mails/'; + if (file_exists(dirname(__FILE__) . '/../../mails/' . $this->context->language->iso_code . '/oxxo.txt') && + file_exists(dirname(__FILE__) . '/../../mails/' . $this->context->language->iso_code . '/oxxo.html')) { + $dir_mail = dirname(__FILE__) . '/../../mails/'; } - $orderId = Order::getOrderByCartId((int)$this->conveyor['id_cart']); - $order = new Order((int)$orderId); + $orderId = Order::getOrderByCartId((int) $this->conveyor['id_cart']); + $order = new Order((int) $orderId); - if (!isset($this->conveyor['voucher_url'])) + if (!isset($this->conveyor['voucher_url'])) { $this->conveyor['voucher_url'] = $this->conveyor['event_json']->data->object->next_action->oxxo_display_details->hosted_voucher_url; - if (!isset($this->conveyor['voucher_expire'])) + } + if (!isset($this->conveyor['voucher_expire'])) { $this->conveyor['voucher_expire'] = $this->conveyor['event_json']->data->object->next_action->oxxo_display_details->expires_after; + } - $template_vars = array( + $template_vars = [ '{name}' => $this->conveyor['payment_method']->billing_details->name, '{shop_name}' => Configuration::get('PS_SHOP_NAME'), '{order_id}' => $order->id, '{voucher_url}' => $this->conveyor['voucher_url'], '{order_ref}' => $order->reference, '{total_paid}' => Tools::displayPrice($order->total_paid, new Currency($order->id_currency)), - ); + ]; if ($dir_mail) { Mail::Send( @@ -524,12 +535,13 @@ public function sendMail() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - sendMail' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -554,7 +566,7 @@ public function saveCard() $customer = \Stripe\Customer::create([ 'description' => 'Customer created from Prestashop Stripe module', 'email' => $cartCustomer->email, - 'name' => $cartCustomer->firstname.' '.$cartCustomer->lastname, + 'name' => $cartCustomer->firstname . ' ' . $cartCustomer->lastname, ]); $stripeCustomer->id_customer = $cartCustomer->id; @@ -585,12 +597,13 @@ public function saveCard() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - saveCard' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -623,30 +636,30 @@ public function addTentative() $stripePayment->setIdStripe($this->conveyor['chargeId']); $stripePayment->setIdPaymentIntent($this->conveyor['paymentIntent']); $stripePayment->setName($this->conveyor['datas']['owner']); - $stripePayment->setIdCart((int)$this->context->cart->id); + $stripePayment->setIdCart((int) $this->context->cart->id); $stripePayment->setType(Tools::strtolower($cardType)); $stripePayment->setAmount($this->conveyor['amount']); - $stripePayment->setRefund((int)0); + $stripePayment->setRefund((int) 0); $stripePayment->setCurrency(Tools::strtolower($this->context->currency->iso_code)); - $stripePayment->setResult((int)$this->conveyor['result']); - $stripePayment->setState((int)Configuration::get('STRIPE_MODE')); + $stripePayment->setResult((int) $this->conveyor['result']); + $stripePayment->setState((int) Configuration::get('STRIPE_MODE')); if (isset($this->conveyor['voucher_url']) && isset($this->conveyor['voucher_expire'])) { $stripePayment->setVoucherUrl($this->conveyor['voucher_url']); - $stripePayment->setVoucherExpire(date("Y-m-d H:i:s", $this->conveyor['voucher_expire'])); + $stripePayment->setVoucherExpire(date('Y-m-d H:i:s', $this->conveyor['voucher_expire'])); } - $stripePayment->setDateAdd(date("Y-m-d H:i:s")); + $stripePayment->setDateAdd(date('Y-m-d H:i:s')); $stripePayment->save(); // Payment with Sofort is not accepted yet, so we can't get his orderPayment if (Tools::strtolower($cardType) != 'sofort' && Tools::strtolower($cardType) != 'sepa_debit' && Tools::strtolower($cardType) != 'oxxo') { - $orderId = Order::getOrderByCartId((int)$this->context->cart->id); + $orderId = Order::getOrderByCartId((int) $this->context->cart->id); $orderPaymentDatas = OrderPayment::getByOrderId($orderId); if (empty($orderPaymentDatas[0]) || empty($orderPaymentDatas[0]->id)) { ProcessLoggerHandler::logError( - 'OrderPayment is not created due to a PrestaShop, please verify order state configuration is loggable (Consider the associated order as validated). We try to create one with charge id ' .$this->conveyor['chargeId'] . ' on payment.', + 'OrderPayment is not created due to a PrestaShop, please verify order state configuration is loggable (Consider the associated order as validated). We try to create one with charge id ' . $this->conveyor['chargeId'] . ' on payment.', 'Order', $orderId, 'ValidationOrderActions - addTentative' @@ -664,12 +677,13 @@ public function addTentative() 3, null, 'Cart', - (int)$this->context->cart->id, + (int) $this->context->cart->id, true ); throw new PrestaShopException('Can\'t save Order Payment'); } ProcessLoggerHandler::closeLogger(); + return true; } @@ -687,12 +701,13 @@ public function addTentative() ProcessLoggerHandler::closeLogger(); } catch (Exception $e) { ProcessLoggerHandler::logError( - preg_replace("/\n/", '
', (string)$e->getMessage().'
'.$e->getTraceAsString()), + preg_replace("/\n/", '
', (string) $e->getMessage() . '
' . $e->getTraceAsString()), null, null, 'ValidationOrderActions - addTentative' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -721,13 +736,14 @@ public function chargeWebhook() if ($id_order == false) { if (in_array($event_type, Stripe_official::$webhook_events)) { ProcessLoggerHandler::logInfo( - 'Unknown order => '.$event_type, + 'Unknown order => ' . $event_type, null, null, 'ValidationOrderActions - chargeWebhook' ); ProcessLoggerHandler::closeLogger(); http_response_code(200); + return true; } else { ProcessLoggerHandler::logError( @@ -738,6 +754,7 @@ public function chargeWebhook() ); ProcessLoggerHandler::closeLogger(); http_response_code(200); + return false; } } @@ -752,13 +769,14 @@ public function chargeWebhook() if ($order->module != 'stripe_official') { ProcessLoggerHandler::logInfo( - 'This order #'.$id_order.' was made with '.$order->module.' not with Stripe', + 'This order #' . $id_order . ' was made with ' . $order->module . ' not with Stripe', null, null, 'ValidationOrderActions - chargeWebhook' ); ProcessLoggerHandler::closeLogger(); http_response_code(200); + return true; } @@ -772,19 +790,18 @@ public function chargeWebhook() ); ProcessLoggerHandler::closeLogger(); http_response_code(200); + return true; } ProcessLoggerHandler::logInfo( - 'current charge => '.$event_type, + 'current charge => ' . $event_type, null, null, 'ValidationOrderActions - chargeWebhook' ); - - switch($event_type) - { + switch ($event_type) { case 'charge.succeeded': if ($order->getCurrentState() != Configuration::get('PS_OS_OUTOFSTOCK_PAID')) { $order->setCurrentState(Configuration::get('PS_OS_PAYMENT')); @@ -793,7 +810,7 @@ public function chargeWebhook() $stripePayment = new StripePayment(); $stripePayment->getStripePaymentByPaymentIntent($this->conveyor['IdPaymentIntent']); $stripePayment->setIdStripe($this->conveyor['event_json']->data->object->id); - $stripePayment->setVoucherValidate(date("Y-m-d H:i:s")); + $stripePayment->setVoucherValidate(date('Y-m-d H:i:s')); $stripePayment->save(); ProcessLoggerHandler::logInfo( @@ -813,18 +830,12 @@ public function chargeWebhook() break; case 'charge.refunded': - if ($order->getCurrentState() != Configuration::get('PS_OS_PAYMENT')) { - $order->setCurrentState(Configuration::get('PS_OS_CANCELED')); - ProcessLoggerHandler::logInfo( - 'Order canceled', - null, - null, - 'ValidationOrderActions - chargeWebhook' - ); - } else { + $currentState = new \OrderState($order->getCurrentState()); + if ((bool) $currentState->paid === true) { if ($this->conveyor['event_json']->data->object->amount_refunded !== $this->conveyor['event_json']->data->object->amount_captured || $this->conveyor['event_json']->data->object->amount_refunded !== $this->conveyor['event_json']->data->object->amount) { - $order->setCurrentState(Configuration::get('PS_CHECKOUT_STATE_PARTIAL_REFUND')); + $newOrderState = empty(Configuration::get('PS_CHECKOUT_STATE_PARTIAL_REFUND')) ? Configuration::get('PS_OS_REFUND') : Configuration::get('PS_CHECKOUT_STATE_PARTIAL_REFUND'); + $order->setCurrentState($newOrderState); ProcessLoggerHandler::logInfo( 'Partial refund of payment => ' . $this->conveyor['event_json']->data->object->id, null, @@ -858,7 +869,7 @@ public function chargeWebhook() return true; } - $currentOrderState = $order->getCurrentOrderState()->name[(int)Configuration::get('PS_LANG_DEFAULT')]; + $currentOrderState = $order->getCurrentOrderState()->name[(int) Configuration::get('PS_LANG_DEFAULT')]; ProcessLoggerHandler::logInfo( 'Set Order State to ' . $currentOrderState . ' for ' . $event_type, @@ -867,6 +878,7 @@ public function chargeWebhook() 'ValidationOrderActions - chargeWebhook' ); ProcessLoggerHandler::closeLogger(); + return true; } } diff --git a/classes/index.php b/classes/index.php deleted file mode 100644 index 37816350..00000000 --- a/classes/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2019 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/composer.json b/composer.json index ada05a46..6310e83a 100644 --- a/composer.json +++ b/composer.json @@ -39,5 +39,6 @@ "scripts": { "pre-autoload-dump": "if [ ${TOTPSCLASSLIB_DEV_PATH} ]; then php ${TOTPSCLASSLIB_DEV_PATH}/classlib/refresh.php .; fi" }, - "type": "prestashop-module" + "type": "prestashop-module", + "author": "202-ecommerce" } diff --git a/config.xml b/config.xml new file mode 100644 index 00000000..ba345aff --- /dev/null +++ b/config.xml @@ -0,0 +1,13 @@ + + + stripe_official + + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/controllers/.htaccess b/controllers/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/controllers/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/controllers/admin/AdminStripe_officialPaymentIntent.php b/controllers/admin/AdminStripe_officialPaymentIntent.php index d28276f1..45cc497d 100644 --- a/controllers/admin/AdminStripe_officialPaymentIntent.php +++ b/controllers/admin/AdminStripe_officialPaymentIntent.php @@ -1,5 +1,27 @@ + * @copyright Copyright (c) Stripe + * @license Academic Free License (AFL 3.0) + */ class AdminStripe_officialPaymentIntentController extends ModuleAdminController { /** @var bool Active bootstrap for Prestashop 1.6 */ @@ -36,9 +58,9 @@ public function __construct() $this->_select = 'o.id_order, sp.id_cart, sp.id_payment_intent, sp.type, spi.status, o.reference'; $this->_join = - 'INNER JOIN `'._DB_PREFIX_.'stripe_payment` sp ON (a.id_payment_intent = sp.id_payment_intent AND sp.result > 0) - INNER JOIN `'._DB_PREFIX_.'stripe_payment_intent` spi ON (sp.id_payment_intent = spi.id_payment_intent) - INNER JOIN `'._DB_PREFIX_.'orders` o ON (sp.id_cart = o.id_cart)'; + 'INNER JOIN `' . _DB_PREFIX_ . 'stripe_payment` sp ON (a.id_payment_intent = sp.id_payment_intent AND sp.result > 0) + INNER JOIN `' . _DB_PREFIX_ . 'stripe_payment_intent` spi ON (sp.id_payment_intent = spi.id_payment_intent) + INNER JOIN `' . _DB_PREFIX_ . 'orders` o ON (sp.id_cart = o.id_cart)'; $this->explicitSelect = true; @@ -70,7 +92,7 @@ public function __construct() 'reference' => [ 'title' => $this->module->l('Order Reference', 'AdminStripe_officialPaymentIntentController'), 'orderby' => false, - ] + ], ]; } @@ -87,6 +109,7 @@ public function initToolbar() /** * @throws PrestaShopException + * * @see AdminController::initToolbar() */ public function renderDetails() diff --git a/controllers/admin/index.php b/controllers/admin/index.php deleted file mode 100644 index 538616ae..00000000 --- a/controllers/admin/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/controllers/front/createIntent.php b/controllers/front/createIntent.php index a099a733..f4afaa53 100644 --- a/controllers/front/createIntent.php +++ b/controllers/front/createIntent.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe\PaymentIntent; @@ -60,14 +60,14 @@ public function initContent() $intent = $this->createIdempotencyKey($intentData); } catch (Exception $e) { ProcessLoggerHandler::logError( - "Retrieve Stripe Account Error => ".$e->getMessage(), + 'Retrieve Stripe Account Error => ' . $e->getMessage(), null, null, 'createIntent' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } ProcessLoggerHandler::logInfo( @@ -78,13 +78,12 @@ public function initContent() ); ProcessLoggerHandler::closeLogger(); - echo( - json_encode([ + echo json_encode([ 'intent' => $intent, 'cardPayment' => $cardData['cardPayment'], - 'saveCard' => $cardData['save_card'] + 'saveCard' => $cardData['save_card'], ]) - ); + ; exit; } @@ -97,15 +96,15 @@ private function constructIntentData($amount, $currency, $paymentOption, $paymen $shippingAddress = new Address($this->context->cart->id_address_delivery); $shippingAddressState = new State($shippingAddress->id_state); - $intentData = array( - "amount" => $amount, - "currency" => $currency, - "payment_method_types" => [$paymentOption], - "capture_method" => $captureMethod, - "metadata" => [ - 'id_cart' => $this->context->cart->id + $intentData = [ + 'amount' => $amount, + 'currency' => $currency, + 'payment_method_types' => [$paymentOption], + 'capture_method' => $captureMethod, + 'metadata' => [ + 'id_cart' => $this->context->cart->id, ], - "description" => 'Product Purchase', + 'description' => 'Product Purchase', 'shipping' => [ 'name' => $customerFullName, 'address' => [ @@ -116,7 +115,7 @@ private function constructIntentData($amount, $currency, $paymentOption, $paymen 'country' => Country::getIsoById($shippingAddress->id_country), ], ], - ); + ]; if ($paymentMethodId) { $stripeAccount = \Stripe\Account::retrieve(); @@ -126,7 +125,7 @@ private function constructIntentData($amount, $currency, $paymentOption, $paymen } ProcessLoggerHandler::logInfo( - 'Intent Data => '.Tools::jsonEncode($intentData), + 'Intent Data => ' . Tools::jsonEncode($intentData), null, null, 'createIntent - constructIntentData' @@ -135,34 +134,34 @@ private function constructIntentData($amount, $currency, $paymentOption, $paymen return $intentData; } catch (\Stripe\Exception\ApiErrorException $e) { ProcessLoggerHandler::logError( - "Retrieve Stripe Account Error => ".$e->getMessage(), + 'Retrieve Stripe Account Error => ' . $e->getMessage(), null, null, 'createIntent' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } catch (PrestaShopDatabaseException $e) { ProcessLoggerHandler::logError( - "Retrieve Prestashop State Error => ".$e->getMessage(), + 'Retrieve Prestashop State Error => ' . $e->getMessage(), null, null, 'createIntent' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } catch (PrestaShopException $e) { ProcessLoggerHandler::logError( - "Retrieve Prestashop State Error => ".$e->getMessage(), + 'Retrieve Prestashop State Error => ' . $e->getMessage(), null, null, 'createIntent' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } } @@ -171,19 +170,19 @@ private function constructCardData($paymentMethodId) if (!$paymentMethodId) { $address = new Address($this->context->cart->id_address_invoice); - $payment_method = array( - 'billing_details' => array( - 'address' => array( + $payment_method = [ + 'billing_details' => [ + 'address' => [ 'city' => $address->city, 'country' => Country::getIsoById($address->id_country), 'line1' => $address->address1, 'line2' => $address->address2, - 'postal_code' => $address->postcode - ), + 'postal_code' => $address->postcode, + ], 'email' => $this->context->customer->email, - 'name' => $this->getCustomerFullNameContext() - ) - ); + 'name' => $this->getCustomerFullNameContext(), + ], + ]; } else { $payment_method = $paymentMethodId; } @@ -201,16 +200,16 @@ private function constructCardData($paymentMethodId) $stripe_validation_return_url = $this->context->link->getModuleLink( 'stripe_official', 'orderConfirmationReturn', - array( - 'id_cart' => $this->context->cart->id - ), + [ + 'id_cart' => $this->context->cart->id, + ], true ); $cardData['cardPayment']['return_url'] = $stripe_validation_return_url; } ProcessLoggerHandler::logInfo( - 'Card Payment => '.Tools::jsonEncode($cardData), + 'Card Payment => ' . Tools::jsonEncode($cardData), null, null, 'createIntent - constructCardPaymentData' @@ -226,15 +225,25 @@ private function createIdempotencyKey($intentData) $stripeIdempotencyKey = new StripeIdempotencyKey(); $stripeIdempotencyKey = $stripeIdempotencyKey->getByIdCart($cart->id); - $paymentIntentStatus = (empty($stripeIdempotencyKey->id) === false) ? PaymentIntent::retrieve($stripeIdempotencyKey->id_payment_intent)->status : null; + if (empty($stripeIdempotencyKey->id) === false) { + $previousPaymentIntentData = PaymentIntent::retrieve($stripeIdempotencyKey->id_payment_intent); + $paymentIntentStatus = $previousPaymentIntentData->status; + $paymentIntentCaptureMethod = $previousPaymentIntentData->capture_method; + } else { + $paymentIntentStatus = null; + $paymentIntentCaptureMethod = null; + } + $updatableStatus = ['requires_payment_method', 'requires_confirmation', 'requires_action']; - if (in_array($paymentIntentStatus, $updatableStatus) === false) { + if (in_array($paymentIntentStatus, $updatableStatus) === false + || $paymentIntentCaptureMethod !== $intentData['capture_method'] + ) { $intent = $stripeIdempotencyKey->createNewOne($cart->id, $intentData); $this->registerStripeEvent($intent); ProcessLoggerHandler::logInfo( - 'Create New Intent => '.$intent, + 'Create New Intent => ' . $intent, null, null, 'createIntent - createIdempotencyKey' @@ -244,7 +253,7 @@ private function createIdempotencyKey($intentData) $intent = $stripeIdempotencyKey->updateIntentData($intentData); ProcessLoggerHandler::logInfo( - 'Update Previous Intent => '.$intent, + 'Update Previous Intent => ' . $intent, null, null, 'createIntent - createIdempotencyKey' @@ -254,24 +263,24 @@ private function createIdempotencyKey($intentData) return $intent; } catch (\Stripe\Exception\ApiErrorException $e) { ProcessLoggerHandler::logError( - "Create Stripe Intent Error => ".$e->getMessage(), + 'Create Stripe Intent Error => ' . $e->getMessage(), null, null, 'createIntent - createIdempotencyKey' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die($e->getMessage()); + exit($e->getMessage()); } catch (PrestaShopException $e) { ProcessLoggerHandler::logError( - "Save Stripe Idempotency Key Error => ".$e->getMessage(), + 'Save Stripe Idempotency Key Error => ' . $e->getMessage(), null, null, 'createIntent - createIdempotencyKey' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } } @@ -290,7 +299,7 @@ private function registerStripeEvent($intent) if ($stripeEvent->save()) { ProcessLoggerHandler::logInfo( - 'Register created Stripe event status for payment intent '.$intent->id, + 'Register created Stripe event status for payment intent ' . $intent->id, 'StripeEvent', $stripeEvent->id, 'createIntent - registerStripeEvent' @@ -304,18 +313,18 @@ private function registerStripeEvent($intent) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } } catch (PrestaShopException $e) { ProcessLoggerHandler::logError( - "An issue appears during saving Stripe module event in database", + 'An issue appears during saving Stripe module event in database', null, null, 'createIntent - registerStripeEvent' ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('An unexpected problem has occurred. Please contact the support.'); + exit('An unexpected problem has occurred. Please contact the support.'); } } diff --git a/controllers/front/index.php b/controllers/front/index.php deleted file mode 100644 index 538616ae..00000000 --- a/controllers/front/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/controllers/front/orderConfirmationReturn.php b/controllers/front/orderConfirmationReturn.php index 11a3d3a6..2263d671 100644 --- a/controllers/front/orderConfirmationReturn.php +++ b/controllers/front/orderConfirmationReturn.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - -use Stripe_officialClasslib\Actions\ActionsHandler; -use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; - class stripe_officialOrderConfirmationReturnModuleFrontController extends ModuleFrontController { public function __construct() @@ -54,25 +50,26 @@ public function initContent() $payment_intent ); - if (isset($intent->payment_method_details->type)) - $payment_method = $intent->payment_method_details->type; - elseif (isset($intent->payment_method_types[0])) + if (isset($intent->payment_method_details->type)) { + $payment_method = $intent->payment_method_details->type; + } elseif (isset($intent->payment_method_types[0])) { $payment_method = $intent->payment_method_types[0]; - else + } else { $payment_method = null; + } if (Tools::getValue('redirect_status') == 'failed') { $url = Context::getContext()->link->getModuleLink( 'stripe_official', 'orderFailure', - array(), + [], true ); } else { - $data = array( + $data = [ 'payment_intent' => $payment_intent, - 'payment_method' => $payment_method - ); + 'payment_method' => $payment_method, + ]; $url = Context::getContext()->link->getModuleLink( 'stripe_official', diff --git a/controllers/front/orderFailure.php b/controllers/front/orderFailure.php index cc29de36..d37fbc93 100644 --- a/controllers/front/orderFailure.php +++ b/controllers/front/orderFailure.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class stripe_officialOrderFailureModuleFrontController extends ModuleFrontController { /** @@ -32,9 +31,9 @@ public function initContent() { parent::initContent(); - $this->context->smarty->assign(array( - 'stripe_order_url' => $this->context->link->getPageLink('order') - )); + $this->context->smarty->assign([ + 'stripe_order_url' => $this->context->link->getPageLink('order'), + ]); if (version_compare(_PS_VERSION_, '1.7', '>=')) { $this->setTemplate('module:stripe_official/views/templates/front/order-confirmation-failed-17.tpl'); diff --git a/controllers/front/orderSuccess.php b/controllers/front/orderSuccess.php old mode 100644 new mode 100755 index 0f72563c..9a4bd2d6 --- a/controllers/front/orderSuccess.php +++ b/controllers/front/orderSuccess.php @@ -1,10 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ +use Stripe_officialClasslib\Actions\ActionsHandler; +use Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler; + class stripe_officialOrderSuccessModuleFrontController extends ModuleFrontController { /** @@ -38,8 +37,9 @@ public function initContent() $intent = $this->retrievePaymentIntent(); - if ($this->registerStripeEvent($intent)) + if ($this->registerStripeEvent($intent)) { $this->handleWebhookActions($intent); + } $this->displayOrderConfirmation($intent); } @@ -60,7 +60,7 @@ private function retrievePaymentIntent() } ProcessLoggerHandler::logInfo( - 'Retrieve payment intent : '.$intent, + 'Retrieve payment intent : ' . $intent, null, null, 'orderSuccess - retrievePaymentIntent' @@ -77,12 +77,13 @@ private function checkEventStatus($paymentIntent) if (!$stripeEventStatus) { ProcessLoggerHandler::logInfo( - 'Charge event does not need to be processed : '.$eventCharge->status, + 'Charge event does not need to be processed : ' . $eventCharge->status, null, null, 'orderSuccess - checkEventStatus' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -108,6 +109,7 @@ private function checkEventStatus($paymentIntent) 'orderSuccess - checkEventStatus' ); ProcessLoggerHandler::closeLogger(); + return false; } } @@ -120,6 +122,7 @@ private function checkEventStatus($paymentIntent) 'orderSuccess - checkEventStatus' ); ProcessLoggerHandler::closeLogger(); + return false; } @@ -156,6 +159,7 @@ private function registerStripeEvent($paymentIntent) 'orderSuccess - registerStripeEvent' ); ProcessLoggerHandler::closeLogger(); + return false; } } @@ -200,7 +204,7 @@ private function handleWebhookActions($intent) 'addTentative' ); } elseif (($eventType == 'pending' && $payment_method == 'sofort') - || ($eventType == 'charge.succeeded' + || ($eventType == 'succeeded' && Stripe_official::$paymentMethods[$payment_method]['flow'] == 'redirect' && $payment_method != 'sofort') ) { @@ -241,7 +245,7 @@ private function displayOrderConfirmation($intent) ); $id_order = 0; - for($i = 1; $i <= 15; $i++) { + for ($i = 1; $i <= 15; ++$i) { if (empty($intent->metadata->id_cart)) { $stripePayment = new StripePayment(); $stripePayment->getStripePaymentByPaymentIntent($intent->id); @@ -251,26 +255,29 @@ private function displayOrderConfirmation($intent) $id_cart = $intent->metadata->id_cart; } - if ($id_cart !== null) { - $id_order = (int) Order::getOrderByCartId($id_cart); - - if ($id_order) { - ProcessLoggerHandler::logInfo( - 'Waiting proccess order OK', - null, - null, - 'orderSuccess - displayOrderConfirmation' - ); - break; - } + if (empty($id_cart) === true) { + break; } - sleep(2); + $id_order = $this->getOrderIdByCartId($id_cart); + ProcessLoggerHandler::logInfo( - 'Waiting proccess time => '.$i, + 'Waiting proccess time => ' . $i . 'Order Id => ' . $id_order, null, null, 'orderSuccess - displayOrderConfirmation' ); + + if (empty($id_order) === false) { + ProcessLoggerHandler::logInfo( + 'Waiting proccess order OK', + null, + null, + 'orderSuccess - displayOrderConfirmation' + ); + break; + } + + sleep(2); } if (isset($this->context->customer->secure_key)) { @@ -283,12 +290,12 @@ private function displayOrderConfirmation($intent) $url = Context::getContext()->link->getModuleLink( 'stripe_official', 'orderFailure', - array(), + [], true ); ProcessLoggerHandler::logInfo( - 'Failed order url => '.$url, + 'Failed order url => ' . $url, null, null, 'orderSuccess - displayOrderConfirmation' @@ -298,16 +305,16 @@ private function displayOrderConfirmation($intent) 'order-confirmation', true, null, - array( - 'id_cart' => $id_cart, - 'id_module' => (int)$this->module->id, + [ + 'id_cart' => isset($id_cart) ? $id_cart : 0, + 'id_module' => (int) $this->module->id, 'id_order' => $id_order, - 'key' => $secure_key - ) + 'key' => $secure_key, + ] ); ProcessLoggerHandler::logInfo( - 'Confirmation order url => '.$url, + 'Confirmation order url => ' . $url, null, null, 'orderSuccess - displayOrderConfirmation' @@ -318,4 +325,15 @@ private function displayOrderConfirmation($intent) Tools::redirect($url); exit; } + + private function getOrderIdByCartId($cartId) + { + $query = (new DbQuery()) + ->select('id_order') + ->from(Order::$definition['table']) + ->where('`id_cart` = ' . (int) $cartId); + $orderId = Db::getInstance()->getValue($query, false); + + return empty($orderId) ? 0 : (int) $orderId; + } } diff --git a/controllers/front/removeCard.php b/controllers/front/removeCard.php index e02ed447..85bcc508 100755 --- a/controllers/front/removeCard.php +++ b/controllers/front/removeCard.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class stripe_officialRemoveCardModuleFrontController extends ModuleFrontController { /** diff --git a/controllers/front/stripeCards.php b/controllers/front/stripeCards.php index e219d10d..c860cf6f 100755 --- a/controllers/front/stripeCards.php +++ b/controllers/front/stripeCards.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class stripe_officialStripeCardsModuleFrontController extends ModuleFrontController { /** @@ -32,7 +31,7 @@ public function initContent() { parent::initContent(); - $allCards = array(); + $allCards = []; if ($this->context->customer->id != null) { $stripeAccount = \Stripe\Account::retrieve(); @@ -50,9 +49,9 @@ public function initContent() } } - $this->context->smarty->assign(array( - 'cards' => $allCards - )); + $this->context->smarty->assign([ + 'cards' => $allCards, + ]); if (version_compare(_PS_VERSION_, '1.7', '>=')) { $this->setTemplate('module:stripe_official/views/templates/front/stripe-cards.tpl'); @@ -70,10 +69,11 @@ public function getBreadcrumbLinks() 'url' => $this->context->link->getModuleLink( 'stripe_official', 'stripeCards', - array(), + [], true ), ]; + return $breadcrumb; } @@ -81,14 +81,14 @@ public function setMedia() { parent::setMedia(); - Media::addJsDef(array( + Media::addJsDef([ 'stripe_remove_card_url' => $this->context->link->getModuleLink( 'stripe_official', 'removeCard', - array(), + [], true - ) - )); + ), + ]); $this->addJS(_MODULE_DIR_ . 'stripe_official/views/js/stripeCard.js'); } diff --git a/controllers/front/updateIntent.php b/controllers/front/updateIntent.php index 8605e50c..25968f96 100644 --- a/controllers/front/updateIntent.php +++ b/controllers/front/updateIntent.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - class stripe_officialUpdateIntentModuleFrontController extends ModuleFrontController { /** @@ -35,7 +34,7 @@ public function initContent() $intent = \Stripe\PaymentIntent::update( Tools::getValue('id_payment_intent'), [ - 'payment_method_types' => [Tools::getValue('payment')] + 'payment_method_types' => [Tools::getValue('payment')], ] ); diff --git a/controllers/front/validation.php b/controllers/front/validation.php index 1c4b6918..c8c1d451 100644 --- a/controllers/front/validation.php +++ b/controllers/front/validation.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe_officialClasslib\Actions\ActionsHandler; @@ -49,10 +49,10 @@ public function initContent() ); if (empty($this->context->cart->getProducts())) { - $chargeResult = array( + $chargeResult = [ 'code' => '0', - 'url' => $url_failed - ); + 'url' => $url_failed, + ]; echo Tools::jsonEncode($chargeResult); exit; } @@ -60,15 +60,15 @@ public function initContent() // Create the handler $handler = new ActionsHandler(); - // Set input data - $handler->setConveyor(array( + // Set input data + $handler->setConveyor([ 'source' => Tools::getValue('source'), 'response' => Tools::getValue('response'), 'id_payment_intent' => Tools::getValue('payment_intent'), 'saveCard' => Tools::getValue('saveCard'), 'module' => $this->module, 'context' => $this->context, - )); + ]); // Set list of actions to execute if (Tools::getValue('source')) { @@ -101,7 +101,6 @@ public function initContent() Tools::redirect($url_failed); } - $id_order = Order::getOrderByCartId($this->context->cart->id); if (isset($this->context->customer->secure_key)) { @@ -114,12 +113,12 @@ public function initContent() 'order-confirmation', true, null, - array( - 'id_cart' => (int)$this->context->cart->id, - 'id_module' => (int)$this->module->id, - 'id_order' => (int)$id_order, - 'key' => $secure_key - ) + [ + 'id_cart' => (int) $this->context->cart->id, + 'id_module' => (int) $this->module->id, + 'id_order' => (int) $id_order, + 'key' => $secure_key, + ] ); if (!empty(Tools::getValue('source')) || !empty(Tools::getValue('payment_intent'))) { @@ -127,11 +126,11 @@ public function initContent() exit; } - /* Ajax redirection Order Confirmation */ - $chargeResult = array( + /* Ajax redirection Order Confirmation */ + $chargeResult = [ 'code' => '1', - 'url' => $url - ); + 'url' => $url, + ]; echo Tools::jsonEncode($chargeResult); exit; diff --git a/controllers/front/webhook.php b/controllers/front/webhook.php index cc5d7d19..acfe7d90 100755 --- a/controllers/front/webhook.php +++ b/controllers/front/webhook.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ use Stripe\Exception\SignatureVerificationException; @@ -103,7 +103,7 @@ public function postProcess() $this->checkApiKey($secret_key); // Retrieve payload - $input = @Tools::file_get_contents("php://input"); + $input = @Tools::file_get_contents('php://input'); ProcessLoggerHandler::logInfo( '$input => ' . $input, null, @@ -114,16 +114,16 @@ public function postProcess() // Retrieve http signature $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; ProcessLoggerHandler::logInfo( - 'set http stripe signature => '.$sig_header, + 'set http stripe signature => ' . $sig_header, null, null, 'webhook - postProcess' ); // Retrieve secret endpoint - $endpoint_secret = Configuration::get(Stripe_official::WEBHOOK_SIGNATURE,null, Stripe_official::getShopGroupIdContext(), Stripe_official::getShopIdContext()); + $endpoint_secret = Configuration::get(Stripe_official::WEBHOOK_SIGNATURE, null, Stripe_official::getShopGroupIdContext(), Stripe_official::getShopIdContext()); ProcessLoggerHandler::logInfo( - 'set endpoint secret => '.$endpoint_secret, + 'set endpoint secret => ' . $endpoint_secret, null, null, 'webhook - postProcess' @@ -155,7 +155,7 @@ public function postProcess() $paymentIntent = $event->data->object->payment_intent; } ProcessLoggerHandler::logInfo( - 'payment_intent : '.$paymentIntent, + 'payment_intent : ' . $paymentIntent, null, null, 'webhook - postProcess' @@ -240,7 +240,7 @@ private function constructEvent($payload, $sigHeader, $secret) } if (!in_array($event->type, Stripe_official::$webhook_events)) { - $msg = 'webhook "'.$event->type.'" call not yet supported'; + $msg = 'webhook "' . $event->type . '" call not yet supported'; ProcessLoggerHandler::logInfo( $msg, null, @@ -270,11 +270,12 @@ private function constructEvent($payload, $sigHeader, $secret) null, 'webhook - constructEvent' ); + return $event; } catch (UnexpectedValueException $e) { // Invalid payload ProcessLoggerHandler::logError( - 'Invalid payload : '.$e->getMessage(), + 'Invalid payload : ' . $e->getMessage(), null, null, 'webhook - constructEvent' @@ -286,7 +287,7 @@ private function constructEvent($payload, $sigHeader, $secret) } catch (SignatureVerificationException $e) { // Invalid signature ProcessLoggerHandler::logError( - 'Invalid signature : '.$e->getMessage(), + 'Invalid signature : ' . $e->getMessage(), null, null, 'webhook - constructEvent' @@ -326,7 +327,7 @@ private function registerEvent($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die($msg); + exit($msg); } return $stripeEvent; @@ -340,7 +341,7 @@ private function registerEvent($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die($msg); + exit($msg); } } @@ -358,7 +359,7 @@ private function validProcessEvent($registeredEvent) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die($msg); + exit($msg); } } catch (PrestaShopException $e) { $msg = 'A problem appears while completing the Stripe event process => ' . $e->getMessage(); @@ -370,7 +371,7 @@ private function validProcessEvent($registeredEvent) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die($msg); + exit($msg); } } @@ -388,7 +389,7 @@ private function checkEventStatus($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(200); - die($msg); + exit($msg); } $lastRegisteredEvent = new StripeEvent(); @@ -404,7 +405,7 @@ private function checkEventStatus($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(200); - die($msg); + exit($msg); } if ($lastRegisteredEvent->status != $eventStatus && $lastRegisteredEvent->date_add != null) { @@ -421,7 +422,7 @@ private function checkEventStatus($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(200); - die($msg); + exit($msg); } } @@ -447,12 +448,13 @@ private function checkEventStatus($event, $paymentIntent) ); } elseif (!StripeEvent::validateTransitionStatus($lastRegisteredEvent->status, $eventStatus) || !$lastRegisteredEvent->isProcessed()) { if ($eventStatus === StripeEvent::CAPTURED_STATUS) { - if (isset($event->data->object->payment_method_details->type)) - $paymentMethodType = $event->data->object->payment_method_details->type; - elseif (isset($event->data->object->payment_method_types[0])) + if (isset($event->data->object->payment_method_details->type)) { + $paymentMethodType = $event->data->object->payment_method_details->type; + } elseif (isset($event->data->object->payment_method_types[0])) { $paymentMethodType = $event->data->object->payment_method_types[0]; - else + } else { $paymentMethodType = null; + } if ($paymentMethodType == 'card' && Configuration::get(Stripe_official::CATCHANDAUTHORIZE) != 'on') { $msg = 'The card payment amount has already been captured.'; @@ -464,7 +466,7 @@ private function checkEventStatus($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(200); - die($msg); + exit($msg); } } $msg = 'This Stripe module event "' . $eventStatus . '" cannot be processed because [Last event status: ' . $lastRegisteredEvent->status . ' | Processed : ' . ($lastRegisteredEvent->isProcessed() ? 'Yes' : 'No') . '].'; @@ -476,7 +478,7 @@ private function checkEventStatus($event, $paymentIntent) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die($msg); + exit($msg); } return $eventStatus; @@ -491,23 +493,23 @@ private function createWebhookHandler($event, $paymentIntent) 'webhook - createWebhookHandler' ); - $events_states = array( + $events_states = [ 'charge.expired' => Configuration::get('PS_OS_CANCELED'), 'charge.failed' => Configuration::get('PS_OS_ERROR'), 'charge.succeeded' => Configuration::get('PS_OS_PAYMENT'), 'charge.captured' => Configuration::get('PS_OS_PAYMENT'), 'charge.refunded' => Configuration::get('PS_OS_REFUND'), - 'charge.dispute.created' => Configuration::get(Stripe_official::SEPA_DISPUTE) - ); + 'charge.dispute.created' => Configuration::get(Stripe_official::SEPA_DISPUTE), + ]; $handler = new ActionsHandler(); - $handler->setConveyor(array( + $handler->setConveyor([ 'event_json' => $event, 'module' => $this->module, 'context' => $this->context, 'events_states' => $events_states, 'paymentIntent' => $paymentIntent, - )); + ]); return $handler; } @@ -523,12 +525,13 @@ private function handleWebhookActions($handler, $event) $eventType = $event->type; - if (isset($event->data->object->payment_method_details->type)) - $paymentMethodType = $event->data->object->payment_method_details->type; - elseif (isset($event->data->object->payment_method_types[0])) + if (isset($event->data->object->payment_method_details->type)) { + $paymentMethodType = $event->data->object->payment_method_details->type; + } elseif (isset($event->data->object->payment_method_types[0])) { $paymentMethodType = $event->data->object->payment_method_types[0]; - else + } else { $paymentMethodType = null; + } if (($eventType == 'charge.succeeded' && $paymentMethodType == 'card') || ($eventType == 'charge.pending' && $paymentMethodType == 'sepa_debit') @@ -582,7 +585,7 @@ private function handleWebhookActions($handler, $event) ); ProcessLoggerHandler::closeLogger(); http_response_code(400); - die('Webhook actions process failed.'); + exit('Webhook actions process failed.'); } } } diff --git a/controllers/index.php b/controllers/index.php deleted file mode 100644 index 538616ae..00000000 --- a/controllers/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/docker-compose.yml b/docker-compose.yml index f0c6424c..c34fc6b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,10 @@ services: prestashop: build: $PWD/202/docker environment: - PS_DOMAIN: "6602-2a01-e34-ecba-50c0-5115-2479-804c-530.ngrok.io" + PS_DOMAIN: "172.20.0.2" RUN_USER: clotaire ports: - - 8080:80 + - 2180:80 volumes: - $PWD:/var/www/html/modules/stripe_official volumes: diff --git a/index.php b/index.php deleted file mode 100644 index 538616ae..00000000 --- a/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/mails/.htaccess b/mails/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/mails/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/package.json b/package.json index 2bf82460..24f1a887 100644 --- a/package.json +++ b/package.json @@ -1,45 +1,45 @@ { - "name": "stripe_official", - "version": "2.4.3", - "description": "Stripe official Module", - "main": "webpack.config.js", - "scripts": { - "watch": "webpack --mode development --colors --devtool source-map --hide-modules -w", - "build": "webpack --mode production --colors --devtool source-map --progress -p", - "lint-css": "stylelint \"_dev/scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache --fix", - "lint-css-fix": "stylelint \"_dev/scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache --fix" - }, - "repository": { - "type": "git", - "url": "https://github.com/202-ecommerce/stripe_official/" - }, - "keywords": [ - "stripe_official" - ], - "homepage": "https://github.com/", - "author": "202-ecommerce", - "license": "SEE LICENSE IN stripe_official.php", - "devDependencies": { - "@babel/core": "^7.5.5", - "@babel/plugin-transform-runtime": "^7.5.5", - "@babel/preset-env": "^7.5.5", - "@babel/runtime": "^7.5.5", - "@babel/runtime-corejs3": "^7.5.5", - "autoprefixer": "^9.6.1", - "babel-loader": "^8.0.6", - "core-js": "^3.1.4", - "css-loader": "^3.2.0", - "file-loader": "^4.2.0", - "mini-css-extract-plugin": "^0.8.0", - "node-sass": "^4.12.0", - "postcss-loader": "^3.0.0", - "sass-loader": "^7.1.0", - "style-loader": "^1.0.0", - "stylelint": "^10.1.0", - "stylelint-config-twbs-bootstrap": "^0.4.0", - "terser-webpack-plugin": "^1.4.1", - "webpack": "^4.39.1", - "webpack-cli": "^3.3.6", - "webpack-fix-style-only-entries": "^0.3.0" - } -} + "name": "stripe_official", + "version": "2.4.3", + "description": "Stripe official Module", + "main": "webpack.config.js", + "scripts": { + "watch": "webpack --mode development --colors --devtool source-map --hide-modules -w", + "build": "webpack --mode production --colors --devtool source-map --progress -p", + "lint-css": "stylelint \"_dev/scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache --fix", + "lint-css-fix": "stylelint \"_dev/scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache --fix" + }, + "repository": { + "type": "git", + "url": "https://github.com/202-ecommerce/stripe_official/" + }, + "keywords": [ + "stripe_official" + ], + "homepage": "https://github.com/", + "author": "PrestaShop", + "license": "OSL-3.0", + "devDependencies": { + "@babel/core": "^7.5.5", + "@babel/plugin-transform-runtime": "^7.5.5", + "@babel/preset-env": "^7.5.5", + "@babel/runtime": "^7.5.5", + "@babel/runtime-corejs3": "^7.5.5", + "autoprefixer": "^9.6.1", + "babel-loader": "^8.0.6", + "core-js": "^3.1.4", + "css-loader": "^3.2.0", + "file-loader": "^4.2.0", + "mini-css-extract-plugin": "^0.8.0", + "node-sass": "^4.12.0", + "postcss-loader": "^3.0.0", + "sass-loader": "^7.1.0", + "style-loader": "^1.0.0", + "stylelint": "^10.1.0", + "stylelint-config-twbs-bootstrap": "^0.4.0", + "terser-webpack-plugin": "^1.4.1", + "webpack": "^4.39.1", + "webpack-cli": "^3.3.6", + "webpack-fix-style-only-entries": "^0.3.0" + } +} \ No newline at end of file diff --git a/postcss.config.js b/postcss.config.js index 7ac6b66a..f6c3e895 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,5 @@ /** - * 2007-2020 PrestaShop + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ module.exports = { diff --git a/smarty/.htaccess b/smarty/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/smarty/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/smarty/plugins/modifier.stripelreplace.php b/smarty/plugins/modifier.stripelreplace.php index 9ccbfab1..7528deae 100644 --- a/smarty/plugins/modifier.stripelreplace.php +++ b/smarty/plugins/modifier.stripelreplace.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ -/** +/* * Smarty modifier to replace HTML tags in translations. * @usage {{l='test'}|totlreplace} * @param.value string @@ -31,9 +31,9 @@ */ if (!function_exists('smarty_modifier_stripelreplace')) { - function smarty_modifier_stripelreplace($string, $replaces = array()) + function smarty_modifier_stripelreplace($string, $replaces = []) { - $search = array( + $search = [ '[b]', '[/b]', '[br]', @@ -47,9 +47,9 @@ function smarty_modifier_stripelreplace($string, $replaces = array()) '[strong]', '[/strong]', '[i]', - '[/i]' - ); - $replace = array( + '[/i]', + ]; + $replace = [ '', '', '
', @@ -63,8 +63,8 @@ function smarty_modifier_stripelreplace($string, $replaces = array()) '', '', '', - '' - ); + '', + ]; $string = str_replace($search, $replace, $string); foreach ($replaces as $k => $v) { $string = str_replace($k, $v, $string); diff --git a/stripe_official.php b/stripe_official.php index e23ee616..b75f2138 100755 --- a/stripe_official.php +++ b/stripe_official.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -47,7 +46,6 @@ * * Developers use declarative method to define objects, parameters, controllers... needed in this module */ - class Stripe_official extends PaymentModule { /** @@ -101,65 +99,69 @@ class Stripe_official extends PaymentModule /** * List of objectModel used in this Module + * * @var array */ - public $objectModels = array( + public $objectModels = [ 'StripePayment', 'StripePaymentIntent', 'StripeCapture', 'StripeCustomer', 'StripeIdempotencyKey', 'StripeEvent', - ); + ]; /** * List of _202 classlib_ extentions + * * @var array */ - public $extensions = array( + public $extensions = [ Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerExtension::class, - ); + ]; /** * To be retrocompatible with PS 1.7, admin tab (controllers) are defined in moduleAdminControllers */ - public $moduleAdminControllers = array( - array( - 'name' => array( + public $moduleAdminControllers = [ + [ + 'name' => [ 'en' => 'Logs', 'fr' => 'Logs', - ), + ], 'class_name' => 'AdminStripe_officialProcessLogger', 'parent_class_name' => 'stripe_official', 'visible' => false, - ), - array( - 'name' => array( + ], + [ + 'name' => [ 'en' => 'Paiment Intent List', 'fr' => 'Liste des intentions de paiement', - ), + ], 'class_name' => 'AdminStripe_officialPaymentIntent', 'parent_class_name' => 'stripe_official', 'visible' => false, - ), - ); + ], + ]; /** * List of ModuleFrontController used in this Module * Module::install() register it, after that you can edit it in BO (for rewrite if needed) + * * @var array */ - public $controllers = array( + public $controllers = [ 'orderFailure', 'stripeCards', - ); + ]; /** * List of hooks needed in this module * _202 classlib_ extentions will plugged automatically hooks + * * @var array */ - public $hooks = array( + public $hooks = [ 'header', 'orderConfirmation', 'displayBackOfficeHeader', @@ -174,211 +176,211 @@ class Stripe_official extends PaymentModule 'adminOrder', 'actionOrderStatusUpdate', 'displayMyAccountBlock', - 'displayCustomerAccount' - ); + 'displayCustomerAccount', + ]; // Read the Stripe guide: https://stripe.com/payments/payment-methods-guide - public static $paymentMethods = array( - 'card' => array( + public static $paymentMethods = [ + 'card' => [ 'name' => 'Card', 'flow' => 'none', 'enable' => true, 'catch_enable' => true, - 'display_in_back_office' => false - ), - 'alipay' => array( + 'display_in_back_office' => false, + ], + 'alipay' => [ 'name' => 'Alipay', 'flow' => 'redirect', - 'countries' => array('CN'), - 'countries_names' => array( + 'countries' => ['CN'], + 'countries_names' => [ 'en' => 'China', 'fr' => 'Chine', 'de' => 'China', 'es' => 'China', 'it' => 'Cina', 'nl' => 'China', - ), - 'currencies' => array('cny', 'aud', 'cad', 'eur', 'gbp', 'hkd', 'jpy', 'sgd', 'myr', 'nzd', 'usd'), + ], + 'currencies' => ['cny', 'aud', 'cad', 'eur', 'gbp', 'hkd', 'jpy', 'sgd', 'myr', 'nzd', 'usd'], 'enable' => self::ENABLE_ALIPAY, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'Yes' - ), - 'bancontact' => array( + 'new_payment' => 'Yes', + ], + 'bancontact' => [ 'name' => 'Bancontact', 'flow' => 'redirect', - 'countries' => array('BE'), - 'countries_names' => array( + 'countries' => ['BE'], + 'countries_names' => [ 'en' => 'Belgium', 'fr' => 'Belgique', 'de' => 'Belgien', 'es' => 'Bélgica', 'it' => 'Belgio', 'nl' => 'België', - ), - 'currencies' => array('eur'), + ], + 'currencies' => ['eur'], 'enable' => self::ENABLE_BANCONTACT, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - 'eps' => array( + 'new_payment' => 'No', + ], + 'eps' => [ 'name' => 'EPS', 'flow' => 'redirect', - 'countries' => array('AT'), - 'countries_names' => array( + 'countries' => ['AT'], + 'countries_names' => [ 'en' => 'Austria', 'fr' => 'Autriche', 'de' => 'Österreich', 'es' => 'Austria', 'it' => 'Austria', 'nl' => 'Oostenrijk', - ), - 'currencies' => array('eur'), + ], + 'currencies' => ['eur'], 'enable' => self::ENABLE_EPS, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - 'fpx' => array( + 'new_payment' => 'No', + ], + 'fpx' => [ 'name' => 'FPX', 'flow' => 'redirect', - 'countries' => array('MY'), - 'countries_names' => array( + 'countries' => ['MY'], + 'countries_names' => [ 'en' => 'Malaysia', 'fr' => 'Malaisie', 'de' => 'Malaysia', 'es' => 'Malasia', 'it' => 'Malesia', 'nl' => 'Malaysia', - ), - 'currencies' => array('myr'), + ], + 'currencies' => ['myr'], 'enable' => self::ENABLE_FPX, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'Yes', - 'new_payment' => 'No' - ), - 'giropay' => array( + 'new_payment' => 'No', + ], + 'giropay' => [ 'name' => 'Giropay', 'flow' => 'redirect', - 'countries' => array('DE'), - 'countries_names' => array( + 'countries' => ['DE'], + 'countries_names' => [ 'en' => 'Germany', 'fr' => 'Allemagne', 'de' => 'Deutschland', 'es' => 'Alemania', 'it' => 'Germania', 'nl' => 'Duitsland', - ), - 'currencies' => array('eur'), + ], + 'currencies' => ['eur'], 'enable' => self::ENABLE_GIROPAY, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - 'ideal' => array( + 'new_payment' => 'No', + ], + 'ideal' => [ 'name' => 'iDEAL', 'flow' => 'redirect', - 'countries' => array('NL'), - 'countries_names' => array( + 'countries' => ['NL'], + 'countries_names' => [ 'en' => 'Netherlands', 'fr' => 'Pays-Bas', 'de' => 'Niederlande', 'es' => 'Países Bajos', 'it' => 'Paesi Bassi', 'nl' => 'Nederlande', - ), - 'currencies' => array('eur'), + ], + 'currencies' => ['eur'], 'enable' => self::ENABLE_IDEAL, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - 'oxxo' => array( + 'new_payment' => 'No', + ], + 'oxxo' => [ 'name' => 'OXXO', 'flow' => 'voucher', - 'countries' => array('MX'), - 'countries_names' => array( + 'countries' => ['MX'], + 'countries_names' => [ 'en' => 'Mexico', 'fr' => 'Mexique', 'de' => 'Mexico', 'es' => 'Mexico', 'it' => 'Mexico', 'nl' => 'Mexico', - ), - 'currencies' => array('mxn'), + ], + 'currencies' => ['mxn'], 'enable' => self::ENABLE_OXXO, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'Yes', - 'new_payment' => 'Yes' - ), - 'p24' => array( + 'new_payment' => 'Yes', + ], + 'p24' => [ 'name' => 'P24', 'flow' => 'redirect', - 'countries' => array('PL'), - 'countries_names' => array( + 'countries' => ['PL'], + 'countries_names' => [ 'en' => 'Poland', 'fr' => 'Pologne', 'de' => 'Polen', 'es' => 'Polonia', 'it' => 'Polonia', 'nl' => 'Polen', - ), - 'currencies' => array('pln'), + ], + 'currencies' => ['pln'], 'enable' => self::ENABLE_P24, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - 'sepa_debit' => array( + 'new_payment' => 'No', + ], + 'sepa_debit' => [ 'name' => 'SEPA Direct Debit', 'flow' => 'none', - 'countries' => array('FR', 'DE', 'ES', 'BE', 'NL', 'LU', 'IT', 'PT', 'AT', 'IE'), - 'countries_names' => array( + 'countries' => ['FR', 'DE', 'ES', 'BE', 'NL', 'LU', 'IT', 'PT', 'AT', 'IE'], + 'countries_names' => [ 'en' => 'France, Germany, Spain, Belgium, Netherlands, Luxembourg, Italy, Portugal, Austria, Ireland', 'fr' => 'France, Allemagne, Espagne, Belgique, Pays-Bas, Luxembourg, Italie, Portugal, Autriche, Irlande', 'de' => 'Frankreich, Deutschland, Spanien, Belgien, Niederlande, Luxemburg, Italien, Portugal, Österreich, Irland', 'es' => 'Francia, Alemania, España, Bélgica, Países Bajos, Luxemburgo, Italia, Portugal, Austria, Irlanda', 'it' => 'Francia, Germania, Spagna, Belgio, Paesi Bassi, Lussemburgo, Italia, Portogallo, Austria, Irlanda', 'nl' => 'Frankrijk, Duitsland, Spanje, België, Nederland, Luxemburg, Italië, Portugal, Oostenrijk, Ierland', - ), - 'currencies' => array('eur'), + ], + 'currencies' => ['eur'], 'enable' => self::ENABLE_SEPA, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - 'sofort' => array( + 'new_payment' => 'No', + ], + 'sofort' => [ 'name' => 'SOFORT', 'flow' => 'redirect', - 'countries' => array('AT', 'BE', 'DE', 'IT', 'NL', 'ES'), - 'countries_names' => array( + 'countries' => ['AT', 'BE', 'DE', 'IT', 'NL', 'ES'], + 'countries_names' => [ 'en' => 'Austria, Belgium, Germany, Italy, Netherlands, Spain', 'fr' => 'Autriche, Belgique, Allemagne, Italie, Pays-Bas, Espagne', 'de' => 'Österreich, Belgien, Deutschland, Italien, Niederlande, Spanien', 'es' => 'Austria, Bélgica, Alemania, Italia, Países Bajos, España', 'it' => 'Austria, Belgio, Germania, Italia, Paesi Bassi, Spagna', 'nl' => 'Österreich, België, Deutschland, Italië, Nederland, Spanje', - ), - 'currencies' => array('eur'), + ], + 'currencies' => ['eur'], 'enable' => self::ENABLE_SOFORT, 'catch_enable' => false, 'display_in_back_office' => true, 'require_activation' => 'No', - 'new_payment' => 'No' - ), - ); + 'new_payment' => 'No', + ], + ]; - public static $webhook_events = array( + public static $webhook_events = [ \Stripe\Event::CHARGE_EXPIRED, \Stripe\Event::CHARGE_FAILED, \Stripe\Event::CHARGE_SUCCEEDED, @@ -387,18 +389,22 @@ class Stripe_official extends PaymentModule \Stripe\Event::CHARGE_REFUNDED, \Stripe\Event::CHARGE_DISPUTE_CREATED, \Stripe\Event::PAYMENT_INTENT_REQUIRES_ACTION, - ); + ]; /* refund */ protected $refund = 0; - public $errors = array(); + public $errors = []; - public $warning = array(); + public $warning = []; public $success; - public $button_label = array(); + public $display; + + public $meta_title; + + public $button_label = []; public function __construct() { @@ -409,7 +415,7 @@ public function __construct() $this->bootstrap = true; $this->display = 'view'; $this->module_key = 'bb21cb93bbac29159ef3af00bca52354'; - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.7.9.99'); + $this->ps_versions_compliancy = ['min' => '1.6', 'max' => '1.7.9.99']; $this->currencies = true; /* curl check */ @@ -437,10 +443,10 @@ public function __construct() $this->description = $this->l('Start accepting stripe payments today, directly from your shop!', $this->name); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?', $this->name); - require_once realpath(dirname(__FILE__) .'/smarty/plugins') . '/modifier.stripelreplace.php'; + require_once realpath(dirname(__FILE__) . '/smarty/plugins') . '/modifier.stripelreplace.php'; /* Use a specific name to bypass an Order confirmation controller check */ - $bypassControllers = array('orderconfirmation', 'order-confirmation'); + $bypassControllers = ['orderconfirmation', 'order-confirmation']; if (in_array(Tools::getValue('controller'), $bypassControllers)) { $this->displayName = $this->l('Payment by Stripe', $this->name); } @@ -448,14 +454,14 @@ public function __construct() if (self::isWellConfigured()) { try { \Stripe\Stripe::setApiKey($this->getSecretKey()); - $version = $this->version.'_'._PS_VERSION_.'_'.phpversion(); + $version = $this->version . '_' . _PS_VERSION_ . '_' . phpversion(); \Stripe\Stripe::setAppInfo( 'StripePrestashop', $version, 'https://addons.prestashop.com/en/payment-card-wallet/24922-stripe-official.html', 'pp_partner_EX2Z2idAZw7OWr' ); - } catch (\Stripe\Error\ApiConnection $e) { + } catch (\Stripe\Exception\ApiConnectionException $e) { Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError( 'Fail to set API Key. Stripe SDK return error: ' . $e ); @@ -497,20 +503,20 @@ public function install() return false; } - $sql = "SHOW KEYS FROM `" . _DB_PREFIX_ . "stripe_event` WHERE Key_name = 'ix_id_payment_intentstatus'"; + $sql = 'SHOW KEYS FROM `' . _DB_PREFIX_ . "stripe_event` WHERE Key_name = 'ix_id_payment_intentstatus'"; if (!Db::getInstance()->executeS($sql)) { - $sql = "SELECT MAX(id_stripe_event) AS id_stripe_event FROM `" . _DB_PREFIX_ . "stripe_event` GROUP BY `id_payment_intent`, `status`"; + $sql = 'SELECT MAX(id_stripe_event) AS id_stripe_event FROM `' . _DB_PREFIX_ . 'stripe_event` GROUP BY `id_payment_intent`, `status`'; $duplicateRows = Db::getInstance()->executeS($sql); $idList = array_column($duplicateRows, 'id_stripe_event'); if (!empty($idList)) { - $sql = "DELETE FROM `" . _DB_PREFIX_ . "stripe_event` WHERE id_stripe_event NOT IN (" . implode(',', $idList) . ");"; + $sql = 'DELETE FROM `' . _DB_PREFIX_ . 'stripe_event` WHERE id_stripe_event NOT IN (' . implode(',', $idList) . ');'; Db::getInstance()->execute($sql); } - $sql = "ALTER TABLE `" . _DB_PREFIX_ . "stripe_event` ADD UNIQUE `ix_id_payment_intentstatus` (`id_payment_intent`, `status`);"; + $sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'stripe_event` ADD UNIQUE `ix_id_payment_intentstatus` (`id_payment_intent`, `status`);'; Db::getInstance()->execute($sql); } @@ -547,6 +553,7 @@ public function install() 'Stripe_official - install' ); Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + return false; } catch (PrestaShopException $e) { Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError( @@ -556,6 +563,7 @@ public function install() 'Stripe_official - install' ); Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + return false; } } @@ -589,14 +597,15 @@ public function uninstall() /** * Create order state - * @return boolean + * + * @return bool */ public function installOrderState() { if (!Configuration::get(self::OS_SOFORT_WAITING) || !Validate::isLoadedObject(new OrderState(Configuration::get(self::OS_SOFORT_WAITING)))) { $order_state = new OrderState(); - $order_state->name = array(); + $order_state->name = []; foreach (Language::getLanguages() as $language) { switch (Tools::strtolower($language['iso_code'])) { case 'fr': @@ -628,8 +637,8 @@ public function installOrderState() $order_state->invoice = false; $order_state->module_name = $this->name; if ($order_state->add()) { - $source = _PS_MODULE_DIR_.'stripe_official/views/img/cc-sofort.png'; - $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state->id.'.gif'; + $source = _PS_MODULE_DIR_ . 'stripe_official/views/img/cc-sofort.png'; + $destination = _PS_ROOT_DIR_ . '/img/os/' . (int) $order_state->id . '.gif'; copy($source, $destination); } Configuration::updateValue(self::OS_SOFORT_WAITING, (int) $order_state->id); @@ -639,7 +648,7 @@ public function installOrderState() if (!Configuration::get(self::CAPTURE_WAITING) || !Validate::isLoadedObject(new OrderState(Configuration::get(self::CAPTURE_WAITING)))) { $order_state = new OrderState(); - $order_state->name = array(); + $order_state->name = []; foreach (Language::getLanguages() as $language) { switch (Tools::strtolower($language['iso_code'])) { case 'fr': @@ -669,8 +678,8 @@ public function installOrderState() $order_state->color = '#03befc'; $order_state->module_name = $this->name; if ($order_state->add()) { - $source = _PS_MODULE_DIR_.'stripe_official/views/img/ca_icon.gif'; - $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state->id.'.gif'; + $source = _PS_MODULE_DIR_ . 'stripe_official/views/img/ca_icon.gif'; + $destination = _PS_ROOT_DIR_ . '/img/os/' . (int) $order_state->id . '.gif'; copy($source, $destination); } @@ -681,7 +690,7 @@ public function installOrderState() if (!Configuration::get(self::SEPA_WAITING) || !Validate::isLoadedObject(new OrderState(Configuration::get(self::SEPA_WAITING)))) { $order_state = new OrderState(); - $order_state->name = array(); + $order_state->name = []; foreach (Language::getLanguages() as $language) { switch (Tools::strtolower($language['iso_code'])) { case 'fr': @@ -713,8 +722,8 @@ public function installOrderState() $order_state->color = '#fcba03'; $order_state->module_name = $this->name; if ($order_state->add()) { - $source = _PS_MODULE_DIR_.'stripe_official/views/img/ca_icon.gif'; - $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state->id.'.gif'; + $source = _PS_MODULE_DIR_ . 'stripe_official/views/img/ca_icon.gif'; + $destination = _PS_ROOT_DIR_ . '/img/os/' . (int) $order_state->id . '.gif'; copy($source, $destination); } @@ -725,7 +734,7 @@ public function installOrderState() if (!Configuration::get(self::SEPA_DISPUTE) || !Validate::isLoadedObject(new OrderState(Configuration::get(self::SEPA_DISPUTE)))) { $order_state = new OrderState(); - $order_state->name = array(); + $order_state->name = []; foreach (Language::getLanguages() as $language) { switch (Tools::strtolower($language['iso_code'])) { case 'fr': @@ -755,8 +764,8 @@ public function installOrderState() $order_state->color = '#e3e1dc'; $order_state->module_name = $this->name; if ($order_state->add()) { - $source = _PS_MODULE_DIR_.'stripe_official/views/img/ca_icon.gif'; - $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state->id.'.gif'; + $source = _PS_MODULE_DIR_ . 'stripe_official/views/img/ca_icon.gif'; + $destination = _PS_ROOT_DIR_ . '/img/os/' . (int) $order_state->id . '.gif'; copy($source, $destination); } @@ -767,7 +776,7 @@ public function installOrderState() if (!Configuration::get(self::OXXO_WAITING) || !Validate::isLoadedObject(new OrderState(Configuration::get(self::OXXO_WAITING)))) { $order_state = new OrderState(); - $order_state->name = array(); + $order_state->name = []; foreach (Language::getLanguages() as $language) { switch (Tools::strtolower($language['iso_code'])) { case 'fr': @@ -799,8 +808,8 @@ public function installOrderState() $order_state->color = '#C23416'; $order_state->module_name = $this->name; if ($order_state->add()) { - $source = _PS_MODULE_DIR_.'stripe_official/views/img/ca_icon.gif'; - $destination = _PS_ROOT_DIR_.'/img/os/'.(int) $order_state->id.'.gif'; + $source = _PS_MODULE_DIR_ . 'stripe_official/views/img/ca_icon.gif'; + $destination = _PS_ROOT_DIR_ . '/img/os/' . (int) $order_state->id . '.gif'; copy($source, $destination); } @@ -838,10 +847,10 @@ public function getContent() /* Check if TLS is enabled and the TLS version used is 1.2 */ if (self::isWellConfigured()) { $secret_key = trim(Tools::getValue(self::TEST_KEY)); - if ($this->checkApiConnection($secret_key)) { + if ($this->checkApiConnection($secret_key) !== false) { try { \Stripe\Charge::all(); - } catch (\Stripe\Error\ApiConnection $e) { + } catch (\Stripe\Exception\ApiConnectionException $e) { Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logInfo($e); Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); @@ -856,10 +865,10 @@ public function getContent() /* Do Log In */ if (Tools::isSubmit('submit_login')) { $handler = new Stripe_officialClasslib\Actions\ActionsHandler(); - $handler->setConveyor(array( + $handler->setConveyor([ 'context' => $this->context, - 'module' => $this - )); + 'module' => $this, + ]); $handler->addActions( 'registerKeys', @@ -877,7 +886,7 @@ public function getContent() $shopId = Stripe_official::getShopIdContext(); /* Check if webhook_id has been defined */ - $webhookId = Configuration::get(self::WEBHOOK_ID,null, $shopGroupId, $shopId); + $webhookId = Configuration::get(self::WEBHOOK_ID, null, $shopGroupId, $shopId); if (!$webhookId) { $this->errors[] = $this->l( 'Webhook configuration cannot be found in PrestaShop, click on save button to fix issue. A new webhook will be created on Stripe, then saved in PrestaShop.', @@ -889,12 +898,12 @@ public function getContent() $webhookEndpoint = \Stripe\WebhookEndpoint::retrieve($webhookId); /* Check if webhook url is wrong */ - $expectedWebhookUrl = $this->context->link->getModuleLink('stripe_official', 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Stripe_official::getShopIdContext() ?: Configuration::get('PS_SHOP_DEFAULT')); + $expectedWebhookUrl = self::getWebhookUrl(); if ($webhookEndpoint->url != $expectedWebhookUrl) { $this->errors[] = - $this->l('Webhook URL configuration is wrong, click on save button to fix issue. Webhook configuration will be corrected.', $this->name) .' | '. - $this->l('Current webhook URL : ',$this->name).$webhookEndpoint->url .' | '. - $this->l('Expected webhook URL : ',$this->name).$expectedWebhookUrl; + $this->l('Webhook URL configuration is wrong, click on save button to fix issue. Webhook configuration will be corrected.', $this->name) . ' | ' . + $this->l('Current webhook URL : ', $this->name) . $webhookEndpoint->url . ' | ' . + $this->l('Expected webhook URL : ', $this->name) . $expectedWebhookUrl; } else { /* Check if webhook events are wrong */ $eventError = false; @@ -909,9 +918,9 @@ public function getContent() } if ($eventError) { $this->errors[] = - $this->l('Webhook events configuration are wrong, click on save button to fix isssue. Webhook configuration will be corrected.',$this->name).' | '. - $this->l('Current webhook events : ',$this->name).implode(' / ', $webhookEndpoint->enabled_events).' | '. - $this->l('Expected webhook events : ',$this->name).implode(' / ', Stripe_official::$webhook_events); + $this->l('Webhook events configuration are wrong, click on save button to fix isssue. Webhook configuration will be corrected.', $this->name) . ' | ' . + $this->l('Current webhook events : ', $this->name) . implode(' / ', $webhookEndpoint->enabled_events) . ' | ' . + $this->l('Expected webhook events : ', $this->name) . implode(' / ', Stripe_official::$webhook_events); } } } catch (\Stripe\Exception\ApiErrorException $e) { @@ -923,8 +932,8 @@ public function getContent() } /* Check if public and secret key have been defined */ - if (!Configuration::get(self::KEY,null, $shopGroupId, $shopId) && !Configuration::get(self::PUBLISHABLE,null, $shopGroupId, $shopId) - && !Configuration::get(self::TEST_KEY,null, $shopGroupId, $shopId) && !Configuration::get(self::TEST_PUBLISHABLE,null, $shopGroupId, $shopId)) { + if (!Configuration::get(self::KEY, null, $shopGroupId, $shopId) && !Configuration::get(self::PUBLISHABLE, null, $shopGroupId, $shopId) + && !Configuration::get(self::TEST_KEY, null, $shopGroupId, $shopId) && !Configuration::get(self::TEST_PUBLISHABLE, null, $shopGroupId, $shopId)) { $this->errors[] = $this->l('Keys are empty.'); } @@ -935,10 +944,11 @@ public function getContent() $query = new DbQuery(); $query->select('*'); $query->from('stripe_payment'); - $query->where('id_stripe = "'.pSQL($refund_id).'"'); + $query->where('id_stripe = "' . pSQL($refund_id) . '"'); $refund = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query->build()); } else { $this->errors[] = $this->l('The Stripe Payment ID can\'t be empty.'); + return false; } @@ -971,25 +981,25 @@ public function getContent() $domain = Tools::getShopDomain(true, true); } - $this->context->controller->addJS($this->_path.'/views/js/faq.js'); - $this->context->controller->addJS($this->_path.'/views/js/back.js'); - $this->context->controller->addJS($this->_path.'/views/js/PSTabs.js'); + $this->context->controller->addJS($this->_path . '/views/js/faq.js'); + $this->context->controller->addJS($this->_path . '/views/js/back.js'); + $this->context->controller->addJS($this->_path . '/views/js/PSTabs.js'); - $this->context->controller->addCSS($this->_path.'/views/css/admin.css'); + $this->context->controller->addCSS($this->_path . '/views/css/admin.css'); - if ((Configuration::get(self::TEST_KEY,null, $shopGroupId, $shopId) != '' && Configuration::get(self::TEST_PUBLISHABLE,null, $shopGroupId, $shopId) != '') - || (Configuration::get(self::KEY,null, $shopGroupId, $shopId) != '' && Configuration::get(self::PUBLISHABLE,null, $shopGroupId, $shopId) != '')) { + if ((Configuration::get(self::TEST_KEY, null, $shopGroupId, $shopId) != '' && Configuration::get(self::TEST_PUBLISHABLE, null, $shopGroupId, $shopId) != '') + || (Configuration::get(self::KEY, null, $shopGroupId, $shopId) != '' && Configuration::get(self::PUBLISHABLE, null, $shopGroupId, $shopId) != '')) { $keys_configured = true; } else { $keys_configured = false; } $allOrderStatus = OrderState::getOrderStates($this->context->language->id); - $statusSelected = array(); - $statusUnselected = array(); + $statusSelected = []; + $statusUnselected = []; - if (Configuration::get(self::CAPTURE_STATUS,null, $shopGroupId, $shopId) && Configuration::get(self::CAPTURE_STATUS,null, $shopGroupId, $shopId) != '') { - $capture_status = explode(',', Configuration::get(self::CAPTURE_STATUS,null, $shopGroupId, $shopId)); + if (Configuration::get(self::CAPTURE_STATUS, null, $shopGroupId, $shopId) && Configuration::get(self::CAPTURE_STATUS, null, $shopGroupId, $shopId) != '') { + $capture_status = explode(',', Configuration::get(self::CAPTURE_STATUS, null, $shopGroupId, $shopId)); foreach ($allOrderStatus as $status) { if (in_array($status['id_order_state'], $capture_status)) { $statusSelected[] = $status; @@ -1001,26 +1011,26 @@ public function getContent() $statusUnselected = $allOrderStatus; } - $orderStatus = array(); + $orderStatus = []; $orderStatus['selected'] = $statusSelected; $orderStatus['unselected'] = $statusUnselected; - $this->context->smarty->assign(array( - 'logo' => $domain.__PS_BASE_URI__.basename(_PS_MODULE_DIR_).'/'.$this->name.'/views/img/Stripe_logo.png', + $this->context->smarty->assign([ + 'logo' => $domain . __PS_BASE_URI__ . basename(_PS_MODULE_DIR_) . '/' . $this->name . '/views/img/Stripe_logo.png', 'new_base_dir', $this->_path, 'keys_configured' => $keys_configured, 'link' => new Link(), - 'catchandauthorize' => Configuration::get(self::CATCHANDAUTHORIZE,null, $shopGroupId, $shopId), + 'catchandauthorize' => Configuration::get(self::CATCHANDAUTHORIZE, null, $shopGroupId, $shopId), 'orderStatus' => $orderStatus, - 'orderStatusSelected' => Configuration::get(self::CAPTURE_STATUS,null, $shopGroupId, $shopId), + 'orderStatusSelected' => Configuration::get(self::CAPTURE_STATUS, null, $shopGroupId, $shopId), 'allOrderStatus' => $allOrderStatus, - 'captureExpire' => Configuration::get(self::CAPTURE_EXPIRE,null, $shopGroupId, $shopId), - 'save_card' => Configuration::get(self::SAVE_CARD,null, $shopGroupId, $shopId), - 'ask_customer' => Configuration::get(self::ASK_CUSTOMER,null, $shopGroupId, $shopId), + 'captureExpire' => Configuration::get(self::CAPTURE_EXPIRE, null, $shopGroupId, $shopId), + 'save_card' => Configuration::get(self::SAVE_CARD, null, $shopGroupId, $shopId), + 'ask_customer' => Configuration::get(self::ASK_CUSTOMER, null, $shopGroupId, $shopId), 'payment_methods' => Stripe_official::$paymentMethods, 'language_iso_code' => $this->context->language->iso_code, - 'stripe_payments_url' => 'https://dashboard.stripe.com/settings/payments' - )); + 'stripe_payments_url' => 'https://dashboard.stripe.com/settings/payments', + ]); $this->displaySomething(); $this->assignSmartyVars(); @@ -1047,36 +1057,36 @@ protected function assignSmartyVars() { $shopGroupId = self::getShopGroupIdContext(); $shopId = self::getShopIdContext(); - $this->context->smarty->assign(array( - 'stripe_mode' => Configuration::get(self::MODE,null, $shopGroupId, $shopId), - 'stripe_key' => Configuration::get(self::KEY,null, $shopGroupId, $shopId), - 'stripe_publishable' => Configuration::get(self::PUBLISHABLE,null, $shopGroupId, $shopId), - 'stripe_test_publishable' => Configuration::get(self::TEST_PUBLISHABLE,null, $shopGroupId, $shopId), - 'stripe_test_key' => Configuration::get(self::TEST_KEY,null, $shopGroupId, $shopId), - 'postcode' => Configuration::get(self::POSTCODE,null, $shopGroupId, $shopId), - 'cardholdername' => Configuration::get(self::CARDHOLDERNAME,null, $shopGroupId, $shopId), - 'reinsurance' => Configuration::get(self::REINSURANCE,null, $shopGroupId, $shopId), - 'visa' => Configuration::get(self::VISA,null, $shopGroupId, $shopId), - 'mastercard' => Configuration::get(self::MASTERCARD,null, $shopGroupId, $shopId), - 'american_express' => Configuration::get(self::AMERICAN_EXPRESS),null, $shopGroupId, $shopId, - 'cb' => Configuration::get(self::CB,null, $shopGroupId, $shopId), - 'diners_club' => Configuration::get(self::DINERS_CLUB,null, $shopGroupId, $shopId), - 'union_pay' => Configuration::get(self::UNION_PAY,null, $shopGroupId, $shopId), - 'jcb' => Configuration::get(self::JCB,null, $shopGroupId, $shopId), - 'discovers' => Configuration::get(self::DISCOVERS,null, $shopGroupId, $shopId), - 'ideal' => Configuration::get(self::ENABLE_IDEAL,null, $shopGroupId, $shopId), - 'sofort' => Configuration::get(self::ENABLE_SOFORT,null, $shopGroupId, $shopId), - 'giropay' => Configuration::get(self::ENABLE_GIROPAY,null, $shopGroupId, $shopId), - 'bancontact' => Configuration::get(self::ENABLE_BANCONTACT,null, $shopGroupId, $shopId), - 'fpx' => Configuration::get(self::ENABLE_FPX,null, $shopGroupId, $shopId), - 'eps' => Configuration::get(self::ENABLE_EPS,null, $shopGroupId, $shopId), - 'p24' => Configuration::get(self::ENABLE_P24,null, $shopGroupId, $shopId), - 'sepa_debit' => Configuration::get(self::ENABLE_SEPA),null, $shopGroupId, $shopId, - 'alipay' => Configuration::get(self::ENABLE_ALIPAY,null, $shopGroupId, $shopId), - 'oxxo' => Configuration::get(self::ENABLE_OXXO,null, $shopGroupId, $shopId), - 'applepay_googlepay' => Configuration::get(self::ENABLE_APPLEPAY_GOOGLEPAY,null, $shopGroupId, $shopId), - 'url_webhhoks' => $this->context->link->getModuleLink($this->name, 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Stripe_official::getShopIdContext() ?: Configuration::get('PS_SHOP_DEFAULT')), - )); + $this->context->smarty->assign([ + 'stripe_mode' => Configuration::get(self::MODE, null, $shopGroupId, $shopId), + 'stripe_key' => Configuration::get(self::KEY, null, $shopGroupId, $shopId), + 'stripe_publishable' => Configuration::get(self::PUBLISHABLE, null, $shopGroupId, $shopId), + 'stripe_test_publishable' => Configuration::get(self::TEST_PUBLISHABLE, null, $shopGroupId, $shopId), + 'stripe_test_key' => Configuration::get(self::TEST_KEY, null, $shopGroupId, $shopId), + 'postcode' => Configuration::get(self::POSTCODE, null, $shopGroupId, $shopId), + 'cardholdername' => Configuration::get(self::CARDHOLDERNAME, null, $shopGroupId, $shopId), + 'reinsurance' => Configuration::get(self::REINSURANCE, null, $shopGroupId, $shopId), + 'visa' => Configuration::get(self::VISA, null, $shopGroupId, $shopId), + 'mastercard' => Configuration::get(self::MASTERCARD, null, $shopGroupId, $shopId), + 'american_express' => Configuration::get(self::AMERICAN_EXPRESS), null, $shopGroupId, $shopId, + 'cb' => Configuration::get(self::CB, null, $shopGroupId, $shopId), + 'diners_club' => Configuration::get(self::DINERS_CLUB, null, $shopGroupId, $shopId), + 'union_pay' => Configuration::get(self::UNION_PAY, null, $shopGroupId, $shopId), + 'jcb' => Configuration::get(self::JCB, null, $shopGroupId, $shopId), + 'discovers' => Configuration::get(self::DISCOVERS, null, $shopGroupId, $shopId), + 'ideal' => Configuration::get(self::ENABLE_IDEAL, null, $shopGroupId, $shopId), + 'sofort' => Configuration::get(self::ENABLE_SOFORT, null, $shopGroupId, $shopId), + 'giropay' => Configuration::get(self::ENABLE_GIROPAY, null, $shopGroupId, $shopId), + 'bancontact' => Configuration::get(self::ENABLE_BANCONTACT, null, $shopGroupId, $shopId), + 'fpx' => Configuration::get(self::ENABLE_FPX, null, $shopGroupId, $shopId), + 'eps' => Configuration::get(self::ENABLE_EPS, null, $shopGroupId, $shopId), + 'p24' => Configuration::get(self::ENABLE_P24, null, $shopGroupId, $shopId), + 'sepa_debit' => Configuration::get(self::ENABLE_SEPA), null, $shopGroupId, $shopId, + 'alipay' => Configuration::get(self::ENABLE_ALIPAY, null, $shopGroupId, $shopId), + 'oxxo' => Configuration::get(self::ENABLE_OXXO, null, $shopGroupId, $shopId), + 'applepay_googlepay' => Configuration::get(self::ENABLE_APPLEPAY_GOOGLEPAY, null, $shopGroupId, $shopId), + 'url_webhhoks' => self::getWebhookUrl(), + ]); } /* @@ -1088,7 +1098,7 @@ protected function assignSmartyVars() */ public function copyAppleDomainFile() { - if (!Tools::copy(_PS_MODULE_DIR_.'stripe_official/apple-developer-merchantid-domain-association', _PS_ROOT_DIR_.'/.well-known/apple-developer-merchantid-domain-association')) { + if (!Tools::copy(_PS_MODULE_DIR_ . 'stripe_official/apple-developer-merchantid-domain-association', _PS_ROOT_DIR_ . '/.well-known/apple-developer-merchantid-domain-association')) { return false; } else { return true; @@ -1104,23 +1114,24 @@ public function copyAppleDomainFile() */ public function addAppleDomainAssociation($secret_key) { - if (!is_dir(_PS_ROOT_DIR_.'/.well-known')) { - if (!mkdir(_PS_ROOT_DIR_.'/.well-known')) { + if (!is_dir(_PS_ROOT_DIR_ . '/.well-known')) { + if (!mkdir(_PS_ROOT_DIR_ . '/.well-known')) { $this->warning[] = $this->l('Settings updated successfully.'); + return false; } } - $domain_file = _PS_ROOT_DIR_.'/.well-known/apple-developer-merchantid-domain-association'; + $domain_file = _PS_ROOT_DIR_ . '/.well-known/apple-developer-merchantid-domain-association'; if (!file_exists($domain_file)) { if (!$this->copyAppleDomainFile()) { $this->warning[] = $this->l('Your host does not authorize us to add your domain to use ApplePay. To add your domain manually please follow the subject "Add my domain ApplePay manually from my dashboard" which is located in the tab F.A.Q of the module.'); } else { try { \Stripe\Stripe::setApiKey($secret_key); - \Stripe\ApplePayDomain::create(array( - 'domain_name' => $this->context->shop->domain - )); + \Stripe\ApplePayDomain::create([ + 'domain_name' => $this->context->shop->domain, + ]); $curl = curl_init(Tools::getShopDomainSsl(true, true) . '/.well-known/apple-developer-merchantid-domain-association'); curl_setopt($curl, CURLOPT_FAILONERROR, true); @@ -1160,7 +1171,7 @@ public function displaySomething() } if (isset($_SERVER['REQUEST_URI'])) { - $return_url = urlencode($domain.$_SERVER['REQUEST_URI']); + $return_url = urlencode($domain . $_SERVER['REQUEST_URI']); } $this->context->smarty->assign('return_url', $return_url); @@ -1178,11 +1189,12 @@ public function displaySomething() */ public function apiRefund($refund_id, $currency, $mode, $id_card, $amount = null) { - if ($this->checkApiConnection($this->getSecretKey()) && !empty($refund_id)) { + $stripeAccount = $this->checkApiConnection($this->getSecretKey()); + if (empty($stripeAccount) !== false && empty($refund_id) !== false) { $query = new DbQuery(); $query->select('*'); $query->from('stripe_payment'); - $query->where('id_stripe = "'.pSQL($refund_id).'"'); + $query->where('id_stripe = "' . pSQL($refund_id) . '"'); $refund = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query->build()); if ($mode == 1) { /* Total refund */ try { @@ -1191,12 +1203,13 @@ public function apiRefund($refund_id, $currency, $mode, $id_card, $amount = null } catch (Exception $e) { // Something else happened, completely unrelated to Stripe $this->errors[] = $e->getMessage(); + return false; } Db::getInstance()->Execute( - 'UPDATE `'._DB_PREFIX_.'stripe_payment` SET `result` = 2, `date_add` = NOW(), `refund` = "' - .pSQL($refund[0]['amount']).'" WHERE `id_stripe` = "'.pSQL($refund_id).'"' + 'UPDATE `' . _DB_PREFIX_ . 'stripe_payment` SET `result` = 2, `date_add` = NOW(), `refund` = "' + . pSQL($refund[0]['amount']) . '" WHERE `id_stripe` = "' . pSQL($refund_id) . '"' ); } else { /* Partial refund */ if (!$this->isZeroDecimalCurrency($currency)) { @@ -1204,10 +1217,11 @@ public function apiRefund($refund_id, $currency, $mode, $id_card, $amount = null } try { $ch = \Stripe\Charge::retrieve($refund_id); - $ch->refunds->create(array('amount' => $ref_amount)); + $ch->refunds->create(['amount' => isset($ref_amount) ? $ref_amount : 0]); } catch (Exception $e) { // Something else happened, completely unrelated to Stripe $this->errors[] = $e->getMessage(); + return false; } @@ -1220,11 +1234,11 @@ public function apiRefund($refund_id, $currency, $mode, $id_card, $amount = null if ($amount <= $refund[0]['amount']) { Db::getInstance()->Execute( - 'UPDATE `'._DB_PREFIX_.'stripe_payment` - SET `result` = '.(int)$result.', + 'UPDATE `' . _DB_PREFIX_ . 'stripe_payment` + SET `result` = ' . (int) $result . ', `date_add` = NOW(), - `refund` = "'.pSQL($amount).'" - WHERE `id_stripe` = "'.pSQL($refund_id).'"' + `refund` = "' . pSQL($amount) . '" + WHERE `id_stripe` = "' . pSQL($refund_id) . '"' ); } } @@ -1235,7 +1249,7 @@ public function apiRefund($refund_id, $currency, $mode, $id_card, $amount = null $query = new DbQuery(); $query->select('result'); $query->from('stripe_payment'); - $query->where('id_stripe = "'.pSQL($refund_id).'"'); + $query->where('id_stripe = "' . pSQL($refund_id) . '"'); $state = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); $this->success = $this->l('Refunds processed successfully'); @@ -1247,7 +1261,7 @@ public function apiRefund($refund_id, $currency, $mode, $id_card, $amount = null public function isZeroDecimalCurrency($currency) { // @see: https://support.stripe.com/questions/which-zero-decimal-currencies-does-stripe-support - $zeroDecimalCurrencies = array( + $zeroDecimalCurrencies = [ 'BIF', 'CLP', 'DJF', @@ -1263,8 +1277,9 @@ public function isZeroDecimalCurrency($currency) 'VUV', 'XAF', 'XOF', - 'XPF' - ); + 'XPF', + ]; + return in_array(Tools::strtoupper($currency), $zeroDecimalCurrencies); } @@ -1275,16 +1290,18 @@ public function isZeroDecimalCurrency($currency) * @param string $regex Apply regex * @param false $onlyFilename Get only filename * @param array $results Results search + * * @return array */ - private static function getDirContentFiles($dir, $regex = '/.*/', $onlyFilename = false, &$results = array()) { + private static function getDirContentFiles($dir, $regex = '/.*/', $onlyFilename = false, &$results = []) + { $files = scandir($dir); foreach ($files as $value) { $path = realpath($dir . DIRECTORY_SEPARATOR . $value); if (!is_dir($path) && preg_match($regex, $value)) { $results[] = $onlyFilename ? $value : $path; - } else if (is_dir($path) && $value != "." && $value != "..") { + } elseif (is_dir($path) && $value != '.' && $value != '..') { self::getDirContentFiles($path, $regex, $onlyFilename, $results); } } @@ -1299,7 +1316,7 @@ private static function getDirContentFiles($dir, $regex = '/.*/', $onlyFilename */ public function cleanModuleCache() { - $path =_PS_MODULE_DIR_.'stripe_official/views/templates'; + $path = _PS_MODULE_DIR_ . 'stripe_official/views/templates'; $regPattern = '/.*\.tpl/'; $templates = self::getDirContentFiles($path, $regPattern, true); @@ -1308,6 +1325,41 @@ public function cleanModuleCache() } } + /** + * get webhook url of stripe_official module + * + * @return string + */ + public static function getWebhookUrl() + { + $context = Context::getContext(); + $id_lang = self::getLangIdContext(); + $id_shop = self::getShopIdContext(); + + return $context->link->getModuleLink( + 'stripe_official', + 'webhook', + [], + true, + $id_lang, + $id_shop + ); + } + + /** + * get current LangId according to activate multishop feature + * + * @return int|null + */ + public static function getLangIdContext() + { + if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && Shop::getContext() === Shop::CONTEXT_ALL) { + return Configuration::get('PS_LANG_DEFAULT', null, 1, 1); + } + + return Configuration::get('PS_LANG_DEFAULT'); + } + /** * get current ShopId according to activate multishop feature * @@ -1318,6 +1370,7 @@ public static function getShopIdContext() if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) { return Context::getContext()->shop->id; } + return Configuration::get('PS_SHOP_DEFAULT'); } @@ -1331,6 +1384,7 @@ public static function getShopGroupIdContext() if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) { return Context::getContext()->shop->id_shop_group; } + return Configuration::get('PS_SHOP_DEFAULT'); } @@ -1338,6 +1392,7 @@ public static function getShopGroupIdContext() * get Secret Key according MODE staging or live * * @param null $id_shop Optional, if set, get the secret key of the specified shop + * * @return string */ public function getSecretKey($id_shop_group = null, $id_shop = null) @@ -1375,13 +1430,16 @@ public function checkApiConnection($secretKey = null) try { \Stripe\Stripe::setApiKey($secretKey); - \Stripe\Account::retrieve(); + + return \Stripe\Account::retrieve(); } catch (Exception $e) { - error_log($e->getMessage()); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::openLogger(self::class); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError($e->getMessage()); + Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); $this->errors[] = $e->getMessage(); + return false; } - return true; } public function updateConfigurationKey($oldKey, $newKey) @@ -1393,9 +1451,9 @@ public function updateConfigurationKey($oldKey, $newKey) $set = ',`value` = 2'; } - $sql = 'UPDATE `'._DB_PREFIX_.'configuration` - SET `name`="'.pSQL($newKey).'"'.$set.' - WHERE `name`="'.pSQL($oldKey).'"'; + $sql = 'UPDATE `' . _DB_PREFIX_ . 'configuration` + SET `name`="' . pSQL($newKey) . '"' . $set . ' + WHERE `name`="' . pSQL($oldKey) . '"'; return Db::getInstance()->execute($sql); } @@ -1403,18 +1461,22 @@ public function updateConfigurationKey($oldKey, $newKey) public function getPaymentMethods() { - $query = new DbQuery(); - $query->select('name'); - $query->from('configuration'); - $query->where('name LIKE "STRIPE_PAYMENT%"'); - $query->where('value = "on"'); - $query->where('id_shop_group = '.$this->context->shop->id_shop_group); - $query->where('id_shop = '.$this->context->shop->id); - - $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query->build()); - - foreach ($results as &$result) { - $result['name'] = Tools::strtolower(str_replace('STRIPE_PAYMENT_', '', $result['name'])); + $configurations = Configuration::getMultiple([ + self::VISA, + self::MASTERCARD, + self::AMERICAN_EXPRESS, + self::CB, + self::DINERS_CLUB, + self::UNION_PAY, + self::JCB, + self::DISCOVERS, + ]); + + $results = []; + foreach ($configurations as $key => $configuration) { + if ($configuration === 'on') { + $results[] = ['name' => Tools::strtolower(str_replace('STRIPE_PAYMENT_', '', $key))]; + } } return $results; @@ -1427,12 +1489,14 @@ public function captureFunds($amount, $id_payment_intent) try { $intent = \Stripe\PaymentIntent::retrieve($id_payment_intent); $intent->capture(['amount_to_capture' => $amount]); + return true; - } catch (\Stripe\Error\ApiConnection $e) { + } catch (\Stripe\Exception\ApiConnectionException $e) { Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError( 'Fail to capture amount. Stripe SDK return error: ' . $e ); Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + return false; } } @@ -1446,14 +1510,14 @@ public function hookDisplayBackOfficeHeader($params) Tools::getValue('controller') == 'AdminModules' && Tools::getIsset('configure') && Tools::getValue('configure') == $this->name) { - Media::addJsDef(array( + Media::addJsDef([ 'transaction_refresh_url' => $this->context->link->getAdminLink( 'AdminAjaxTransaction', true, - array(), - array('ajax' => 1, 'action' => 'refresh') + [], + ['ajax' => 1, 'action' => 'refresh'] ), - )); + ]); } } @@ -1472,15 +1536,16 @@ public function hookDisplayAdminCartsView($params) $paymentInformations->state = $paymentInformations->state ? 'TEST' : 'LIVE'; $paymentInformations->url_dashboard = $stripePayment->getDashboardUrl(); - $this->context->smarty->assign(array( - 'paymentInformations' => $paymentInformations - )); + $this->context->smarty->assign([ + 'paymentInformations' => $paymentInformations, + ]); return $this->display(__FILE__, 'views/templates/hook/admin_cart.tpl'); } /** * Add a tab to controle intents on an order details admin page (tab header) + * * @return html */ public function hookDisplayAdminOrderTabOrder($params) @@ -1505,6 +1570,7 @@ public function hookDisplayAdminOrderTabLink($params) /** * Add a tab to controle intents on an order details admin page (tab content) + * * @return html */ public function hookDisplayAdminOrderContentOrder($params) @@ -1527,7 +1593,7 @@ public function hookDisplayAdminOrderContentOrder($params) $dispute = $stripeDispute->orderHasDispute($stripePayment->getIdStripe(), $order->id_shop); } - $this->context->smarty->assign(array( + $this->context->smarty->assign([ 'stripe_charge' => $stripePayment->getIdStripe(), 'stripe_paymentIntent' => $stripePayment->getIdPaymentIntent(), 'stripe_date' => $stripePayment->getDateAdd(), @@ -1538,8 +1604,8 @@ public function hookDisplayAdminOrderContentOrder($params) 'stripe_expired' => $stripeCapture->getExpired(), 'stripe_dispute' => $dispute, 'stripe_voucher_expire' => $stripePayment->getVoucherExpire(), - 'stripe_voucher_validate' => $stripePayment->getVoucherValidate() - )); + 'stripe_voucher_validate' => $stripePayment->getVoucherValidate(), + ]); return $this->display(__FILE__, 'views/templates/hook/admin_content_order.tpl'); } @@ -1578,6 +1644,7 @@ public function hookActionOrderStatusUpdate($params) 'Stripe_official - hookActionOrderStatusUpdate' ); Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + return false; } catch (PrestaShopException $e) { Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::logError( @@ -1587,6 +1654,7 @@ public function hookActionOrderStatusUpdate($params) 'Stripe_official - hookActionOrderStatusUpdate' ); Stripe_officialClasslib\Extensions\ProcessLogger\ProcessLoggerHandler::closeLogger(); + return false; } } @@ -1600,7 +1668,7 @@ public function hookActionOrderStatusUpdate($params) public function hookHeader() { $orderPageNames = ['order', 'orderopc']; - Hook::exec('actionStripeDefineOrderPageNames', array('orderPageNames' => &$orderPageNames)); + Hook::exec('actionStripeDefineOrderPageNames', ['orderPageNames' => &$orderPageNames]); if (!in_array(Dispatcher::getInstance()->getController(), $orderPageNames)) { return; } @@ -1626,28 +1694,28 @@ public function hookHeader() if (version_compare(_PS_VERSION_, '1.7', '>=')) { $this->context->controller->registerJavascript( - $this->name.'-stripe-v3', + $this->name . '-stripe-v3', 'https://js.stripe.com/v3/', - array( - 'server'=>'remote', + [ + 'server' => 'remote', 'position' => 'head', - ) + ] ); $this->context->controller->registerJavascript( - $this->name.'-payments', - 'modules/'.$this->name.'/views/js/payments.js' + $this->name . '-payments', + 'modules/' . $this->name . '/views/js/payments.js' ); if (Configuration::get(self::ENABLE_APPLEPAY_GOOGLEPAY)) { $this->context->controller->registerJavascript( - $this->name.'-stripepaymentrequest', - 'modules/'.$this->name.'/views/js/payment_request.js' + $this->name . '-stripepaymentrequest', + 'modules/' . $this->name . '/views/js/payment_request.js' ); } $this->context->controller->registerStylesheet( - $this->name.'-checkoutcss', - 'modules/'.$this->name.'/views/css/checkout.css' + $this->name . '-checkoutcss', + 'modules/' . $this->name . '/views/css/checkout.css' ); $prestashop_version = '1.7'; $firstname = str_replace('"', '\\"', $this->context->customer->firstname); @@ -1674,7 +1742,7 @@ public function hookHeader() } // Javacript variables needed by Elements - Media::addJsDef(array( + Media::addJsDef([ 'stripe_pk' => $this->getPublishableKey(), 'stripe_merchant_country_code' => $merchantCountry->iso_code, @@ -1690,26 +1758,26 @@ public function hookHeader() 'stripe_locale' => $this->context->language->iso_code, - 'stripe_auto_save_card' =>$auto_save_card, + 'stripe_auto_save_card' => $auto_save_card, 'stripe_validation_return_url' => $this->context->link->getModuleLink( $this->name, 'validation', - array(), + [], true ), 'stripe_order_confirmation_return_url' => $this->context->link->getModuleLink( $this->name, 'orderConfirmationReturn', - array(), + [], true ), 'stripe_create_intent_url' => $this->context->link->getModuleLink( $this->name, 'createIntent', - array(), + [], true ), @@ -1720,14 +1788,14 @@ public function hookHeader() 'stripe_postcode_disabled' => Configuration::get(self::POSTCODE), 'stripe_cardholdername_enabled' => Configuration::get(self::CARDHOLDERNAME), 'stripe_reinsurance_enabled' => Configuration::get(self::REINSURANCE), - 'stripe_module_dir' => Media::getMediaPath(_PS_MODULE_DIR_.$this->name), + 'stripe_module_dir' => Media::getMediaPath(_PS_MODULE_DIR_ . $this->name), - 'stripe_message' => array( + 'stripe_message' => [ 'processing' => $this->l('Processing…'), 'accept_cgv' => $this->l('Please accept the CGV'), - 'redirecting' => $this->l('Redirecting…') - ) - )); + 'redirecting' => $this->l('Redirecting…'), + ], + ]); } /** @@ -1739,13 +1807,15 @@ public function hookPayment($params) return; } - if (!$this->checkApiConnection()) { - $this->context->smarty->assign(array( + $stripeAccount = $this->checkApiConnection(); + + if (empty($stripeAccount) === true) { + $this->context->smarty->assign([ 'stripeError' => $this->l( 'No API keys have been provided. Please contact the owner of the website.', $this->name - ) - )); + ), + ]); } // The hookHeader isn't triggered when updating the cart or the carrier @@ -1757,10 +1827,16 @@ public function hookPayment($params) $amount = Tools::ps_round($amount, 2); $amount = $this->isZeroDecimalCurrency($currency->iso_code) ? $amount : $amount * 100; - if (Configuration::get(self::POSTCODE) == null) { + if (Configuration::get(self::REINSURANCE) == null) { $stripe_reinsurance_enabled = 'off'; } else { - $stripe_reinsurance_enabled = Configuration::get(self::POSTCODE); + $stripe_reinsurance_enabled = Configuration::get(self::REINSURANCE); + } + + if (Configuration::get(self::POSTCODE) == null) { + $stripe_postcode_enabled = 'off'; + } else { + $stripe_postcode_enabled = Configuration::get(self::POSTCODE); } $show_save_card = false; @@ -1769,19 +1845,19 @@ public function hookPayment($params) } // Send the payment amount, it may have changed - $this->context->smarty->assign(array( + $this->context->smarty->assign([ 'stripe_amount' => Tools::ps_round($amount, 0), 'applepay_googlepay' => Configuration::get(self::ENABLE_APPLEPAY_GOOGLEPAY), 'prestashop_version' => '1.6', - 'stripe_postcode_enabled' => $stripe_reinsurance_enabled, + 'stripe_postcode_enabled' => $stripe_postcode_enabled, 'stripe_cardholdername_enabled' => Configuration::get(self::CARDHOLDERNAME), - 'stripe_reinsurance_enabled' => Configuration::get(self::REINSURANCE), + 'stripe_reinsurance_enabled' => $stripe_reinsurance_enabled, 'stripe_payment_methods' => $this->getPaymentMethods(), - 'module_dir' => Media::getMediaPath(_PS_MODULE_DIR_.$this->name), + 'module_dir' => Media::getMediaPath(_PS_MODULE_DIR_ . $this->name), 'customer_name' => $address->firstname . ' ' . $address->lastname, 'stripe_save_card' => Configuration::get(self::SAVE_CARD), - 'show_save_card' => $show_save_card - )); + 'show_save_card' => $show_save_card, + ]); // Fetch country based on invoice address and currency $country = Country::getIsoById($address->id_country); @@ -1811,7 +1887,6 @@ public function hookPayment($params) $display .= $this->display(__FILE__, 'views/templates/front/payment_form_common.tpl'); } - $stripeAccount = \Stripe\Account::retrieve(); $stripeCustomer = new StripeCustomer(); $stripeCustomer->getCustomerById($this->context->customer->id, $stripeAccount->id); @@ -1827,8 +1902,7 @@ public function hookPayment($params) return $display; } - $stripeCard = new StripeCard($stripeCustomer->stripe_customer_key); - $customerCards = $stripeCard->getAllCustomerCards(); + $customerCards = $stripeCustomer->getStripeCustomerCards(); if (empty($customerCards)) { return $display; @@ -1839,11 +1913,11 @@ public function hookPayment($params) continue; } - $this->context->smarty->assign(array( + $this->context->smarty->assign([ 'id_payment_method' => $card->id, 'last4' => $card->card->last4, - 'brand' => Tools::ucfirst($card->card->brand) - )); + 'brand' => Tools::ucfirst($card->card->brand), + ]); $display .= $this->display(__FILE__, 'views/templates/front/payment_form_save_card.tpl'); } @@ -1854,20 +1928,20 @@ public function hookPayment($params) public function hookDisplayPaymentEU($params) { if (!self::isWellConfigured() || !$this->active || version_compare(_PS_VERSION_, '1.7', '>=')) { - return array(); + return []; } $payment = $this->hookPayment($params); - Media::addJsDef(array( - 'stripe_compliance' => true - )); + Media::addJsDef([ + 'stripe_compliance' => true, + ]); - $payment_options = array( + $payment_options = [ 'cta_text' => $this->l('Pay by card'), - 'logo' => Media::getMediaPath(_PS_MODULE_DIR_.$this->name.'/logo.png'), - 'form' => $payment - ); + 'logo' => Media::getMediaPath(_PS_MODULE_DIR_ . $this->name . '/logo.png'), + 'form' => $payment, + ]; return $payment_options; } @@ -1881,13 +1955,15 @@ public function hookPaymentOptions($params) return; } - if (!$this->checkApiConnection()) { - $this->context->smarty->assign(array( + $stripeAccount = $this->checkApiConnection(); + + if (empty($stripeAccount) === true) { + $this->context->smarty->assign([ 'stripeError' => $this->l( 'No API keys have been provided. Please contact the owner of the website.', $this->name - ) - )); + ), + ]); } $address = new Address($params['cart']->id_address_invoice); @@ -1903,7 +1979,7 @@ public function hookPaymentOptions($params) $show_save_card = true; } - $this->context->smarty->assign(array( + $this->context->smarty->assign([ 'applepay_googlepay' => Configuration::get(self::ENABLE_APPLEPAY_GOOGLEPAY), 'prestashop_version' => '1.7', 'publishableKey' => $this->getPublishableKey(), @@ -1911,11 +1987,11 @@ public function hookPaymentOptions($params) 'stripe_cardholdername_enabled' => Configuration::get(self::CARDHOLDERNAME), 'stripe_reinsurance_enabled' => Configuration::get(self::REINSURANCE), 'stripe_payment_methods' => $this->getPaymentMethods(), - 'module_dir' => Media::getMediaPath(_PS_MODULE_DIR_.$this->name), + 'module_dir' => Media::getMediaPath(_PS_MODULE_DIR_ . $this->name), 'customer_name' => $address->firstname . ' ' . $address->lastname, 'stripe_save_card' => Configuration::get(self::SAVE_CARD), - 'show_save_card' => $show_save_card - )); + 'show_save_card' => $show_save_card, + ]); // Fetch country based on invoice address and currency $address = new Address($params['cart']->id_address_invoice); @@ -1923,7 +1999,7 @@ public function hookPaymentOptions($params) $currency = Tools::strtolower($this->context->currency->iso_code); // Show only the payment methods that are relevant to the selected country and currency - $options = array(); + $options = []; foreach (self::$paymentMethods as $name => $paymentMethod) { // Check if the payment method is enabled if ($paymentMethod['enable'] !== true && Configuration::get($paymentMethod['enable']) != 'on') { @@ -1948,10 +2024,10 @@ public function hookPaymentOptions($params) ->setCallToActionText($this->button_label[$name]); // Display additional information for redirect and receiver based payment methods - if (in_array($paymentMethod['flow'], array('redirect', 'receiver'))) { + if (in_array($paymentMethod['flow'], ['redirect', 'receiver'])) { $option->setAdditionalInformation( $this->context->smarty->fetch( - 'module:'.$this->name.'/views/templates/front/payment_info_'.basename($paymentMethod['flow']).'.tpl' + 'module:' . $this->name . '/views/templates/front/payment_info_' . basename($paymentMethod['flow']) . '.tpl' ) ); } @@ -1959,14 +2035,13 @@ public function hookPaymentOptions($params) // Payment methods with embedded form fields $option->setForm( $this->context->smarty->fetch( - 'module:' . $this->name . '/views/templates/front/payment_form_' . basename($name) . '.tpl' + 'module:' . $this->name . '/views/templates/front/payment_form_' . basename($name) . '.tpl' ) ); $options[] = $option; } - $stripeAccount = \Stripe\Account::retrieve(); $stripeCustomer = new StripeCustomer(); $stripeCustomer->getCustomerById($this->context->customer->id, $stripeAccount->id); @@ -1982,8 +2057,7 @@ public function hookPaymentOptions($params) return $options; } - $stripeCard = new StripeCard($stripeCustomer->stripe_customer_key); - $customerCards = $stripeCard->getAllCustomerCards(); + $customerCards = $stripeCustomer->getStripeCustomerCards(); if (empty($customerCards)) { return $options; @@ -1997,11 +2071,11 @@ public function hookPaymentOptions($params) $option = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption(); $option ->setModuleName($this->name) - ->setCallToActionText($this->button_label['save_card'].' : '.Tools::ucfirst($card->card->brand).' **** **** **** '.$card->card->last4); + ->setCallToActionText($this->button_label['save_card'] . ' : ' . Tools::ucfirst($card->card->brand) . ' **** **** **** ' . $card->card->last4); - $this->context->smarty->assign(array( - 'id_payment_method' => $card->id - )); + $this->context->smarty->assign([ + 'id_payment_method' => $card->id, + ]); $option->setForm( $this->context->smarty->fetch( @@ -2035,11 +2109,11 @@ public function hookOrderConfirmation($params) $stripePayment = new StripePayment(); $stripePayment->getStripePaymentByCart($order->id_cart); - $this->context->smarty->assign(array( + $this->context->smarty->assign([ 'stripe_order_reference' => pSQL($order->reference), 'prestashop_version' => $prestashop_version, - 'stripePayment' => $stripePayment - )); + 'stripePayment' => $stripePayment, + ]); return $this->display(__FILE__, 'views/templates/front/order-confirmation.tpl'); } @@ -2055,10 +2129,10 @@ public function hookDisplayCustomerAccount() $shopGroupId = Stripe_official::getShopGroupIdContext(); $shopId = Stripe_official::getShopIdContext(); - $this->context->smarty->assign(array( + $this->context->smarty->assign([ 'prestashop_version' => $prestashop_version, 'isSaveCard' => Configuration::get(self::SAVE_CARD, null, $shopGroupId, $shopId), - )); + ]); return $this->display(__FILE__, 'my-account-stripe-cards.tpl'); } diff --git a/translations/.htaccess b/translations/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/translations/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/translations/br.php b/translations/br.php index 317e1ebb..c80ba1fe 100755 --- a/translations/br.php +++ b/translations/br.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Para usar este módulo, ative o cURL (extensão PHP).'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Pagar com cartão'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Pagar com Bancontact'; @@ -45,7 +45,7 @@ $_MODULE['<{stripe_official}prestashop>stripe_official_86c7338e09e2c3ca2e458da630895e25'] = 'Nenhuma chave API foi fornecida. Entre em contato com o proprietário do site.'; $_MODULE['<{stripe_official}prestashop>stripecards_cd81f9f55969c822377f076017bb3484'] = 'Cartões'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_53c6a96a3df980c3270d6ed82b6f174b'] = 'Souhaitez-vous supprimer les éléments sélectionnés ?'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_53c6a96a3df980c3270d6ed82b6f174b'] = 'Souhaitez-vous supprimer les éléments sélectionnés ?'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; @@ -61,10 +61,10 @@ $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_71c3e06323cd5a59436ec53afca80c57'] = 'Choisissez le nombre de jours pendant lesquels vous souhaitez conserver les journaux dans la base de données'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_dcc459e0cef1e36a18a356fbc5789b16'] = 'Effacer tout'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr(e) ?'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr(e) ?'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f51c7af7c02cd3a846d87d97bfaf6b58'] = 'Tous les logs ont été effacés'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_9ca4bc48596557840045a7477c803657'] = 'Vous devez spécifier un nombre \"Délai d\'effacement automatique (en jours)\" valide.'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_5988c28d05527a0d0ce8ae3da1134352'] = 'Les paramètres de journal ont été mis à jour avec succès !'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_5988c28d05527a0d0ce8ae3da1134352'] = 'Les paramètres de journal ont été mis à jour avec succès !'; $_MODULE['<{stripe_official}prestashop>main_c2cc7082a89c1ad6631a2f66af5f00c0'] = 'Conexão'; $_MODULE['<{stripe_official}prestashop>main_76f0ed934de85cc7131910b32ede7714'] = 'Reembolso'; $_MODULE['<{stripe_official}prestashop>configuration_e6ad4dd232a1bb7d77852af7fc2e0538'] = '[a @href1@]Crie sua conta Stripe em 10 minutos[/a] e comece a aceitar pagamentos em cartão ou formas de pagamento locais (sem necessidade de contrato adicional/ID de comerciante de seu banco).'; @@ -162,6 +162,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'O vale vence em:'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Nome'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'Compre Agora'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Meus cartões'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Número do cartão'; @@ -191,6 +192,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Pagar com iDEAL'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar agora'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Pagar com EPS'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'minha conta'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Meus cartões'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Número do cartão'; @@ -213,7 +215,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = '[a @href1@]Tente outra vez[/a] ou fale com o proprietário do site.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Pagar com Alipay'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Pagar com FPX'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar agora'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Chaves de API de produção fornecidas em vez de chaves de API de teste'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'Os campos de ID do cliente e chave secreta são obrigatórios'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Chaves de API de teste fornecidas em vez de chaves de API em tempo real'; diff --git a/translations/de.php b/translations/de.php index 50a8b4ac..8504df71 100755 --- a/translations/de.php +++ b/translations/de.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Um dieses Modul zu benutzen, aktivieren Sie bitte cURL (PHP-Erweiterung).'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Mit Karte zahlen'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Mit Bancontact zahlen'; @@ -52,9 +52,12 @@ $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_a0db49ba470c1c9ae2128c3470339153'] = 'Level'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_68972b8768ecc5cdcb803169e5f42407'] = 'Objektname'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d95fc016a6eee828f434ed5f55504427'] = 'Objekt-ID'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f89167d8204a193c6bbeabb68922d448'] = 'Session-ID'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_44749712dbec183e983dcd78a7736c41'] = 'Datum'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2d8e32e9c23e2a7155c88028b3fbff66'] = 'Einstellungen der Prozess-Logs'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2ce895700ba5c16bede3b769128d216f'] = 'Hier können Sie die Standardkonfiguration für diesen Process Logger ändern'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4ffdbc22f758943cdb6b6a54b361f373'] = 'Ruhemodus aktivieren'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_ea7a14b5d41ab5c1022a7d59f1b1e9df'] = 'Wenn der Ruhemodus aktiviert ist, werden nur Erfolgs- und Fehlerprotokolle gespeichert. Protokolle mit einer Level-Info werden nicht gespeichert.'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_3073ef21c0b326939d5b630edd08cfb6'] = 'Automatisches Löschen deaktivieren'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_434ef5977d28afa36e430439de18cbad'] = 'Wenn deaktiviert, werden Protokolle nach der Verzögerung automatisch gelöscht'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_1607c94671fd5baf4ac06f554b118b2a'] = 'Verzögerung beim automatischen Löschen (in Tagen)'; @@ -162,6 +165,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'Gutschein läuft ab am:'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Name'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-Mail'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'Kaufe jetzt'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Meine Karten'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Typ'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Kartennummer'; @@ -191,6 +195,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Mit iDeal zahlen'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Jetzt kaufen'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Mit EPS zahlen'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mein Konto'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Meine Karten'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Typ'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Kartennummer'; @@ -213,7 +218,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = 'Bitte [a @href1@]versuchen Sie es erneut[/a] oder wenden Sie sich an den Besitzer der Website.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Mit Alipay zahlen'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Mit FPX zahlen'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Jetzt kaufen'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Anstatt der API-Test-Schlüssel wurden API-Live-Schlüssel angegeben'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'Die Felder für Kunden-ID und Geheimschlüssel sind verpflichtend'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Anstatt der API-Live-Schlüssel wurden API-Test-Schlüssel angegeben'; diff --git a/translations/en.php b/translations/en.php new file mode 100755 index 00000000..e69de29b diff --git a/translations/es.php b/translations/es.php index 8e7d2b4a..18755243 100755 --- a/translations/es.php +++ b/translations/es.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Para poder utilizar este módulo, activa cURL (extensión PHP).'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Pagar con tarjeta'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Pagar con Bancontact'; @@ -52,9 +52,12 @@ $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_a0db49ba470c1c9ae2128c3470339153'] = 'Nivel'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_68972b8768ecc5cdcb803169e5f42407'] = 'Nombre del objeto'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d95fc016a6eee828f434ed5f55504427'] = 'ID del objeto'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f89167d8204a193c6bbeabb68922d448'] = 'ID de sesión'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2d8e32e9c23e2a7155c88028b3fbff66'] = 'Configuración del registrador de procesos'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2ce895700ba5c16bede3b769128d216f'] = 'Aquí puede cambiar la configuración predeterminada de este registrador de procesos'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4ffdbc22f758943cdb6b6a54b361f373'] = 'Activar modo silencioso'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_ea7a14b5d41ab5c1022a7d59f1b1e9df'] = 'Si el modo silencioso está activado, solo se guardan los registros de éxito y error. Los registros con información de nivel no se guardan.'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_3073ef21c0b326939d5b630edd08cfb6'] = 'Desactivar el borrado automático'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_434ef5977d28afa36e430439de18cbad'] = 'Si está desactivado, los registros se borrarán automáticamente después de la demora'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_1607c94671fd5baf4ac06f554b118b2a'] = 'Retraso de borrado automático (en días)'; @@ -101,7 +104,7 @@ $_MODULE['<{stripe_official}prestashop>configuration_1f6176c4f26f546cd5424d53fac0f2f8'] = 'Discovers'; $_MODULE['<{stripe_official}prestashop>configuration_0e29ba92a96e3342f6e47f324a0c8857'] = 'Carteras digitales, es decir, Apple Pay y Google Pay. [br] Al usar Apple Pay, aceptas los términos de servicio de [a @href1@] Stripe [/a] y [a @href2@] Apple [/a].'; $_MODULE['<{stripe_official}prestashop>configuration_f80b9de6d53dc9db807d2a123c149fc7'] = 'No recopiles el código postal (no se recomienda*).'; -$_MODULE['<{stripe_official}prestashop>configuration_c99b5f040533a2516fed921947a3b7f4'] = 'Esta información mejora las tasas de aceptación de las tarjetas emitidas en los Estados Unidos, el Reino Unido y Canadá.'; +$_MODULE['<{stripe_official}prestashop>configuration_c99b5f040533a2516fed921947a3b7f4'] = 'Esta información mejora las tasas de aceptación de las tarjetas emitidas en los Estados Unidos, el Reino Unido y Canadá.'; $_MODULE['<{stripe_official}prestashop>configuration_8cb12d0aa65678a528d4395dbf3a4138'] = 'Recopilar el nombre del titular de la tarjeta'; $_MODULE['<{stripe_official}prestashop>configuration_25b9cedf5864546692ee2f44f83ec4a7'] = 'Guardar tarjetas de clientes (para futuros pagos con un solo clic)'; $_MODULE['<{stripe_official}prestashop>configuration_04cdecad3493646701ed01647741b78f'] = 'Preguntar al cliente'; @@ -162,6 +165,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'El cupón caducará el:'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Nombre'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Correo electrónico'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar ahora'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Mis tarjetas'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Número de tarjeta'; @@ -191,6 +195,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Pagar con iDeal'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar ahora'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Pagar con EPS'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mi cuenta'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Mis tarjetas'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Número de tarjeta'; @@ -213,7 +218,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = '[a @href1@]Inténtalo de nuevo[/a] o ponte en contacto con el propietario del sitio web.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Pagar con Alipay'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Pagar con FPX'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar ahora'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Se proporcionaron claves de API activas en lugar de claves de prueba.'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'Los campos ID de cliente y Clave secreta son obligatorios.'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Se proporcionaron claves de API de prueba en lugar de claves activas.'; diff --git a/translations/fr.php b/translations/fr.php index 72d28c00..25f51e56 100755 --- a/translations/fr.php +++ b/translations/fr.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Pour pouvoir utiliser ce module, veuillez activer cURL (extension PHP).'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Payer par carte bancaire'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Payer avec Bancontact'; @@ -17,16 +17,16 @@ $_MODULE['<{stripe_official}prestashop>stripe_official_6a408e5941b4ed7630edd7c211aed267'] = 'Payer par carte bancaire'; $_MODULE['<{stripe_official}prestashop>stripe_official_ce7566d1d08cc094b74cf283cf9c56a5'] = 'Stripe'; $_MODULE['<{stripe_official}prestashop>stripe_official_7349826060a4851f4835aade49af34c7'] = 'Module de paiement Stripe'; -$_MODULE['<{stripe_official}prestashop>stripe_official_7c716e01a03b426976692f4a7a0d80be'] = 'Commencez à accepter des paiements Stripe dès aujourd\'hui, directement depuis votre boutique !'; -$_MODULE['<{stripe_official}prestashop>stripe_official_876f23178c29dc2552c0b48bf23cd9bd'] = 'Voulez-vous vraiment désinstaller ?'; +$_MODULE['<{stripe_official}prestashop>stripe_official_7c716e01a03b426976692f4a7a0d80be'] = 'Commencez à accepter des paiements Stripe dès aujourd\'hui, directement depuis votre boutique !'; +$_MODULE['<{stripe_official}prestashop>stripe_official_876f23178c29dc2552c0b48bf23cd9bd'] = 'Voulez-vous vraiment désinstaller ?'; $_MODULE['<{stripe_official}prestashop>stripe_official_6341ee14cd6d47787171f68d27f1f41b'] = 'Paiement par Stripe'; $_MODULE['<{stripe_official}prestashop>stripe_official_a6ee78c840497aed8a81b6164d4224e6'] = 'Vous devez activer SSL sur la boutique si vous souhaitez utiliser ce module en production.'; -$_MODULE['<{stripe_official}prestashop>stripe_official_66f67e1a8f01161f2009c2ed39c3cb1e'] = 'Vous avez atteint la limite de 16 points de terminaison de webhook enregistrés dans votre Dashboard Stripe pour ce compte. Veuillez en supprimer un si vous souhaitez enregistrer ce domaine.'; +$_MODULE['<{stripe_official}prestashop>stripe_official_66f67e1a8f01161f2009c2ed39c3cb1e'] = 'Vous avez atteint la limite de 16 points de terminaison de webhook enregistrés dans votre Dashboard Stripe pour ce compte. Veuillez en supprimer un si vous souhaitez enregistrer ce domaine.'; $_MODULE['<{stripe_official}prestashop>stripe_official_69e6a2456656fcc3c9a79452ef3a7928'] = 'Votre version TLS n\'est pas prise en charge. Vous devrez mettre à jour votre intégration. Veuillez consulter la FAQ si vous ne savez pas comment faire.'; $_MODULE['<{stripe_official}prestashop>stripe_official_47daed1af40eaa1fb3c750322137815d'] = 'La configuration du Webhook est introuvable dans PrestaShop, cliquez sur le bouton Enregistrer pour résoudre le problème. Un nouveau webhook sera créé sur Stripe, puis enregistré dans PrestaShop.'; $_MODULE['<{stripe_official}prestashop>stripe_official_4684c4310f6bd9917b3c079bc38fd335'] = 'La configuration de l\'URL du Webhook est incorrecte, cliquez sur le bouton Enregistrer pour résoudre le problème. La configuration du Webhook sera corrigée.'; -$_MODULE['<{stripe_official}prestashop>stripe_official_572bde45cccf4cde600e2a846cfe8085'] = 'URL du webhook actuel :'; -$_MODULE['<{stripe_official}prestashop>stripe_official_12632987bdd5031845a591acdf5faa40'] = 'URL de webhook attendue :'; +$_MODULE['<{stripe_official}prestashop>stripe_official_572bde45cccf4cde600e2a846cfe8085'] = 'URL du webhook actuel :'; +$_MODULE['<{stripe_official}prestashop>stripe_official_12632987bdd5031845a591acdf5faa40'] = 'URL de webhook attendue :'; $_MODULE['<{stripe_official}prestashop>stripe_official_2226fcd706ac6ba242dc3381636cf74b'] = 'La configuration des événements Webhook est incorrecte, cliquez sur le bouton Enregistrer pour résoudre le problème. La configuration du Webhook sera corrigée.'; $_MODULE['<{stripe_official}prestashop>stripe_official_4047173bbb1dd67cd5e877f7736c1e86'] = 'Evénements webhook actuels :'; $_MODULE['<{stripe_official}prestashop>stripe_official_78b8b4d922d4061d31e55caece729f8b'] = 'Evénements webhook attendus :'; @@ -36,8 +36,8 @@ $_MODULE['<{stripe_official}prestashop>stripe_official_eb804bebeffc55fb161165d50bcf74f8'] = 'ID de paiement Stripe inconnu.'; $_MODULE['<{stripe_official}prestashop>stripe_official_2c9360a1d3c79d4adba0cbc6c9ad2618'] = 'Remboursements effectués'; $_MODULE['<{stripe_official}prestashop>stripe_official_8dd2f915acf4ec98006d11c9a4b0945b'] = 'Paramètres mis à jour.'; -$_MODULE['<{stripe_official}prestashop>stripe_official_566442fe2a78f88e12572cc083aa9c30'] = 'Votre hébergeur ne nous autorise pas à ajouter votre domaine pour utiliser Apple Pay. Pour ajouter votre domaine manuellement, veuillez consulter le sujet « Ajouter mon domaine Apple Pay manuellement depuis mon Dashboard », que vous trouverez dans l\'onglet FAQ du module.'; -$_MODULE['<{stripe_official}prestashop>stripe_official_5a741711b570f9ec19ea6ef4587c8a29'] = 'Vos configurations ont été enregistrées, cependant votre hébergeur ne nous autorise pas à ajouter votre domaine pour utiliser Apple Pay. Pour ajouter votre domaine manuellement, veuillez consulter le sujet « Ajouter mon domaine Apple Pay manuellement depuis mon Dashboard pour utiliser Apple Pay », que vous trouverez dans l\'onglet FAQ du module.'; +$_MODULE['<{stripe_official}prestashop>stripe_official_566442fe2a78f88e12572cc083aa9c30'] = 'Votre hébergeur ne nous autorise pas à ajouter votre domaine pour utiliser Apple Pay. Pour ajouter votre domaine manuellement, veuillez consulter le sujet « Ajouter mon domaine Apple Pay manuellement depuis mon Dashboard », que vous trouverez dans l\'onglet FAQ du module.'; +$_MODULE['<{stripe_official}prestashop>stripe_official_5a741711b570f9ec19ea6ef4587c8a29'] = 'Vos configurations ont été enregistrées, cependant votre hébergeur ne nous autorise pas à ajouter votre domaine pour utiliser Apple Pay. Pour ajouter votre domaine manuellement, veuillez consulter le sujet « Ajouter mon domaine Apple Pay manuellement depuis mon Dashboard pour utiliser Apple Pay », que vous trouverez dans l\'onglet FAQ du module.'; $_MODULE['<{stripe_official}prestashop>stripe_official_9769caadb45900927273623278fd5de2'] = 'Identifiants Stripe non valides, veuillez vérifier votre configuration.'; $_MODULE['<{stripe_official}prestashop>stripe_official_fd2bdc826d325902e451236cf6fd774e'] = 'Traitement'; $_MODULE['<{stripe_official}prestashop>stripe_official_b24ee2c7cb1734370b544eb4e6cdc2b6'] = 'Veuillez accepter les CGV'; @@ -45,26 +45,29 @@ $_MODULE['<{stripe_official}prestashop>stripe_official_86c7338e09e2c3ca2e458da630895e25'] = 'Aucune clé API n\'a été fournie. Veuillez contacter le propriétaire du site Web.'; $_MODULE['<{stripe_official}prestashop>stripecards_cd81f9f55969c822377f076017bb3484'] = 'Cartes bancaires'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_53c6a96a3df980c3270d6ed82b6f174b'] = 'Souhaitez-vous supprimer les éléments sélectionnés ?'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_53c6a96a3df980c3270d6ed82b6f174b'] = 'Souhaitez-vous supprimer les éléments sélectionnés ?'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_68972b8768ecc5cdcb803169e5f42407'] = 'Nom de l\'objet'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d95fc016a6eee828f434ed5f55504427'] = 'ID de l\'objet'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f89167d8204a193c6bbeabb68922d448'] = 'ID de session'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_44749712dbec183e983dcd78a7736c41'] = 'Date'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2d8e32e9c23e2a7155c88028b3fbff66'] = 'Paramètres de l\'outil de consignation des processus'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2ce895700ba5c16bede3b769128d216f'] = 'Ici, vous pouvez modifier la configuration par défaut de ce processus de logs'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4ffdbc22f758943cdb6b6a54b361f373'] = 'Activer le mode silencieux'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_ea7a14b5d41ab5c1022a7d59f1b1e9df'] = 'Si le mode silencieux est activé, seuls les journaux de réussite et d\'erreur sont enregistrés. Les journaux d\'information ne sont pas enregistrés.'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_3073ef21c0b326939d5b630edd08cfb6'] = 'Désactiver l\'effacement automatique'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_434ef5977d28afa36e430439de18cbad'] = 'Si désactivé, les journaux seront automatiquement effacés après le délai'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_1607c94671fd5baf4ac06f554b118b2a'] = 'Délai d\'effacement automatique (en jours)'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_71c3e06323cd5a59436ec53afca80c57'] = 'Choisissez le nombre de jours pendant lesquels vous souhaitez conserver les journaux dans la base de données'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_dcc459e0cef1e36a18a356fbc5789b16'] = 'Effacer tout'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr(e) ?'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr(e) ?'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f51c7af7c02cd3a846d87d97bfaf6b58'] = 'Tous les logs ont été effacés'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_9ca4bc48596557840045a7477c803657'] = 'Vous devez spécifier un nombre \"Délai d\'effacement automatique (en jours)\" valide.'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_5988c28d05527a0d0ce8ae3da1134352'] = 'Les paramètres de journal ont été mis à jour avec succès !'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_5988c28d05527a0d0ce8ae3da1134352'] = 'Les paramètres de journal ont été mis à jour avec succès !'; $_MODULE['<{stripe_official}prestashop>main_c2cc7082a89c1ad6631a2f66af5f00c0'] = 'Connexion'; $_MODULE['<{stripe_official}prestashop>main_76f0ed934de85cc7131910b32ede7714'] = 'Remboursement'; $_MODULE['<{stripe_official}prestashop>configuration_e6ad4dd232a1bb7d77852af7fc2e0538'] = '[a @href1@]Créez votre compte Stripe en 10 minutes[/a] et commencez immédiatement à accepter les paiements par carte bancaire ainsi que les moyens de paiement locaux (sans aucun autre ID de contrat/marchand requis de votre banque).'; @@ -107,7 +110,7 @@ $_MODULE['<{stripe_official}prestashop>configuration_04cdecad3493646701ed01647741b78f'] = 'Demander au client'; $_MODULE['<{stripe_official}prestashop>configuration_0275d5a919dc2906f576e72335d1faf1'] = 'Enregistrer sans demander au client'; $_MODULE['<{stripe_official}prestashop>configuration_33bcccaf7654c09d4a90ee486c45cfd2'] = 'Activer l\'autorisation et la capture distinctes. Si cette option est activée, Stripe bloquera au moment du règlement le montant de la commande sur le compte de la carte bancaire. Cette autorisation sera capturée et l\'argent sera versé sur votre compte lorsque la commande passera à l\'état de votre choix.'; -$_MODULE['<{stripe_official}prestashop>configuration_73a5b8196763ea2e1043092e8f9c015e'] = 'Attention : vous disposez d\'un délai de 7 jours calendaires pour capturer l\'autorisation avant qu\'elle n\'expire et que les fonds bloqués sur la carte soient débloqués.'; +$_MODULE['<{stripe_official}prestashop>configuration_73a5b8196763ea2e1043092e8f9c015e'] = 'Attention : vous disposez d\'un délai de 7 jours calendaires pour capturer l\'autorisation avant qu\'elle n\'expire et que les fonds bloqués sur la carte soient débloqués.'; $_MODULE['<{stripe_official}prestashop>configuration_1097f096a2eedb06b25489aed19a2ae7'] = 'Capturer le paiement lors du passage aux états de commande suivants.'; $_MODULE['<{stripe_official}prestashop>configuration_160341e19f4199f98bae44696b547c48'] = 'Votre état'; $_MODULE['<{stripe_official}prestashop>configuration_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; @@ -126,7 +129,7 @@ $_MODULE['<{stripe_official}prestashop>configuration_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; $_MODULE['<{stripe_official}prestashop>refund_2b660da0c521cc6bc51a188bc9f7d084'] = 'Sélectionnez la commande que vous voulez rembourser'; $_MODULE['<{stripe_official}prestashop>refund_24e85d1e652b3681994e9cae2cc1f35a'] = 'ID de paiement Stripe'; -$_MODULE['<{stripe_official}prestashop>refund_991bd624dcaff354bd793e4cacbd6ea3'] = 'Cet ID se trouve dans l\'onglet Stripe de la commande que vous souhaitez rembourser. Il commence par « ch_ » ou « py_ ».'; +$_MODULE['<{stripe_official}prestashop>refund_991bd624dcaff354bd793e4cacbd6ea3'] = 'Cet ID se trouve dans l\'onglet Stripe de la commande que vous souhaitez rembourser. Il commence par « ch_ » ou « py_ ».'; $_MODULE['<{stripe_official}prestashop>refund_c0a3c3e9b5fbd21c505e082644b2220c'] = 'Remboursement total'; $_MODULE['<{stripe_official}prestashop>refund_77fd2b4393b379bedd30efcd5df02090'] = 'Remboursement partiel'; $_MODULE['<{stripe_official}prestashop>refund_fe9cc1bcfa322db8ade8960ddf4bb19c'] = 'Nous enverrons immédiatement tout remboursement effectué à la banque de votre client.'; @@ -162,6 +165,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'Expiration du coupon le :'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Nom'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'Acheter maintenant'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Mes cartes bancaires'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Numéro de carte bancaire'; @@ -191,6 +195,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Payer avec iDeal'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Acheter maintenant'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Payer avec EPS'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Mes cartes bancaires'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Numéro de carte bancaire'; @@ -198,7 +203,7 @@ $_MODULE['<{stripe_official}prestashop>stripe-cards16_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_78560f5a4e1f5716c8fb9d7cb35f56de'] = 'Vous n\'avez pas encore enregistré de carte bancaire.'; $_MODULE['<{stripe_official}prestashop>payment_form_p24_751e90522b3385322c4c34b6f73847d2'] = 'Payer avec P24'; -$_MODULE['<{stripe_official}prestashop>payment_form_save_card_6e9c53f6d39367724e9b996b3ea9ef22'] = 'Payer par carte bancaire :'; +$_MODULE['<{stripe_official}prestashop>payment_form_save_card_6e9c53f6d39367724e9b996b3ea9ef22'] = 'Payer par carte bancaire :'; $_MODULE['<{stripe_official}prestashop>payment_form_save_card_eeceac1af4e7620894d6d2083921bb73'] = 'Acheter maintenant'; $_MODULE['<{stripe_official}prestashop>payment_form_giropay_32e26982dda43a14285657baee320523'] = 'Payer avec Giropay'; $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-16_9d67bee92ea535ba9c7840797966edfa'] = 'Une erreur est survenue lors de votre paiement.'; @@ -213,7 +218,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = 'Veuillez [a @href1@]réessayer[/a] ou contacter le propriétaire du site Web.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Payer avec Alipay'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Payer avec FPX'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Acheter'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Vous avez fourni des clés API de production au lieu de clés API de test'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'Les champs ID du client et Clé secrète sont obligatoires'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Vous avez fourni des clés API de test au lieu de clés API de production'; diff --git a/translations/index.php b/translations/index.php deleted file mode 100755 index 1a42123d..00000000 --- a/translations/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/translations/it.php b/translations/it.php index 94e9bb54..89958a9e 100755 --- a/translations/it.php +++ b/translations/it.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Per poter utilizzare questo modulo occorre attivare cURL (estensione PHP)'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Paga con carta'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Paga con Bancontact'; @@ -52,9 +52,12 @@ $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_a0db49ba470c1c9ae2128c3470339153'] = 'Livello'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_68972b8768ecc5cdcb803169e5f42407'] = 'Nome oggetto'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d95fc016a6eee828f434ed5f55504427'] = 'ID oggetto'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f89167d8204a193c6bbeabb68922d448'] = 'ID sessione'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_44749712dbec183e983dcd78a7736c41'] = 'Data'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2d8e32e9c23e2a7155c88028b3fbff66'] = 'Impostazioni registratore processo'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_2ce895700ba5c16bede3b769128d216f'] = 'Qui puoi modificare la configurazione predefinita per questo Process Logger'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4ffdbc22f758943cdb6b6a54b361f373'] = 'Attiva la modalità silenziosa'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_ea7a14b5d41ab5c1022a7d59f1b1e9df'] = 'Se la modalità silenziosa è attivata, vengono salvati solo i log di successo e di errore. I registri con informazioni di livello non vengono salvati.'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_3073ef21c0b326939d5b630edd08cfb6'] = 'Disabilita la cancellazione automatica'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_434ef5977d28afa36e430439de18cbad'] = 'Se disabilitato, i registri verranno automaticamente cancellati dopo il ritardo'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_1607c94671fd5baf4ac06f554b118b2a'] = 'Ritardo cancellazione automatica (in giorni)'; @@ -162,6 +165,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'Data scadenza voucher:'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Nome'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'acquista ora'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Le mie carte'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Numero di carta'; @@ -191,6 +195,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Paga con iDeal'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Acquista ora'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Paga con EPS'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Il mio account'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Le mie carte'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Numero di carta'; @@ -213,7 +218,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = '[a @href1@]Riprova[/a] o contatta il titolare del sito web.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Paga con Alipay'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Paga con FPX'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Compra subito'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Chiavi API live fornite in luogo delle chiavi API di test'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'I campi ID cliente e Chiave segreta sono obbligatori'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Chiavi API di test fornite in luogo delle chiavi API live'; diff --git a/translations/nl.php b/translations/nl.php index 6be07472..430508cf 100755 --- a/translations/nl.php +++ b/translations/nl.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Activeer cURL (PHP-extensie) als u deze module wilt gebruiken.'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Betalen met kaart'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Betalen met Bancontact'; @@ -162,6 +162,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'Voucher verloopt op:'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Naam'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mailadres'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'Nu kopen'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Mijn kaarten'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Kaartnummer'; @@ -191,6 +192,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Betalen met iDEAL'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Nu kopen'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Betalen met EPS'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mijn rekening'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Mijn kaarten'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Kaartnummer'; @@ -213,7 +215,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = '[a @href1@]Probeer het opnieuw[/a] of neem contact op met de beheerder van de website.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Betalen met Alipay'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Betalen met FPX'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Nu kopen'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Er zijn API-sleutels voor de livemodus opgegeven in plaats van API-sleutels voor de testmodus'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'De velden Client-ID en Geheime sleutel zijn verplicht'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Er zijn API-sleutels voor de testmodus opgegeven in plaats van API-sleutels voor de livemodus'; diff --git a/translations/pt.php b/translations/pt.php index 23e977da..44d2c3ee 100755 --- a/translations/pt.php +++ b/translations/pt.php @@ -1,7 +1,7 @@ stripe_official_4093808c9781fb6ca2ed5ade71deff4d'] = 'Para poder utilizar este módulo, ative o cURL (extensão PHP).'; $_MODULE['<{stripe_official}prestashop>stripe_official_cc21116ce900f38c0691823ab193b9a3'] = 'Pagar com cartão'; $_MODULE['<{stripe_official}prestashop>stripe_official_d536f6cb1304cde5da44c530d3157886'] = 'Pagar com Bancontact'; @@ -45,7 +45,7 @@ $_MODULE['<{stripe_official}prestashop>stripe_official_86c7338e09e2c3ca2e458da630895e25'] = 'Nenhuma chave API foi fornecida. Entre em contato com o proprietário do site.'; $_MODULE['<{stripe_official}prestashop>stripecards_cd81f9f55969c822377f076017bb3484'] = 'Cartões'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_53c6a96a3df980c3270d6ed82b6f174b'] = 'Souhaitez-vous supprimer les éléments sélectionnés ?'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_53c6a96a3df980c3270d6ed82b6f174b'] = 'Souhaitez-vous supprimer les éléments sélectionnés ?'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; @@ -61,10 +61,10 @@ $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_71c3e06323cd5a59436ec53afca80c57'] = 'Choisissez le nombre de jours pendant lesquels vous souhaitez conserver les journaux dans la base de données'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_dcc459e0cef1e36a18a356fbc5789b16'] = 'Effacer tout'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr(e) ?'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr(e) ?'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_f51c7af7c02cd3a846d87d97bfaf6b58'] = 'Tous les logs ont été effacés'; $_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_9ca4bc48596557840045a7477c803657'] = 'Vous devez spécifier un nombre \"Délai d\'effacement automatique (en jours)\" valide.'; -$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_5988c28d05527a0d0ce8ae3da1134352'] = 'Les paramètres de journal ont été mis à jour avec succès !'; +$_MODULE['<{stripe_official}prestashop>adminprocessloggercontroller_5988c28d05527a0d0ce8ae3da1134352'] = 'Les paramètres de journal ont été mis à jour avec succès !'; $_MODULE['<{stripe_official}prestashop>main_c2cc7082a89c1ad6631a2f66af5f00c0'] = 'Ligação'; $_MODULE['<{stripe_official}prestashop>main_76f0ed934de85cc7131910b32ede7714'] = 'Reembolso'; $_MODULE['<{stripe_official}prestashop>configuration_e6ad4dd232a1bb7d77852af7fc2e0538'] = '[a @href1@]Crie a sua conta Stripe em 10 minutos[/a] e comece imediatamente a aceitar pagamentos com cartão, bem como métodos de pagamento locais (não é necessário um contrato adicional/identificação do comerciante do seu banco).'; @@ -162,6 +162,7 @@ $_MODULE['<{stripe_official}prestashop>admin_content_order_2311c8c5e8f44924a3e61c78e2223049'] = 'O vale irá expirar em:'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_49ee3087348e8d44e1feda1917443987'] = 'Nome'; $_MODULE['<{stripe_official}prestashop>payment_form_oxxo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{stripe_official}prestashop>payment_form_oxxo_eeceac1af4e7620894d6d2083921bb73'] = 'Compre Agora'; $_MODULE['<{stripe_official}prestashop>stripe-cards_4e997b9d3b7152f2afeacd96ab1ef1cb'] = 'Os meus cartões'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards_a44217022190f5734b2f72ba1e4f8a79'] = 'Número do cartão'; @@ -191,6 +192,7 @@ $_MODULE['<{stripe_official}prestashop>payment_form_ideal_ac23f66a874a7808e300a15f2e94320a'] = 'Pagar com iDeal'; $_MODULE['<{stripe_official}prestashop>payment_form_ideal_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar agora'; $_MODULE['<{stripe_official}prestashop>payment_form_eps_c446bbd08309aff37eee1e0c43b19cde'] = 'Pagar com EPS'; +$_MODULE['<{stripe_official}prestashop>stripe-cards16_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Minha conta'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a46d3e7285f76d2401202f18b0acbcbd'] = 'Os meus cartões'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Tipo'; $_MODULE['<{stripe_official}prestashop>stripe-cards16_a44217022190f5734b2f72ba1e4f8a79'] = 'Número do cartão'; @@ -213,7 +215,6 @@ $_MODULE['<{stripe_official}prestashop>order-confirmation-failed-17_7dc9c0e2e38c2bbf16923bc6d79b7b06'] = '[a @href1@]Tente novamente[/a] ou contacte o proprietário do website.'; $_MODULE['<{stripe_official}prestashop>payment_form_alipay_47e1e580d173b931fdfdeb6bb5f14848'] = 'Pagar com Alipay'; $_MODULE['<{stripe_official}prestashop>payment_form_fpx_74253765ffa5a6b91d758c7df4d3c871'] = 'Pagar com FPX'; -$_MODULE['<{stripe_official}prestashop>payment_form_fpx_eeceac1af4e7620894d6d2083921bb73'] = 'Comprar agora'; $_MODULE['<{stripe_official}prestashop>configurationactions_187b101d0358396a634514ea228616d5'] = 'Chaves API em tempo real fornecidas em vez de chaves API de teste'; $_MODULE['<{stripe_official}prestashop>configurationactions_2df5570b8a0e0c076571d1213f7f901e'] = 'Os campos de identificação do cliente e Chave Secreta são obrigatórios'; $_MODULE['<{stripe_official}prestashop>configurationactions_5fba3565c1b6638ac41f7627066aaa58'] = 'Chaves API de teste fornecidas em vez de chaves API em tempo real'; diff --git a/upgrade/.htaccess b/upgrade/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/upgrade/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/upgrade/Upgrade-1.1.0.php b/upgrade/Upgrade-1.1.0.php index d0e7f874..558f8707 100644 --- a/upgrade/Upgrade-1.1.0.php +++ b/upgrade/Upgrade-1.1.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } function upgrade_module_1_1_0($module) { - return ($module->registerHook('header')); + return $module->registerHook('header'); } diff --git a/upgrade/Upgrade-1.3.0.php b/upgrade/Upgrade-1.3.0.php index 0f0923f5..1925a24d 100644 --- a/upgrade/Upgrade-1.3.0.php +++ b/upgrade/Upgrade-1.3.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -30,7 +29,7 @@ function upgrade_module_1_3_0() { $alter_stripe_payment_table = true; - $result = Db::getInstance()->executeS('SHOW FIELDS FROM '._DB_PREFIX_.'stripe_payment'); + $result = Db::getInstance()->executeS('SHOW FIELDS FROM ' . _DB_PREFIX_ . 'stripe_payment'); if (!empty($result)) { foreach ($result as $res) { @@ -40,7 +39,7 @@ function upgrade_module_1_3_0() } if ($alter_stripe_payment_table === true) { - $sql = 'ALTER TABLE '._DB_PREFIX_.'stripe_payment ADD state tinyint(4) NOT NULL'; + $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'stripe_payment ADD state tinyint(4) NOT NULL'; if (!Db::getInstance()->execute($sql)) { return false; } diff --git a/upgrade/Upgrade-1.5.0.php b/upgrade/Upgrade-1.5.0.php index 32989399..b4f4bf19 100644 --- a/upgrade/Upgrade-1.5.0.php +++ b/upgrade/Upgrade-1.5.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -39,5 +38,6 @@ function upgrade_module_1_5_0($module) if (!$module->installOrderState()) { return false; } + return true; } diff --git a/upgrade/Upgrade-2.0.0.php b/upgrade/Upgrade-2.0.0.php index 48cf0bbf..beaab066 100644 --- a/upgrade/Upgrade-2.0.0.php +++ b/upgrade/Upgrade-2.0.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } diff --git a/upgrade/Upgrade-2.0.6.php b/upgrade/Upgrade-2.0.6.php index 8e0cd626..f98145cc 100644 --- a/upgrade/Upgrade-2.0.6.php +++ b/upgrade/Upgrade-2.0.6.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } diff --git a/upgrade/Upgrade-2.1.0.php b/upgrade/Upgrade-2.1.0.php index 5fbbdef5..9a9ea4ed 100755 --- a/upgrade/Upgrade-2.1.0.php +++ b/upgrade/Upgrade-2.1.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -30,8 +29,6 @@ require_once dirname(__FILE__) . '/../classes/StripeCapture.php'; require_once dirname(__FILE__) . '/../classes/StripeCustomer.php'; -use Stripe_officialClasslib\Actions\ActionsHandler; - function upgrade_module_2_1_0($module) { $installer = new Stripe_officialClasslib\Install\ModuleInstaller($module); @@ -40,9 +37,9 @@ function upgrade_module_2_1_0($module) $installer->registerHooks(); $handler = new Stripe_officialClasslib\Actions\ActionsHandler(); - $handler->setConveyor(array( - 'context' => Context::getContext() - )); + $handler->setConveyor([ + 'context' => Context::getContext(), + ]); $handler->addActions('registerWebhookSignature'); $handler->process('ConfigurationActions'); diff --git a/upgrade/Upgrade-2.1.1.php b/upgrade/Upgrade-2.1.1.php index 19572d89..0e7435d3 100755 --- a/upgrade/Upgrade-2.1.1.php +++ b/upgrade/Upgrade-2.1.1.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } diff --git a/upgrade/Upgrade-2.2.0.php b/upgrade/Upgrade-2.2.0.php index 219ceeaf..b5df0bf8 100755 --- a/upgrade/Upgrade-2.2.0.php +++ b/upgrade/Upgrade-2.2.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } diff --git a/upgrade/Upgrade-2.3.0.php b/upgrade/Upgrade-2.3.0.php index dcea10f7..1d5545eb 100644 --- a/upgrade/Upgrade-2.3.0.php +++ b/upgrade/Upgrade-2.3.0.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -30,7 +29,7 @@ function upgrade_module_2_3_0($module) { $alter_stripe_payment_table = true; - $result = Db::getInstance()->executeS('SHOW FIELDS FROM '._DB_PREFIX_.'stripe_payment'); + $result = Db::getInstance()->executeS('SHOW FIELDS FROM ' . _DB_PREFIX_ . 'stripe_payment'); if (!empty($result)) { foreach ($result as $res) { @@ -40,7 +39,7 @@ function upgrade_module_2_3_0($module) } if ($alter_stripe_payment_table === true) { - $sql = 'ALTER TABLE '._DB_PREFIX_.'stripe_payment + $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'stripe_payment ADD voucher_url varchar(255) AFTER state, ADD voucher_expire varchar(255) AFTER voucher_url, ADD voucher_validate varchar(255) AFTER voucher_expire'; @@ -50,9 +49,8 @@ function upgrade_module_2_3_0($module) } } - $alter_stripe_customer_table = true; - $result = Db::getInstance()->executeS('SHOW FIELDS FROM '._DB_PREFIX_.'stripe_customer'); + $result = Db::getInstance()->executeS('SHOW FIELDS FROM ' . _DB_PREFIX_ . 'stripe_customer'); if (!empty($result)) { foreach ($result as $res) { @@ -62,7 +60,7 @@ function upgrade_module_2_3_0($module) } if ($alter_stripe_customer_table === true) { - $sql = 'ALTER TABLE '._DB_PREFIX_.'stripe_customer + $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'stripe_customer ADD id_account varchar(255) AFTER stripe_customer_key'; if (!Db::getInstance()->execute($sql)) { return false; diff --git a/upgrade/Upgrade-2.3.1.php b/upgrade/Upgrade-2.3.1.php index b8d7494b..dcfaefff 100644 --- a/upgrade/Upgrade-2.3.1.php +++ b/upgrade/Upgrade-2.3.1.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -35,19 +34,19 @@ function upgrade_module_2_3_1($module) $installer->installObjectModel('StripeIdempotencyKey'); $installer->installObjectModel('StripePayment'); - $sql = 'ALTER TABLE `'._DB_PREFIX_.'stripe_official_processlogger` MODIFY msg TEXT'; + $sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'stripe_official_processlogger` MODIFY msg TEXT'; if (!Db::getInstance()->execute($sql)) { return false; } - $indexes = array( + $indexes = [ 'id_idempotency_key', 'id_cart', 'idempotency_key', - 'id_payment_intent' - ); - $already_indexed = array(); - $results = Db::getInstance()->executeS('SHOW INDEX FROM '._DB_PREFIX_.'stripe_idempotency_key'); + 'id_payment_intent', + ]; + $already_indexed = []; + $results = Db::getInstance()->executeS('SHOW INDEX FROM ' . _DB_PREFIX_ . 'stripe_idempotency_key'); foreach ($results as $result) { array_push($already_indexed, $result['Column_name']); @@ -58,7 +57,7 @@ function upgrade_module_2_3_1($module) if (!empty($to_index)) { $sql = ''; foreach ($to_index as $index) { - $sql .= 'ALTER TABLE `'._DB_PREFIX_.'stripe_idempotency_key` ADD INDEX( `'.$index.'`);'; + $sql .= 'ALTER TABLE `' . _DB_PREFIX_ . 'stripe_idempotency_key` ADD INDEX( `' . $index . '`);'; } if (!Db::getInstance()->execute($sql)) { diff --git a/upgrade/Upgrade-2.3.2.php b/upgrade/Upgrade-2.3.2.php index 380434c7..5ca4dba0 100644 --- a/upgrade/Upgrade-2.3.2.php +++ b/upgrade/Upgrade-2.3.2.php @@ -1,6 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -39,11 +38,11 @@ function upgrade_module_2_3_2($module) $webhooksList = StripeWebhook::getWebhookList(); foreach ($webhooksList as $webhookEndpoint) { - if ($webhookEndpoint->url == $context->link->getModuleLink('stripe_official', 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Configuration::get('PS_SHOP_DEFAULT'))) { + if ($webhookEndpoint->url == $context->link->getModuleLink('stripe_official', 'webhook', [], true, Configuration::get('PS_LANG_DEFAULT'), Configuration::get('PS_SHOP_DEFAULT'))) { $webhookEndpoint->update( $webhookEndpoint->id, [ - 'enabled_events' => $module::$webhook_events + 'enabled_events' => $module::$webhook_events, ] ); } diff --git a/upgrade/Upgrade-2.3.5.php b/upgrade/Upgrade-2.3.5.php index 63f9d68a..bc7e7cfb 100644 --- a/upgrade/Upgrade-2.3.5.php +++ b/upgrade/Upgrade-2.3.5.php @@ -1,7 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -40,7 +38,7 @@ function upgrade_module_2_3_5($module) $stripeClient = new \Stripe\StripeClient(Configuration::get(Stripe_official::KEY)); $webhooksList = $stripeClient->webhookEndpoints->all(); foreach ($webhooksList as $webhookEndpoint) { - if ($webhookEndpoint->url == $context->link->getModuleLink('stripe_official', 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Configuration::get('PS_SHOP_DEFAULT'))) { + if ($webhookEndpoint->url == $context->link->getModuleLink('stripe_official', 'webhook', [], true, Configuration::get('PS_LANG_DEFAULT'), Configuration::get('PS_SHOP_DEFAULT'))) { $webhookEndpoint->delete(); } } @@ -50,7 +48,7 @@ function upgrade_module_2_3_5($module) $stripeClient = new \Stripe\StripeClient(Configuration::get(Stripe_official::TEST_KEY)); $webhooksList = $stripeClient->webhookEndpoints->all(); foreach ($webhooksList as $webhookEndpoint) { - if ($webhookEndpoint->url == $context->link->getModuleLink('stripe_official', 'webhook', array(), true, Configuration::get('PS_LANG_DEFAULT'), Configuration::get('PS_SHOP_DEFAULT'))) { + if ($webhookEndpoint->url == $context->link->getModuleLink('stripe_official', 'webhook', [], true, Configuration::get('PS_LANG_DEFAULT'), Configuration::get('PS_SHOP_DEFAULT'))) { $webhookEndpoint->delete(); } } @@ -58,7 +56,7 @@ function upgrade_module_2_3_5($module) /* Create new webhook in current Mode */ StripeWebhook::create(); /* Delete (if exist) table stripe_webhook from previous module version */ - $sql = 'DROP TABLE IF EXISTS '._DB_PREFIX_.'stripe_webhook;'; + $sql = 'DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'stripe_webhook;'; if (!Db::getInstance()->execute($sql)) { return false; } diff --git a/upgrade/Upgrade-2.3.6.php b/upgrade/Upgrade-2.3.6.php index a649ab8c..0af2a219 100755 --- a/upgrade/Upgrade-2.3.6.php +++ b/upgrade/Upgrade-2.3.6.php @@ -1,7 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -33,7 +31,7 @@ */ function upgrade_module_2_3_6($module) { - $sql = 'ALTER TABLE `'._DB_PREFIX_.'stripe_official_processlogger` MODIFY msg TEXT'; + $sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'stripe_official_processlogger` MODIFY msg TEXT'; if (!Db::getInstance()->execute($sql)) { return false; } diff --git a/upgrade/Upgrade-2.3.7.php b/upgrade/Upgrade-2.3.7.php index fd95612a..6e72ae4a 100755 --- a/upgrade/Upgrade-2.3.7.php +++ b/upgrade/Upgrade-2.3.7.php @@ -1,7 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } @@ -33,8 +31,8 @@ function upgrade_module_2_3_7($module) $shopGroupId = Stripe_official::getShopGroupIdContext(); $shopId = Stripe_official::getShopIdContext(); - if (Configuration::get('STRIPE_PARTIAL_REFUND_STATE',null, $shopGroupId, $shopId) - && $orderState = new OrderState(Configuration::get('STRIPE_PARTIAL_REFUND_STATE',null, $shopGroupId, $shopId))) { + if (Configuration::get('STRIPE_PARTIAL_REFUND_STATE', null, $shopGroupId, $shopId) + && $orderState = new OrderState(Configuration::get('STRIPE_PARTIAL_REFUND_STATE', null, $shopGroupId, $shopId))) { if (!Configuration::deleteByName('STRIPE_PARTIAL_REFUND_STATE') && !$orderState->delete()) { return false; } diff --git a/upgrade/Upgrade-2.4.0.php b/upgrade/Upgrade-2.4.0.php index f373add8..fbc292f1 100755 --- a/upgrade/Upgrade-2.4.0.php +++ b/upgrade/Upgrade-2.4.0.php @@ -1,7 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } diff --git a/upgrade/Upgrade-2.4.1.php b/upgrade/Upgrade-2.4.1.php index f31d0b76..ddb11cff 100644 --- a/upgrade/Upgrade-2.4.1.php +++ b/upgrade/Upgrade-2.4.1.php @@ -1,7 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } diff --git a/upgrade/Upgrade-2.4.2.php b/upgrade/Upgrade-2.4.2.php index 551514bb..e1841f80 100644 --- a/upgrade/Upgrade-2.4.2.php +++ b/upgrade/Upgrade-2.4.2.php @@ -1,8 +1,6 @@ * @copyright Copyright (c) Stripe - * @license Commercial license + * @license Academic Free License (AFL 3.0) */ - if (!defined('_PS_VERSION_')) { exit; } function upgrade_module_2_4_2($module) { - $sql = "TRUNCATE `" . _DB_PREFIX_ . "stripe_event`;"; + $sql = 'TRUNCATE `' . _DB_PREFIX_ . 'stripe_event`;'; return Db::getInstance()->execute($sql); } diff --git a/upgrade/index.php b/upgrade/index.php deleted file mode 100644 index 538616ae..00000000 --- a/upgrade/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/vendor/.htaccess b/vendor/.htaccess new file mode 100644 index 00000000..3de9e400 --- /dev/null +++ b/vendor/.htaccess @@ -0,0 +1,10 @@ +# Apache 2.2 + + Order deny,allow + Deny from all + + +# Apache 2.4 + + Require all denied + diff --git a/views/css/index.php b/views/css/index.php deleted file mode 100644 index 538616ae..00000000 --- a/views/css/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/img/index.php b/views/img/index.php deleted file mode 100644 index 538616ae..00000000 --- a/views/img/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/index.php b/views/index.php deleted file mode 100644 index ffdebb42..00000000 --- a/views/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/js/index.php b/views/js/index.php deleted file mode 100644 index 538616ae..00000000 --- a/views/js/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/templates/admin/_partials/configuration.tpl b/views/templates/admin/_partials/configuration.tpl index 136fe5a2..144510b6 100755 --- a/views/templates/admin/_partials/configuration.tpl +++ b/views/templates/admin/_partials/configuration.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}
diff --git a/views/templates/admin/_partials/index.php b/views/templates/admin/_partials/index.php deleted file mode 100644 index 538616ae..00000000 --- a/views/templates/admin/_partials/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/templates/admin/_partials/messages.tpl b/views/templates/admin/_partials/messages.tpl index e5ffbe34..a2cfb1ed 100644 --- a/views/templates/admin/_partials/messages.tpl +++ b/views/templates/admin/_partials/messages.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {if isset($success)} {foreach from=$success item=success_message} diff --git a/views/templates/admin/_partials/refund.tpl b/views/templates/admin/_partials/refund.tpl index 9f6ce127..bf845581 100644 --- a/views/templates/admin/_partials/refund.tpl +++ b/views/templates/admin/_partials/refund.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/admin/index.php b/views/templates/admin/index.php deleted file mode 100644 index 538616ae..00000000 --- a/views/templates/admin/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/templates/admin/main.tpl b/views/templates/admin/main.tpl index 05df3066..eef79ba6 100644 --- a/views/templates/admin/main.tpl +++ b/views/templates/admin/main.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {include file="./_partials/messages.tpl"}
diff --git a/views/templates/front/index.php b/views/templates/front/index.php deleted file mode 100644 index 538616ae..00000000 --- a/views/templates/front/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2018 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; diff --git a/views/templates/front/order-confirmation-failed-16.tpl b/views/templates/front/order-confirmation-failed-16.tpl index c5017e03..289a1b4e 100644 --- a/views/templates/front/order-confirmation-failed-16.tpl +++ b/views/templates/front/order-confirmation-failed-16.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}

{l s='An error occured during your payment.' mod='stripe_official'}
diff --git a/views/templates/front/order-confirmation-failed-17.tpl b/views/templates/front/order-confirmation-failed-17.tpl index 5625d49b..838cb8d3 100644 --- a/views/templates/front/order-confirmation-failed-17.tpl +++ b/views/templates/front/order-confirmation-failed-17.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {extends file='page.tpl'} diff --git a/views/templates/front/order-confirmation-success-16.tpl b/views/templates/front/order-confirmation-success-16.tpl index c73524e9..20f16296 100644 --- a/views/templates/front/order-confirmation-success-16.tpl +++ b/views/templates/front/order-confirmation-success-16.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}

{l s='Congratulations, your order has been placed and will be processed soon.' mod='stripe_official'}

diff --git a/views/templates/front/order-confirmation-success-17.tpl b/views/templates/front/order-confirmation-success-17.tpl index a9c1bca8..1b1357be 100644 --- a/views/templates/front/order-confirmation-success-17.tpl +++ b/views/templates/front/order-confirmation-success-17.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {* {extends file=$layout} *} {extends file='page.tpl'} diff --git a/views/templates/front/order-confirmation.tpl b/views/templates/front/order-confirmation.tpl index 04cf7fb3..2e98472d 100644 --- a/views/templates/front/order-confirmation.tpl +++ b/views/templates/front/order-confirmation.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}

{l s='Congratulations, your order has been placed and will be processed soon.' mod='stripe_official'}

diff --git a/views/templates/front/payment_form_alipay.tpl b/views/templates/front/payment_form_alipay.tpl index 96d58236..6afa2621 100755 --- a/views/templates/front/payment_form_alipay.tpl +++ b/views/templates/front/payment_form_alipay.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_bancontact.tpl b/views/templates/front/payment_form_bancontact.tpl index 4a0d79b7..b1e10b7c 100644 --- a/views/templates/front/payment_form_bancontact.tpl +++ b/views/templates/front/payment_form_bancontact.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_card.tpl b/views/templates/front/payment_form_card.tpl index 2d162e17..05beeddd 100644 --- a/views/templates/front/payment_form_card.tpl +++ b/views/templates/front/payment_form_card.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {if $applepay_googlepay == 'on'}

diff --git a/views/templates/front/payment_form_common.tpl b/views/templates/front/payment_form_common.tpl index 52eb43b1..83905699 100644 --- a/views/templates/front/payment_form_common.tpl +++ b/views/templates/front/payment_form_common.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} \ No newline at end of file diff --git a/views/templates/front/payment_form_eps.tpl b/views/templates/front/payment_form_eps.tpl index 55d0d7b4..0bcf3753 100644 --- a/views/templates/front/payment_form_eps.tpl +++ b/views/templates/front/payment_form_eps.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_fpx.tpl b/views/templates/front/payment_form_fpx.tpl index 7d20c19e..b4c2c2e7 100644 --- a/views/templates/front/payment_form_fpx.tpl +++ b/views/templates/front/payment_form_fpx.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_giropay.tpl b/views/templates/front/payment_form_giropay.tpl index 7294034c..edf1b993 100644 --- a/views/templates/front/payment_form_giropay.tpl +++ b/views/templates/front/payment_form_giropay.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_ideal.tpl b/views/templates/front/payment_form_ideal.tpl index 50673a29..a71da244 100644 --- a/views/templates/front/payment_form_ideal.tpl +++ b/views/templates/front/payment_form_ideal.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_oxxo.tpl b/views/templates/front/payment_form_oxxo.tpl index 6846ab07..a71d6c6e 100755 --- a/views/templates/front/payment_form_oxxo.tpl +++ b/views/templates/front/payment_form_oxxo.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_p24.tpl b/views/templates/front/payment_form_p24.tpl index a6f6e329..97dacd08 100644 --- a/views/templates/front/payment_form_p24.tpl +++ b/views/templates/front/payment_form_p24.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_save_card.tpl b/views/templates/front/payment_form_save_card.tpl index 7eb0ab61..1850deca 100755 --- a/views/templates/front/payment_form_save_card.tpl +++ b/views/templates/front/payment_form_save_card.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {if $prestashop_version == '1.7'} diff --git a/views/templates/front/payment_form_sepa_debit.tpl b/views/templates/front/payment_form_sepa_debit.tpl index 7fa87a88..373684eb 100644 --- a/views/templates/front/payment_form_sepa_debit.tpl +++ b/views/templates/front/payment_form_sepa_debit.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_form_sofort.tpl b/views/templates/front/payment_form_sofort.tpl index 4b11eaf1..4ec02dc8 100644 --- a/views/templates/front/payment_form_sofort.tpl +++ b/views/templates/front/payment_form_sofort.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} diff --git a/views/templates/front/payment_info_redirect.tpl b/views/templates/front/payment_info_redirect.tpl index 417b61bf..e3b3569f 100644 --- a/views/templates/front/payment_info_redirect.tpl +++ b/views/templates/front/payment_info_redirect.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}

{l s='You\'ll be redirected to the banking site to complete your payment.' mod='stripe_official'}

\ No newline at end of file diff --git a/views/templates/front/stripe-cards.tpl b/views/templates/front/stripe-cards.tpl index 1d569672..5fde2730 100755 --- a/views/templates/front/stripe-cards.tpl +++ b/views/templates/front/stripe-cards.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *} {extends file='customer/page.tpl'} diff --git a/views/templates/front/stripe-cards16.tpl b/views/templates/front/stripe-cards16.tpl index 39cb6a35..409b685a 100755 --- a/views/templates/front/stripe-cards16.tpl +++ b/views/templates/front/stripe-cards16.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,41 +19,46 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} -

{l s='My cards' mod='stripe_official'}

+ * @license Academic Free License (AFL 3.0) + *} +{capture name=path}{l s='My account' mod='stripe_official'}{$navigationPipe}{l s='My cards' mod='stripe_official'}{/capture} -{if $cards|@count > 0} - +

+ {l s='My cards' mod='stripe_official'} +

+
+ {if $cards|@count > 0} +
- - - - - - + + + + + + - {foreach from=$cards item=card} - - - - - + + + + - - {/foreach} + + + {/foreach} -
{l s='Type' mod='stripe_official'}{l s='Card number' mod='stripe_official'}{l s='Validity' mod='stripe_official'}{l s='Delete' mod='stripe_official'}
{l s='Type' mod='stripe_official'}{l s='Card number' mod='stripe_official'}{l s='Validity' mod='stripe_official'}{l s='Delete' mod='stripe_official'}
- {$card.card->brand|capitalize|escape:'htmlall':'UTF-8'} - - **** **** **** {$card.card->last4|escape:'htmlall':'UTF-8'} - - {$card.card->exp_month|escape:'htmlall':'UTF-8'}/{$card.card->exp_year|escape:'htmlall':'UTF-8'} - + {foreach from=$cards item=card} +
+ {$card.card->brand|capitalize|escape:'htmlall':'UTF-8'} + + **** **** **** {$card.card->last4|escape:'htmlall':'UTF-8'} + + {$card.card->exp_month|escape:'htmlall':'UTF-8'}/{$card.card->exp_year|escape:'htmlall':'UTF-8'} + -
-{else} -

{l s='You haven\'t registered a card yet.' mod='stripe_official'}

-{/if} \ No newline at end of file + + {else} +

{l s='You haven\'t registered a card yet.' mod='stripe_official'}

+ {/if} +
diff --git a/views/templates/hook/admin_cart.tpl b/views/templates/hook/admin_cart.tpl index 4cafcdad..d05ce7db 100644 --- a/views/templates/hook/admin_cart.tpl +++ b/views/templates/hook/admin_cart.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}
diff --git a/views/templates/hook/admin_content_order.tpl b/views/templates/hook/admin_content_order.tpl index bde7019d..81504d08 100755 --- a/views/templates/hook/admin_content_order.tpl +++ b/views/templates/hook/admin_content_order.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}

diff --git a/views/templates/hook/admin_tab_order.tpl b/views/templates/hook/admin_tab_order.tpl index 4c1c212d..5ac12def 100644 --- a/views/templates/hook/admin_tab_order.tpl +++ b/views/templates/hook/admin_tab_order.tpl @@ -1,5 +1,5 @@ -{* - * 2007-2019 PrestaShop +{** + * 2007-2022 Stripe * * NOTICE OF LICENSE * @@ -19,8 +19,8 @@ * * @author 202-ecommerce * @copyright Copyright (c) Stripe - * @license Commercial license -*} + * @license Academic Free License (AFL 3.0) + *}