Changeset 2912552
- Timestamp:
- 05/15/2023 02:54:17 PM (3 years ago)
- Location:
- fpay-gateway/trunk
- Files:
-
- 6 added
- 42 edited
-
composer.json (modified) (1 diff)
-
composer.lock (modified) (26 diffs)
-
config/config.php (modified) (1 diff)
-
fpay-gateway.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
src/Factories/FpayWoocommerceFactoryImpl.php (modified) (3 diffs)
-
src/Services/Contracts/CountryManager.php (modified) (2 diffs)
-
src/Services/CountryManagerImpl.php (modified) (2 diffs)
-
tests/src/Services/CountryManagerTest.php (modified) (1 diff)
-
vendor/composer/installed.json (modified) (21 diffs)
-
vendor/composer/installed.php (modified) (7 diffs)
-
vendor/json-mapper/json-mapper/CHANGELOG.md (modified) (1 diff)
-
vendor/json-mapper/json-mapper/Version (modified) (1 diff)
-
vendor/json-mapper/json-mapper/composer.json (modified) (1 diff)
-
vendor/json-mapper/json-mapper/src/Handler/ValueFactory.php (modified) (1 diff)
-
vendor/json-mapper/json-mapper/src/Middleware/CaseConversion.php (modified) (3 diffs)
-
vendor/json-mapper/json-mapper/src/Middleware/DocBlockAnnotations.php (modified) (2 diffs)
-
vendor/json-mapper/json-mapper/src/Middleware/TypedProperties.php (modified) (2 diffs)
-
vendor/json-mapper/json-mapper/tests/Implementation/DatePopoWithConstructor.php (added)
-
vendor/json-mapper/json-mapper/tests/Implementation/Php74/SimpleObject.php (added)
-
vendor/json-mapper/json-mapper/tests/Implementation/Php74/SimpleObjectExtension.php (added)
-
vendor/json-mapper/json-mapper/tests/Implementation/SimpleObjectExtension.php (added)
-
vendor/json-mapper/json-mapper/tests/Integration/FeatureSupportsMappingToParentPrivateProperties.php (added)
-
vendor/json-mapper/json-mapper/tests/Integration/Regression/Bug146RegressionTest.php (added)
-
vendor/json-mapper/json-mapper/tests/Unit/Handler/ValueFactoryTest.php (modified) (1 diff)
-
vendor/json-mapper/json-mapper/tests/Unit/Middleware/CaseConversionTest.php (modified) (1 diff)
-
vendor/react/promise/CHANGELOG.md (modified) (1 diff)
-
vendor/react/promise/README.md (modified) (2 diffs)
-
vendor/react/promise/composer.json (modified) (1 diff)
-
vendor/react/promise/src/functions.php (modified) (2 diffs)
-
vendor/seld/jsonlint/CHANGELOG.md (modified) (1 diff)
-
vendor/seld/jsonlint/README.md (modified) (1 diff)
-
vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php (modified) (5 diffs)
-
vendor/seld/jsonlint/src/Seld/JsonLint/Lexer.php (modified) (6 diffs)
-
vendor/symfony/cache/Adapter/PhpFilesAdapter.php (modified) (1 diff)
-
vendor/symfony/cache/Traits/FilesystemTrait.php (modified) (1 diff)
-
vendor/symfony/cache/Traits/RedisTrait.php (modified) (2 diffs)
-
vendor/symfony/console/Command/DumpCompletionCommand.php (modified) (1 diff)
-
vendor/symfony/console/Helper/Table.php (modified) (1 diff)
-
vendor/symfony/console/Terminal.php (modified) (3 diffs)
-
vendor/symfony/filesystem/Filesystem.php (modified) (1 diff)
-
vendor/symfony/process/PhpExecutableFinder.php (modified) (1 diff)
-
vendor_fpay/guzzlehttp/guzzle/src/Client.php (modified) (1 diff)
-
vendor_fpay/guzzlehttp/guzzle/src/Cookie/SetCookie.php (modified) (1 diff)
-
vendor_fpay/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (2 diffs)
-
vendor_fpay/guzzlehttp/guzzle/src/Handler/StreamHandler.php (modified) (2 diffs)
-
vendor_fpay/guzzlehttp/guzzle/src/RequestOptions.php (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fpay-gateway/trunk/composer.json
r2902085 r2912552 25 25 }, 26 26 "prepend-autoloader": false, 27 "optimize-autoloader": true 27 "optimize-autoloader": true, 28 "options": { 29 "ssl": { 30 "verify_peer": false, 31 "allow_self_signed": false 32 } 33 } 28 34 }, 29 35 "require": { -
fpay-gateway/trunk/composer.lock
r2902085 r2912552 820 820 { 821 821 "name": "json-mapper/json-mapper", 822 "version": "2.1 6.0",822 "version": "2.18.0", 823 823 "source": { 824 824 "type": "git", 825 825 "url": "https://github.com/JsonMapper/JsonMapper.git", 826 "reference": " 0b31f49640340ebde6ad0357316cdb22a5335e76"827 }, 828 "dist": { 829 "type": "zip", 830 "url": "https://api.github.com/repos/JsonMapper/JsonMapper/zipball/ 0b31f49640340ebde6ad0357316cdb22a5335e76",831 "reference": " 0b31f49640340ebde6ad0357316cdb22a5335e76",826 "reference": "24144cc22f9eccc3360eb91c85c1a44546fb4ca8" 827 }, 828 "dist": { 829 "type": "zip", 830 "url": "https://api.github.com/repos/JsonMapper/JsonMapper/zipball/24144cc22f9eccc3360eb91c85c1a44546fb4ca8", 831 "reference": "24144cc22f9eccc3360eb91c85c1a44546fb4ca8", 832 832 "shasum": "" 833 833 }, … … 850 850 "squizlabs/php_codesniffer": "^3.5", 851 851 "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0", 852 "vimeo/psalm": "^4.10 "852 "vimeo/psalm": "^4.10 || ^5.0" 853 853 }, 854 854 "suggest": { … … 885 885 } 886 886 ], 887 "time": "2023-0 2-13T19:28:05+00:00"887 "time": "2023-05-12T16:49:57+00:00" 888 888 }, 889 889 { … … 2021 2021 { 2022 2022 "name": "react/promise", 2023 "version": "v2. 9.0",2023 "version": "v2.10.0", 2024 2024 "source": { 2025 2025 "type": "git", 2026 2026 "url": "https://github.com/reactphp/promise.git", 2027 "reference": " 234f8fd1023c9158e2314fa9d7d0e6a83db42910"2028 }, 2029 "dist": { 2030 "type": "zip", 2031 "url": "https://api.github.com/repos/reactphp/promise/zipball/ 234f8fd1023c9158e2314fa9d7d0e6a83db42910",2032 "reference": " 234f8fd1023c9158e2314fa9d7d0e6a83db42910",2027 "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" 2028 }, 2029 "dist": { 2030 "type": "zip", 2031 "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", 2032 "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", 2033 2033 "shasum": "" 2034 2034 }, … … 2037 2037 }, 2038 2038 "require-dev": { 2039 "phpunit/phpunit": "^9. 3|| ^5.7 || ^4.8.36"2039 "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" 2040 2040 }, 2041 2041 "type": "library", … … 2081 2081 "support": { 2082 2082 "issues": "https://github.com/reactphp/promise/issues", 2083 "source": "https://github.com/reactphp/promise/tree/v2.9.0" 2084 }, 2085 "funding": [ 2086 { 2087 "url": "https://github.com/WyriHaximus", 2088 "type": "github" 2089 }, 2090 { 2091 "url": "https://github.com/clue", 2092 "type": "github" 2093 } 2094 ], 2095 "time": "2022-02-11T10:27:51+00:00" 2083 "source": "https://github.com/reactphp/promise/tree/v2.10.0" 2084 }, 2085 "funding": [ 2086 { 2087 "url": "https://opencollective.com/reactphp", 2088 "type": "open_collective" 2089 } 2090 ], 2091 "time": "2023-05-02T15:15:43+00:00" 2096 2092 }, 2097 2093 { 2098 2094 "name": "seld/jsonlint", 2099 "version": "1. 9.0",2095 "version": "1.10.0", 2100 2096 "source": { 2101 2097 "type": "git", 2102 2098 "url": "https://github.com/Seldaek/jsonlint.git", 2103 "reference": " 4211420d25eba80712bff236a98960ef68b866b7"2104 }, 2105 "dist": { 2106 "type": "zip", 2107 "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/ 4211420d25eba80712bff236a98960ef68b866b7",2108 "reference": " 4211420d25eba80712bff236a98960ef68b866b7",2099 "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" 2100 }, 2101 "dist": { 2102 "type": "zip", 2103 "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", 2104 "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", 2109 2105 "shasum": "" 2110 2106 }, … … 2145 2141 "support": { 2146 2142 "issues": "https://github.com/Seldaek/jsonlint/issues", 2147 "source": "https://github.com/Seldaek/jsonlint/tree/1. 9.0"2143 "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" 2148 2144 }, 2149 2145 "funding": [ … … 2157 2153 } 2158 2154 ], 2159 "time": "202 2-04-01T13:37:23+00:00"2155 "time": "2023-05-11T13:16:46+00:00" 2160 2156 }, 2161 2157 { … … 2270 2266 { 2271 2267 "name": "symfony/cache", 2272 "version": "v5.4.2 2",2268 "version": "v5.4.23", 2273 2269 "source": { 2274 2270 "type": "git", 2275 2271 "url": "https://github.com/symfony/cache.git", 2276 "reference": " 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6"2277 }, 2278 "dist": { 2279 "type": "zip", 2280 "url": "https://api.github.com/repos/symfony/cache/zipball/ 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6",2281 "reference": " 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6",2272 "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107" 2273 }, 2274 "dist": { 2275 "type": "zip", 2276 "url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107", 2277 "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107", 2282 2278 "shasum": "" 2283 2279 }, … … 2347 2343 ], 2348 2344 "support": { 2349 "source": "https://github.com/symfony/cache/tree/v5.4.2 2"2345 "source": "https://github.com/symfony/cache/tree/v5.4.23" 2350 2346 }, 2351 2347 "funding": [ … … 2363 2359 } 2364 2360 ], 2365 "time": "2023-0 3-29T20:01:08+00:00"2361 "time": "2023-04-21T15:38:51+00:00" 2366 2362 }, 2367 2363 { … … 2446 2442 { 2447 2443 "name": "symfony/console", 2448 "version": "v5.4.2 2",2444 "version": "v5.4.23", 2449 2445 "source": { 2450 2446 "type": "git", 2451 2447 "url": "https://github.com/symfony/console.git", 2452 "reference": " 3cd51fd2e6c461ca678f84d419461281bd87a0a8"2453 }, 2454 "dist": { 2455 "type": "zip", 2456 "url": "https://api.github.com/repos/symfony/console/zipball/ 3cd51fd2e6c461ca678f84d419461281bd87a0a8",2457 "reference": " 3cd51fd2e6c461ca678f84d419461281bd87a0a8",2448 "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" 2449 }, 2450 "dist": { 2451 "type": "zip", 2452 "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", 2453 "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", 2458 2454 "shasum": "" 2459 2455 }, … … 2525 2521 ], 2526 2522 "support": { 2527 "source": "https://github.com/symfony/console/tree/v5.4.2 2"2523 "source": "https://github.com/symfony/console/tree/v5.4.23" 2528 2524 }, 2529 2525 "funding": [ … … 2541 2537 } 2542 2538 ], 2543 "time": "2023-0 3-25T09:27:28+00:00"2539 "time": "2023-04-24T18:47:29+00:00" 2544 2540 }, 2545 2541 { … … 2612 2608 { 2613 2609 "name": "symfony/filesystem", 2614 "version": "v5.4.2 1",2610 "version": "v5.4.23", 2615 2611 "source": { 2616 2612 "type": "git", 2617 2613 "url": "https://github.com/symfony/filesystem.git", 2618 "reference": " e75960b1bbfd2b8c9e483e0d74811d555ca3de9f"2619 }, 2620 "dist": { 2621 "type": "zip", 2622 "url": "https://api.github.com/repos/symfony/filesystem/zipball/ e75960b1bbfd2b8c9e483e0d74811d555ca3de9f",2623 "reference": " e75960b1bbfd2b8c9e483e0d74811d555ca3de9f",2614 "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" 2615 }, 2616 "dist": { 2617 "type": "zip", 2618 "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", 2619 "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", 2624 2620 "shasum": "" 2625 2621 }, … … 2656 2652 "homepage": "https://symfony.com", 2657 2653 "support": { 2658 "source": "https://github.com/symfony/filesystem/tree/v5.4.2 1"2654 "source": "https://github.com/symfony/filesystem/tree/v5.4.23" 2659 2655 }, 2660 2656 "funding": [ … … 2672 2668 } 2673 2669 ], 2674 "time": "2023-0 2-14T08:03:56+00:00"2670 "time": "2023-03-02T11:38:35+00:00" 2675 2671 }, 2676 2672 { … … 3310 3306 { 3311 3307 "name": "symfony/process", 3312 "version": "v5.4.2 2",3308 "version": "v5.4.23", 3313 3309 "source": { 3314 3310 "type": "git", 3315 3311 "url": "https://github.com/symfony/process.git", 3316 "reference": "4b8 50da0cc3a2a9181c1ed407adbca4733dc839b"3317 }, 3318 "dist": { 3319 "type": "zip", 3320 "url": "https://api.github.com/repos/symfony/process/zipball/4b8 50da0cc3a2a9181c1ed407adbca4733dc839b",3321 "reference": "4b8 50da0cc3a2a9181c1ed407adbca4733dc839b",3312 "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" 3313 }, 3314 "dist": { 3315 "type": "zip", 3316 "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", 3317 "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", 3322 3318 "shasum": "" 3323 3319 }, … … 3352 3348 "homepage": "https://symfony.com", 3353 3349 "support": { 3354 "source": "https://github.com/symfony/process/tree/v5.4.2 2"3350 "source": "https://github.com/symfony/process/tree/v5.4.23" 3355 3351 }, 3356 3352 "funding": [ … … 3368 3364 } 3369 3365 ], 3370 "time": "2023-0 3-06T21:29:33+00:00"3366 "time": "2023-04-18T13:50:24+00:00" 3371 3367 }, 3372 3368 { … … 5413 5409 { 5414 5410 "name": "phpunit/phpunit", 5415 "version": "9.6. 7",5411 "version": "9.6.8", 5416 5412 "source": { 5417 5413 "type": "git", 5418 5414 "url": "https://github.com/sebastianbergmann/phpunit.git", 5419 "reference": " c993f0d3b0489ffc42ee2fe0bd645af1538a63b2"5420 }, 5421 "dist": { 5422 "type": "zip", 5423 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",5424 "reference": " c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",5415 "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" 5416 }, 5417 "dist": { 5418 "type": "zip", 5419 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", 5420 "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", 5425 5421 "shasum": "" 5426 5422 }, … … 5496 5492 "issues": "https://github.com/sebastianbergmann/phpunit/issues", 5497 5493 "security": "https://github.com/sebastianbergmann/phpunit/security/policy", 5498 "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6. 7"5494 "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" 5499 5495 }, 5500 5496 "funding": [ … … 5512 5508 } 5513 5509 ], 5514 "time": "2023-0 4-14T08:58:40+00:00"5510 "time": "2023-05-11T05:14:45+00:00" 5515 5511 }, 5516 5512 { … … 5814 5810 { 5815 5811 "name": "sebastian/diff", 5816 "version": "4.0. 4",5812 "version": "4.0.5", 5817 5813 "source": { 5818 5814 "type": "git", 5819 5815 "url": "https://github.com/sebastianbergmann/diff.git", 5820 "reference": " 3461e3fccc7cfdfc2720be910d3bd73c69be590d"5821 }, 5822 "dist": { 5823 "type": "zip", 5824 "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ 3461e3fccc7cfdfc2720be910d3bd73c69be590d",5825 "reference": " 3461e3fccc7cfdfc2720be910d3bd73c69be590d",5816 "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" 5817 }, 5818 "dist": { 5819 "type": "zip", 5820 "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", 5821 "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", 5826 5822 "shasum": "" 5827 5823 }, … … 5868 5864 "support": { 5869 5865 "issues": "https://github.com/sebastianbergmann/diff/issues", 5870 "source": "https://github.com/sebastianbergmann/diff/tree/4.0. 4"5866 "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" 5871 5867 }, 5872 5868 "funding": [ … … 5876 5872 } 5877 5873 ], 5878 "time": "202 0-10-26T13:10:38+00:00"5874 "time": "2023-05-07T05:35:17+00:00" 5879 5875 }, 5880 5876 { -
fpay-gateway/trunk/config/config.php
r2901917 r2912552 36 36 'supported_countries' => explode(',', $_ENV['FPAY_SUPPORTED_COUNTRIES']), 37 37 'supported_currencies' => explode(',', $_ENV['FPAY_SUPPORTED_CURRENCIES']), 38 'decimals_quantity' => intval($_ENV['FPAY_DECIMALS']), 38 39 39 40 /** -
fpay-gateway/trunk/fpay-gateway.php
r2904111 r2912552 6 6 * Author: Fpay 7 7 * Author URI: https://fpay.cl/ 8 * Version: 2.5. 68 * Version: 2.5.7 9 9 */ 10 10 -
fpay-gateway/trunk/readme.txt
r2904111 r2912552 4 4 Requires at least: 4.7 5 5 Tested up to: 6.1.1 6 Stable tag: 2.5. 66 Stable tag: 2.5.7 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 24 24 25 25 == Changelog == 26 = 2.5.7 = 27 * Se solventa un problema al usar el plugin en Perú donde no estaba validando si debia o no redondear los valores al momento de crear la intención de pago. 28 26 29 = 2.5.6 = 27 30 * Se solventa un problema con el empaquetado para publicar el plugin en la tienda de Wordpress. -
fpay-gateway/trunk/src/Factories/FpayWoocommerceFactoryImpl.php
r2834802 r2912552 93 93 return $this->container->make(AbstractAmount::class, [ 94 94 'currency' => $this->country_manager->getCurrentCurrency(), 95 'total' => round($data->get_total()),95 'total' => $this->country_manager->round($data->get_total()), 96 96 'details' => $details 97 97 ]); … … 130 130 "description" => $data->get_name(), 131 131 "quantity" => $data->get_quantity(), 132 "price" => round($data->get_total()),133 "tax" => round($data->get_subtotal_tax()),132 "price" => $this->country_manager->round($data->get_total()), 133 "tax" => $this->country_manager->round($data->get_subtotal_tax()), 134 134 "category" => $data->get_type() 135 135 ]); … … 185 185 { 186 186 return $this->container->make(AbstractDetails::class, [ 187 'subtotal' => round($data->get_subtotal()),187 'subtotal' => $this->country_manager->round($data->get_subtotal()), 188 188 'tax' => AbstractDetails::TAX_CERO, 189 'shipping' => round($data->get_shipping_total()),189 'shipping' => $this->country_manager->round($data->get_shipping_total()), 190 190 'shipping_discount' => AbstractDetails::DISCOUNT_CERO, 191 191 ]); -
fpay-gateway/trunk/src/Services/Contracts/CountryManager.php
r2834802 r2912552 7 7 interface CountryManager 8 8 { 9 const CL_COUNTRY_CODE = 'CL'; 10 const PE_COUNTRY_CODE = 'PE'; 11 const CO_COUNTRY_CODE = 'CO'; 12 13 const COUNTRIES_THAT_NEEDS_ROUND = [ 14 self::CL_COUNTRY_CODE => self::CL_COUNTRY_CODE, 15 self::CO_COUNTRY_CODE => self::CO_COUNTRY_CODE, 16 ]; 9 17 const IN_PLUGIN_ACTIVATION_PROCESS = true; 10 18 const NOT_PLUGIN_ACTIVATION_PROCESS = false; … … 31 39 32 40 public function createCountry(array $data): AbstractCountry; 41 42 public function doesTheCountryNeedRound():bool; 43 44 public function round($value): float; 33 45 } -
fpay-gateway/trunk/src/Services/CountryManagerImpl.php
r2834802 r2912552 156 156 $country = null; 157 157 switch ($country_key) { 158 case 'CL':158 case self::CL_COUNTRY_CODE: 159 159 $country = $this->createCountry(array( 160 160 'name' => 'Chile', 161 161 'currency_code' => 'CLP', 162 162 'currency_name' => 'Peso chileno', 163 'country_code' => 'CL'163 'country_code' => self::CL_COUNTRY_CODE 164 164 ) 165 165 ); 166 166 break; 167 case 'PE':167 case self::PE_COUNTRY_CODE: 168 168 $country = $this->createCountry(array( 169 169 'name' => 'Perú', 170 170 'currency_code' => 'PEN', 171 171 'currency_name' => 'Soles', 172 'country_code' => 'PE'172 'country_code' => self::PE_COUNTRY_CODE 173 173 ) 174 174 ); … … 191 191 ]); 192 192 } 193 194 public function doesTheCountryNeedRound(): bool 195 { 196 return array_key_exists($this->getCurrentCountry(), self::COUNTRIES_THAT_NEEDS_ROUND); 197 } 198 199 public function round($value): float 200 { 201 return $this->doestheCountryNeedRound() ? round($value) : round($value, config('decimals_quantity')); 202 } 193 203 } -
fpay-gateway/trunk/tests/src/Services/CountryManagerTest.php
r2834802 r2912552 159 159 expect(true)->toBeTrue(); 160 160 }); 161 162 it('checks if the current country as chile requires to round the values', function () { 163 164 /** 165 *Arrange 166 */ 167 /** @var CountryManager | Mockery\Mock $country_manager_spy */ 168 $country_manager_spy = Mockery::spy(new CountryManagerImpl( 169 $this->container, 170 $this->logger, 171 'logo', 172 config('plugin_number') 173 )); 174 175 /** 176 * Woocommerce functions called 177 */ 178 expect_woocommerce('wc_get_base_location')->andReturn(['country' => 'CL']); 179 expect_woocommerce('get_woocommerce_currency')->andReturn('CLP'); 180 expect_woocommerce('is_admin')->andReturn(true); 181 182 /** 183 * Act 184 */ 185 $needs_round = $country_manager_spy->doesTheCountryNeedRound(); 186 $rounded_value = $country_manager_spy->round(19.5); 187 188 /** 189 * Assert 190 */ 191 expect($needs_round)->toBeTrue(); 192 expect($rounded_value)->toBeFloat(); 193 expect($rounded_value)->toEqual(20); 194 }); 195 196 it('checks if the current country as colombia requires to round the values', function () { 197 198 /** 199 *Arrange 200 */ 201 /** @var CountryManager | Mockery\Mock $country_manager_spy */ 202 $country_manager_spy = Mockery::spy(new CountryManagerImpl( 203 $this->container, 204 $this->logger, 205 'logo', 206 config('plugin_number') 207 )); 208 209 /** 210 * Woocommerce functions called 211 */ 212 expect_woocommerce('wc_get_base_location')->andReturn(['country' => 'CO']); 213 expect_woocommerce('get_woocommerce_currency')->andReturn('COP'); 214 expect_woocommerce('is_admin')->andReturn(true); 215 216 /** 217 * Act 218 */ 219 $needs_round = $country_manager_spy->doesTheCountryNeedRound(); 220 $rounded_value = $country_manager_spy->round(19.5); 221 222 /** 223 * Assert 224 */ 225 expect($needs_round)->toBeTrue(); 226 expect($rounded_value)->toBeFloat(); 227 expect($rounded_value)->toEqual(20); 228 229 /** 230 * Assert 231 */ 232 expect($needs_round)->toBeTrue(); 233 }); 234 235 it('checks if the round method works correctly to the rules, upper or equal to .5 round to up and under .5 round to down', function () { 236 237 /** 238 *Arrange 239 */ 240 /** @var CountryManager | Mockery\Mock $country_manager_spy */ 241 $country_manager_spy = Mockery::spy(new CountryManagerImpl( 242 $this->container, 243 $this->logger, 244 'logo', 245 config('plugin_number') 246 )); 247 248 /** 249 * Woocommerce functions called 250 */ 251 expect_woocommerce('wc_get_base_location')->andReturn(['country' => 'CL']); 252 expect_woocommerce('get_woocommerce_currency')->andReturn('CLP'); 253 expect_woocommerce('is_admin')->andReturn(true); 254 255 /** 256 * Act 257 */ 258 $needs_round = $country_manager_spy->doesTheCountryNeedRound(); 259 $rounded_value_up = $country_manager_spy->round(19.5); 260 $rounded_value_down = $country_manager_spy->round(19.4); 261 262 /** 263 * Assert 264 */ 265 expect($needs_round)->toBeTrue(); 266 expect($rounded_value_up)->toBeFloat(); 267 expect($rounded_value_up)->toEqual(20); 268 expect($rounded_value_down)->toEqual(19); 269 }); 270 271 it('checks if the current country as peru DOES NOT requires to round the values', function () { 272 273 /** 274 *Arrange 275 */ 276 /** @var CountryManager | Mockery\Mock $country_manager_spy */ 277 $country_manager_spy = Mockery::spy(new CountryManagerImpl( 278 $this->container, 279 $this->logger, 280 'logo', 281 config('plugin_number') 282 )); 283 284 /** 285 * Woocommerce functions called 286 */ 287 expect_woocommerce('wc_get_base_location')->andReturn(['country' => 'PE']); 288 expect_woocommerce('get_woocommerce_currency')->andReturn('SOL'); 289 expect_woocommerce('is_admin')->andReturn(true); 290 291 /** 292 * Act 293 */ 294 $needs_round = $country_manager_spy->doesTheCountryNeedRound(); 295 $not_rounded_value = $country_manager_spy->round(19.5); 296 297 /** 298 * Assert 299 */ 300 expect($needs_round)->toBeFalse(); 301 expect($not_rounded_value)->toBeFloat(); 302 expect($not_rounded_value)->toEqual(19.5); 303 304 }); 305 306 it('checks if the current function makes the round correctly based in the .env configuration by 4 decimales', function () { 307 308 /** 309 *Arrange 310 */ 311 /** @var CountryManager | Mockery\Mock $country_manager_spy */ 312 $country_manager_spy = Mockery::spy(new CountryManagerImpl( 313 $this->container, 314 $this->logger, 315 'logo', 316 config('plugin_number') 317 )); 318 319 $_ENV["FPAY_DECIMALS"]="4"; 320 321 /** 322 * Woocommerce functions called 323 */ 324 expect_woocommerce('wc_get_base_location')->andReturn(['country' => 'PE']); 325 expect_woocommerce('get_woocommerce_currency')->andReturn('SOL'); 326 expect_woocommerce('is_admin')->andReturn(true); 327 328 /** 329 * Act 330 */ 331 $needs_round = $country_manager_spy->doesTheCountryNeedRound(); 332 $rounded_value_by_four_decimales = $country_manager_spy->round(19.51509); 333 334 /** 335 * Assert 336 */ 337 expect($needs_round)->toBeFalse(); 338 expect($rounded_value_by_four_decimales)->toBeFloat(); 339 expect($rounded_value_by_four_decimales)->toEqual(19.5151); 340 expect(config('decimals_quantity'))->toEqual(4); 341 342 }); -
fpay-gateway/trunk/vendor/composer/installed.json
r2902085 r2912552 847 847 { 848 848 "name": "json-mapper/json-mapper", 849 "version": "2.1 6.0",850 "version_normalized": "2.1 6.0.0",849 "version": "2.18.0", 850 "version_normalized": "2.18.0.0", 851 851 "source": { 852 852 "type": "git", 853 853 "url": "https://github.com/JsonMapper/JsonMapper.git", 854 "reference": " 0b31f49640340ebde6ad0357316cdb22a5335e76"855 }, 856 "dist": { 857 "type": "zip", 858 "url": "https://api.github.com/repos/JsonMapper/JsonMapper/zipball/ 0b31f49640340ebde6ad0357316cdb22a5335e76",859 "reference": " 0b31f49640340ebde6ad0357316cdb22a5335e76",854 "reference": "24144cc22f9eccc3360eb91c85c1a44546fb4ca8" 855 }, 856 "dist": { 857 "type": "zip", 858 "url": "https://api.github.com/repos/JsonMapper/JsonMapper/zipball/24144cc22f9eccc3360eb91c85c1a44546fb4ca8", 859 "reference": "24144cc22f9eccc3360eb91c85c1a44546fb4ca8", 860 860 "shasum": "" 861 861 }, … … 878 878 "squizlabs/php_codesniffer": "^3.5", 879 879 "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0", 880 "vimeo/psalm": "^4.10 "880 "vimeo/psalm": "^4.10 || ^5.0" 881 881 }, 882 882 "suggest": { … … 884 884 "json-mapper/symfony-bundle": "Use JsonMapper directly with Symfony" 885 885 }, 886 "time": "2023-0 2-13T19:28:05+00:00",886 "time": "2023-05-12T16:49:57+00:00", 887 887 "type": "library", 888 888 "installation-source": "dist", … … 2102 2102 { 2103 2103 "name": "react/promise", 2104 "version": "v2. 9.0",2105 "version_normalized": "2. 9.0.0",2104 "version": "v2.10.0", 2105 "version_normalized": "2.10.0.0", 2106 2106 "source": { 2107 2107 "type": "git", 2108 2108 "url": "https://github.com/reactphp/promise.git", 2109 "reference": " 234f8fd1023c9158e2314fa9d7d0e6a83db42910"2110 }, 2111 "dist": { 2112 "type": "zip", 2113 "url": "https://api.github.com/repos/reactphp/promise/zipball/ 234f8fd1023c9158e2314fa9d7d0e6a83db42910",2114 "reference": " 234f8fd1023c9158e2314fa9d7d0e6a83db42910",2109 "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" 2110 }, 2111 "dist": { 2112 "type": "zip", 2113 "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", 2114 "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", 2115 2115 "shasum": "" 2116 2116 }, … … 2119 2119 }, 2120 2120 "require-dev": { 2121 "phpunit/phpunit": "^9. 3|| ^5.7 || ^4.8.36"2122 }, 2123 "time": "202 2-02-11T10:27:51+00:00",2121 "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" 2122 }, 2123 "time": "2023-05-02T15:15:43+00:00", 2124 2124 "type": "library", 2125 2125 "installation-source": "dist", … … 2165 2165 "support": { 2166 2166 "issues": "https://github.com/reactphp/promise/issues", 2167 "source": "https://github.com/reactphp/promise/tree/v2.9.0" 2168 }, 2169 "funding": [ 2170 { 2171 "url": "https://github.com/WyriHaximus", 2172 "type": "github" 2173 }, 2174 { 2175 "url": "https://github.com/clue", 2176 "type": "github" 2167 "source": "https://github.com/reactphp/promise/tree/v2.10.0" 2168 }, 2169 "funding": [ 2170 { 2171 "url": "https://opencollective.com/reactphp", 2172 "type": "open_collective" 2177 2173 } 2178 2174 ], … … 2181 2177 { 2182 2178 "name": "seld/jsonlint", 2183 "version": "1. 9.0",2184 "version_normalized": "1. 9.0.0",2179 "version": "1.10.0", 2180 "version_normalized": "1.10.0.0", 2185 2181 "source": { 2186 2182 "type": "git", 2187 2183 "url": "https://github.com/Seldaek/jsonlint.git", 2188 "reference": " 4211420d25eba80712bff236a98960ef68b866b7"2189 }, 2190 "dist": { 2191 "type": "zip", 2192 "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/ 4211420d25eba80712bff236a98960ef68b866b7",2193 "reference": " 4211420d25eba80712bff236a98960ef68b866b7",2184 "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" 2185 }, 2186 "dist": { 2187 "type": "zip", 2188 "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", 2189 "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", 2194 2190 "shasum": "" 2195 2191 }, … … 2201 2197 "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" 2202 2198 }, 2203 "time": "202 2-04-01T13:37:23+00:00",2199 "time": "2023-05-11T13:16:46+00:00", 2204 2200 "bin": [ 2205 2201 "bin/jsonlint" … … 2232 2228 "support": { 2233 2229 "issues": "https://github.com/Seldaek/jsonlint/issues", 2234 "source": "https://github.com/Seldaek/jsonlint/tree/1. 9.0"2230 "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" 2235 2231 }, 2236 2232 "funding": [ … … 2363 2359 { 2364 2360 "name": "symfony/cache", 2365 "version": "v5.4.2 2",2366 "version_normalized": "5.4.2 2.0",2361 "version": "v5.4.23", 2362 "version_normalized": "5.4.23.0", 2367 2363 "source": { 2368 2364 "type": "git", 2369 2365 "url": "https://github.com/symfony/cache.git", 2370 "reference": " 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6"2371 }, 2372 "dist": { 2373 "type": "zip", 2374 "url": "https://api.github.com/repos/symfony/cache/zipball/ 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6",2375 "reference": " 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6",2366 "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107" 2367 }, 2368 "dist": { 2369 "type": "zip", 2370 "url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107", 2371 "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107", 2376 2372 "shasum": "" 2377 2373 }, … … 2411 2407 "symfony/var-dumper": "^4.4|^5.0|^6.0" 2412 2408 }, 2413 "time": "2023-0 3-29T20:01:08+00:00",2409 "time": "2023-04-21T15:38:51+00:00", 2414 2410 "type": "library", 2415 2411 "installation-source": "dist", … … 2443 2439 ], 2444 2440 "support": { 2445 "source": "https://github.com/symfony/cache/tree/v5.4.2 2"2441 "source": "https://github.com/symfony/cache/tree/v5.4.23" 2446 2442 }, 2447 2443 "funding": [ … … 2545 2541 { 2546 2542 "name": "symfony/console", 2547 "version": "v5.4.2 2",2548 "version_normalized": "5.4.2 2.0",2543 "version": "v5.4.23", 2544 "version_normalized": "5.4.23.0", 2549 2545 "source": { 2550 2546 "type": "git", 2551 2547 "url": "https://github.com/symfony/console.git", 2552 "reference": " 3cd51fd2e6c461ca678f84d419461281bd87a0a8"2553 }, 2554 "dist": { 2555 "type": "zip", 2556 "url": "https://api.github.com/repos/symfony/console/zipball/ 3cd51fd2e6c461ca678f84d419461281bd87a0a8",2557 "reference": " 3cd51fd2e6c461ca678f84d419461281bd87a0a8",2548 "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" 2549 }, 2550 "dist": { 2551 "type": "zip", 2552 "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", 2553 "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", 2558 2554 "shasum": "" 2559 2555 }, … … 2593 2589 "symfony/process": "" 2594 2590 }, 2595 "time": "2023-0 3-25T09:27:28+00:00",2591 "time": "2023-04-24T18:47:29+00:00", 2596 2592 "type": "library", 2597 2593 "installation-source": "dist", … … 2627 2623 ], 2628 2624 "support": { 2629 "source": "https://github.com/symfony/console/tree/v5.4.2 2"2625 "source": "https://github.com/symfony/console/tree/v5.4.23" 2630 2626 }, 2631 2627 "funding": [ … … 2717 2713 { 2718 2714 "name": "symfony/filesystem", 2719 "version": "v5.4.2 1",2720 "version_normalized": "5.4.2 1.0",2715 "version": "v5.4.23", 2716 "version_normalized": "5.4.23.0", 2721 2717 "source": { 2722 2718 "type": "git", 2723 2719 "url": "https://github.com/symfony/filesystem.git", 2724 "reference": " e75960b1bbfd2b8c9e483e0d74811d555ca3de9f"2725 }, 2726 "dist": { 2727 "type": "zip", 2728 "url": "https://api.github.com/repos/symfony/filesystem/zipball/ e75960b1bbfd2b8c9e483e0d74811d555ca3de9f",2729 "reference": " e75960b1bbfd2b8c9e483e0d74811d555ca3de9f",2720 "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" 2721 }, 2722 "dist": { 2723 "type": "zip", 2724 "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", 2725 "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", 2730 2726 "shasum": "" 2731 2727 }, … … 2736 2732 "symfony/polyfill-php80": "^1.16" 2737 2733 }, 2738 "time": "2023-0 2-14T08:03:56+00:00",2734 "time": "2023-03-02T11:38:35+00:00", 2739 2735 "type": "library", 2740 2736 "installation-source": "dist", … … 2764 2760 "homepage": "https://symfony.com", 2765 2761 "support": { 2766 "source": "https://github.com/symfony/filesystem/tree/v5.4.2 1"2762 "source": "https://github.com/symfony/filesystem/tree/v5.4.23" 2767 2763 }, 2768 2764 "funding": [ … … 3442 3438 { 3443 3439 "name": "symfony/process", 3444 "version": "v5.4.2 2",3445 "version_normalized": "5.4.2 2.0",3440 "version": "v5.4.23", 3441 "version_normalized": "5.4.23.0", 3446 3442 "source": { 3447 3443 "type": "git", 3448 3444 "url": "https://github.com/symfony/process.git", 3449 "reference": "4b8 50da0cc3a2a9181c1ed407adbca4733dc839b"3450 }, 3451 "dist": { 3452 "type": "zip", 3453 "url": "https://api.github.com/repos/symfony/process/zipball/4b8 50da0cc3a2a9181c1ed407adbca4733dc839b",3454 "reference": "4b8 50da0cc3a2a9181c1ed407adbca4733dc839b",3445 "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" 3446 }, 3447 "dist": { 3448 "type": "zip", 3449 "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", 3450 "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", 3455 3451 "shasum": "" 3456 3452 }, … … 3459 3455 "symfony/polyfill-php80": "^1.16" 3460 3456 }, 3461 "time": "2023-0 3-06T21:29:33+00:00",3457 "time": "2023-04-18T13:50:24+00:00", 3462 3458 "type": "library", 3463 3459 "installation-source": "dist", … … 3487 3483 "homepage": "https://symfony.com", 3488 3484 "support": { 3489 "source": "https://github.com/symfony/process/tree/v5.4.2 2"3485 "source": "https://github.com/symfony/process/tree/v5.4.23" 3490 3486 }, 3491 3487 "funding": [ -
fpay-gateway/trunk/vendor/composer/installed.php
r2902085 r2912552 120 120 ), 121 121 'json-mapper/json-mapper' => array( 122 'pretty_version' => '2.1 6.0',123 'version' => '2.1 6.0.0',124 'reference' => ' 0b31f49640340ebde6ad0357316cdb22a5335e76',122 'pretty_version' => '2.18.0', 123 'version' => '2.18.0.0', 124 'reference' => '24144cc22f9eccc3360eb91c85c1a44546fb4ca8', 125 125 'type' => 'library', 126 126 'install_path' => __DIR__ . '/../json-mapper/json-mapper', … … 307 307 ), 308 308 'react/promise' => array( 309 'pretty_version' => 'v2. 9.0',310 'version' => '2. 9.0.0',311 'reference' => ' 234f8fd1023c9158e2314fa9d7d0e6a83db42910',309 'pretty_version' => 'v2.10.0', 310 'version' => '2.10.0.0', 311 'reference' => 'f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38', 312 312 'type' => 'library', 313 313 'install_path' => __DIR__ . '/../react/promise', … … 322 322 ), 323 323 'seld/jsonlint' => array( 324 'pretty_version' => '1. 9.0',325 'version' => '1. 9.0.0',326 'reference' => ' 4211420d25eba80712bff236a98960ef68b866b7',324 'pretty_version' => '1.10.0', 325 'version' => '1.10.0.0', 326 'reference' => '594fd6462aad8ecee0b45ca5045acea4776667f1', 327 327 'type' => 'library', 328 328 'install_path' => __DIR__ . '/../seld/jsonlint', … … 349 349 ), 350 350 'symfony/cache' => array( 351 'pretty_version' => 'v5.4.2 2',352 'version' => '5.4.2 2.0',353 'reference' => ' 5ed986c4ef65f0dea5e9753630b5cb1f07f847d6',351 'pretty_version' => 'v5.4.23', 352 'version' => '5.4.23.0', 353 'reference' => '983c79ff28612cdfd66d8e44e1a06e5afc87e107', 354 354 'type' => 'library', 355 355 'install_path' => __DIR__ . '/../symfony/cache', … … 373 373 ), 374 374 'symfony/console' => array( 375 'pretty_version' => 'v5.4.2 2',376 'version' => '5.4.2 2.0',377 'reference' => ' 3cd51fd2e6c461ca678f84d419461281bd87a0a8',375 'pretty_version' => 'v5.4.23', 376 'version' => '5.4.23.0', 377 'reference' => '90f21e27d0d88ce38720556dd164d4a1e4c3934c', 378 378 'type' => 'library', 379 379 'install_path' => __DIR__ . '/../symfony/console', … … 391 391 ), 392 392 'symfony/filesystem' => array( 393 'pretty_version' => 'v5.4.2 1',394 'version' => '5.4.2 1.0',395 'reference' => ' e75960b1bbfd2b8c9e483e0d74811d555ca3de9f',393 'pretty_version' => 'v5.4.23', 394 'version' => '5.4.23.0', 395 'reference' => 'b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5', 396 396 'type' => 'library', 397 397 'install_path' => __DIR__ . '/../symfony/filesystem', … … 472 472 ), 473 473 'symfony/process' => array( 474 'pretty_version' => 'v5.4.2 2',475 'version' => '5.4.2 2.0',476 'reference' => '4b8 50da0cc3a2a9181c1ed407adbca4733dc839b',474 'pretty_version' => 'v5.4.23', 475 'version' => '5.4.23.0', 476 'reference' => '4b842fc4b61609e0a155a114082bd94e31e98287', 477 477 'type' => 'library', 478 478 'install_path' => __DIR__ . '/../symfony/process', -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/CHANGELOG.md
r2880636 r2912552 6 6 7 7 ## [Unreleased] 8 9 ## [2.18.0] - 2023-05-12 10 ### Fixed 11 - Support private properties from parent class in DocBlockAnnotations and TypedProperties [PR#161](https://github.com/JsonMapper/JsonMapper/pull/161) 12 13 ## [2.17.0] - 2023-05-02 14 ### Changed 15 - Allow vimeo/psalm 5.0 as dev dependency 16 - Allow recursive traversal in CaseConversion middleware [PR#160](https://github.com/JsonMapper/JsonMapper/pull/160) 17 ### Fixed 18 - Fix null value reaching native php class factories [PR#159](https://github.com/JsonMapper/JsonMapper/pull/159). Thanks to [template-provider](https://github.com/template-provider) for reporting the issue. 8 19 9 20 ## [2.16.0] - 2023-02-13 -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/Version
r2880636 r2912552 1 2.1 6.01 2.18.0 -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/composer.json
r2880636 r2912552 30 30 "squizlabs/php_codesniffer": "^3.5", 31 31 "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0", 32 "vimeo/psalm": "^4.10 "32 "vimeo/psalm": "^4.10 || ^5.0" 33 33 }, 34 34 "autoload": { -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/src/Handler/ValueFactory.php
r2904129 r2912552 95 95 } 96 96 97 if (\is_null($value) && $property->isNullable()) { 98 return null; 99 } 97 100 // No match was found (or there was only one option) lets assume the first is the right one. 98 101 $types = $property->getPropertyTypes(); -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/src/Middleware/CaseConversion.php
r2834802 r2912552 16 16 /** @var TextNotation */ 17 17 private $replacementSeparator; 18 /** @var bool */ 19 private $applyRecursive; 18 20 19 public function __construct(TextNotation $searchSeparator, TextNotation $replacementSeparator) 20 { 21 public function __construct( 22 TextNotation $searchSeparator, 23 TextNotation $replacementSeparator, 24 bool $applyRecursive = false 25 ) { 21 26 $this->searchSeparator = $searchSeparator; 22 27 $this->replacementSeparator = $replacementSeparator; 28 $this->applyRecursive = $applyRecursive; 23 29 } 24 30 … … 33 39 } 34 40 41 $this->replace($json); 42 } 43 44 /** @param \stdClass|array $json */ 45 private function replace($json): void 46 { 47 if (is_array($json)) { 48 array_walk( 49 $json, 50 function ($value) { 51 $this->replace($value); 52 } 53 ); 54 return; 55 } 56 35 57 $keys = \array_keys((array) $json); 36 58 foreach ($keys as $key) { … … 41 63 } 42 64 43 $json->$replacementKey = $json->$key; 65 $value = $json->$key; 66 $json->$replacementKey = $value; 44 67 unset($json->$key); 68 69 if ($this->applyRecursive && (is_array($value) || $value instanceof \stdClass)) { 70 $this->replace($value); 71 } 45 72 } 46 73 } -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/src/Middleware/DocBlockAnnotations.php
r2880636 r2912552 46 46 } 47 47 48 $properties = $object->getReflectedObject()->getProperties();49 48 $intermediatePropertyMap = new PropertyMap(); 50 51 foreach ($properties as $property) { 49 foreach ($this->getObjectPropertiesIncludingParents($object) as $property) { 52 50 $name = $property->getName(); 53 51 $docBlock = $property->getDocComment(); … … 130 128 return new AnnotationMap($var ?: null, [], null); 131 129 } 130 131 /** @return \ReflectionProperty[] */ 132 public function getObjectPropertiesIncludingParents(ObjectWrapper $object): array 133 { 134 $properties = []; 135 $reflectionClass = $object->getReflectedObject(); 136 do { 137 $properties = array_merge($properties, $reflectionClass->getProperties()); 138 } while ($reflectionClass = $reflectionClass->getParentClass()); 139 return $properties; 140 } 132 141 } -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/src/Middleware/TypedProperties.php
r2880636 r2912552 45 45 } 46 46 47 $reflectionProperties = $object->getReflectedObject()->getProperties();48 47 $intermediatePropertyMap = new PropertyMap(); 49 48 50 foreach ($ reflectionPropertiesas $reflectionProperty) {49 foreach ($this->getObjectPropertiesIncludingParents($object) as $reflectionProperty) { 51 50 $type = $reflectionProperty->getType(); 52 51 … … 98 97 return $intermediatePropertyMap; 99 98 } 99 100 /** @return \ReflectionProperty[] */ 101 public function getObjectPropertiesIncludingParents(ObjectWrapper $object): array 102 { 103 $properties = []; 104 $reflectionClass = $object->getReflectedObject(); 105 do { 106 $properties = array_merge($properties, $reflectionClass->getProperties()); 107 } while ($reflectionClass = $reflectionClass->getParentClass()); 108 return $properties; 109 } 100 110 } -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/tests/Unit/Handler/ValueFactoryTest.php
r2904129 r2912552 448 448 } 449 449 450 /** 451 * @covers \JsonMapper\Handler\ValueFactory 452 */ 453 public function testItCanMapToNullWhenPropertyIsNullable(): void 454 { 455 $property = PropertyBuilder::new() 456 ->setName('value') 457 ->addType(\DateTimeImmutable::class, ArrayInformation::notAnArray()) 458 ->setIsNullable(true) 459 ->setVisibility(Visibility::PUBLIC()) 460 ->build(); 461 $propertyMap = new PropertyMap(); 462 $propertyMap->addProperty($property); 463 $jsonMapper = $this->createMock(JsonMapperInterface::class); 464 $valueFactory = new ValueFactory(new ScalarCaster(), new FactoryRegistry(), new FactoryRegistry()); 465 466 $this->assertNull($valueFactory->build($jsonMapper, $property, null)); 467 } 468 450 469 public function scalarValueDataTypes(): array 451 470 { -
fpay-gateway/trunk/vendor/json-mapper/json-mapper/tests/Unit/Middleware/CaseConversionTest.php
r2834802 r2912552 118 118 self::assertObjectHasAttribute('key', $json); 119 119 self::assertEquals('placeholder', $json->key); 120 } 121 122 /** 123 * @covers \JsonMapper\Middleware\CaseConversion 124 */ 125 public function testWillRecursivelyApplyCaseConversionWhenApplied(): void 126 { 127 $middleware = new CaseConversion(TextNotation::STUDLY_CAPS(), TextNotation::CAMEL_CASE(), true); 128 $json = (object) [ 129 'One' => 1, 130 'Object' => (object) ['TwentyOne' => 21], 131 'Array' => [ 132 (object) ['FirstName' => 'Jane', 'LastName' => 'Doe'], 133 (object) ['FirstName' => 'John', 'LastName' => 'Doe'], 134 ] 135 ]; 136 $object = new ObjectWrapper(null, \stdClass::class); 137 138 $middleware->handle($json, $object, new PropertyMap(), $this->createMock(JsonMapperInterface::class)); 139 140 self::assertEquals( 141 (object) [ 142 'one' => 1, 143 'object' => (object) ['twentyOne' => 21], 144 'array' => [ 145 (object) ['firstName' => 'Jane', 'lastName' => 'Doe'], 146 (object) ['firstName' => 'John', 'lastName' => 'Doe'], 147 ] 148 ], 149 $json 150 ); 151 } 152 153 /** 154 * @covers \JsonMapper\Middleware\CaseConversion 155 */ 156 public function testWillNotRecursivelyApplyCaseConversionWhenNotApplied(): void 157 { 158 $middleware = new CaseConversion(TextNotation::STUDLY_CAPS(), TextNotation::CAMEL_CASE(), false); 159 $json = (object) [ 160 'One' => 1, 161 'Object' => (object) ['TwentyOne' => 21], 162 'Array' => [ 163 (object) ['FirstName' => 'Jane', 'LastName' => 'Doe'], 164 (object) ['FirstName' => 'John', 'LastName' => 'Doe'], 165 ] 166 ]; 167 $object = new ObjectWrapper(null, \stdClass::class); 168 169 $middleware->handle($json, $object, new PropertyMap(), $this->createMock(JsonMapperInterface::class)); 170 171 self::assertEquals( 172 (object) [ 173 'one' => 1, 174 'object' => (object) ['TwentyOne' => 21], 175 'array' => [ 176 (object) ['FirstName' => 'Jane', 'LastName' => 'Doe'], 177 (object) ['FirstName' => 'John', 'LastName' => 'Doe'], 178 ] 179 ], 180 $json 181 ); 120 182 } 121 183 -
fpay-gateway/trunk/vendor/react/promise/CHANGELOG.md
r2834802 r2912552 1 1 CHANGELOG for 2.x 2 2 ================= 3 4 ## 2.10.0 (2023-05-02) 5 6 * Feature: Support Disjunctive Normal Form Types (DNF types) for PHP 8.2+. 7 (#237 by @nhedger) 8 9 Feature: Add full support for PHP 8.2. 10 (#233 by @WyriHaximus and #241 by @clue) 11 12 * Improve examples in documentation. 13 (#226 by @nhedger) 14 15 * Improve test suite and project setup and report failed assertions. 16 (#215 and #217 by @SimonFrings and #241 by @clue) 3 17 4 18 * 2.9.0 (2022-02-11) -
fpay-gateway/trunk/vendor/react/promise/README.md
r2834802 r2912552 5 5 [CommonJS Promises/A](http://wiki.commonjs.org/wiki/Promises/A) for PHP. 6 6 7 [](https://github.com/reactphp/promise/actions) 7 [](https://github.com/reactphp/promise/actions) 8 [](https://packagist.org/packages/react/promise) 8 9 9 10 Table of Contents … … 850 851 851 852 ```bash 852 $ composer require react/promise:^2.9 853 composer require react/promise:^2.10 853 854 ``` 854 855 -
fpay-gateway/trunk/vendor/react/promise/composer.json
r2834802 r2912552 29 29 }, 30 30 "require-dev": { 31 "phpunit/phpunit": "^9. 3|| ^5.7 || ^4.8.36"31 "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" 32 32 }, 33 33 "autoload": { -
fpay-gateway/trunk/vendor/react/promise/src/functions.php
r2834802 r2912552 355 355 // Extract the type of the argument and handle different possibilities 356 356 $type = $expectedException->getType(); 357 357 358 358 $isTypeUnion = true; 359 359 $types = []; … … 380 380 381 381 foreach ($types as $type) { 382 if (!$type instanceof \ReflectionNamedType) { 383 throw new \LogicException('This implementation does not support groups of intersection or union types'); 382 383 if ($type instanceof \ReflectionIntersectionType) { 384 foreach ($type->getTypes() as $typeToMatch) { 385 if (!($matches = ($typeToMatch->isBuiltin() && \gettype($object) === $typeToMatch->getName()) 386 || (new \ReflectionClass($typeToMatch->getName()))->isInstance($object))) { 387 break; 388 } 389 } 390 } else { 391 $matches = ($type->isBuiltin() && \gettype($object) === $type->getName()) 392 || (new \ReflectionClass($type->getName()))->isInstance($object); 384 393 } 385 386 // A named-type can be either a class-name or a built-in type like string, int, array, etc.387 $matches = ($type->isBuiltin() && \gettype($object) === $type->getName())388 || (new \ReflectionClass($type->getName()))->isInstance($object);389 390 394 391 395 // If we look for a single match (union), we can return early on match -
fpay-gateway/trunk/vendor/seld/jsonlint/CHANGELOG.md
r2834802 r2912552 1 1 You can find newer changelog entries in [GitHub releases](https://github.com/Seldaek/jsonlint/releases) 2 3 ### 1.10.0 (2023-05-11) 4 5 * Added ALLOW_COMMENTS flag to parse while allowing (and ignoring) inline `//` and multiline `/* */` comments in the JSON document (#81) 6 7 ### 1.9.0 (2022-04-01) 8 9 * Internal cleanups and type fixes 2 10 3 11 ### 1.8.1 (2020-08-13) -
fpay-gateway/trunk/vendor/seld/jsonlint/README.md
r2834802 r2912552 35 35 - `JsonParser::ALLOW_DUPLICATE_KEYS` collects duplicate keys. e.g. if you have two `foo` keys they will end up as `foo` and `foo.2`. 36 36 - `JsonParser::PARSE_TO_ASSOC` parses to associative arrays instead of stdClass objects. 37 - `JsonParser::ALLOW_COMMENTS` parses while allowing (and ignoring) inline `//` and multiline `/* */` comments in the JSON document. 37 38 38 39 Example: -
fpay-gateway/trunk/vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php
r2834802 r2912552 31 31 const ALLOW_DUPLICATE_KEYS = 2; 32 32 const PARSE_TO_ASSOC = 4; 33 const ALLOW_COMMENTS = 8; 33 34 34 35 /** @var Lexer */ … … 37 38 /** 38 39 * @var int 39 * @p salm-var int-mask-of<self::*>40 * @phpstan-var int-mask-of<self::*> 40 41 */ 41 42 private $flags; … … 178 179 * @param int $flags Bitmask of parse/lint options (see constants of this class) 179 180 * @return null|ParsingException null if no error is found, a ParsingException containing all details otherwise 181 * 182 * @phpstan-param int-mask-of<self::*> $flags 180 183 */ 181 184 public function lint($input, $flags = 0) … … 194 197 * @return mixed 195 198 * @throws ParsingException 199 * 200 * @phpstan-param int-mask-of<self::*> $flags 196 201 */ 197 202 public function parse($input, $flags = 0) … … 211 216 $recovering = 0; 212 217 213 $this->lexer = new Lexer( );218 $this->lexer = new Lexer($flags); 214 219 $this->lexer->setInput($input); 215 220 -
fpay-gateway/trunk/vendor/seld/jsonlint/src/Seld/JsonLint/Lexer.php
r2834802 r2912552 25 25 const T_SKIP_WHITESPACE = 0; 26 26 const T_ERROR = 2; 27 28 /** 29 * @phpstan-var array<int<0,13>, string> 27 /** @internal */ 28 const T_BREAK_LINE = 3; 29 /** @internal */ 30 const T_COMMENT = 30; 31 /** @internal */ 32 const T_OPEN_COMMENT = 31; 33 /** @internal */ 34 const T_CLOSE_COMMENT = 32; 35 36 /** 37 * @phpstan-var array<int<0,17>, string> 30 38 * @const 31 39 */ 32 40 private $rules = array( 33 0 => '/\G\s+/', 34 1 => '/\G-?([0-9]|[1-9][0-9]+)(\.[0-9]+)?([eE][+-]?[0-9]+)?\b/', 35 2 => '{\G"(?>\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^\0-\x1f\\\\"]++)*+"}', 36 3 => '/\G\{/', 37 4 => '/\G\}/', 38 5 => '/\G\[/', 39 6 => '/\G\]/', 40 7 => '/\G,/', 41 8 => '/\G:/', 42 9 => '/\Gtrue\b/', 43 10 => '/\Gfalse\b/', 44 11 => '/\Gnull\b/', 45 12 => '/\G$/', 46 13 => '/\G./', 41 0 => '/\G\s*\n\r?/', 42 1 => '/\G\s+/', 43 2 => '/\G-?([0-9]|[1-9][0-9]+)(\.[0-9]+)?([eE][+-]?[0-9]+)?\b/', 44 3 => '{\G"(?>\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^\0-\x1f\\\\"]++)*+"}', 45 4 => '/\G\{/', 46 5 => '/\G\}/', 47 6 => '/\G\[/', 48 7 => '/\G\]/', 49 8 => '/\G,/', 50 9 => '/\G:/', 51 10 => '/\Gtrue\b/', 52 11 => '/\Gfalse\b/', 53 12 => '/\Gnull\b/', 54 13 => '/\G$/', 55 14 => '/\G\/\//', 56 15 => '/\G\/\*/', 57 16 => '/\G\*\//', 58 17 => '/\G./', 47 59 ); 48 60 … … 55 67 /** @var 0|positive-int */ 56 68 private $offset; 69 /** @var int */ 70 private $flags; 57 71 58 72 /** @var string */ … … 68 82 69 83 /** 70 * @return 1|4|6|8|10|11|14|17|18|21|22|23|24|-1 84 * @param int $flags 85 */ 86 public function __construct($flags = 0) 87 { 88 $this->flags = $flags; 89 } 90 91 /** 92 * @return 0|1|4|6|8|10|11|14|17|18|21|22|23|24|30|-1 71 93 */ 72 94 public function lex() 73 95 { 74 do{96 while (true) { 75 97 $symbol = $this->next(); 76 } while ($symbol === self::T_SKIP_WHITESPACE); 77 78 return $symbol; 98 switch ($symbol) { 99 case self::T_SKIP_WHITESPACE: 100 case self::T_BREAK_LINE: 101 break; 102 case self::T_COMMENT: 103 case self::T_OPEN_COMMENT: 104 if (!($this->flags & JsonParser::ALLOW_COMMENTS)) { 105 $this->parseError('Lexical error on line ' . ($this->yylineno+1) . ". Comments are not allowed.\n" . $this->showPosition()); 106 } 107 $this->skipUntil($symbol === self::T_COMMENT ? self::T_BREAK_LINE : self::T_CLOSE_COMMENT); 108 if ($this->done) { 109 // last symbol '/\G$/' before EOF 110 return 14; 111 } 112 break; 113 case self::T_CLOSE_COMMENT: 114 $this->parseError('Lexical error on line ' . ($this->yylineno+1) . ". Unexpected token.\n" . $this->showPosition()); 115 default: 116 return $symbol; 117 } 118 } 79 119 } 80 120 … … 161 201 162 202 /** 163 * @return 0|1|4|6|8|10|11|14|17|18|21|22|23|24|-1 203 * @param int $token 204 * @return void 205 */ 206 private function skipUntil($token) 207 { 208 $symbol = $this->next(); 209 while ($symbol !== $token && false === $this->done) { 210 $symbol = $this->next(); 211 } 212 } 213 214 /** 215 * @return 0|1|3|4|6|8|10|11|14|17|18|21|22|23|24|30|31|32|-1 164 216 */ 165 217 private function next() … … 182 234 } 183 235 184 $rulesLen = 14; // count($this->rules)236 $rulesLen = count($this->rules); 185 237 186 238 for ($i=0; $i < $rulesLen; $i++) { … … 216 268 /** 217 269 * @param int $rule 218 * @return 0| 4|6|8|10|11|14|17|18|21|22|23|24|-1270 * @return 0|3|4|6|8|10|11|14|17|18|21|22|23|24|30|31|32|-1 219 271 */ 220 272 private function performAction($rule) 221 273 { 222 274 switch ($rule) { 223 case 0:/* skip whitespace */ 275 case 0:/* skip break line */ 276 return self::T_BREAK_LINE; 277 case 1:/* skip whitespace */ 224 278 return self::T_SKIP_WHITESPACE; 225 case 1:279 case 2: 226 280 return 6; 227 case 2:281 case 3: 228 282 $this->yytext = substr($this->yytext, 1, $this->yyleng-2); 229 230 283 return 4; 231 case 3:284 case 4: 232 285 return 17; 233 case 4:286 case 5: 234 287 return 18; 235 case 5:288 case 6: 236 289 return 23; 237 case 6:290 case 7: 238 291 return 24; 239 case 7:292 case 8: 240 293 return 22; 241 case 8:294 case 9: 242 295 return 21; 243 case 9:296 case 10: 244 297 return 10; 245 case 1 0:298 case 11: 246 299 return 11; 247 case 1 1:300 case 12: 248 301 return 8; 249 case 1 2:302 case 13: 250 303 return 14; 251 case 13: 304 case 14: 305 return self::T_COMMENT; 306 case 15: 307 return self::T_OPEN_COMMENT; 308 case 16: 309 return self::T_CLOSE_COMMENT; 310 case 17: 252 311 return self::T_INVALID; 253 312 default: -
fpay-gateway/trunk/vendor/symfony/cache/Adapter/PhpFilesAdapter.php
r2904129 r2912552 83 83 84 84 if ($time >= $expiresAt) { 85 $pruned = $this->doUnlink($file) && !file_exists($file) && $pruned;85 $pruned = ($this->doUnlink($file) || !file_exists($file)) && $pruned; 86 86 } 87 87 } -
fpay-gateway/trunk/vendor/symfony/cache/Traits/FilesystemTrait.php
r2904129 r2912552 41 41 if (($expiresAt = (int) fgets($h)) && $time >= $expiresAt) { 42 42 fclose($h); 43 $pruned = @unlink($file) && !file_exists($file) && $pruned;43 $pruned = (@unlink($file) || !file_exists($file)) && $pruned; 44 44 } else { 45 45 fclose($h); -
fpay-gateway/trunk/vendor/symfony/cache/Traits/RedisTrait.php
r2904129 r2912552 333 333 $params['parameters']['password'] = $auth; 334 334 } 335 336 if (isset($params['ssl'])) { 337 foreach ($hosts as $i => $host) { 338 if (!isset($host['ssl'])) { 339 $hosts[$i]['ssl'] = $params['ssl']; 340 } 341 } 342 } 343 335 344 if (1 === \count($hosts) && !($params['redis_cluster'] || $params['redis_sentinel'])) { 336 345 $hosts = $hosts[0]; … … 341 350 $params['exceptions'] = false; 342 351 343 $redis = new $class($hosts, array_diff_key($params, array_diff_key(self::$defaultConnectionOptions, ['ssl' => null])));352 $redis = new $class($hosts, array_diff_key($params, self::$defaultConnectionOptions)); 344 353 if (isset($params['redis_sentinel'])) { 345 354 $redis->getConnection()->setSentinelTimeout($params['timeout']); -
fpay-gateway/trunk/vendor/symfony/console/Command/DumpCompletionCommand.php
r2880636 r2912552 133 133 private function getSupportedShells(): array 134 134 { 135 return array_map(function ($f) { 136 return pathinfo($f, \PATHINFO_EXTENSION); 137 }, glob(__DIR__.'/../Resources/completion.*')); 135 $shells = []; 136 137 foreach (new \DirectoryIterator(__DIR__.'/../Resources/') as $file) { 138 if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) { 139 $shells[] = $file->getExtension(); 140 } 141 } 142 143 return $shells; 138 144 } 139 145 } -
fpay-gateway/trunk/vendor/symfony/console/Helper/Table.php
r2834802 r2912552 806 806 $textLength = Helper::width($textContent); 807 807 if ($textLength > 0) { 808 $contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan()));808 $contentColumns = mb_str_split($textContent, ceil($textLength / $cell->getColspan())); 809 809 foreach ($contentColumns as $position => $content) { 810 810 $row[$i + $position] = $content; -
fpay-gateway/trunk/vendor/symfony/console/Terminal.php
r2834802 r2912552 78 78 { 79 79 if ('\\' === \DIRECTORY_SEPARATOR) { 80 if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { 80 $ansicon = getenv('ANSICON'); 81 if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) { 81 82 // extract [w, H] from "wxh (WxH)" 82 83 // or [w, h] from "wxh" … … 158 159 ]; 159 160 161 $cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0; 162 160 163 $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); 161 164 if (!\is_resource($process)) { … … 168 171 proc_close($process); 169 172 173 if ($cp) { 174 sapi_windows_cp_set($cp); 175 } 176 170 177 return $info; 171 178 } -
fpay-gateway/trunk/vendor/symfony/filesystem/Filesystem.php
r2834802 r2912552 171 171 } elseif (is_dir($file)) { 172 172 if (!$isRecursive) { 173 $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '- .'));173 $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-_')); 174 174 175 175 if (file_exists($tmpName)) { -
fpay-gateway/trunk/vendor/symfony/process/PhpExecutableFinder.php
r2834802 r2912552 57 57 58 58 // PHP_BINARY return the current sapi executable 59 if (\PHP_BINARY && \in_array(\PHP_SAPI, ['c gi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) {59 if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], true)) { 60 60 return \PHP_BINARY.$args; 61 61 } -
fpay-gateway/trunk/vendor_fpay/guzzlehttp/guzzle/src/Client.php
r2836223 r2912552 444 444 } 445 445 446 if (isset($options['version'])) { 447 $modify['version'] = $options['version']; 448 } 449 446 450 $request = Psr7\Utils::modifyRequest($request, $modify); 447 451 if ($request->getBody() instanceof Psr7\MultipartStream) { -
fpay-gateway/trunk/vendor_fpay/guzzlehttp/guzzle/src/Cookie/SetCookie.php
r2836223 r2912552 81 81 public function __construct(array $data = []) 82 82 { 83 /** @var array|null $replaced will be null in case of replace error */ 84 $replaced = \array_replace(self::$defaults, $data); 85 if ($replaced === null) { 86 throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.'); 87 } 88 89 $this->data = $replaced; 83 $this->data = self::$defaults; 84 85 if (isset($data['Name'])) { 86 $this->setName($data['Name']); 87 } 88 89 if (isset($data['Value'])) { 90 $this->setValue($data['Value']); 91 } 92 93 if (isset($data['Domain'])) { 94 $this->setDomain($data['Domain']); 95 } 96 97 if (isset($data['Path'])) { 98 $this->setPath($data['Path']); 99 } 100 101 if (isset($data['Max-Age'])) { 102 $this->setMaxAge($data['Max-Age']); 103 } 104 105 if (isset($data['Expires'])) { 106 $this->setExpires($data['Expires']); 107 } 108 109 if (isset($data['Secure'])) { 110 $this->setSecure($data['Secure']); 111 } 112 113 if (isset($data['Discard'])) { 114 $this->setDiscard($data['Discard']); 115 } 116 117 if (isset($data['HttpOnly'])) { 118 $this->setHttpOnly($data['HttpOnly']); 119 } 120 121 // Set the remaining values that don't have extra validation logic 122 foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) { 123 $this->data[$key] = $data[$key]; 124 } 125 90 126 // Extract the Expires value and turn it into a UNIX timestamp if needed 91 127 if (!$this->getExpires() && $this->getMaxAge()) { -
fpay-gateway/trunk/vendor_fpay/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r2901917 r2912552 231 231 \CURLOPT_RETURNTRANSFER => false, 232 232 \CURLOPT_HEADER => false, 233 \CURLOPT_CONNECTTIMEOUT => 150,233 \CURLOPT_CONNECTTIMEOUT => 300, 234 234 ]; 235 235 … … 459 459 } 460 460 461 if (isset($options['crypto_method'])) { 462 if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 463 if (!defined('CURL_SSLVERSION_TLSv1_0')) { 464 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); 465 } 466 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; 467 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { 468 if (!defined('CURL_SSLVERSION_TLSv1_1')) { 469 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL'); 470 } 471 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; 472 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { 473 if (!defined('CURL_SSLVERSION_TLSv1_2')) { 474 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); 475 } 476 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 477 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 478 if (!defined('CURL_SSLVERSION_TLSv1_3')) { 479 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 480 } 481 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; 482 } else { 483 throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); 484 } 485 } 486 461 487 if (isset($options['cert'])) { 462 488 $cert = $options['cert']; -
fpay-gateway/trunk/vendor_fpay/guzzlehttp/guzzle/src/Handler/StreamHandler.php
r2836223 r2912552 395 395 $body = (string) $request->getBody(); 396 396 397 if ( !empty($body)) {397 if ('' !== $body) { 398 398 $context['http']['content'] = $body; 399 399 // Prevent the HTTP handler from adding a Content-Type header. … … 477 477 $options['http']['timeout'] = $value; 478 478 } 479 } 480 481 /** 482 * @param mixed $value as passed via Request transfer options. 483 */ 484 private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void 485 { 486 if ( 487 $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT 488 || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT 489 || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT 490 || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) 491 ) { 492 $options['http']['crypto_method'] = $value; 493 494 return; 495 } 496 497 throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); 479 498 } 480 499 -
fpay-gateway/trunk/vendor_fpay/guzzlehttp/guzzle/src/RequestOptions.php
r2836223 r2912552 77 77 * connect_timeout: (float, default=0) Float describing the number of 78 78 * seconds to wait while trying to connect to a server. Use 0 to wait 79 * indefinitely(the default behavior).79 * 300 seconds (the default behavior). 80 80 */ 81 81 public const CONNECT_TIMEOUT = 'connect_timeout'; 82 83 /** 84 * crypto_method: (int) A value describing the minimum TLS protocol 85 * version to use. 86 * 87 * This setting must be set to one of the 88 * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is 89 * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required 90 * in order to specify a crypto method, with cURL 7.52.0 or higher being 91 * required to use TLS 1.3. 92 */ 93 public const CRYPTO_METHOD = 'crypto_method'; 82 94 83 95 /** -
fpay-gateway/trunk/version.txt
r2904111 r2912552 1 2.5. 61 2.5.7
Note: See TracChangeset
for help on using the changeset viewer.