From 82370e1b3fac63570043ae81fb62789e2a910ced Mon Sep 17 00:00:00 2001 From: Jakub Polomsky Date: Wed, 11 Nov 2020 11:43:40 +0100 Subject: [PATCH] clean up file tree remove composer dependencies from the repository move composer.json and composer.lock to top level directory --- .gitignore | 2 + .../composer.lock => composer.lock | 0 woocommerce-qenta-checkout-page/composer.json | 18 - .../tests/confirm.txt => .gitkeep} | 0 .../vendor/autoload.php | 7 - .../vendor/composer/ClassLoader.php | 445 ----- .../vendor/composer/InstalledVersions.php | 295 ---- .../vendor/composer/LICENSE | 21 - .../vendor/composer/autoload_classmap.php | 11 - .../vendor/composer/autoload_files.php | 13 - .../vendor/composer/autoload_namespaces.php | 11 - .../vendor/composer/autoload_psr4.php | 14 - .../vendor/composer/autoload_real.php | 75 - .../vendor/composer/autoload_static.php | 85 - .../vendor/composer/installed.json | 515 ------ .../vendor/composer/installed.php | 110 -- .../vendor/composer/platform_check.php | 21 - .../vendor/guzzlehttp/guzzle/CHANGELOG.md | 1450 ---------------- .../vendor/guzzlehttp/guzzle/LICENSE | 19 - .../vendor/guzzlehttp/guzzle/README.md | 79 - .../vendor/guzzlehttp/guzzle/UPGRADING.md | 1253 -------------- .../vendor/guzzlehttp/guzzle/composer.json | 72 - .../guzzlehttp/guzzle/src/BodySummarizer.php | 28 - .../guzzle/src/BodySummarizerInterface.php | 13 - .../vendor/guzzlehttp/guzzle/src/Client.php | 474 ------ .../guzzlehttp/guzzle/src/ClientInterface.php | 84 - .../guzzlehttp/guzzle/src/ClientTrait.php | 241 --- .../guzzle/src/Cookie/CookieJar.php | 313 ---- .../guzzle/src/Cookie/CookieJarInterface.php | 79 - .../guzzle/src/Cookie/FileCookieJar.php | 101 -- .../guzzle/src/Cookie/SessionCookieJar.php | 77 - .../guzzle/src/Cookie/SetCookie.php | 410 ----- .../src/Exception/BadResponseException.php | 39 - .../guzzle/src/Exception/ClientException.php | 10 - .../guzzle/src/Exception/ConnectException.php | 56 - .../guzzle/src/Exception/GuzzleException.php | 9 - .../Exception/InvalidArgumentException.php | 7 - .../guzzle/src/Exception/RequestException.php | 166 -- .../guzzle/src/Exception/ServerException.php | 10 - .../Exception/TooManyRedirectsException.php | 7 - .../src/Exception/TransferException.php | 7 - .../guzzle/src/Handler/CurlFactory.php | 586 ------- .../src/Handler/CurlFactoryInterface.php | 25 - .../guzzle/src/Handler/CurlHandler.php | 49 - .../guzzle/src/Handler/CurlMultiHandler.php | 253 --- .../guzzle/src/Handler/EasyHandle.php | 118 -- .../guzzle/src/Handler/MockHandler.php | 211 --- .../guzzlehttp/guzzle/src/Handler/Proxy.php | 51 - .../guzzle/src/Handler/StreamHandler.php | 527 ------ .../guzzlehttp/guzzle/src/HandlerStack.php | 271 --- .../guzzle/src/MessageFormatter.php | 198 --- .../guzzle/src/MessageFormatterInterface.php | 18 - .../guzzlehttp/guzzle/src/Middleware.php | 260 --- .../vendor/guzzlehttp/guzzle/src/Pool.php | 125 -- .../guzzle/src/PrepareBodyMiddleware.php | 104 -- .../guzzle/src/RedirectMiddleware.php | 216 --- .../guzzlehttp/guzzle/src/RequestOptions.php | 264 --- .../guzzlehttp/guzzle/src/RetryMiddleware.php | 116 -- .../guzzlehttp/guzzle/src/TransferStats.php | 133 -- .../vendor/guzzlehttp/guzzle/src/Utils.php | 387 ----- .../guzzlehttp/guzzle/src/functions.php | 167 -- .../guzzle/src/functions_include.php | 6 - .../vendor/guzzlehttp/promises/.php_cs.dist | 88 - .../vendor/guzzlehttp/promises/CHANGELOG.md | 81 - .../vendor/guzzlehttp/promises/LICENSE | 19 - .../vendor/guzzlehttp/promises/Makefile | 13 - .../vendor/guzzlehttp/promises/README.md | 532 ------ .../vendor/guzzlehttp/promises/composer.json | 39 - .../guzzlehttp/promises/phpstan-baseline.neon | 7 - .../guzzlehttp/promises/phpstan.neon.dist | 10 - .../vendor/guzzlehttp/promises/psalm.xml | 15 - .../promises/src/AggregateException.php | 17 - .../promises/src/CancellationException.php | 10 - .../guzzlehttp/promises/src/Coroutine.php | 169 -- .../vendor/guzzlehttp/promises/src/Create.php | 84 - .../vendor/guzzlehttp/promises/src/Each.php | 90 - .../guzzlehttp/promises/src/EachPromise.php | 253 --- .../promises/src/FulfilledPromise.php | 84 - .../vendor/guzzlehttp/promises/src/Is.php | 46 - .../guzzlehttp/promises/src/Promise.php | 278 ---- .../promises/src/PromiseInterface.php | 97 -- .../promises/src/PromisorInterface.php | 16 - .../promises/src/RejectedPromise.php | 91 - .../promises/src/RejectionException.php | 48 - .../guzzlehttp/promises/src/TaskQueue.php | 67 - .../promises/src/TaskQueueInterface.php | 24 - .../vendor/guzzlehttp/promises/src/Utils.php | 274 --- .../guzzlehttp/promises/src/functions.php | 363 ---- .../promises/src/functions_include.php | 6 - .../vendor/guzzlehttp/psr7/CHANGELOG.md | 270 --- .../vendor/guzzlehttp/psr7/LICENSE | 19 - .../vendor/guzzlehttp/psr7/README.md | 809 --------- .../vendor/guzzlehttp/psr7/composer.json | 49 - .../guzzlehttp/psr7/src/AppendStream.php | 244 --- .../guzzlehttp/psr7/src/BufferStream.php | 140 -- .../guzzlehttp/psr7/src/CachingStream.php | 139 -- .../guzzlehttp/psr7/src/DroppingStream.php | 43 - .../vendor/guzzlehttp/psr7/src/FnStream.php | 160 -- .../vendor/guzzlehttp/psr7/src/Header.php | 71 - .../guzzlehttp/psr7/src/InflateStream.php | 53 - .../guzzlehttp/psr7/src/LazyOpenStream.php | 40 - .../guzzlehttp/psr7/src/LimitStream.php | 156 -- .../vendor/guzzlehttp/psr7/src/Message.php | 252 --- .../guzzlehttp/psr7/src/MessageTrait.php | 214 --- .../vendor/guzzlehttp/psr7/src/MimeType.php | 140 -- .../guzzlehttp/psr7/src/MultipartStream.php | 154 -- .../guzzlehttp/psr7/src/NoSeekStream.php | 23 - .../vendor/guzzlehttp/psr7/src/PumpStream.php | 168 -- .../vendor/guzzlehttp/psr7/src/Query.php | 108 -- .../vendor/guzzlehttp/psr7/src/Request.php | 152 -- .../vendor/guzzlehttp/psr7/src/Response.php | 155 -- .../vendor/guzzlehttp/psr7/src/Rfc7230.php | 18 - .../guzzlehttp/psr7/src/ServerRequest.php | 378 ----- .../vendor/guzzlehttp/psr7/src/Stream.php | 270 --- .../psr7/src/StreamDecoratorTrait.php | 151 -- .../guzzlehttp/psr7/src/StreamWrapper.php | 163 -- .../guzzlehttp/psr7/src/UploadedFile.php | 325 ---- .../vendor/guzzlehttp/psr7/src/Uri.php | 761 --------- .../guzzlehttp/psr7/src/UriNormalizer.php | 217 --- .../guzzlehttp/psr7/src/UriResolver.php | 220 --- .../vendor/guzzlehttp/psr7/src/Utils.php | 398 ----- .../vendor/guzzlehttp/psr7/src/functions.php | 417 ----- .../guzzlehttp/psr7/src/functions_include.php | 6 - .../mobiledetect/mobiledetectlib/LICENSE.txt | 48 - .../mobiledetectlib/Mobile_Detect.json | 1 - .../mobiledetectlib/Mobile_Detect.php | 1477 ----------------- .../mobiledetect/mobiledetectlib/README.md | 344 ---- .../mobiledetectlib/composer.json | 31 - .../mobiledetectlib/composer.lock | 983 ----------- .../mobiledetectlib/docker-compose.yml | 16 - .../mobiledetectlib/docs/CONTRIBUTING.md | 48 - .../mobiledetectlib/docs/HISTORY.md | 11 - .../mobiledetectlib/docs/ISSUE_TEMPLATE.md | 15 - .../mobiledetectlib/docs/KNOWN_LIMITATIONS.md | 12 - .../mobiledetectlib/export/exportToJSON.php | 67 - .../namespaced/Detection/MobileDetect.php | 22 - .../mobiledetect/mobiledetectlib/phpcs.xml | 20 - .../vendor/psr/http-client/CHANGELOG.md | 23 - .../vendor/psr/http-client/LICENSE | 19 - .../vendor/psr/http-client/README.md | 12 - .../vendor/psr/http-client/composer.json | 27 - .../src/ClientExceptionInterface.php | 10 - .../psr/http-client/src/ClientInterface.php | 20 - .../src/NetworkExceptionInterface.php | 24 - .../src/RequestExceptionInterface.php | 24 - .../vendor/psr/http-message/CHANGELOG.md | 36 - .../vendor/psr/http-message/LICENSE | 19 - .../vendor/psr/http-message/README.md | 13 - .../vendor/psr/http-message/composer.json | 26 - .../psr/http-message/src/MessageInterface.php | 187 --- .../psr/http-message/src/RequestInterface.php | 129 -- .../http-message/src/ResponseInterface.php | 68 - .../src/ServerRequestInterface.php | 261 --- .../psr/http-message/src/StreamInterface.php | 158 -- .../src/UploadedFileInterface.php | 123 -- .../psr/http-message/src/UriInterface.php | 323 ---- .../.github/workflows/phpunit.yml | 23 - .../qenta/checkout-client-library/.gitignore | 5 - .../qenta/checkout-client-library/LICENSE | 339 ---- .../qenta/checkout-client-library/README.md | 8 - .../checkout-client-library/composer.json | 27 - .../library/QentaCEE/QMore/BackendClient.php | 619 ------- .../QentaCEE/QMore/Config/client.config.php | 41 - .../QentaCEE/QMore/Config/user.config.php | 46 - .../Exception/ExceptionInterface.php | 42 - .../Exception/InvalidArgumentException.php | 42 - .../QMore/DataStorage/Request/Read.php | 147 -- .../QMore/DataStorage/Response/Initiation.php | 93 -- .../QMore/DataStorage/Response/Read.php | 237 --- .../QentaCEE/QMore/DataStorageClient.php | 504 ------ .../library/QentaCEE/QMore/Error.php | 100 -- .../Exception/BadMethodCallException.php | 42 - .../QMore/Exception/ExceptionInterface.php | 42 - .../Exception/InvalidArgumentException.php | 42 - .../Exception/InvalidParamLengthException.php | 42 - .../Exception/InvalidResponseException.php | 42 - .../library/QentaCEE/QMore/FrontendClient.php | 830 --------- .../library/QentaCEE/QMore/Module.php | 64 - .../library/QentaCEE/QMore/PaymentType.php | 41 - .../QMore/Request/Backend/TransferFund.php | 122 -- .../Request/Backend/TransferFund/Existing.php | 83 - .../Request/Backend/TransferFund/Moneta.php | 84 - .../Request/Backend/TransferFund/SepaCT.php | 90 - .../Backend/TransferFund/SkrillWallet.php | 84 - .../Response/Backend/ApproveReversal.php | 42 - .../QMore/Response/Backend/Deposit.php | 59 - .../Response/Backend/DepositReversal.php | 42 - .../Response/Backend/FinancialObject.php | 80 - .../Backend/GetFinancialInstitutions.php | 47 - .../Response/Backend/GetOrderDetails.php | 111 -- .../QentaCEE/QMore/Response/Backend/Order.php | 465 ------ .../QMore/Response/Backend/Order/Credit.php | 250 --- .../Response/Backend/Order/CreditIterator.php | 42 - .../Response/Backend/Order/OrderIterator.php | 118 -- .../QMore/Response/Backend/Order/Payment.php | 304 ---- .../Response/Backend/Order/Payment/Ideal.php | 95 -- .../Response/Backend/Order/Payment/Paypal.php | 275 --- .../Order/Payment/Sofortueberweisung.php | 185 --- .../Backend/Order/PaymentIterator.php | 42 - .../QMore/Response/Backend/RecurPayment.php | 59 - .../QMore/Response/Backend/Refund.php | 59 - .../QMore/Response/Backend/RefundReversal.php | 42 - .../Response/Backend/ResponseAbstract.php | 60 - .../QMore/Response/Backend/TransferFund.php | 59 - .../QentaCEE/QMore/Response/Initiation.php | 54 - .../QMore/Response/ResponseAbstract.php | 124 -- .../library/QentaCEE/QMore/Return/Cancel.php | 42 - .../library/QentaCEE/QMore/Return/Failure.php | 80 - .../library/QentaCEE/QMore/Return/Pending.php | 47 - .../library/QentaCEE/QMore/Return/Success.php | 47 - .../QMore/Return/Success/CreditCard.php | 47 - .../QentaCEE/QMore/Return/Success/Ideal.php | 47 - .../QentaCEE/QMore/Return/Success/PayPal.php | 47 - .../QentaCEE/QMore/Return/Success/SepaDD.php | 47 - .../Return/Success/Sofortueberweisung.php | 46 - .../library/QentaCEE/QMore/ReturnFactory.php | 141 -- .../QentaCEE/QPay/Config/client.config.php | 41 - .../QentaCEE/QPay/Config/user.config.php | 47 - .../library/QentaCEE/QPay/Error.php | 51 - .../QPay/Exception/BadMethodCallException.php | 42 - .../QPay/Exception/ExceptionInterface.php | 42 - .../Exception/InvalidArgumentException.php | 42 - .../Exception/InvalidParamLengthException.php | 42 - .../Exception/InvalidResponseException.php | 42 - .../library/QentaCEE/QPay/FrontendClient.php | 946 ----------- .../library/QentaCEE/QPay/MobileDetect.php | 53 - .../library/QentaCEE/QPay/Module.php | 63 - .../library/QentaCEE/QPay/PaymentType.php | 46 - .../QPay/Request/Backend/TransferFund.php | 122 -- .../Request/Backend/TransferFund/Existing.php | 84 - .../Request/Backend/TransferFund/Moneta.php | 85 - .../Request/Backend/TransferFund/SepaCT.php | 90 - .../Backend/TransferFund/SkrillWallet.php | 85 - .../QentaCEE/QPay/Response/Initiation.php | 51 - .../QPay/Response/ResponseAbstract.php | 72 - .../QPay/Response/Toolkit/ApproveReversal.php | 42 - .../QPay/Response/Toolkit/Deposit.php | 58 - .../QPay/Response/Toolkit/DepositReversal.php | 42 - .../QPay/Response/Toolkit/FinancialObject.php | 68 - .../QPay/Response/Toolkit/GetOrderDetails.php | 110 -- .../QentaCEE/QPay/Response/Toolkit/Order.php | 473 ------ .../QPay/Response/Toolkit/Order/Credit.php | 251 --- .../Response/Toolkit/Order/CreditIterator.php | 43 - .../Response/Toolkit/Order/OrderIterator.php | 114 -- .../QPay/Response/Toolkit/Order/Payment.php | 304 ---- .../Response/Toolkit/Order/Payment/Ideal.php | 95 -- .../Response/Toolkit/Order/Payment/Paypal.php | 275 --- .../Order/Payment/Sofortueberweisung.php | 185 --- .../Toolkit/Order/PaymentIterator.php | 42 - .../QPay/Response/Toolkit/RecurPayment.php | 59 - .../QentaCEE/QPay/Response/Toolkit/Refund.php | 59 - .../QPay/Response/Toolkit/RefundReversal.php | 42 - .../Response/Toolkit/ResponseAbstract.php | 76 - .../QPay/Response/Toolkit/TransferFund.php | 59 - .../library/QentaCEE/QPay/Return/Cancel.php | 42 - .../library/QentaCEE/QPay/Return/Failure.php | 57 - .../library/QentaCEE/QPay/Return/Pending.php | 42 - .../library/QentaCEE/QPay/Return/Success.php | 42 - .../QPay/Return/Success/CreditCard.php | 42 - .../QentaCEE/QPay/Return/Success/Ideal.php | 42 - .../QentaCEE/QPay/Return/Success/PayPal.php | 42 - .../Return/Success/Sofortueberweisung.php | 42 - .../library/QentaCEE/QPay/ReturnFactory.php | 138 -- .../library/QentaCEE/QPay/ToolkitClient.php | 592 ------- .../library/QentaCEE/Stdlib/Basket.php | 164 -- .../library/QentaCEE/Stdlib/Basket/Item.php | 276 --- .../QentaCEE/Stdlib/Client/ClientAbstract.php | 537 ------ .../Client/Exception/ExceptionInterface.php | 42 - .../Exception/InvalidResponseException.php | 42 - .../library/QentaCEE/Stdlib/Config.php | 239 --- .../QentaCEE/Stdlib/Config/client.config.php | 41 - .../library/QentaCEE/Stdlib/ConsumerData.php | 332 ---- .../QentaCEE/Stdlib/ConsumerData/Address.php | 332 ---- .../library/QentaCEE/Stdlib/Error.php | 104 -- .../Stdlib/Exception/ExceptionInterface.php | 42 - .../Exception/InvalidArgumentException.php | 42 - .../Exception/InvalidFormatException.php | 42 - .../Exception/InvalidResponseException.php | 42 - .../Stdlib/Exception/InvalidTypeException.php | 42 - .../Exception/InvalidValueException.php | 42 - .../Exception/UnexpectedValueException.php | 42 - .../library/QentaCEE/Stdlib/Fingerprint.php | 143 -- .../QentaCEE/Stdlib/FingerprintOrder.php | 199 --- .../library/QentaCEE/Stdlib/Module.php | 52 - .../QentaCEE/Stdlib/Module/ModuleAbstract.php | 60 - .../Stdlib/Module/ModuleInterface.php | 58 - .../QentaCEE/Stdlib/PaymentTypeAbstract.php | 190 --- .../Stdlib/Response/ResponseAbstract.php | 157 -- .../library/QentaCEE/Stdlib/Return/Cancel.php | 49 - .../QentaCEE/Stdlib/Return/Failure.php | 95 -- .../QentaCEE/Stdlib/Return/Pending.php | 102 -- .../QentaCEE/Stdlib/Return/ReturnAbstract.php | 172 -- .../QentaCEE/Stdlib/Return/Success.php | 195 --- .../Stdlib/Return/Success/CreditCard.php | 93 -- .../QentaCEE/Stdlib/Return/Success/Ideal.php | 72 - .../QentaCEE/Stdlib/Return/Success/PayPal.php | 153 -- .../QentaCEE/Stdlib/Return/Success/SepaDD.php | 83 - .../Return/Success/Sofortueberweisung.php | 123 -- .../QentaCEE/Stdlib/ReturnFactoryAbstract.php | 99 -- .../library/QentaCEE/Stdlib/SerialApi.php | 235 --- .../QentaCEE/Stdlib/Validate/Exception.php | 36 - .../QentaCEE/Stdlib/Validate/Fingerprint.php | 338 ---- .../QentaCEE/Stdlib/Validate/Interface.php | 61 - .../Stdlib/Validate/ValidateAbstract.php | 303 ---- .../QentaCEE/QMore/BackendClientTest.php | 255 --- .../InvalidArgumentExceptionTest.php | 100 -- .../QMore/DataStorage/Request/ReadTest.php | 130 -- .../DataStorage/Response/InitiationTest.php | 113 -- .../QMore/DataStorage/Response/ReadTest.php | 79 - .../QentaCEE/QMore/DataStorageClientTest.php | 263 --- .../QentaCEE/QMore/FrontendClientTest.php | 445 ----- .../tests/QentaCEE/QMore/ModuleTest.php | 57 - .../tests/QentaCEE/QMore/PaymentTypeTest.php | 98 -- .../Response/Backend/ApproveReversalTest.php | 113 -- .../Response/Backend/DepositReversalTest.php | 112 -- .../QMore/Response/Backend/DepositTest.php | 145 -- .../Response/Backend/GetOrderDetailsTest.php | 109 -- .../Response/Backend/Order/CreditTest.php | 143 -- .../Response/Backend/Order/IteratorTest.php | 103 -- .../Backend/Order/Payment/IdealTest.php | 94 -- .../Backend/Order/Payment/PaypalTest.php | 151 -- .../Order/Payment/SofortueberweisungTest.php | 126 -- .../Response/Backend/Order/PaymentTest.php | 154 -- .../QMore/Response/Backend/OrderTest.php | 186 --- .../QMore/Response/Backend/OrderTest1.php | 186 --- .../Response/Backend/RecurPaymentTest.php | 124 -- .../Response/Backend/RefundReversalTest.php | 114 -- .../QMore/Response/Backend/RefundTest.php | 152 -- .../QMore/Response/InitiationTest.php | 93 -- .../QentaCEE/QMore/Return/CancelTest.php | 82 - .../QentaCEE/QMore/Return/FailureTest.php | 83 - .../QMore/Return/ReturnAbstractTest.php | 112 -- .../QMore/Return/Success/CreditCardTest.php | 118 -- .../QMore/Return/Success/IdealTest.php | 106 -- .../QMore/Return/Success/PaypalTest.php | 155 -- .../Return/Success/SofortueberweisungTest.php | 136 -- .../QentaCEE/QMore/Return/SuccessTest.php | 191 --- .../QentaCEE/QMore/ReturnFactoryTest.php | 213 --- .../tests/QentaCEE/QPay/ErrorTest.php | 56 - .../Exception/BadMethodCallExceptionTest.php | 99 -- .../InvalidArgumentExceptionTest.php | 99 -- .../InvalidParamLengthExceptionTest.php | 99 -- .../InvalidResponseExceptionTest.php | 99 -- .../QentaCEE/QPay/FrontendClientTest.php | 450 ----- .../tests/QentaCEE/QPay/MobileDetectTest.php | 48 - .../tests/QentaCEE/QPay/ModuleTest.php | 58 - .../tests/QentaCEE/QPay/PaymentTypeTest.php | 98 -- .../QentaCEE/QPay/Response/InitiationTest.php | 92 - .../QPay/Response/ResponseAbstractTest.php | 59 - .../Response/Toolkit/ApproveReversalTest.php | 113 -- .../Response/Toolkit/DepositReversalTest.php | 115 -- .../QPay/Response/Toolkit/DepositTest.php | 147 -- .../Response/Toolkit/GetOrderDetailsTest.php | 104 -- .../Response/Toolkit/Order/CreditTest.php | 140 -- .../Response/Toolkit/Order/IteratorTest.php | 103 -- .../Toolkit/Order/Payment/IdealTest.php | 101 -- .../Toolkit/Order/Payment/PaypalTest.php | 151 -- .../Order/Payment/SofortueberweisungTest.php | 126 -- .../Response/Toolkit/Order/PaymentTest.php | 155 -- .../QPay/Response/Toolkit/OrderTest.php | 186 --- .../QPay/Response/Toolkit/OrderTest1.php | 186 --- .../Response/Toolkit/RecurPaymentTest.php | 120 -- .../Response/Toolkit/RefundReversalTest.php | 112 -- .../QPay/Response/Toolkit/RefundTest.php | 148 -- .../tests/QentaCEE/QPay/Return/CancelTest.php | 81 - .../QentaCEE/QPay/Return/FailureTest.php | 73 - .../QentaCEE/QPay/Return/PendingTest.php | 95 -- .../QPay/Return/ReturnAbstractTest.php | 115 -- .../QPay/Return/Success/CreditCardTest.php | 118 -- .../QPay/Return/Success/IdealTest.php | 106 -- .../QPay/Return/Success/PaypalTest.php | 155 -- .../Return/Success/SofortueberweisungTest.php | 136 -- .../QentaCEE/QPay/Return/SuccessTest.php | 190 --- .../tests/QentaCEE/QPay/ReturnFactoryTest.php | 213 --- .../tests/QentaCEE/QPay/ToolkitClientTest.php | 248 --- .../tests/QentaCEE/Stdlib/Basket/ItemTest.php | 71 - .../tests/QentaCEE/Stdlib/BasketTest.php | 118 -- .../Stdlib/Client/ClientAbstractTest.php | 109 -- .../InvalidResponseExceptionTest.php | 100 -- .../Stdlib/ConsumerData/AddressTest.php | 163 -- .../QentaCEE/Stdlib/ConsumerDataTest.php | 162 -- .../tests/QentaCEE/Stdlib/ErrorTest.php | 78 - .../InvalidArgumentExceptionTest.php | 99 -- .../Exception/InvalidFormatExceptionTest.php | 99 -- .../UnexpectedValueExceptionTest.php | 99 -- .../QentaCEE/Stdlib/FingerprintOrderTest.php | 106 -- .../tests/QentaCEE/Stdlib/FingerprintTest.php | 154 -- .../Stdlib/Module/ModuleAbstractTest.php | 65 - .../tests/QentaCEE/Stdlib/ModuleTest.php | 44 - .../Stdlib/PaymentTypeAbstractTest.php | 110 -- .../tests/QentaCEE/Stdlib/SerialApiTest.php | 329 ---- .../Stdlib/Validate/FingerprintTest.php | 215 --- .../tests/bootstrap.php | 34 - .../tests/configuration.xml | 62 - .../checkout-client-library/tests/confirm.php | 43 - .../vendor/ralouphie/getallheaders/LICENSE | 21 - .../vendor/ralouphie/getallheaders/README.md | 27 - .../ralouphie/getallheaders/composer.json | 26 - .../getallheaders/src/getallheaders.php | 46 - 399 files changed, 2 insertions(+), 55127 deletions(-) rename woocommerce-qenta-checkout-page/composer.lock => composer.lock (100%) delete mode 100755 woocommerce-qenta-checkout-page/composer.json rename woocommerce-qenta-checkout-page/vendor/{qenta/checkout-client-library/tests/confirm.txt => .gitkeep} (100%) delete mode 100644 woocommerce-qenta-checkout-page/vendor/autoload.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/ClassLoader.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/InstalledVersions.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/autoload_classmap.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/autoload_files.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/autoload_namespaces.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/autoload_psr4.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/autoload_real.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/autoload_static.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/installed.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/installed.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/composer/platform_check.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/CHANGELOG.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/UPGRADING.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizer.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Client.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/ClientInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/ClientTrait.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/HandlerStack.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatter.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Middleware.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Pool.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RequestOptions.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/TransferStats.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Utils.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/functions.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/functions_include.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/.php_cs.dist delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/CHANGELOG.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/Makefile delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan-baseline.neon delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan.neon.dist delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/psalm.xml delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/AggregateException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/CancellationException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Coroutine.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Create.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Each.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/EachPromise.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/FulfilledPromise.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Is.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Promise.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/PromiseInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/PromisorInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/RejectedPromise.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/RejectionException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueue.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueueInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Utils.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions_include.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/CHANGELOG.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/AppendStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/BufferStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/CachingStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/DroppingStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/FnStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Header.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/InflateStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LazyOpenStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LimitStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Message.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MessageTrait.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MimeType.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MultipartStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/NoSeekStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/PumpStream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Query.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Request.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Response.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Rfc7230.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/ServerRequest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Stream.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamWrapper.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UploadedFile.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Uri.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriNormalizer.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriResolver.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Utils.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions_include.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/LICENSE.txt delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.lock delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docker-compose.yml delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/CONTRIBUTING.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/HISTORY.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/ISSUE_TEMPLATE.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/phpcs.xml delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/CHANGELOG.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/src/ClientExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/src/ClientInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/src/NetworkExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-client/src/RequestExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/CHANGELOG.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/MessageInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/RequestInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/ResponseInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/ServerRequestInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/StreamInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/UploadedFileInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/psr/http-message/src/UriInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.github/workflows/phpunit.yml delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.gitignore delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/README.md delete mode 100755 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/BackendClient.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/client.config.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/user.config.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Exception/ExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Exception/InvalidArgumentException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Request/Read.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Initiation.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Read.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorageClient.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Error.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/BadMethodCallException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/ExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/InvalidArgumentException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/InvalidParamLengthException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/InvalidResponseException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/FrontendClient.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Module.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/PaymentType.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Existing.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Moneta.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SepaCT.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SkrillWallet.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/ApproveReversal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Deposit.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/DepositReversal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/FinancialObject.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetFinancialInstitutions.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetOrderDetails.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Credit.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/CreditIterator.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/OrderIterator.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Ideal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Paypal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Sofortueberweisung.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/PaymentIterator.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/RecurPayment.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Refund.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/RefundReversal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/ResponseAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/TransferFund.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Initiation.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/ResponseAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Cancel.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Failure.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Pending.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Success.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Success/CreditCard.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Success/Ideal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Success/PayPal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Success/SepaDD.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Success/Sofortueberweisung.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/ReturnFactory.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Config/client.config.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Config/user.config.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Error.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/BadMethodCallException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/ExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/InvalidArgumentException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/InvalidParamLengthException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/InvalidResponseException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/FrontendClient.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/MobileDetect.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Module.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/PaymentType.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Existing.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Moneta.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SepaCT.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SkrillWallet.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Initiation.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/ResponseAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/ApproveReversal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Deposit.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/DepositReversal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/FinancialObject.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/GetOrderDetails.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Credit.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/CreditIterator.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/OrderIterator.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Ideal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Paypal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Sofortueberweisung.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/PaymentIterator.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/RecurPayment.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Refund.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/RefundReversal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/ResponseAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/TransferFund.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Cancel.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Failure.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Pending.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Success.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Success/CreditCard.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Success/Ideal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Success/PayPal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Success/Sofortueberweisung.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/ReturnFactory.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/ToolkitClient.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket/Item.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/ClientAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/Exception/ExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/Exception/InvalidResponseException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Config.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Config/client.config.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData/Address.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Error.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/ExceptionInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/InvalidArgumentException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/InvalidFormatException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/InvalidResponseException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/InvalidTypeException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/InvalidValueException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/UnexpectedValueException.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Fingerprint.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/FingerprintOrder.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Module.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Module/ModuleAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Module/ModuleInterface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/PaymentTypeAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Response/ResponseAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Cancel.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Failure.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Pending.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/ReturnAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/CreditCard.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Ideal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/PayPal.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/SepaDD.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Sofortueberweisung.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ReturnFactoryAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/SerialApi.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Exception.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Fingerprint.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Interface.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/ValidateAbstract.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/BackendClientTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Exception/InvalidArgumentExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Request/ReadTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/InitiationTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/ReadTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorageClientTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/FrontendClientTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ModuleTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/PaymentTypeTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/ApproveReversalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositReversalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/GetOrderDetailsTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/CreditTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/IteratorTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/IdealTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/PaypalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/SofortueberweisungTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/PaymentTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest1.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RecurPaymentTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundReversalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/InitiationTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/CancelTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/FailureTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/ReturnAbstractTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/CreditCardTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/IdealTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/PaypalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/SofortueberweisungTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/SuccessTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ReturnFactoryTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ErrorTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/BadMethodCallExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidArgumentExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidParamLengthExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidResponseExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/FrontendClientTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/MobileDetectTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ModuleTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/PaymentTypeTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/InitiationTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/ResponseAbstractTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/ApproveReversalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositReversalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/GetOrderDetailsTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/CreditTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/IteratorTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/IdealTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/PaypalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/SofortueberweisungTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/PaymentTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest1.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RecurPaymentTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundReversalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/CancelTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/FailureTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/PendingTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/ReturnAbstractTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/CreditCardTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/IdealTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/PaypalTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/SofortueberweisungTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/SuccessTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ReturnFactoryTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ToolkitClientTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Basket/ItemTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/BasketTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/ClientAbstractTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/Exception/InvalidResponseExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerData/AddressTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerDataTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ErrorTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidArgumentExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidFormatExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/UnexpectedValueExceptionTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintOrderTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Module/ModuleAbstractTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ModuleTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/PaymentTypeAbstractTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/SerialApiTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Validate/FingerprintTest.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/bootstrap.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/configuration.xml delete mode 100644 woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/confirm.php delete mode 100644 woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/LICENSE delete mode 100644 woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/README.md delete mode 100644 woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/composer.json delete mode 100644 woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/src/getallheaders.php diff --git a/.gitignore b/.gitignore index bbf29d3..4862555 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ .idea/vcs.xml .idea/woocommerce-wcp.iml .idea/workspace.xml +.idea/php.xml +.idea/woocommerce-qcp.iml diff --git a/woocommerce-qenta-checkout-page/composer.lock b/composer.lock similarity index 100% rename from woocommerce-qenta-checkout-page/composer.lock rename to composer.lock diff --git a/woocommerce-qenta-checkout-page/composer.json b/woocommerce-qenta-checkout-page/composer.json deleted file mode 100755 index 20ec591..0000000 --- a/woocommerce-qenta-checkout-page/composer.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "qenta/woocommerce-qenta-checkout-page", - "license": "GPL-2.0", - "type": "library", - "description": "QENTA Checkout Page plugin for WooCommerce", - "keywords": ["QENTA", "checkout", "page", "seamless", "payment"], - "homepage": "https://www.qenta-cee.at", - "support": { - "email": "support@qenta.com", - "docs": "https://guides.qenta.com" - }, - "require": { - "php": "~7.4.0", - "psr/http-message": "^1.0", - "qenta/checkout-client-library": "^4.0.0" - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/confirm.txt b/woocommerce-qenta-checkout-page/vendor/.gitkeep similarity index 100% rename from woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/confirm.txt rename to woocommerce-qenta-checkout-page/vendor/.gitkeep diff --git a/woocommerce-qenta-checkout-page/vendor/autoload.php b/woocommerce-qenta-checkout-page/vendor/autoload.php deleted file mode 100644 index 986e5fd..0000000 --- a/woocommerce-qenta-checkout-page/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/woocommerce-qenta-checkout-page/vendor/composer/InstalledVersions.php b/woocommerce-qenta-checkout-page/vendor/composer/InstalledVersions.php deleted file mode 100644 index ad7632f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,295 +0,0 @@ - - array ( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'aliases' => - array ( - ), - 'reference' => '70c153650333116c1664f3036cd1cde51b9d3bab', - 'name' => 'qenta/woocommerce-qenta-checkout-page', - ), - 'versions' => - array ( - 'guzzlehttp/guzzle' => - array ( - 'pretty_version' => '7.2.0', - 'version' => '7.2.0.0', - 'aliases' => - array ( - ), - 'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79', - ), - 'guzzlehttp/promises' => - array ( - 'pretty_version' => '1.4.0', - 'version' => '1.4.0.0', - 'aliases' => - array ( - ), - 'reference' => '60d379c243457e073cff02bc323a2a86cb355631', - ), - 'guzzlehttp/psr7' => - array ( - 'pretty_version' => '1.7.0', - 'version' => '1.7.0.0', - 'aliases' => - array ( - ), - 'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3', - ), - 'mobiledetect/mobiledetectlib' => - array ( - 'pretty_version' => '2.8.34', - 'version' => '2.8.34.0', - 'aliases' => - array ( - ), - 'reference' => '6f8113f57a508494ca36acbcfa2dc2d923c7ed5b', - ), - 'psr/http-client' => - array ( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'aliases' => - array ( - ), - 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', - ), - 'psr/http-client-implementation' => - array ( - 'provided' => - array ( - 0 => '1.0', - ), - ), - 'psr/http-message' => - array ( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'aliases' => - array ( - ), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', - ), - 'psr/http-message-implementation' => - array ( - 'provided' => - array ( - 0 => '1.0', - ), - ), - 'qenta/checkout-client-library' => - array ( - 'pretty_version' => '4.0.0', - 'version' => '4.0.0.0', - 'aliases' => - array ( - ), - 'reference' => '9238ddebcc7ba85be2d777155d31b9efcf2e2191', - ), - 'qenta/woocommerce-qenta-checkout-page' => - array ( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'aliases' => - array ( - ), - 'reference' => '70c153650333116c1664f3036cd1cde51b9d3bab', - ), - 'ralouphie/getallheaders' => - array ( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', - 'aliases' => - array ( - ), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', - ), - ), -); - - - - - - - -public static function getInstalledPackages() -{ -return array_keys(self::$installed['versions']); -} - - - - - - - - - -public static function isInstalled($packageName) -{ -return isset(self::$installed['versions'][$packageName]); -} - - - - - - - - - - - - - - -public static function satisfies(VersionParser $parser, $packageName, $constraint) -{ -$constraint = $parser->parseConstraints($constraint); -$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - -return $provided->matches($constraint); -} - - - - - - - - - - -public static function getVersionRanges($packageName) -{ -if (!isset(self::$installed['versions'][$packageName])) { -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - -$ranges = array(); -if (isset(self::$installed['versions'][$packageName]['pretty_version'])) { -$ranges[] = self::$installed['versions'][$packageName]['pretty_version']; -} -if (array_key_exists('aliases', self::$installed['versions'][$packageName])) { -$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']); -} -if (array_key_exists('replaced', self::$installed['versions'][$packageName])) { -$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']); -} -if (array_key_exists('provided', self::$installed['versions'][$packageName])) { -$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']); -} - -return implode(' || ', $ranges); -} - - - - - -public static function getVersion($packageName) -{ -if (!isset(self::$installed['versions'][$packageName])) { -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - -if (!isset(self::$installed['versions'][$packageName]['version'])) { -return null; -} - -return self::$installed['versions'][$packageName]['version']; -} - - - - - -public static function getPrettyVersion($packageName) -{ -if (!isset(self::$installed['versions'][$packageName])) { -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - -if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) { -return null; -} - -return self::$installed['versions'][$packageName]['pretty_version']; -} - - - - - -public static function getReference($packageName) -{ -if (!isset(self::$installed['versions'][$packageName])) { -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - -if (!isset(self::$installed['versions'][$packageName]['reference'])) { -return null; -} - -return self::$installed['versions'][$packageName]['reference']; -} - - - - - -public static function getRootPackage() -{ -return self::$installed['root']; -} - - - - - - - -public static function getRawData() -{ -return self::$installed; -} - - - - - - - - - - - - - - - - - - - -public static function reload($data) -{ -self::$installed = $data; -} -} diff --git a/woocommerce-qenta-checkout-page/vendor/composer/LICENSE b/woocommerce-qenta-checkout-page/vendor/composer/LICENSE deleted file mode 100644 index f27399a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/woocommerce-qenta-checkout-page/vendor/composer/autoload_classmap.php b/woocommerce-qenta-checkout-page/vendor/composer/autoload_classmap.php deleted file mode 100644 index e39860a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,11 +0,0 @@ - $vendorDir . '/composer/InstalledVersions.php', - 'Mobile_Detect' => $vendorDir . '/mobiledetect/mobiledetectlib/Mobile_Detect.php', -); diff --git a/woocommerce-qenta-checkout-page/vendor/composer/autoload_files.php b/woocommerce-qenta-checkout-page/vendor/composer/autoload_files.php deleted file mode 100644 index 0e9caa2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/autoload_files.php +++ /dev/null @@ -1,13 +0,0 @@ - $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', - 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', -); diff --git a/woocommerce-qenta-checkout-page/vendor/composer/autoload_namespaces.php b/woocommerce-qenta-checkout-page/vendor/composer/autoload_namespaces.php deleted file mode 100644 index def8839..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,11 +0,0 @@ - array($vendorDir . '/qenta/checkout-client-library/library'), - 'Detection' => array($vendorDir . '/mobiledetect/mobiledetectlib/namespaced'), -); diff --git a/woocommerce-qenta-checkout-page/vendor/composer/autoload_psr4.php b/woocommerce-qenta-checkout-page/vendor/composer/autoload_psr4.php deleted file mode 100644 index 01c8817..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,14 +0,0 @@ - array($vendorDir . '/psr/http-message/src'), - 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), - 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), - 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), - 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), -); diff --git a/woocommerce-qenta-checkout-page/vendor/composer/autoload_real.php b/woocommerce-qenta-checkout-page/vendor/composer/autoload_real.php deleted file mode 100644 index dee17ac..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/autoload_real.php +++ /dev/null @@ -1,75 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit091f1b89f9731ce865fbbfa469ce2f4e::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit091f1b89f9731ce865fbbfa469ce2f4e::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire091f1b89f9731ce865fbbfa469ce2f4e($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequire091f1b89f9731ce865fbbfa469ce2f4e($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/composer/autoload_static.php b/woocommerce-qenta-checkout-page/vendor/composer/autoload_static.php deleted file mode 100644 index 2b2d9f7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/autoload_static.php +++ /dev/null @@ -1,85 +0,0 @@ - __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', - 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'P' => - array ( - 'Psr\\Http\\Message\\' => 17, - 'Psr\\Http\\Client\\' => 16, - ), - 'G' => - array ( - 'GuzzleHttp\\Psr7\\' => 16, - 'GuzzleHttp\\Promise\\' => 19, - 'GuzzleHttp\\' => 11, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Psr\\Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'Psr\\Http\\Client\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-client/src', - ), - 'GuzzleHttp\\Psr7\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', - ), - 'GuzzleHttp\\Promise\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', - ), - 'GuzzleHttp\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', - ), - ); - - public static $prefixesPsr0 = array ( - 'Q' => - array ( - 'QentaCEE' => - array ( - 0 => __DIR__ . '/..' . '/qenta/checkout-client-library/library', - ), - ), - 'D' => - array ( - 'Detection' => - array ( - 0 => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/namespaced', - ), - ), - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'Mobile_Detect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/Mobile_Detect.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit091f1b89f9731ce865fbbfa469ce2f4e::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit091f1b89f9731ce865fbbfa469ce2f4e::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit091f1b89f9731ce865fbbfa469ce2f4e::$prefixesPsr0; - $loader->classMap = ComposerStaticInit091f1b89f9731ce865fbbfa469ce2f4e::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/composer/installed.json b/woocommerce-qenta-checkout-page/vendor/composer/installed.json deleted file mode 100644 index 062665c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/installed.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "packages": [ - { - "name": "guzzlehttp/guzzle", - "version": "7.2.0", - "version_normalized": "7.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79", - "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "time": "2020-10-10T11:47:56+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.2.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" - } - ], - "install-path": "../guzzlehttp/guzzle" - }, - { - "name": "guzzlehttp/promises", - "version": "1.4.0", - "version_normalized": "1.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" - }, - "time": "2020-09-30T07:37:28+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.0" - }, - "install-path": "../guzzlehttp/promises" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.7.0", - "version_normalized": "1.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "time": "2020-09-30T07:37:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.7.0" - }, - "install-path": "../guzzlehttp/psr7" - }, - { - "name": "mobiledetect/mobiledetectlib", - "version": "2.8.34", - "version_normalized": "2.8.34.0", - "source": { - "type": "git", - "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/6f8113f57a508494ca36acbcfa2dc2d923c7ed5b", - "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.35||~5.7" - }, - "time": "2019-09-18T18:44:20+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "Mobile_Detect.php" - ], - "psr-0": { - "Detection": "namespaced/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Serban Ghita", - "email": "serbanghita@gmail.com", - "homepage": "http://mobiledetect.net", - "role": "Developer" - } - ], - "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", - "homepage": "https://github.com/serbanghita/Mobile-Detect", - "keywords": [ - "detect mobile devices", - "mobile", - "mobile detect", - "mobile detector", - "php mobile detect" - ], - "support": { - "issues": "https://github.com/serbanghita/Mobile-Detect/issues", - "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.34" - }, - "install-path": "../mobiledetect/mobiledetectlib" - }, - { - "name": "psr/http-client", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "time": "2020-06-29T06:28:15+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/master" - }, - "install-path": "../psr/http-client" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T14:39:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "install-path": "../psr/http-message" - }, - { - "name": "qenta/checkout-client-library", - "version": "4.0.0", - "version_normalized": "4.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/qenta-cee/checkout-client-library.git", - "reference": "9238ddebcc7ba85be2d777155d31b9efcf2e2191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/qenta-cee/checkout-client-library/zipball/9238ddebcc7ba85be2d777155d31b9efcf2e2191", - "reference": "9238ddebcc7ba85be2d777155d31b9efcf2e2191", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^7.2", - "mobiledetect/mobiledetectlib": "^2.8", - "php": "~7.2.5|~7.3.0|~7.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.0" - }, - "time": "2020-11-08T19:17:50+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "QentaCEE": "library" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0" - ], - "description": "QENTA Client Library for Checkout Page and Checkout Seamless", - "homepage": "https://www.qenta-cee.at", - "keywords": [ - "QENTA", - "checkout", - "page", - "payment", - "seamless" - ], - "support": { - "docs": "https://guides.qenta.com", - "email": "support@qenta.com", - "issues": "https://github.com/qenta-cee/checkout-client-library/issues", - "source": "https://github.com/qenta-cee/checkout-client-library/tree/4.0.0" - }, - "install-path": "../qenta/checkout-client-library" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "version_normalized": "3.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "time": "2019-03-08T08:55:37+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "install-path": "../ralouphie/getallheaders" - } - ], - "dev": true -} diff --git a/woocommerce-qenta-checkout-page/vendor/composer/installed.php b/woocommerce-qenta-checkout-page/vendor/composer/installed.php deleted file mode 100644 index 027a9e3..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/installed.php +++ /dev/null @@ -1,110 +0,0 @@ - - array ( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'aliases' => - array ( - ), - 'reference' => '70c153650333116c1664f3036cd1cde51b9d3bab', - 'name' => 'qenta/woocommerce-qenta-checkout-page', - ), - 'versions' => - array ( - 'guzzlehttp/guzzle' => - array ( - 'pretty_version' => '7.2.0', - 'version' => '7.2.0.0', - 'aliases' => - array ( - ), - 'reference' => '0aa74dfb41ae110835923ef10a9d803a22d50e79', - ), - 'guzzlehttp/promises' => - array ( - 'pretty_version' => '1.4.0', - 'version' => '1.4.0.0', - 'aliases' => - array ( - ), - 'reference' => '60d379c243457e073cff02bc323a2a86cb355631', - ), - 'guzzlehttp/psr7' => - array ( - 'pretty_version' => '1.7.0', - 'version' => '1.7.0.0', - 'aliases' => - array ( - ), - 'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3', - ), - 'mobiledetect/mobiledetectlib' => - array ( - 'pretty_version' => '2.8.34', - 'version' => '2.8.34.0', - 'aliases' => - array ( - ), - 'reference' => '6f8113f57a508494ca36acbcfa2dc2d923c7ed5b', - ), - 'psr/http-client' => - array ( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'aliases' => - array ( - ), - 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', - ), - 'psr/http-client-implementation' => - array ( - 'provided' => - array ( - 0 => '1.0', - ), - ), - 'psr/http-message' => - array ( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'aliases' => - array ( - ), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', - ), - 'psr/http-message-implementation' => - array ( - 'provided' => - array ( - 0 => '1.0', - ), - ), - 'qenta/checkout-client-library' => - array ( - 'pretty_version' => '4.0.0', - 'version' => '4.0.0.0', - 'aliases' => - array ( - ), - 'reference' => '9238ddebcc7ba85be2d777155d31b9efcf2e2191', - ), - 'qenta/woocommerce-qenta-checkout-page' => - array ( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'aliases' => - array ( - ), - 'reference' => '70c153650333116c1664f3036cd1cde51b9d3bab', - ), - 'ralouphie/getallheaders' => - array ( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', - 'aliases' => - array ( - ), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', - ), - ), -); diff --git a/woocommerce-qenta-checkout-page/vendor/composer/platform_check.php b/woocommerce-qenta-checkout-page/vendor/composer/platform_check.php deleted file mode 100644 index e3275f8..0000000 --- a/woocommerce-qenta-checkout-page/vendor/composer/platform_check.php +++ /dev/null @@ -1,21 +0,0 @@ -= 70400)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; -} - -$missingExtensions = array(); -extension_loaded('json') || $missingExtensions[] = 'json'; - -if ($missingExtensions) { - $issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions); -} - -if ($issues) { - echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues); - exit(104); -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/CHANGELOG.md b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/CHANGELOG.md deleted file mode 100644 index d2092c0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ /dev/null @@ -1,1450 +0,0 @@ -# Change Log - -Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. - -## 7.2.0 - 2020-10-10 - -### Added - -- Support for PHP 8 [#2712](https://github.com/guzzle/guzzle/pull/2712), [#2715](https://github.com/guzzle/guzzle/pull/2715), [#2789](https://github.com/guzzle/guzzle/pull/2789) -- Support passing a body summarizer to the http errors middleware [#2795](https://github.com/guzzle/guzzle/pull/2795) - -### Fixed - -- Handle exceptions during response creation [#2591](https://github.com/guzzle/guzzle/pull/2591) -- Fix CURLOPT_ENCODING not to be overwritten [#2595](https://github.com/guzzle/guzzle/pull/2595) -- Make sure the Request always has a body object [#2804](https://github.com/guzzle/guzzle/pull/2804) - -### Changed - -- The `TooManyRedirectsException` has a response [#2660](https://github.com/guzzle/guzzle/pull/2660) -- Avoid "functions" from dependencies [#2712](https://github.com/guzzle/guzzle/pull/2712) - -### Deprecated - -- Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786) - -## 7.1.1 - 2020-09-30 - -### Fixed - -- Incorrect EOF detection for response body streams on Windows. - -### Changed - -- We dont connect curl `sink` on HEAD requests. -- Removed some PHP 5 workarounds - -## 7.1.0 - 2020-09-22 - -### Added - -- `GuzzleHttp\MessageFormatterInterface` - -### Fixed - -- Fixed issue that caused cookies with no value not to be stored. -- On redirects, we allow all safe methods like GET, HEAD and OPTIONS. -- Fixed logging on empty responses. -- Make sure MessageFormatter::format returns string - -### Deprecated - -- All functions in `GuzzleHttp` has been deprecated. Use static methods on `Utils` instead. -- `ClientInterface::getConfig()` -- `Client::getConfig()` -- `Client::__call()` -- `Utils::defaultCaBundle()` -- `CurlFactory::LOW_CURL_VERSION_NUMBER` - -## 7.0.1 - 2020-06-27 - -* Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699) - -## 7.0.0 - 2020-06-27 - -No changes since 7.0.0-rc1. - -## 7.0.0-rc1 - 2020-06-15 - -### Changed - -* Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629) -* Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675) - -## 7.0.0-beta2 - 2020-05-25 - -### Added - -* Using `Utils` class instead of functions in the `GuzzleHttp` namespace. [#2546](https://github.com/guzzle/guzzle/pull/2546) -* `ClientInterface::MAJOR_VERSION` [#2583](https://github.com/guzzle/guzzle/pull/2583) - -### Changed - -* Avoid the `getenv` function when unsafe [#2531](https://github.com/guzzle/guzzle/pull/2531) -* Added real client methods [#2529](https://github.com/guzzle/guzzle/pull/2529) -* Avoid functions due to global install conflicts [#2546](https://github.com/guzzle/guzzle/pull/2546) -* Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550) -* Adding methods for HTTP verbs like `Client::get()`, `Client::head()`, `Client::patch()` etc [#2529](https://github.com/guzzle/guzzle/pull/2529) -* `ConnectException` extends `TransferException` [#2541](https://github.com/guzzle/guzzle/pull/2541) -* Updated the default User Agent to "GuzzleHttp/7" [#2654](https://github.com/guzzle/guzzle/pull/2654) - -### Fixed - -* Various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626) - -### Removed - -* Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528) - -## 7.0.0-beta1 - 2019-12-30 - -The diff might look very big but 95% of Guzzle users will be able to upgrade without modification. -Please see [the upgrade document](UPGRADING.md) that describes all BC breaking changes. - -### Added - -* Implement PSR-18 and dropped PHP 5 support [#2421](https://github.com/guzzle/guzzle/pull/2421) [#2474](https://github.com/guzzle/guzzle/pull/2474) -* PHP 7 types [#2442](https://github.com/guzzle/guzzle/pull/2442) [#2449](https://github.com/guzzle/guzzle/pull/2449) [#2466](https://github.com/guzzle/guzzle/pull/2466) [#2497](https://github.com/guzzle/guzzle/pull/2497) [#2499](https://github.com/guzzle/guzzle/pull/2499) -* IDN support for redirects [2424](https://github.com/guzzle/guzzle/pull/2424) - -### Changed - -* Dont allow passing null as third argument to `BadResponseException::__construct()` [#2427](https://github.com/guzzle/guzzle/pull/2427) -* Use SAPI constant instead of method call [#2450](https://github.com/guzzle/guzzle/pull/2450) -* Use native function invocation [#2444](https://github.com/guzzle/guzzle/pull/2444) -* Better defaults for PHP installations with old ICU lib [2454](https://github.com/guzzle/guzzle/pull/2454) -* Added visibility to all constants [#2462](https://github.com/guzzle/guzzle/pull/2462) -* Dont allow passing `null` as URI to `Client::request()` and `Client::requestAsync()` [#2461](https://github.com/guzzle/guzzle/pull/2461) -* Widen the exception argument to throwable [#2495](https://github.com/guzzle/guzzle/pull/2495) - -### Fixed - -* Logging when Promise rejected with a string [#2311](https://github.com/guzzle/guzzle/pull/2311) - -### Removed - -* Class `SeekException` [#2162](https://github.com/guzzle/guzzle/pull/2162) -* `RequestException::getResponseBodySummary()` [#2425](https://github.com/guzzle/guzzle/pull/2425) -* `CookieJar::getCookieValue()` [#2433](https://github.com/guzzle/guzzle/pull/2433) -* `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440) -* Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464) - -## 6.5.2 - 2019-12-23 - -* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489) - -## 6.5.1 - 2019-12-21 - -* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454) -* IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424) - -## 6.5.0 - 2019-12-07 - -* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143) -* Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287) -* Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132) -* Fix: `RetryMiddleware` did not do exponential delay between retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132) -* Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348) -* Deprecated `ClientInterface::VERSION` - -## 6.4.1 - 2019-10-23 - -* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that -* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar` - -## 6.4.0 - 2019-10-23 - -* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108) -* Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081) -* Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161) -* Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163) -* Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242) -* Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284) -* Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273) -* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335) -* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362) - -## 6.3.3 - 2018-04-22 - -* Fix: Default headers when decode_content is specified - - -## 6.3.2 - 2018-03-26 - -* Fix: Release process - - -## 6.3.1 - 2018-03-26 - -* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014) -* Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012) -* Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999) -* Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998) -* Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953) -* Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915) -* Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916) - -+ Minor code cleanups, documentation fixes and clarifications. - - -## 6.3.0 - 2017-06-22 - -* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659) -* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621) -* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580) -* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609) -* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641) -* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611) -* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811) -* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642) -* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569) -* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711) -* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745) -* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721) -* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318) -* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) -* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) - - -+ Minor code cleanups, documentation fixes and clarifications. - -## 6.2.3 - 2017-02-28 - -* Fix deprecations with guzzle/psr7 version 1.4 - -## 6.2.2 - 2016-10-08 - -* Allow to pass nullable Response to delay callable -* Only add scheme when host is present -* Fix drain case where content-length is the literal string zero -* Obfuscate in-URL credentials in exceptions - -## 6.2.1 - 2016-07-18 - -* Address HTTP_PROXY security vulnerability, CVE-2016-5385: - https://httpoxy.org/ -* Fixing timeout bug with StreamHandler: - https://github.com/guzzle/guzzle/pull/1488 -* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when - a server does not honor `Connection: close`. -* Ignore URI fragment when sending requests. - -## 6.2.0 - 2016-03-21 - -* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. - https://github.com/guzzle/guzzle/pull/1389 -* Bug fix: Fix sleep calculation when waiting for delayed requests. - https://github.com/guzzle/guzzle/pull/1324 -* Feature: More flexible history containers. - https://github.com/guzzle/guzzle/pull/1373 -* Bug fix: defer sink stream opening in StreamHandler. - https://github.com/guzzle/guzzle/pull/1377 -* Bug fix: do not attempt to escape cookie values. - https://github.com/guzzle/guzzle/pull/1406 -* Feature: report original content encoding and length on decoded responses. - https://github.com/guzzle/guzzle/pull/1409 -* Bug fix: rewind seekable request bodies before dispatching to cURL. - https://github.com/guzzle/guzzle/pull/1422 -* Bug fix: provide an empty string to `http_build_query` for HHVM workaround. - https://github.com/guzzle/guzzle/pull/1367 - -## 6.1.1 - 2015-11-22 - -* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler - https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4 -* Feature: HandlerStack is now more generic. - https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e -* Bug fix: setting verify to false in the StreamHandler now disables peer - verification. https://github.com/guzzle/guzzle/issues/1256 -* Feature: Middleware now uses an exception factory, including more error - context. https://github.com/guzzle/guzzle/pull/1282 -* Feature: better support for disabled functions. - https://github.com/guzzle/guzzle/pull/1287 -* Bug fix: fixed regression where MockHandler was not using `sink`. - https://github.com/guzzle/guzzle/pull/1292 - -## 6.1.0 - 2015-09-08 - -* Feature: Added the `on_stats` request option to provide access to transfer - statistics for requests. https://github.com/guzzle/guzzle/pull/1202 -* Feature: Added the ability to persist session cookies in CookieJars. - https://github.com/guzzle/guzzle/pull/1195 -* Feature: Some compatibility updates for Google APP Engine - https://github.com/guzzle/guzzle/pull/1216 -* Feature: Added support for NO_PROXY to prevent the use of a proxy based on - a simple set of rules. https://github.com/guzzle/guzzle/pull/1197 -* Feature: Cookies can now contain square brackets. - https://github.com/guzzle/guzzle/pull/1237 -* Bug fix: Now correctly parsing `=` inside of quotes in Cookies. - https://github.com/guzzle/guzzle/pull/1232 -* Bug fix: Cusotm cURL options now correctly override curl options of the - same name. https://github.com/guzzle/guzzle/pull/1221 -* Bug fix: Content-Type header is now added when using an explicitly provided - multipart body. https://github.com/guzzle/guzzle/pull/1218 -* Bug fix: Now ignoring Set-Cookie headers that have no name. -* Bug fix: Reason phrase is no longer cast to an int in some cases in the - cURL handler. https://github.com/guzzle/guzzle/pull/1187 -* Bug fix: Remove the Authorization header when redirecting if the Host - header changes. https://github.com/guzzle/guzzle/pull/1207 -* Bug fix: Cookie path matching fixes - https://github.com/guzzle/guzzle/issues/1129 -* Bug fix: Fixing the cURL `body_as_string` setting - https://github.com/guzzle/guzzle/pull/1201 -* Bug fix: quotes are no longer stripped when parsing cookies. - https://github.com/guzzle/guzzle/issues/1172 -* Bug fix: `form_params` and `query` now always uses the `&` separator. - https://github.com/guzzle/guzzle/pull/1163 -* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. - https://github.com/guzzle/guzzle/pull/1189 - -## 6.0.2 - 2015-07-04 - -* Fixed a memory leak in the curl handlers in which references to callbacks - were not being removed by `curl_reset`. -* Cookies are now extracted properly before redirects. -* Cookies now allow more character ranges. -* Decoded Content-Encoding responses are now modified to correctly reflect - their state if the encoding was automatically removed by a handler. This - means that the `Content-Encoding` header may be removed an the - `Content-Length` modified to reflect the message size after removing the - encoding. -* Added a more explicit error message when trying to use `form_params` and - `multipart` in the same request. -* Several fixes for HHVM support. -* Functions are now conditionally required using an additional level of - indirection to help with global Composer installations. - -## 6.0.1 - 2015-05-27 - -* Fixed a bug with serializing the `query` request option where the `&` - separator was missing. -* Added a better error message for when `body` is provided as an array. Please - use `form_params` or `multipart` instead. -* Various doc fixes. - -## 6.0.0 - 2015-05-26 - -* See the UPGRADING.md document for more information. -* Added `multipart` and `form_params` request options. -* Added `synchronous` request option. -* Added the `on_headers` request option. -* Fixed `expect` handling. -* No longer adding default middlewares in the client ctor. These need to be - present on the provided handler in order to work. -* Requests are no longer initiated when sending async requests with the - CurlMultiHandler. This prevents unexpected recursion from requests completing - while ticking the cURL loop. -* Removed the semantics of setting `default` to `true`. This is no longer - required now that the cURL loop is not ticked for async requests. -* Added request and response logging middleware. -* No longer allowing self signed certificates when using the StreamHandler. -* Ensuring that `sink` is valid if saving to a file. -* Request exceptions now include a "handler context" which provides handler - specific contextual information. -* Added `GuzzleHttp\RequestOptions` to allow request options to be applied - using constants. -* `$maxHandles` has been removed from CurlMultiHandler. -* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. - -## 5.3.0 - 2015-05-19 - -* Mock now supports `save_to` -* Marked `AbstractRequestEvent::getTransaction()` as public. -* Fixed a bug in which multiple headers using different casing would overwrite - previous headers in the associative array. -* Added `Utils::getDefaultHandler()` -* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. -* URL scheme is now always lowercased. - -## 6.0.0-beta.1 - -* Requires PHP >= 5.5 -* Updated to use PSR-7 - * Requires immutable messages, which basically means an event based system - owned by a request instance is no longer possible. - * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). - * Removed the dependency on `guzzlehttp/streams`. These stream abstractions - are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` - namespace. -* Added middleware and handler system - * Replaced the Guzzle event and subscriber system with a middleware system. - * No longer depends on RingPHP, but rather places the HTTP handlers directly - in Guzzle, operating on PSR-7 messages. - * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which - means the `guzzlehttp/retry-subscriber` is now obsolete. - * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. -* Asynchronous responses - * No longer supports the `future` request option to send an async request. - Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, - `getAsync`, etc.). - * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid - recursion required by chaining and forwarding react promises. See - https://github.com/guzzle/promises - * Added `requestAsync` and `sendAsync` to send request asynchronously. - * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests - asynchronously. -* Request options - * POST and form updates - * Added the `form_fields` and `form_files` request options. - * Removed the `GuzzleHttp\Post` namespace. - * The `body` request option no longer accepts an array for POST requests. - * The `exceptions` request option has been deprecated in favor of the - `http_errors` request options. - * The `save_to` request option has been deprecated in favor of `sink` request - option. -* Clients no longer accept an array of URI template string and variables for - URI variables. You will need to expand URI templates before passing them - into a client constructor or request method. -* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are - now magic methods that will send synchronous requests. -* Replaced `Utils.php` with plain functions in `functions.php`. -* Removed `GuzzleHttp\Collection`. -* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as - an array. -* Removed `GuzzleHttp\Query`. Query string handling is now handled using an - associative array passed into the `query` request option. The query string - is serialized using PHP's `http_build_query`. If you need more control, you - can pass the query string in as a string. -* `GuzzleHttp\QueryParser` has been replaced with the - `GuzzleHttp\Psr7\parse_query`. - -## 5.2.0 - 2015-01-27 - -* Added `AppliesHeadersInterface` to make applying headers to a request based - on the body more generic and not specific to `PostBodyInterface`. -* Reduced the number of stack frames needed to send requests. -* Nested futures are now resolved in the client rather than the RequestFsm -* Finishing state transitions is now handled in the RequestFsm rather than the - RingBridge. -* Added a guard in the Pool class to not use recursion for request retries. - -## 5.1.0 - 2014-12-19 - -* Pool class no longer uses recursion when a request is intercepted. -* The size of a Pool can now be dynamically adjusted using a callback. - See https://github.com/guzzle/guzzle/pull/943. -* Setting a request option to `null` when creating a request with a client will - ensure that the option is not set. This allows you to overwrite default - request options on a per-request basis. - See https://github.com/guzzle/guzzle/pull/937. -* Added the ability to limit which protocols are allowed for redirects by - specifying a `protocols` array in the `allow_redirects` request option. -* Nested futures due to retries are now resolved when waiting for synchronous - responses. See https://github.com/guzzle/guzzle/pull/947. -* `"0"` is now an allowed URI path. See - https://github.com/guzzle/guzzle/pull/935. -* `Query` no longer typehints on the `$query` argument in the constructor, - allowing for strings and arrays. -* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle - specific exceptions if necessary. - -## 5.0.3 - 2014-11-03 - -This change updates query strings so that they are treated as un-encoded values -by default where the value represents an un-encoded value to send over the -wire. A Query object then encodes the value before sending over the wire. This -means that even value query string values (e.g., ":") are url encoded. This -makes the Query class match PHP's http_build_query function. However, if you -want to send requests over the wire using valid query string characters that do -not need to be encoded, then you can provide a string to Url::setQuery() and -pass true as the second argument to specify that the query string is a raw -string that should not be parsed or encoded (unless a call to getQuery() is -subsequently made, forcing the query-string to be converted into a Query -object). - -## 5.0.2 - 2014-10-30 - -* Added a trailing `\r\n` to multipart/form-data payloads. See - https://github.com/guzzle/guzzle/pull/871 -* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. -* Status codes are now returned as integers. See - https://github.com/guzzle/guzzle/issues/881 -* No longer overwriting an existing `application/x-www-form-urlencoded` header - when sending POST requests, allowing for customized headers. See - https://github.com/guzzle/guzzle/issues/877 -* Improved path URL serialization. - - * No longer double percent-encoding characters in the path or query string if - they are already encoded. - * Now properly encoding the supplied path to a URL object, instead of only - encoding ' ' and '?'. - * Note: This has been changed in 5.0.3 to now encode query string values by - default unless the `rawString` argument is provided when setting the query - string on a URL: Now allowing many more characters to be present in the - query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A - -## 5.0.1 - 2014-10-16 - -Bugfix release. - -* Fixed an issue where connection errors still returned response object in - error and end events event though the response is unusable. This has been - corrected so that a response is not returned in the `getResponse` method of - these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 -* Fixed an issue where transfer statistics were not being populated in the - RingBridge. https://github.com/guzzle/guzzle/issues/866 - -## 5.0.0 - 2014-10-12 - -Adding support for non-blocking responses and some minor API cleanup. - -### New Features - -* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. -* Added a public API for creating a default HTTP adapter. -* Updated the redirect plugin to be non-blocking so that redirects are sent - concurrently. Other plugins like this can now be updated to be non-blocking. -* Added a "progress" event so that you can get upload and download progress - events. -* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers - requests concurrently using a capped pool size as efficiently as possible. -* Added `hasListeners()` to EmitterInterface. -* Removed `GuzzleHttp\ClientInterface::sendAll` and marked - `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the - recommended way). - -### Breaking changes - -The breaking changes in this release are relatively minor. The biggest thing to -look out for is that request and response objects no longer implement fluent -interfaces. - -* Removed the fluent interfaces (i.e., `return $this`) from requests, - responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, - `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and - `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of - why I did this: https://ocramius.github.io/blog/fluent-interfaces-are-evil/. - This also makes the Guzzle message interfaces compatible with the current - PSR-7 message proposal. -* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except - for the HTTP request functions from function.php, these functions are now - implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` - moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to - `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to - `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be - `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php - caused problems for many users: they aren't PSR-4 compliant, require an - explicit include, and needed an if-guard to ensure that the functions are not - declared multiple times. -* Rewrote adapter layer. - * Removing all classes from `GuzzleHttp\Adapter`, these are now - implemented as callables that are stored in `GuzzleHttp\Ring\Client`. - * Removed the concept of "parallel adapters". Sending requests serially or - concurrently is now handled using a single adapter. - * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The - Transaction object now exposes the request, response, and client as public - properties. The getters and setters have been removed. -* Removed the "headers" event. This event was only useful for changing the - body a response once the headers of the response were known. You can implement - a similar behavior in a number of ways. One example might be to use a - FnStream that has access to the transaction being sent. For example, when the - first byte is written, you could check if the response headers match your - expectations, and if so, change the actual stream body that is being - written to. -* Removed the `asArray` parameter from - `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header - value as an array, then use the newly added `getHeaderAsArray()` method of - `MessageInterface`. This change makes the Guzzle interfaces compatible with - the PSR-7 interfaces. -* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add - custom request options using double-dispatch (this was an implementation - detail). Instead, you should now provide an associative array to the - constructor which is a mapping of the request option name mapping to a - function that applies the option value to a request. -* Removed the concept of "throwImmediately" from exceptions and error events. - This control mechanism was used to stop a transfer of concurrent requests - from completing. This can now be handled by throwing the exception or by - cancelling a pool of requests or each outstanding future request individually. -* Updated to "GuzzleHttp\Streams" 3.0. - * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a - `maxLen` parameter. This update makes the Guzzle streams project - compatible with the current PSR-7 proposal. - * `GuzzleHttp\Stream\Stream::__construct`, - `GuzzleHttp\Stream\Stream::factory`, and - `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second - argument. They now accept an associative array of options, including the - "size" key and "metadata" key which can be used to provide custom metadata. - -## 4.2.2 - 2014-09-08 - -* Fixed a memory leak in the CurlAdapter when reusing cURL handles. -* No longer using `request_fulluri` in stream adapter proxies. -* Relative redirects are now based on the last response, not the first response. - -## 4.2.1 - 2014-08-19 - -* Ensuring that the StreamAdapter does not always add a Content-Type header -* Adding automated github releases with a phar and zip - -## 4.2.0 - 2014-08-17 - -* Now merging in default options using a case-insensitive comparison. - Closes https://github.com/guzzle/guzzle/issues/767 -* Added the ability to automatically decode `Content-Encoding` response bodies - using the `decode_content` request option. This is set to `true` by default - to decode the response body if it comes over the wire with a - `Content-Encoding`. Set this value to `false` to disable decoding the - response content, and pass a string to provide a request `Accept-Encoding` - header and turn on automatic response decoding. This feature now allows you - to pass an `Accept-Encoding` header in the headers of a request but still - disable automatic response decoding. - Closes https://github.com/guzzle/guzzle/issues/764 -* Added the ability to throw an exception immediately when transferring - requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 -* Updating guzzlehttp/streams dependency to ~2.1 -* No longer utilizing the now deprecated namespaced methods from the stream - package. - -## 4.1.8 - 2014-08-14 - -* Fixed an issue in the CurlFactory that caused setting the `stream=false` - request option to throw an exception. - See: https://github.com/guzzle/guzzle/issues/769 -* TransactionIterator now calls rewind on the inner iterator. - See: https://github.com/guzzle/guzzle/pull/765 -* You can now set the `Content-Type` header to `multipart/form-data` - when creating POST requests to force multipart bodies. - See https://github.com/guzzle/guzzle/issues/768 - -## 4.1.7 - 2014-08-07 - -* Fixed an error in the HistoryPlugin that caused the same request and response - to be logged multiple times when an HTTP protocol error occurs. -* Ensuring that cURL does not add a default Content-Type when no Content-Type - has been supplied by the user. This prevents the adapter layer from modifying - the request that is sent over the wire after any listeners may have already - put the request in a desired state (e.g., signed the request). -* Throwing an exception when you attempt to send requests that have the - "stream" set to true in parallel using the MultiAdapter. -* Only calling curl_multi_select when there are active cURL handles. This was - previously changed and caused performance problems on some systems due to PHP - always selecting until the maximum select timeout. -* Fixed a bug where multipart/form-data POST fields were not correctly - aggregated (e.g., values with "&"). - -## 4.1.6 - 2014-08-03 - -* Added helper methods to make it easier to represent messages as strings, - including getting the start line and getting headers as a string. - -## 4.1.5 - 2014-08-02 - -* Automatically retrying cURL "Connection died, retrying a fresh connect" - errors when possible. -* cURL implementation cleanup -* Allowing multiple event subscriber listeners to be registered per event by - passing an array of arrays of listener configuration. - -## 4.1.4 - 2014-07-22 - -* Fixed a bug that caused multi-part POST requests with more than one field to - serialize incorrectly. -* Paths can now be set to "0" -* `ResponseInterface::xml` now accepts a `libxml_options` option and added a - missing default argument that was required when parsing XML response bodies. -* A `save_to` stream is now created lazily, which means that files are not - created on disk unless a request succeeds. - -## 4.1.3 - 2014-07-15 - -* Various fixes to multipart/form-data POST uploads -* Wrapping function.php in an if-statement to ensure Guzzle can be used - globally and in a Composer install -* Fixed an issue with generating and merging in events to an event array -* POST headers are only applied before sending a request to allow you to change - the query aggregator used before uploading -* Added much more robust query string parsing -* Fixed various parsing and normalization issues with URLs -* Fixing an issue where multi-valued headers were not being utilized correctly - in the StreamAdapter - -## 4.1.2 - 2014-06-18 - -* Added support for sending payloads with GET requests - -## 4.1.1 - 2014-06-08 - -* Fixed an issue related to using custom message factory options in subclasses -* Fixed an issue with nested form fields in a multi-part POST -* Fixed an issue with using the `json` request option for POST requests -* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` - -## 4.1.0 - 2014-05-27 - -* Added a `json` request option to easily serialize JSON payloads. -* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. -* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. -* Added the ability to provide an emitter to a client in the client constructor. -* Added the ability to persist a cookie session using $_SESSION. -* Added a trait that can be used to add event listeners to an iterator. -* Removed request method constants from RequestInterface. -* Fixed warning when invalid request start-lines are received. -* Updated MessageFactory to work with custom request option methods. -* Updated cacert bundle to latest build. - -4.0.2 (2014-04-16) ------------------- - -* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) -* Added the ability to set scalars as POST fields (#628) - -## 4.0.1 - 2014-04-04 - -* The HTTP status code of a response is now set as the exception code of - RequestException objects. -* 303 redirects will now correctly switch from POST to GET requests. -* The default parallel adapter of a client now correctly uses the MultiAdapter. -* HasDataTrait now initializes the internal data array as an empty array so - that the toArray() method always returns an array. - -## 4.0.0 - 2014-03-29 - -* For information on changes and upgrading, see: - https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 -* Added `GuzzleHttp\batch()` as a convenience function for sending requests in - parallel without needing to write asynchronous code. -* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. - You can now pass a callable or an array of associative arrays where each - associative array contains the "fn", "priority", and "once" keys. - -## 4.0.0.rc-2 - 2014-03-25 - -* Removed `getConfig()` and `setConfig()` from clients to avoid confusion - around whether things like base_url, message_factory, etc. should be able to - be retrieved or modified. -* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface -* functions.php functions were renamed using snake_case to match PHP idioms -* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and - `GUZZLE_CURL_SELECT_TIMEOUT` environment variables -* Added the ability to specify custom `sendAll()` event priorities -* Added the ability to specify custom stream context options to the stream - adapter. -* Added a functions.php function for `get_path()` and `set_path()` -* CurlAdapter and MultiAdapter now use a callable to generate curl resources -* MockAdapter now properly reads a body and emits a `headers` event -* Updated Url class to check if a scheme and host are set before adding ":" - and "//". This allows empty Url (e.g., "") to be serialized as "". -* Parsing invalid XML no longer emits warnings -* Curl classes now properly throw AdapterExceptions -* Various performance optimizations -* Streams are created with the faster `Stream\create()` function -* Marked deprecation_proxy() as internal -* Test server is now a collection of static methods on a class - -## 4.0.0-rc.1 - 2014-03-15 - -* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 - -## 3.8.1 - 2014-01-28 - -* Bug: Always using GET requests when redirecting from a 303 response -* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in - `Guzzle\Http\ClientInterface::setSslVerification()` -* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL -* Bug: The body of a request can now be set to `"0"` -* Sending PHP stream requests no longer forces `HTTP/1.0` -* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of - each sub-exception -* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than - clobbering everything). -* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) -* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. - For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. -* Now properly escaping the regular expression delimiter when matching Cookie domains. -* Network access is now disabled when loading XML documents - -## 3.8.0 - 2013-12-05 - -* Added the ability to define a POST name for a file -* JSON response parsing now properly walks additionalProperties -* cURL error code 18 is now retried automatically in the BackoffPlugin -* Fixed a cURL error when URLs contain fragments -* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were - CurlExceptions -* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) -* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` -* Fixed a bug that was encountered when parsing empty header parameters -* UriTemplate now has a `setRegex()` method to match the docs -* The `debug` request parameter now checks if it is truthy rather than if it exists -* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin -* Added the ability to combine URLs using strict RFC 3986 compliance -* Command objects can now return the validation errors encountered by the command -* Various fixes to cache revalidation (#437 and 29797e5) -* Various fixes to the AsyncPlugin -* Cleaned up build scripts - -## 3.7.4 - 2013-10-02 - -* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) -* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp - (see https://github.com/aws/aws-sdk-php/issues/147) -* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots -* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) -* Updated the bundled cacert.pem (#419) -* OauthPlugin now supports adding authentication to headers or query string (#425) - -## 3.7.3 - 2013-09-08 - -* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and - `CommandTransferException`. -* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description -* Schemas are only injected into response models when explicitly configured. -* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of - an EntityBody. -* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. -* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. -* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() -* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin -* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests -* Bug fix: Properly parsing headers that contain commas contained in quotes -* Bug fix: mimetype guessing based on a filename is now case-insensitive - -## 3.7.2 - 2013-08-02 - -* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander - See https://github.com/guzzle/guzzle/issues/371 -* Bug fix: Cookie domains are now matched correctly according to RFC 6265 - See https://github.com/guzzle/guzzle/issues/377 -* Bug fix: GET parameters are now used when calculating an OAuth signature -* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted -* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched -* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. - See https://github.com/guzzle/guzzle/issues/379 -* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See - https://github.com/guzzle/guzzle/pull/380 -* cURL multi cleanup and optimizations - -## 3.7.1 - 2013-07-05 - -* Bug fix: Setting default options on a client now works -* Bug fix: Setting options on HEAD requests now works. See #352 -* Bug fix: Moving stream factory before send event to before building the stream. See #353 -* Bug fix: Cookies no longer match on IP addresses per RFC 6265 -* Bug fix: Correctly parsing header parameters that are in `<>` and quotes -* Added `cert` and `ssl_key` as request options -* `Host` header can now diverge from the host part of a URL if the header is set manually -* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter -* OAuth parameters are only added via the plugin if they aren't already set -* Exceptions are now thrown when a URL cannot be parsed -* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails -* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin - -## 3.7.0 - 2013-06-10 - -* See UPGRADING.md for more information on how to upgrade. -* Requests now support the ability to specify an array of $options when creating a request to more easily modify a - request. You can pass a 'request.options' configuration setting to a client to apply default request options to - every request created by a client (e.g. default query string variables, headers, curl options, etc.). -* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. - See `Guzzle\Http\StaticClient::mount`. -* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests - created by a command (e.g. custom headers, query string variables, timeout settings, etc.). -* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the - headers of a response -* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key - (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) -* ServiceBuilders now support storing and retrieving arbitrary data -* CachePlugin can now purge all resources for a given URI -* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource -* CachePlugin now uses the Vary header to determine if a resource is a cache hit -* `Guzzle\Http\Message\Response` now implements `\Serializable` -* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters -* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable -* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` -* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size -* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message -* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older - Symfony users can still use the old version of Monolog. -* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. - Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. -* Several performance improvements to `Guzzle\Common\Collection` -* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -* Added `Guzzle\Stream\StreamInterface::isRepeatable` -* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. -* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. -* Removed `Guzzle\Http\ClientInterface::expandTemplate()` -* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` -* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` -* Removed `Guzzle\Http\Message\RequestInterface::canCache` -* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` -* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` -* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. -* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting - `Guzzle\Common\Version::$emitWarnings` to true. -* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use - `$request->getResponseBody()->isRepeatable()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. - These will work through Guzzle 4.0 -* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. -* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. -* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. -* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -* Marked `Guzzle\Common\Collection::inject()` as deprecated. -* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` -* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -* Always setting X-cache headers on cached responses -* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -* Added `CacheStorageInterface::purge($url)` -* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -## 3.6.0 - 2013-05-29 - -* ServiceDescription now implements ToArrayInterface -* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters -* Guzzle can now correctly parse incomplete URLs -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess -* Added the ability to cast Model objects to a string to view debug information. - -## 3.5.0 - 2013-05-13 - -* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times -* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove - itself from the EventDispatcher) -* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values -* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too -* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a - non-existent key -* Bug: All __call() method arguments are now required (helps with mocking frameworks) -* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference - to help with refcount based garbage collection of resources created by sending a request -* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. -* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the - HistoryPlugin for a history. -* Added a `responseBody` alias for the `response_body` location -* Refactored internals to no longer rely on Response::getRequest() -* HistoryPlugin can now be cast to a string -* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests - and responses that are sent over the wire -* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects - -## 3.4.3 - 2013-04-30 - -* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response -* Added a check to re-extract the temp cacert bundle from the phar before sending each request - -## 3.4.2 - 2013-04-29 - -* Bug fix: Stream objects now work correctly with "a" and "a+" modes -* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present -* Bug fix: AsyncPlugin no longer forces HEAD requests -* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter -* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails -* Setting a response on a request will write to the custom request body from the response body if one is specified -* LogPlugin now writes to php://output when STDERR is undefined -* Added the ability to set multiple POST files for the same key in a single call -* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default -* Added the ability to queue CurlExceptions to the MockPlugin -* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) -* Configuration loading now allows remote files - -## 3.4.1 - 2013-04-16 - -* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti - handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. -* Exceptions are now properly grouped when sending requests in parallel -* Redirects are now properly aggregated when a multi transaction fails -* Redirects now set the response on the original object even in the event of a failure -* Bug fix: Model names are now properly set even when using $refs -* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax -* Added support for oauth_callback in OAuth signatures -* Added support for oauth_verifier in OAuth signatures -* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection - -## 3.4.0 - 2013-04-11 - -* Bug fix: URLs are now resolved correctly based on https://tools.ietf.org/html/rfc3986#section-5.2. #289 -* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 -* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 -* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. -* Bug fix: Added `number` type to service descriptions. -* Bug fix: empty parameters are removed from an OAuth signature -* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header -* Bug fix: Fixed "array to string" error when validating a union of types in a service description -* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream -* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. -* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. -* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. -* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if - the Content-Type can be determined based on the entity body or the path of the request. -* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. -* Added support for a PSR-3 LogAdapter. -* Added a `command.after_prepare` event -* Added `oauth_callback` parameter to the OauthPlugin -* Added the ability to create a custom stream class when using a stream factory -* Added a CachingEntityBody decorator -* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. -* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. -* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies -* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This - means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use - POST fields or files (the latter is only used when emulating a form POST in the browser). -* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest - -## 3.3.1 - 2013-03-10 - -* Added the ability to create PHP streaming responses from HTTP requests -* Bug fix: Running any filters when parsing response headers with service descriptions -* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing -* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across - response location visitors. -* Bug fix: Removed the possibility of creating configuration files with circular dependencies -* RequestFactory::create() now uses the key of a POST file when setting the POST file name -* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set - -## 3.3.0 - 2013-03-03 - -* A large number of performance optimizations have been made -* Bug fix: Added 'wb' as a valid write mode for streams -* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned -* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` -* BC: Removed `Guzzle\Http\Utils` class -* BC: Setting a service description on a client will no longer modify the client's command factories. -* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using - the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' -* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to - lowercase -* Operation parameter objects are now lazy loaded internally -* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses -* Added support for instantiating responseType=class responseClass classes. Classes must implement - `Guzzle\Service\Command\ResponseClassInterface` -* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These - additional properties also support locations and can be used to parse JSON responses where the outermost part of the - JSON is an array -* Added support for nested renaming of JSON models (rename sentAs to name) -* CachePlugin - * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error - * Debug headers can now added to cached response in the CachePlugin - -## 3.2.0 - 2013-02-14 - -* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. -* URLs with no path no longer contain a "/" by default -* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. -* BadResponseException no longer includes the full request and response message -* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface -* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface -* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription -* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list -* xmlEncoding can now be customized for the XML declaration of a XML service description operation -* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value - aggregation and no longer uses callbacks -* The URL encoding implementation of Guzzle\Http\QueryString can now be customized -* Bug fix: Filters were not always invoked for array service description parameters -* Bug fix: Redirects now use a target response body rather than a temporary response body -* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded -* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives - -## 3.1.2 - 2013-01-27 - -* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the - response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. -* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent -* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) -* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() -* Setting default headers on a client after setting the user-agent will not erase the user-agent setting - -## 3.1.1 - 2013-01-20 - -* Adding wildcard support to Guzzle\Common\Collection::getPath() -* Adding alias support to ServiceBuilder configs -* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface - -## 3.1.0 - 2013-01-12 - -* BC: CurlException now extends from RequestException rather than BadResponseException -* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() -* Added getData to ServiceDescriptionInterface -* Added context array to RequestInterface::setState() -* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http -* Bug: Adding required content-type when JSON request visitor adds JSON to a command -* Bug: Fixing the serialization of a service description with custom data -* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing - an array of successful and failed responses -* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection -* Added Guzzle\Http\IoEmittingEntityBody -* Moved command filtration from validators to location visitors -* Added `extends` attributes to service description parameters -* Added getModels to ServiceDescriptionInterface - -## 3.0.7 - 2012-12-19 - -* Fixing phar detection when forcing a cacert to system if null or true -* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` -* Cleaning up `Guzzle\Common\Collection::inject` method -* Adding a response_body location to service descriptions - -## 3.0.6 - 2012-12-09 - -* CurlMulti performance improvements -* Adding setErrorResponses() to Operation -* composer.json tweaks - -## 3.0.5 - 2012-11-18 - -* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin -* Bug: Response body can now be a string containing "0" -* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert -* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs -* Added support for XML attributes in service description responses -* DefaultRequestSerializer now supports array URI parameter values for URI template expansion -* Added better mimetype guessing to requests and post files - -## 3.0.4 - 2012-11-11 - -* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value -* Bug: Cookies can now be added that have a name, domain, or value set to "0" -* Bug: Using the system cacert bundle when using the Phar -* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures -* Enhanced cookie jar de-duplication -* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added -* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies -* Added the ability to create any sort of hash for a stream rather than just an MD5 hash - -## 3.0.3 - 2012-11-04 - -* Implementing redirects in PHP rather than cURL -* Added PECL URI template extension and using as default parser if available -* Bug: Fixed Content-Length parsing of Response factory -* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. -* Adding ToArrayInterface throughout library -* Fixing OauthPlugin to create unique nonce values per request - -## 3.0.2 - 2012-10-25 - -* Magic methods are enabled by default on clients -* Magic methods return the result of a command -* Service clients no longer require a base_url option in the factory -* Bug: Fixed an issue with URI templates where null template variables were being expanded - -## 3.0.1 - 2012-10-22 - -* Models can now be used like regular collection objects by calling filter, map, etc. -* Models no longer require a Parameter structure or initial data in the constructor -* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` - -## 3.0.0 - 2012-10-15 - -* Rewrote service description format to be based on Swagger - * Now based on JSON schema - * Added nested input structures and nested response models - * Support for JSON and XML input and output models - * Renamed `commands` to `operations` - * Removed dot class notation - * Removed custom types -* Broke the project into smaller top-level namespaces to be more component friendly -* Removed support for XML configs and descriptions. Use arrays or JSON files. -* Removed the Validation component and Inspector -* Moved all cookie code to Guzzle\Plugin\Cookie -* Magic methods on a Guzzle\Service\Client now return the command un-executed. -* Calling getResult() or getResponse() on a command will lazily execute the command if needed. -* Now shipping with cURL's CA certs and using it by default -* Added previousResponse() method to response objects -* No longer sending Accept and Accept-Encoding headers on every request -* Only sending an Expect header by default when a payload is greater than 1MB -* Added/moved client options: - * curl.blacklist to curl.option.blacklist - * Added ssl.certificate_authority -* Added a Guzzle\Iterator component -* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin -* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) -* Added a more robust caching plugin -* Added setBody to response objects -* Updating LogPlugin to use a more flexible MessageFormatter -* Added a completely revamped build process -* Cleaning up Collection class and removing default values from the get method -* Fixed ZF2 cache adapters - -## 2.8.8 - 2012-10-15 - -* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did - -## 2.8.7 - 2012-09-30 - -* Bug: Fixed config file aliases for JSON includes -* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests -* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload -* Bug: Hardening request and response parsing to account for missing parts -* Bug: Fixed PEAR packaging -* Bug: Fixed Request::getInfo -* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail -* Adding the ability for the namespace Iterator factory to look in multiple directories -* Added more getters/setters/removers from service descriptions -* Added the ability to remove POST fields from OAuth signatures -* OAuth plugin now supports 2-legged OAuth - -## 2.8.6 - 2012-09-05 - -* Added the ability to modify and build service descriptions -* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command -* Added a `json` parameter location -* Now allowing dot notation for classes in the CacheAdapterFactory -* Using the union of two arrays rather than an array_merge when extending service builder services and service params -* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references - in service builder config files. -* Services defined in two different config files that include one another will by default replace the previously - defined service, but you can now create services that extend themselves and merge their settings over the previous -* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like - '_default' with a default JSON configuration file. - -## 2.8.5 - 2012-08-29 - -* Bug: Suppressed empty arrays from URI templates -* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching -* Added support for HTTP responses that do not contain a reason phrase in the start-line -* AbstractCommand commands are now invokable -* Added a way to get the data used when signing an Oauth request before a request is sent - -## 2.8.4 - 2012-08-15 - -* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin -* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. -* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream -* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream -* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) -* Added additional response status codes -* Removed SSL information from the default User-Agent header -* DELETE requests can now send an entity body -* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries -* Added the ability of the MockPlugin to consume mocked request bodies -* LogPlugin now exposes request and response objects in the extras array - -## 2.8.3 - 2012-07-30 - -* Bug: Fixed a case where empty POST requests were sent as GET requests -* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body -* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new -* Added multiple inheritance to service description commands -* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` -* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything -* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles - -## 2.8.2 - 2012-07-24 - -* Bug: Query string values set to 0 are no longer dropped from the query string -* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` -* Bug: `+` is now treated as an encoded space when parsing query strings -* QueryString and Collection performance improvements -* Allowing dot notation for class paths in filters attribute of a service descriptions - -## 2.8.1 - 2012-07-16 - -* Loosening Event Dispatcher dependency -* POST redirects can now be customized using CURLOPT_POSTREDIR - -## 2.8.0 - 2012-07-15 - -* BC: Guzzle\Http\Query - * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) - * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() - * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) - * Changed the aggregation functions of QueryString to be static methods - * Can now use fromString() with querystrings that have a leading ? -* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters -* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body -* Cookies are no longer URL decoded by default -* Bug: URI template variables set to null are no longer expanded - -## 2.7.2 - 2012-07-02 - -* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. -* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() -* CachePlugin now allows for a custom request parameter function to check if a request can be cached -* Bug fix: CachePlugin now only caches GET and HEAD requests by default -* Bug fix: Using header glue when transferring headers over the wire -* Allowing deeply nested arrays for composite variables in URI templates -* Batch divisors can now return iterators or arrays - -## 2.7.1 - 2012-06-26 - -* Minor patch to update version number in UA string -* Updating build process - -## 2.7.0 - 2012-06-25 - -* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. -* BC: Removed magic setX methods from commands -* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method -* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. -* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) -* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace -* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin -* Added the ability to set POST fields and files in a service description -* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method -* Adding a command.before_prepare event to clients -* Added BatchClosureTransfer and BatchClosureDivisor -* BatchTransferException now includes references to the batch divisor and transfer strategies -* Fixed some tests so that they pass more reliably -* Added Guzzle\Common\Log\ArrayLogAdapter - -## 2.6.6 - 2012-06-10 - -* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin -* BC: Removing Guzzle\Service\Command\CommandSet -* Adding generic batching system (replaces the batch queue plugin and command set) -* Updating ZF cache and log adapters and now using ZF's composer repository -* Bug: Setting the name of each ApiParam when creating through an ApiCommand -* Adding result_type, result_doc, deprecated, and doc_url to service descriptions -* Bug: Changed the default cookie header casing back to 'Cookie' - -## 2.6.5 - 2012-06-03 - -* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() -* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from -* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data -* BC: Renaming methods in the CookieJarInterface -* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations -* Making the default glue for HTTP headers ';' instead of ',' -* Adding a removeValue to Guzzle\Http\Message\Header -* Adding getCookies() to request interface. -* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() - -## 2.6.4 - 2012-05-30 - -* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. -* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand -* Bug: Fixing magic method command calls on clients -* Bug: Email constraint only validates strings -* Bug: Aggregate POST fields when POST files are present in curl handle -* Bug: Fixing default User-Agent header -* Bug: Only appending or prepending parameters in commands if they are specified -* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes -* Allowing the use of dot notation for class namespaces when using instance_of constraint -* Added any_match validation constraint -* Added an AsyncPlugin -* Passing request object to the calculateWait method of the ExponentialBackoffPlugin -* Allowing the result of a command object to be changed -* Parsing location and type sub values when instantiating a service description rather than over and over at runtime - -## 2.6.3 - 2012-05-23 - -* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. -* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. -* You can now use an array of data when creating PUT request bodies in the request factory. -* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. -* [Http] Adding support for Content-Type in multipart POST uploads per upload -* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) -* Adding more POST data operations for easier manipulation of POST data. -* You can now set empty POST fields. -* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. -* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. -* CS updates - -## 2.6.2 - 2012-05-19 - -* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. - -## 2.6.1 - 2012-05-19 - -* [BC] Removing 'path' support in service descriptions. Use 'uri'. -* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. -* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. -* [BC] Removing Guzzle\Common\XmlElement. -* All commands, both dynamic and concrete, have ApiCommand objects. -* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. -* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. -* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. - -## 2.6.0 - 2012-05-15 - -* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder -* [BC] Executing a Command returns the result of the command rather than the command -* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. -* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. -* [BC] Moving ResourceIterator* to Guzzle\Service\Resource -* [BC] Completely refactored ResourceIterators to iterate over a cloned command object -* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate -* [BC] Guzzle\Guzzle is now deprecated -* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject -* Adding Guzzle\Version class to give version information about Guzzle -* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() -* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data -* ServiceDescription and ServiceBuilder are now cacheable using similar configs -* Changing the format of XML and JSON service builder configs. Backwards compatible. -* Cleaned up Cookie parsing -* Trimming the default Guzzle User-Agent header -* Adding a setOnComplete() method to Commands that is called when a command completes -* Keeping track of requests that were mocked in the MockPlugin -* Fixed a caching bug in the CacheAdapterFactory -* Inspector objects can be injected into a Command object -* Refactoring a lot of code and tests to be case insensitive when dealing with headers -* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL -* Adding the ability to set global option overrides to service builder configs -* Adding the ability to include other service builder config files from within XML and JSON files -* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. - -## 2.5.0 - 2012-05-08 - -* Major performance improvements -* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. -* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. -* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" -* Added the ability to passed parameters to all requests created by a client -* Added callback functionality to the ExponentialBackoffPlugin -* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. -* Rewinding request stream bodies when retrying requests -* Exception is thrown when JSON response body cannot be decoded -* Added configurable magic method calls to clients and commands. This is off by default. -* Fixed a defect that added a hash to every parsed URL part -* Fixed duplicate none generation for OauthPlugin. -* Emitting an event each time a client is generated by a ServiceBuilder -* Using an ApiParams object instead of a Collection for parameters of an ApiCommand -* cache.* request parameters should be renamed to params.cache.* -* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. -* Added the ability to disable type validation of service descriptions -* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/LICENSE b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/LICENSE deleted file mode 100644 index d51aa69..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/README.md b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/README.md deleted file mode 100644 index 363d6f8..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/README.md +++ /dev/null @@ -1,79 +0,0 @@ -![Guzzle](.github/logo.png?raw=true) - -# Guzzle, PHP HTTP client - -[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) -[![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) -[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) - -Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and -trivial to integrate with web services. - -- Simple interface for building query strings, POST requests, streaming large - uploads, streaming large downloads, using HTTP cookies, uploading JSON data, - etc... -- Can send both synchronous and asynchronous requests using the same interface. -- Uses PSR-7 interfaces for requests, responses, and streams. This allows you - to utilize other PSR-7 compatible libraries with Guzzle. -- Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients. -- Abstracts away the underlying HTTP transport, allowing you to write - environment and transport agnostic code; i.e., no hard dependency on cURL, - PHP streams, sockets, or non-blocking event loops. -- Middleware system allows you to augment and compose client behavior. - -```php -$client = new \GuzzleHttp\Client(); -$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); - -echo $response->getStatusCode(); // 200 -echo $response->getHeaderLine('content-type'); // 'application/json; charset=utf8' -echo $response->getBody(); // '{"id": 1420053, "name": "guzzle", ...}' - -// Send an asynchronous request. -$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); -$promise = $client->sendAsync($request)->then(function ($response) { - echo 'I completed! ' . $response->getBody(); -}); - -$promise->wait(); -``` - -## Help and docs - -We use GitHub issues only to discuss bugs and new features. For support please refer to: - -- [Documentation](http://guzzlephp.org/) -- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle) -- [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](http://slack.httplug.io/) -- [Gitter](https://gitter.im/guzzle/guzzle) - - -## Installing Guzzle - -The recommended way to install Guzzle is through -[Composer](https://getcomposer.org/). - -```bash -composer require guzzlehttp/guzzle -``` - - -## Version Guidance - -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | -|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| -| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | -| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | -| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | -| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | -| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >= 7.2 | - -[guzzle-3-repo]: https://github.com/guzzle/guzzle3 -[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x -[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 -[guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5 -[guzzle-7-repo]: https://github.com/guzzle/guzzle -[guzzle-3-docs]: http://guzzle3.readthedocs.org -[guzzle-5-docs]: http://docs.guzzlephp.org/en/5.3/ -[guzzle-6-docs]: http://docs.guzzlephp.org/en/6.5/ -[guzzle-7-docs]: http://docs.guzzlephp.org/en/latest/ diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/UPGRADING.md b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/UPGRADING.md deleted file mode 100644 index 45417a7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/UPGRADING.md +++ /dev/null @@ -1,1253 +0,0 @@ -Guzzle Upgrade Guide -==================== - -6.0 to 7.0 ----------- - -In order to take advantage of the new features of PHP, Guzzle dropped the support -of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return -types for functions and methods have been added wherever possible. - -Please make sure: -- You are calling a function or a method with the correct type. -- If you extend a class of Guzzle; update all signatures on methods you override. - -#### Other backwards compatibility breaking changes - -- Class `GuzzleHttp\UriTemplate` is removed. -- Class `GuzzleHttp\Exception\SeekException` is removed. -- Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`, - `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty - Response as argument. -- Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException` - instead of `GuzzleHttp\Exception\RequestException`. -- Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed. -- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed. -- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead. -- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed. - Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative. -- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed. -- Request option `exception` is removed. Please use `http_errors`. -- Request option `save_to` is removed. Please use `sink`. -- Pool option `pool_size` is removed. Please use `concurrency`. -- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility. -- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation. -- The `log` middleware will log the errors with level `error` instead of `notice` -- Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher). - -#### Native functions calls - -All internal native functions calls of Guzzle are now prefixed with a slash. This -change makes it impossible for method overloading by other libraries or applications. -Example: - -```php -// Before: -curl_version(); - -// After: -\curl_version(); -``` - -For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master). - -5.0 to 6.0 ----------- - -Guzzle now uses [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages. -Due to the fact that these messages are immutable, this prompted a refactoring -of Guzzle to use a middleware based system rather than an event system. Any -HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be -updated to work with the new immutable PSR-7 request and response objects. Any -event listeners or subscribers need to be updated to become middleware -functions that wrap handlers (or are injected into a -`GuzzleHttp\HandlerStack`). - -- Removed `GuzzleHttp\BatchResults` -- Removed `GuzzleHttp\Collection` -- Removed `GuzzleHttp\HasDataTrait` -- Removed `GuzzleHttp\ToArrayInterface` -- The `guzzlehttp/streams` dependency has been removed. Stream functionality - is now present in the `GuzzleHttp\Psr7` namespace provided by the - `guzzlehttp/psr7` package. -- Guzzle no longer uses ReactPHP promises and now uses the - `guzzlehttp/promises` library. We use a custom promise library for three - significant reasons: - 1. React promises (at the time of writing this) are recursive. Promise - chaining and promise resolution will eventually blow the stack. Guzzle - promises are not recursive as they use a sort of trampolining technique. - Note: there has been movement in the React project to modify promises to - no longer utilize recursion. - 2. Guzzle needs to have the ability to synchronously block on a promise to - wait for a result. Guzzle promises allows this functionality (and does - not require the use of recursion). - 3. Because we need to be able to wait on a result, doing so using React - promises requires wrapping react promises with RingPHP futures. This - overhead is no longer needed, reducing stack sizes, reducing complexity, - and improving performance. -- `GuzzleHttp\Mimetypes` has been moved to a function in - `GuzzleHttp\Psr7\mimetype_from_extension` and - `GuzzleHttp\Psr7\mimetype_from_filename`. -- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query - strings must now be passed into request objects as strings, or provided to - the `query` request option when creating requests with clients. The `query` - option uses PHP's `http_build_query` to convert an array to a string. If you - need a different serialization technique, you will need to pass the query - string in as a string. There are a couple helper functions that will make - working with query strings easier: `GuzzleHttp\Psr7\parse_query` and - `GuzzleHttp\Psr7\build_query`. -- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware - system based on PSR-7, using RingPHP and it's middleware system as well adds - more complexity than the benefits it provides. All HTTP handlers that were - present in RingPHP have been modified to work directly with PSR-7 messages - and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces - complexity in Guzzle, removes a dependency, and improves performance. RingPHP - will be maintained for Guzzle 5 support, but will no longer be a part of - Guzzle 6. -- As Guzzle now uses a middleware based systems the event system and RingPHP - integration has been removed. Note: while the event system has been removed, - it is possible to add your own type of event system that is powered by the - middleware system. - - Removed the `Event` namespace. - - Removed the `Subscriber` namespace. - - Removed `Transaction` class - - Removed `RequestFsm` - - Removed `RingBridge` - - `GuzzleHttp\Subscriber\Cookie` is now provided by - `GuzzleHttp\Middleware::cookies` - - `GuzzleHttp\Subscriber\HttpError` is now provided by - `GuzzleHttp\Middleware::httpError` - - `GuzzleHttp\Subscriber\History` is now provided by - `GuzzleHttp\Middleware::history` - - `GuzzleHttp\Subscriber\Mock` is now provided by - `GuzzleHttp\Handler\MockHandler` - - `GuzzleHttp\Subscriber\Prepare` is now provided by - `GuzzleHttp\PrepareBodyMiddleware` - - `GuzzleHttp\Subscriber\Redirect` is now provided by - `GuzzleHttp\RedirectMiddleware` -- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in - `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. -- Static functions in `GuzzleHttp\Utils` have been moved to namespaced - functions under the `GuzzleHttp` namespace. This requires either a Composer - based autoloader or you to include functions.php. -- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to - `GuzzleHttp\ClientInterface::getConfig`. -- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. -- The `json` and `xml` methods of response objects has been removed. With the - migration to strictly adhering to PSR-7 as the interface for Guzzle messages, - adding methods to message interfaces would actually require Guzzle messages - to extend from PSR-7 messages rather then work with them directly. - -## Migrating to middleware - -The change to PSR-7 unfortunately required significant refactoring to Guzzle -due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event -system from plugins. The event system relied on mutability of HTTP messages and -side effects in order to work. With immutable messages, you have to change your -workflow to become more about either returning a value (e.g., functional -middlewares) or setting a value on an object. Guzzle v6 has chosen the -functional middleware approach. - -Instead of using the event system to listen for things like the `before` event, -you now create a stack based middleware function that intercepts a request on -the way in and the promise of the response on the way out. This is a much -simpler and more predictable approach than the event system and works nicely -with PSR-7 middleware. Due to the use of promises, the middleware system is -also asynchronous. - -v5: - -```php -use GuzzleHttp\Event\BeforeEvent; -$client = new GuzzleHttp\Client(); -// Get the emitter and listen to the before event. -$client->getEmitter()->on('before', function (BeforeEvent $e) { - // Guzzle v5 events relied on mutation - $e->getRequest()->setHeader('X-Foo', 'Bar'); -}); -``` - -v6: - -In v6, you can modify the request before it is sent using the `mapRequest` -middleware. The idiomatic way in v6 to modify the request/response lifecycle is -to setup a handler middleware stack up front and inject the handler into a -client. - -```php -use GuzzleHttp\Middleware; -// Create a handler stack that has all of the default middlewares attached -$handler = GuzzleHttp\HandlerStack::create(); -// Push the handler onto the handler stack -$handler->push(Middleware::mapRequest(function (RequestInterface $request) { - // Notice that we have to return a request object - return $request->withHeader('X-Foo', 'Bar'); -})); -// Inject the handler into the client -$client = new GuzzleHttp\Client(['handler' => $handler]); -``` - -## POST Requests - -This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) -and `multipart` request options. `form_params` is an associative array of -strings or array of strings and is used to serialize an -`application/x-www-form-urlencoded` POST request. The -[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) -option is now used to send a multipart/form-data POST request. - -`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add -POST files to a multipart/form-data request. - -The `body` option no longer accepts an array to send POST requests. Please use -`multipart` or `form_params` instead. - -The `base_url` option has been renamed to `base_uri`. - -4.x to 5.0 ----------- - -## Rewritten Adapter Layer - -Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send -HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor -is still supported, but it has now been renamed to `handler`. Instead of -passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP -`callable` that follows the RingPHP specification. - -## Removed Fluent Interfaces - -[Fluent interfaces were removed](https://ocramius.github.io/blog/fluent-interfaces-are-evil/) -from the following classes: - -- `GuzzleHttp\Collection` -- `GuzzleHttp\Url` -- `GuzzleHttp\Query` -- `GuzzleHttp\Post\PostBody` -- `GuzzleHttp\Cookie\SetCookie` - -## Removed functions.php - -Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following -functions can be used as replacements. - -- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` -- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` -- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` -- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, - deprecated in favor of using `GuzzleHttp\Pool::batch()`. - -The "procedural" global client has been removed with no replacement (e.g., -`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` -object as a replacement. - -## `throwImmediately` has been removed - -The concept of "throwImmediately" has been removed from exceptions and error -events. This control mechanism was used to stop a transfer of concurrent -requests from completing. This can now be handled by throwing the exception or -by cancelling a pool of requests or each outstanding future request -individually. - -## headers event has been removed - -Removed the "headers" event. This event was only useful for changing the -body a response once the headers of the response were known. You can implement -a similar behavior in a number of ways. One example might be to use a -FnStream that has access to the transaction being sent. For example, when the -first byte is written, you could check if the response headers match your -expectations, and if so, change the actual stream body that is being -written to. - -## Updates to HTTP Messages - -Removed the `asArray` parameter from -`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header -value as an array, then use the newly added `getHeaderAsArray()` method of -`MessageInterface`. This change makes the Guzzle interfaces compatible with -the PSR-7 interfaces. - -3.x to 4.0 ----------- - -## Overarching changes: - -- Now requires PHP 5.4 or greater. -- No longer requires cURL to send requests. -- Guzzle no longer wraps every exception it throws. Only exceptions that are - recoverable are now wrapped by Guzzle. -- Various namespaces have been removed or renamed. -- No longer requiring the Symfony EventDispatcher. A custom event dispatcher - based on the Symfony EventDispatcher is - now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant - speed and functionality improvements). - -Changes per Guzzle 3.x namespace are described below. - -## Batch - -The `Guzzle\Batch` namespace has been removed. This is best left to -third-parties to implement on top of Guzzle's core HTTP library. - -## Cache - -The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement -has been implemented yet, but hoping to utilize a PSR cache interface). - -## Common - -- Removed all of the wrapped exceptions. It's better to use the standard PHP - library for unrecoverable exceptions. -- `FromConfigInterface` has been removed. -- `Guzzle\Common\Version` has been removed. The VERSION constant can be found - at `GuzzleHttp\ClientInterface::VERSION`. - -### Collection - -- `getAll` has been removed. Use `toArray` to convert a collection to an array. -- `inject` has been removed. -- `keySearch` has been removed. -- `getPath` no longer supports wildcard expressions. Use something better like - JMESPath for this. -- `setPath` now supports appending to an existing array via the `[]` notation. - -### Events - -Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses -`GuzzleHttp\Event\Emitter`. - -- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by - `GuzzleHttp\Event\EmitterInterface`. -- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by - `GuzzleHttp\Event\Emitter`. -- `Symfony\Component\EventDispatcher\Event` is replaced by - `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in - `GuzzleHttp\Event\EventInterface`. -- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and - `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the - event emitter of a request, client, etc. now uses the `getEmitter` method - rather than the `getDispatcher` method. - -#### Emitter - -- Use the `once()` method to add a listener that automatically removes itself - the first time it is invoked. -- Use the `listeners()` method to retrieve a list of event listeners rather than - the `getListeners()` method. -- Use `emit()` instead of `dispatch()` to emit an event from an emitter. -- Use `attach()` instead of `addSubscriber()` and `detach()` instead of - `removeSubscriber()`. - -```php -$mock = new Mock(); -// 3.x -$request->getEventDispatcher()->addSubscriber($mock); -$request->getEventDispatcher()->removeSubscriber($mock); -// 4.x -$request->getEmitter()->attach($mock); -$request->getEmitter()->detach($mock); -``` - -Use the `on()` method to add a listener rather than the `addListener()` method. - -```php -// 3.x -$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); -// 4.x -$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); -``` - -## Http - -### General changes - -- The cacert.pem certificate has been moved to `src/cacert.pem`. -- Added the concept of adapters that are used to transfer requests over the - wire. -- Simplified the event system. -- Sending requests in parallel is still possible, but batching is no longer a - concept of the HTTP layer. Instead, you must use the `complete` and `error` - events to asynchronously manage parallel request transfers. -- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. -- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. -- QueryAggregators have been rewritten so that they are simply callable - functions. -- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in - `functions.php` for an easy to use static client instance. -- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from - `GuzzleHttp\Exception\TransferException`. - -### Client - -Calling methods like `get()`, `post()`, `head()`, etc. no longer create and -return a request, but rather creates a request, sends the request, and returns -the response. - -```php -// 3.0 -$request = $client->get('/'); -$response = $request->send(); - -// 4.0 -$response = $client->get('/'); - -// or, to mirror the previous behavior -$request = $client->createRequest('GET', '/'); -$response = $client->send($request); -``` - -`GuzzleHttp\ClientInterface` has changed. - -- The `send` method no longer accepts more than one request. Use `sendAll` to - send multiple requests in parallel. -- `setUserAgent()` has been removed. Use a default request option instead. You - could, for example, do something like: - `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. -- `setSslVerification()` has been removed. Use default request options instead, - like `$client->setConfig('defaults/verify', true)`. - -`GuzzleHttp\Client` has changed. - -- The constructor now accepts only an associative array. You can include a - `base_url` string or array to use a URI template as the base URL of a client. - You can also specify a `defaults` key that is an associative array of default - request options. You can pass an `adapter` to use a custom adapter, - `batch_adapter` to use a custom adapter for sending requests in parallel, or - a `message_factory` to change the factory used to create HTTP requests and - responses. -- The client no longer emits a `client.create_request` event. -- Creating requests with a client no longer automatically utilize a URI - template. You must pass an array into a creational method (e.g., - `createRequest`, `get`, `put`, etc.) in order to expand a URI template. - -### Messages - -Messages no longer have references to their counterparts (i.e., a request no -longer has a reference to it's response, and a response no loger has a -reference to its request). This association is now managed through a -`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to -these transaction objects using request events that are emitted over the -lifecycle of a request. - -#### Requests with a body - -- `GuzzleHttp\Message\EntityEnclosingRequest` and - `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The - separation between requests that contain a body and requests that do not - contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` - handles both use cases. -- Any method that previously accepts a `GuzzleHttp\Response` object now accept a - `GuzzleHttp\Message\ResponseInterface`. -- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to - `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create - both requests and responses and is implemented in - `GuzzleHttp\Message\MessageFactory`. -- POST field and file methods have been removed from the request object. You - must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` - to control the format of a POST body. Requests that are created using a - standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use - a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if - the method is POST and no body is provided. - -```php -$request = $client->createRequest('POST', '/'); -$request->getBody()->setField('foo', 'bar'); -$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); -``` - -#### Headers - -- `GuzzleHttp\Message\Header` has been removed. Header values are now simply - represented by an array of values or as a string. Header values are returned - as a string by default when retrieving a header value from a message. You can - pass an optional argument of `true` to retrieve a header value as an array - of strings instead of a single concatenated string. -- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to - `GuzzleHttp\Post`. This interface has been simplified and now allows the - addition of arbitrary headers. -- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most - of the custom headers are now handled separately in specific - subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has - been updated to properly handle headers that contain parameters (like the - `Link` header). - -#### Responses - -- `GuzzleHttp\Message\Response::getInfo()` and - `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event - system to retrieve this type of information. -- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. -- `GuzzleHttp\Message\Response::getMessage()` has been removed. -- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific - methods have moved to the CacheSubscriber. -- Header specific helper functions like `getContentMd5()` have been removed. - Just use `getHeader('Content-MD5')` instead. -- `GuzzleHttp\Message\Response::setRequest()` and - `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event - system to work with request and response objects as a transaction. -- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the - Redirect subscriber instead. -- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have - been removed. Use `getStatusCode()` instead. - -#### Streaming responses - -Streaming requests can now be created by a client directly, returning a -`GuzzleHttp\Message\ResponseInterface` object that contains a body stream -referencing an open PHP HTTP stream. - -```php -// 3.0 -use Guzzle\Stream\PhpStreamRequestFactory; -$request = $client->get('/'); -$factory = new PhpStreamRequestFactory(); -$stream = $factory->fromRequest($request); -$data = $stream->read(1024); - -// 4.0 -$response = $client->get('/', ['stream' => true]); -// Read some data off of the stream in the response body -$data = $response->getBody()->read(1024); -``` - -#### Redirects - -The `configureRedirects()` method has been removed in favor of a -`allow_redirects` request option. - -```php -// Standard redirects with a default of a max of 5 redirects -$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); - -// Strict redirects with a custom number of redirects -$request = $client->createRequest('GET', '/', [ - 'allow_redirects' => ['max' => 5, 'strict' => true] -]); -``` - -#### EntityBody - -EntityBody interfaces and classes have been removed or moved to -`GuzzleHttp\Stream`. All classes and interfaces that once required -`GuzzleHttp\EntityBodyInterface` now require -`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no -longer uses `GuzzleHttp\EntityBody::factory` but now uses -`GuzzleHttp\Stream\Stream::factory` or even better: -`GuzzleHttp\Stream\create()`. - -- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` -- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` -- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` -- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` -- `Guzzle\Http\IoEmittyinEntityBody` has been removed. - -#### Request lifecycle events - -Requests previously submitted a large number of requests. The number of events -emitted over the lifecycle of a request has been significantly reduced to make -it easier to understand how to extend the behavior of a request. All events -emitted during the lifecycle of a request now emit a custom -`GuzzleHttp\Event\EventInterface` object that contains context providing -methods and a way in which to modify the transaction at that specific point in -time (e.g., intercept the request and set a response on the transaction). - -- `request.before_send` has been renamed to `before` and now emits a - `GuzzleHttp\Event\BeforeEvent` -- `request.complete` has been renamed to `complete` and now emits a - `GuzzleHttp\Event\CompleteEvent`. -- `request.sent` has been removed. Use `complete`. -- `request.success` has been removed. Use `complete`. -- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. -- `request.exception` has been removed. Use `error`. -- `request.receive.status_line` has been removed. -- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to - maintain a status update. -- `curl.callback.write` has been removed. Use a custom `StreamInterface` to - intercept writes. -- `curl.callback.read` has been removed. Use a custom `StreamInterface` to - intercept reads. - -`headers` is a new event that is emitted after the response headers of a -request have been received before the body of the response is downloaded. This -event emits a `GuzzleHttp\Event\HeadersEvent`. - -You can intercept a request and inject a response using the `intercept()` event -of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and -`GuzzleHttp\Event\ErrorEvent` event. - -See: http://docs.guzzlephp.org/en/latest/events.html - -## Inflection - -The `Guzzle\Inflection` namespace has been removed. This is not a core concern -of Guzzle. - -## Iterator - -The `Guzzle\Iterator` namespace has been removed. - -- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and - `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of - Guzzle itself. -- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent - class is shipped with PHP 5.4. -- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because - it's easier to just wrap an iterator in a generator that maps values. - -For a replacement of these iterators, see https://github.com/nikic/iter - -## Log - -The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The -`Guzzle\Log` namespace has been removed. Guzzle now relies on -`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been -moved to `GuzzleHttp\Subscriber\Log\Formatter`. - -## Parser - -The `Guzzle\Parser` namespace has been removed. This was previously used to -make it possible to plug in custom parsers for cookies, messages, URI -templates, and URLs; however, this level of complexity is not needed in Guzzle -so it has been removed. - -- Cookie: Cookie parsing logic has been moved to - `GuzzleHttp\Cookie\SetCookie::fromString`. -- Message: Message parsing logic for both requests and responses has been moved - to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only - used in debugging or deserializing messages, so it doesn't make sense for - Guzzle as a library to add this level of complexity to parsing messages. -- UriTemplate: URI template parsing has been moved to - `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL - URI template library if it is installed. -- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously - it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, - then developers are free to subclass `GuzzleHttp\Url`. - -## Plugin - -The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. -Several plugins are shipping with the core Guzzle library under this namespace. - -- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar - code has moved to `GuzzleHttp\Cookie`. -- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. -- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is - received. -- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. -- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before - sending. This subscriber is attached to all requests by default. -- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. - -The following plugins have been removed (third-parties are free to re-implement -these if needed): - -- `GuzzleHttp\Plugin\Async` has been removed. -- `GuzzleHttp\Plugin\CurlAuth` has been removed. -- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This - functionality should instead be implemented with event listeners that occur - after normal response parsing occurs in the guzzle/command package. - -The following plugins are not part of the core Guzzle package, but are provided -in separate repositories: - -- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler - to build custom retry policies using simple functions rather than various - chained classes. See: https://github.com/guzzle/retry-subscriber -- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to - https://github.com/guzzle/cache-subscriber -- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to - https://github.com/guzzle/log-subscriber -- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to - https://github.com/guzzle/message-integrity-subscriber -- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to - `GuzzleHttp\Subscriber\MockSubscriber`. -- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to - https://github.com/guzzle/oauth-subscriber - -## Service - -The service description layer of Guzzle has moved into two separate packages: - -- http://github.com/guzzle/command Provides a high level abstraction over web - services by representing web service operations using commands. -- http://github.com/guzzle/guzzle-services Provides an implementation of - guzzle/command that provides request serialization and response parsing using - Guzzle service descriptions. - -## Stream - -Stream have moved to a separate package available at -https://github.com/guzzle/streams. - -`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take -on the responsibilities of `Guzzle\Http\EntityBody` and -`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number -of methods implemented by the `StreamInterface` has been drastically reduced to -allow developers to more easily extend and decorate stream behavior. - -## Removed methods from StreamInterface - -- `getStream` and `setStream` have been removed to better encapsulate streams. -- `getMetadata` and `setMetadata` have been removed in favor of - `GuzzleHttp\Stream\MetadataStreamInterface`. -- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been - removed. This data is accessible when - using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. -- `rewind` has been removed. Use `seek(0)` for a similar behavior. - -## Renamed methods - -- `detachStream` has been renamed to `detach`. -- `feof` has been renamed to `eof`. -- `ftell` has been renamed to `tell`. -- `readLine` has moved from an instance method to a static class method of - `GuzzleHttp\Stream\Stream`. - -## Metadata streams - -`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams -that contain additional metadata accessible via `getMetadata()`. -`GuzzleHttp\Stream\StreamInterface::getMetadata` and -`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. - -## StreamRequestFactory - -The entire concept of the StreamRequestFactory has been removed. The way this -was used in Guzzle 3 broke the actual interface of sending streaming requests -(instead of getting back a Response, you got a StreamInterface). Streaming -PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. - -3.6 to 3.7 ----------- - -### Deprecations - -- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: - -```php -\Guzzle\Common\Version::$emitWarnings = true; -``` - -The following APIs and options have been marked as deprecated: - -- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -- Marked `Guzzle\Common\Collection::inject()` as deprecated. -- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use - `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or - `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` - -3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational -request methods. When paired with a client's configuration settings, these options allow you to specify default settings -for various aspects of a request. Because these options make other previous configuration options redundant, several -configuration options and methods of a client and AbstractCommand have been deprecated. - -- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. -- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. -- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` -- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 - - $command = $client->getCommand('foo', array( - 'command.headers' => array('Test' => '123'), - 'command.response_body' => '/path/to/file' - )); - - // Should be changed to: - - $command = $client->getCommand('foo', array( - 'command.request_options' => array( - 'headers' => array('Test' => '123'), - 'save_as' => '/path/to/file' - ) - )); - -### Interface changes - -Additions and changes (you will need to update any implementations or subclasses you may have created): - -- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -- Added `Guzzle\Stream\StreamInterface::isRepeatable` -- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. - -The following methods were removed from interfaces. All of these methods are still available in the concrete classes -that implement them, but you should update your code to use alternative methods: - -- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or - `$client->setDefaultOption('headers/{header_name}', 'value')`. or - `$client->setDefaultOption('headers', array('header_name' => 'value'))`. -- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. -- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. -- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. -- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. -- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. - -### Cache plugin breaking changes - -- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -- Always setting X-cache headers on cached responses -- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -- Added `CacheStorageInterface::purge($url)` -- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -3.5 to 3.6 ----------- - -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). - For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). - Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Moved getLinks() from Response to just be used on a Link header object. - -If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the -HeaderInterface (e.g. toArray(), getAll(), etc.). - -### Interface changes - -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() - -### Removed deprecated functions - -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). - -### Deprecations - -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. - -### Other changes - -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess - -3.3 to 3.4 ----------- - -Base URLs of a client now follow the rules of https://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. - -3.2 to 3.3 ----------- - -### Response::getEtag() quote stripping removed - -`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header - -### Removed `Guzzle\Http\Utils` - -The `Guzzle\Http\Utils` class was removed. This class was only used for testing. - -### Stream wrapper and type - -`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. - -### curl.emit_io became emit_io - -Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the -'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' - -3.1 to 3.2 ----------- - -### CurlMulti is no longer reused globally - -Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added -to a single client can pollute requests dispatched from other clients. - -If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the -ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is -created. - -```php -$multi = new Guzzle\Http\Curl\CurlMulti(); -$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); -$builder->addListener('service_builder.create_client', function ($event) use ($multi) { - $event['client']->setCurlMulti($multi); -} -}); -``` - -### No default path - -URLs no longer have a default path value of '/' if no path was specified. - -Before: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com/ -``` - -After: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com -``` - -### Less verbose BadResponseException - -The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and -response information. You can, however, get access to the request and response object by calling `getRequest()` or -`getResponse()` on the exception object. - -### Query parameter aggregation - -Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a -setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is -responsible for handling the aggregation of multi-valued query string variables into a flattened hash. - -2.8 to 3.x ----------- - -### Guzzle\Service\Inspector - -Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` - -**Before** - -```php -use Guzzle\Service\Inspector; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Inspector::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -**After** - -```php -use Guzzle\Common\Collection; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Collection::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -### Convert XML Service Descriptions to JSON - -**Before** - -```xml - - - - - - Get a list of groups - - - Uses a search query to get a list of groups - - - - Create a group - - - - - Delete a group by ID - - - - - - - Update a group - - - - - - -``` - -**After** - -```json -{ - "name": "Zendesk REST API v2", - "apiVersion": "2012-12-31", - "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", - "operations": { - "list_groups": { - "httpMethod":"GET", - "uri": "groups.json", - "summary": "Get a list of groups" - }, - "search_groups":{ - "httpMethod":"GET", - "uri": "search.json?query=\"{query} type:group\"", - "summary": "Uses a search query to get a list of groups", - "parameters":{ - "query":{ - "location": "uri", - "description":"Zendesk Search Query", - "type": "string", - "required": true - } - } - }, - "create_group": { - "httpMethod":"POST", - "uri": "groups.json", - "summary": "Create a group", - "parameters":{ - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - }, - "delete_group": { - "httpMethod":"DELETE", - "uri": "groups/{id}.json", - "summary": "Delete a group", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to delete by ID", - "type": "integer", - "required": true - } - } - }, - "get_group": { - "httpMethod":"GET", - "uri": "groups/{id}.json", - "summary": "Get a ticket", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to get by ID", - "type": "integer", - "required": true - } - } - }, - "update_group": { - "httpMethod":"PUT", - "uri": "groups/{id}.json", - "summary": "Update a group", - "parameters":{ - "id": { - "location": "uri", - "description":"Group to update by ID", - "type": "integer", - "required": true - }, - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - } -} -``` - -### Guzzle\Service\Description\ServiceDescription - -Commands are now called Operations - -**Before** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getCommands(); // @returns ApiCommandInterface[] -$sd->hasCommand($name); -$sd->getCommand($name); // @returns ApiCommandInterface|null -$sd->addCommand($command); // @param ApiCommandInterface $command -``` - -**After** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getOperations(); // @returns OperationInterface[] -$sd->hasOperation($name); -$sd->getOperation($name); // @returns OperationInterface|null -$sd->addOperation($operation); // @param OperationInterface $operation -``` - -### Guzzle\Common\Inflection\Inflector - -Namespace is now `Guzzle\Inflection\Inflector` - -### Guzzle\Http\Plugin - -Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. - -### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log - -Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. - -**Before** - -```php -use Guzzle\Common\Log\ClosureLogAdapter; -use Guzzle\Http\Plugin\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $verbosity is an integer indicating desired message verbosity level -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); -``` - -**After** - -```php -use Guzzle\Log\ClosureLogAdapter; -use Guzzle\Log\MessageFormatter; -use Guzzle\Plugin\Log\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $format is a string indicating desired message format -- @see MessageFormatter -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); -``` - -### Guzzle\Http\Plugin\CurlAuthPlugin - -Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. - -### Guzzle\Http\Plugin\ExponentialBackoffPlugin - -Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. - -**Before** - -```php -use Guzzle\Http\Plugin\ExponentialBackoffPlugin; - -$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( - ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) - )); - -$client->addSubscriber($backoffPlugin); -``` - -**After** - -```php -use Guzzle\Plugin\Backoff\BackoffPlugin; -use Guzzle\Plugin\Backoff\HttpBackoffStrategy; - -// Use convenient factory method instead -- see implementation for ideas of what -// you can do with chaining backoff strategies -$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( - HttpBackoffStrategy::getDefaultFailureCodes(), array(429) - )); -$client->addSubscriber($backoffPlugin); -``` - -### Known Issues - -#### [BUG] Accept-Encoding header behavior changed unintentionally. - -(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) - -In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to -properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. -See issue #217 for a workaround, or use a version containing the fix. diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/composer.json b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/composer.json deleted file mode 100644 index 11a366c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/composer.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "guzzlehttp/guzzle", - "type": "library", - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "framework", - "http", - "rest", - "web service", - "curl", - "client", - "HTTP client", - "PSR-7", - "PSR-18" - ], - "homepage": "http://guzzlephp.org/", - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "require": { - "php": "^7.2.5 || ^8.0", - "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7", - "psr/http-client": "^1.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "config": { - "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-master": "7.1-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\": "tests/" - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizer.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizer.php deleted file mode 100644 index 6eca94e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizer.php +++ /dev/null @@ -1,28 +0,0 @@ -truncateAt = $truncateAt; - } - - /** - * Returns a summarized message body. - */ - public function summarize(MessageInterface $message): ?string - { - return $this->truncateAt === null - ? \GuzzleHttp\Psr7\Message::bodySummary($message) - : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php deleted file mode 100644 index 3e02e03..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php +++ /dev/null @@ -1,13 +0,0 @@ - 'http://www.foo.com/1.0/', - * 'timeout' => 0, - * 'allow_redirects' => false, - * 'proxy' => '192.168.16.1:10' - * ]); - * - * Client configuration settings include the following options: - * - * - handler: (callable) Function that transfers HTTP requests over the - * wire. The function is called with a Psr7\Http\Message\RequestInterface - * and array of transfer options, and must return a - * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a - * Psr7\Http\Message\ResponseInterface on success. - * If no handler is provided, a default handler will be created - * that enables all of the request options below by attaching all of the - * default middleware to the handler. - * - base_uri: (string|UriInterface) Base URI of the client that is merged - * into relative URIs. Can be a string or instance of UriInterface. - * - **: any request option - * - * @param array $config Client configuration settings. - * - * @see \GuzzleHttp\RequestOptions for a list of available request options. - */ - public function __construct(array $config = []) - { - if (!isset($config['handler'])) { - $config['handler'] = HandlerStack::create(); - } elseif (!\is_callable($config['handler'])) { - throw new InvalidArgumentException('handler must be a callable'); - } - - // Convert the base_uri to a UriInterface - if (isset($config['base_uri'])) { - $config['base_uri'] = Psr7\Utils::uriFor($config['base_uri']); - } - - $this->configureDefaults($config); - } - - /** - * @param string $method - * @param array $args - * - * @return PromiseInterface|ResponseInterface - * - * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0. - */ - public function __call($method, $args) - { - if (\count($args) < 1) { - throw new InvalidArgumentException('Magic request methods require a URI and optional options array'); - } - - $uri = $args[0]; - $opts = $args[1] ?? []; - - return \substr($method, -5) === 'Async' - ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) - : $this->request($method, $uri, $opts); - } - - /** - * Asynchronously send an HTTP request. - * - * @param array $options Request options to apply to the given - * request and to the transfer. See \GuzzleHttp\RequestOptions. - */ - public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface - { - // Merge the base URI into the request URI if needed. - $options = $this->prepareDefaults($options); - - return $this->transfer( - $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), - $options - ); - } - - /** - * Send an HTTP request. - * - * @param array $options Request options to apply to the given - * request and to the transfer. See \GuzzleHttp\RequestOptions. - * - * @throws GuzzleException - */ - public function send(RequestInterface $request, array $options = []): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - return $this->sendAsync($request, $options)->wait(); - } - - /** - * The HttpClient PSR (PSR-18) specify this method. - * - * @inheritDoc - */ - public function sendRequest(RequestInterface $request): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - $options[RequestOptions::ALLOW_REDIRECTS] = false; - $options[RequestOptions::HTTP_ERRORS] = false; - - return $this->sendAsync($request, $options)->wait(); - } - - /** - * Create and send an asynchronous HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string $method HTTP method - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. - */ - public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface - { - $options = $this->prepareDefaults($options); - // Remove request modifying parameter because it can be done up-front. - $headers = $options['headers'] ?? []; - $body = $options['body'] ?? null; - $version = $options['version'] ?? '1.1'; - // Merge the URI into the base URI. - $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options); - if (\is_array($body)) { - throw $this->invalidBody(); - } - $request = new Psr7\Request($method, $uri, $headers, $body, $version); - // Remove the option so that they are not doubly-applied. - unset($options['headers'], $options['body'], $options['version']); - - return $this->transfer($request, $options); - } - - /** - * Create and send an HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string $method HTTP method. - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. - * - * @throws GuzzleException - */ - public function request(string $method, $uri = '', array $options = []): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - return $this->requestAsync($method, $uri, $options)->wait(); - } - - /** - * Get a client configuration option. - * - * These options include default request options of the client, a "handler" - * (if utilized by the concrete client), and a "base_uri" if utilized by - * the concrete client. - * - * @param string|null $option The config option to retrieve. - * - * @return mixed - * - * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. - */ - public function getConfig(?string $option = null) - { - return $option === null - ? $this->config - : (isset($this->config[$option]) ? $this->config[$option] : null); - } - - private function buildUri(UriInterface $uri, array $config): UriInterface - { - if (isset($config['base_uri'])) { - $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri); - } - - if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) { - $idnOptions = ($config['idn_conversion'] === true) ? \IDNA_DEFAULT : $config['idn_conversion']; - $uri = Utils::idnUriConvert($uri, $idnOptions); - } - - return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; - } - - /** - * Configures the default options for a client. - */ - private function configureDefaults(array $config): void - { - $defaults = [ - 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false, - 'idn_conversion' => false, - ]; - - // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. - - // We can only trust the HTTP_PROXY environment variable in a CLI - // process due to the fact that PHP has no reliable mechanism to - // get environment variables that start with "HTTP_". - if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) { - $defaults['proxy']['http'] = $proxy; - } - - if ($proxy = Utils::getenv('HTTPS_PROXY')) { - $defaults['proxy']['https'] = $proxy; - } - - if ($noProxy = Utils::getenv('NO_PROXY')) { - $cleanedNoProxy = \str_replace(' ', '', $noProxy); - $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); - } - - $this->config = $config + $defaults; - - if (!empty($config['cookies']) && $config['cookies'] === true) { - $this->config['cookies'] = new CookieJar(); - } - - // Add the default user-agent header. - if (!isset($this->config['headers'])) { - $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()]; - } else { - // Add the User-Agent header if one was not already set. - foreach (\array_keys($this->config['headers']) as $name) { - if (\strtolower($name) === 'user-agent') { - return; - } - } - $this->config['headers']['User-Agent'] = Utils::defaultUserAgent(); - } - } - - /** - * Merges default options into the array. - * - * @param array $options Options to modify by reference - */ - private function prepareDefaults(array $options): array - { - $defaults = $this->config; - - if (!empty($defaults['headers'])) { - // Default headers are only added if they are not present. - $defaults['_conditional'] = $defaults['headers']; - unset($defaults['headers']); - } - - // Special handling for headers is required as they are added as - // conditional headers and as headers passed to a request ctor. - if (\array_key_exists('headers', $options)) { - // Allows default headers to be unset. - if ($options['headers'] === null) { - $defaults['_conditional'] = []; - unset($options['headers']); - } elseif (!\is_array($options['headers'])) { - throw new InvalidArgumentException('headers must be an array'); - } - } - - // Shallow merge defaults underneath options. - $result = $options + $defaults; - - // Remove null values. - foreach ($result as $k => $v) { - if ($v === null) { - unset($result[$k]); - } - } - - return $result; - } - - /** - * Transfers the given request and applies request options. - * - * The URI of the request is not modified and the request options are used - * as-is without merging in default options. - * - * @param array $options See \GuzzleHttp\RequestOptions. - */ - private function transfer(RequestInterface $request, array $options): PromiseInterface - { - $request = $this->applyOptions($request, $options); - /** @var HandlerStack $handler */ - $handler = $options['handler']; - - try { - return P\Create::promiseFor($handler($request, $options)); - } catch (\Exception $e) { - return P\Create::rejectionFor($e); - } - } - - /** - * Applies the array of request options to a request. - */ - private function applyOptions(RequestInterface $request, array &$options): RequestInterface - { - $modify = [ - 'set_headers' => [], - ]; - - if (isset($options['headers'])) { - $modify['set_headers'] = $options['headers']; - unset($options['headers']); - } - - if (isset($options['form_params'])) { - if (isset($options['multipart'])) { - throw new InvalidArgumentException('You cannot use ' - . 'form_params and multipart at the same time. Use the ' - . 'form_params option if you want to send application/' - . 'x-www-form-urlencoded requests, and the multipart ' - . 'option to send multipart/form-data requests.'); - } - $options['body'] = \http_build_query($options['form_params'], '', '&'); - unset($options['form_params']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; - } - - if (isset($options['multipart'])) { - $options['body'] = new Psr7\MultipartStream($options['multipart']); - unset($options['multipart']); - } - - if (isset($options['json'])) { - $options['body'] = Utils::jsonEncode($options['json']); - unset($options['json']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/json'; - } - - if (!empty($options['decode_content']) - && $options['decode_content'] !== true - ) { - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']); - $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; - } - - if (isset($options['body'])) { - if (\is_array($options['body'])) { - throw $this->invalidBody(); - } - $modify['body'] = Psr7\Utils::streamFor($options['body']); - unset($options['body']); - } - - if (!empty($options['auth']) && \is_array($options['auth'])) { - $value = $options['auth']; - $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; - switch ($type) { - case 'basic': - // Ensure that we don't have the header in different case and set the new value. - $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); - $modify['set_headers']['Authorization'] = 'Basic ' - . \base64_encode("$value[0]:$value[1]"); - break; - case 'digest': - // @todo: Do not rely on curl - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; - $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - case 'ntlm': - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; - $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - } - } - - if (isset($options['query'])) { - $value = $options['query']; - if (\is_array($value)) { - $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986); - } - if (!\is_string($value)) { - throw new InvalidArgumentException('query must be a string or array'); - } - $modify['query'] = $value; - unset($options['query']); - } - - // Ensure that sink is not an invalid value. - if (isset($options['sink'])) { - // TODO: Add more sink validation? - if (\is_bool($options['sink'])) { - throw new InvalidArgumentException('sink must not be a boolean'); - } - } - - $request = Psr7\Utils::modifyRequest($request, $modify); - if ($request->getBody() instanceof Psr7\MultipartStream) { - // Use a multipart/form-data POST if a Content-Type is not set. - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - . $request->getBody()->getBoundary(); - } - - // Merge in conditional headers if they are not present. - if (isset($options['_conditional'])) { - // Build up the changes so it's in a single clone of the message. - $modify = []; - foreach ($options['_conditional'] as $k => $v) { - if (!$request->hasHeader($k)) { - $modify['set_headers'][$k] = $v; - } - } - $request = Psr7\Utils::modifyRequest($request, $modify); - // Don't pass this internal value along to middleware/handlers. - unset($options['_conditional']); - } - - return $request; - } - - /** - * Return an InvalidArgumentException with pre-set message. - */ - private function invalidBody(): InvalidArgumentException - { - return new InvalidArgumentException('Passing in the "body" request ' - . 'option as an array to send a request is not supported. ' - . 'Please use the "form_params" request option to send a ' - . 'application/x-www-form-urlencoded request, or the "multipart" ' - . 'request option to send a multipart/form-data request.'); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/ClientInterface.php deleted file mode 100644 index f257a1a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ /dev/null @@ -1,84 +0,0 @@ -request('GET', $uri, $options); - } - - /** - * Create and send an HTTP HEAD request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function head($uri, array $options = []): ResponseInterface - { - return $this->request('HEAD', $uri, $options); - } - - /** - * Create and send an HTTP PUT request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function put($uri, array $options = []): ResponseInterface - { - return $this->request('PUT', $uri, $options); - } - - /** - * Create and send an HTTP POST request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function post($uri, array $options = []): ResponseInterface - { - return $this->request('POST', $uri, $options); - } - - /** - * Create and send an HTTP PATCH request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function patch($uri, array $options = []): ResponseInterface - { - return $this->request('PATCH', $uri, $options); - } - - /** - * Create and send an HTTP DELETE request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function delete($uri, array $options = []): ResponseInterface - { - return $this->request('DELETE', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string $method HTTP method - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface; - - /** - * Create and send an asynchronous HTTP GET request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function getAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('GET', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP HEAD request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function headAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('HEAD', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP PUT request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function putAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('PUT', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP POST request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function postAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('POST', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP PATCH request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function patchAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('PATCH', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP DELETE request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function deleteAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('DELETE', $uri, $options); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php deleted file mode 100644 index d6757c6..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ /dev/null @@ -1,313 +0,0 @@ -strictMode = $strictMode; - - foreach ($cookieArray as $cookie) { - if (!($cookie instanceof SetCookie)) { - $cookie = new SetCookie($cookie); - } - $this->setCookie($cookie); - } - } - - /** - * Create a new Cookie jar from an associative array and domain. - * - * @param array $cookies Cookies to create the jar from - * @param string $domain Domain to set the cookies to - */ - public static function fromArray(array $cookies, string $domain): self - { - $cookieJar = new self(); - foreach ($cookies as $name => $value) { - $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true - ])); - } - - return $cookieJar; - } - - /** - * Evaluate if this cookie should be persisted to storage - * that survives between requests. - * - * @param SetCookie $cookie Being evaluated. - * @param bool $allowSessionCookies If we should persist session cookies - */ - public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool - { - if ($cookie->getExpires() || $allowSessionCookies) { - if (!$cookie->getDiscard()) { - return true; - } - } - - return false; - } - - /** - * Finds and returns the cookie based on the name - * - * @param string $name cookie name to search for - * - * @return SetCookie|null cookie that was found or null if not found - */ - public function getCookieByName(string $name): ?SetCookie - { - foreach ($this->cookies as $cookie) { - if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { - return $cookie; - } - } - - return null; - } - - /** - * @inheritDoc - */ - public function toArray(): array - { - return \array_map(static function (SetCookie $cookie): array { - return $cookie->toArray(); - }, $this->getIterator()->getArrayCopy()); - } - - /** - * @inheritDoc - */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void - { - if (!$domain) { - $this->cookies = []; - return; - } elseif (!$path) { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie) use ($domain): bool { - return !$cookie->matchesDomain($domain); - } - ); - } elseif (!$name) { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie) use ($path, $domain): bool { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } else { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } - } - - /** - * @inheritDoc - */ - public function clearSessionCookies(): void - { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie): bool { - return !$cookie->getDiscard() && $cookie->getExpires(); - } - ); - } - - /** - * @inheritDoc - */ - public function setCookie(SetCookie $cookie): bool - { - // If the name string is empty (but not 0), ignore the set-cookie - // string entirely. - $name = $cookie->getName(); - if (!$name && $name !== '0') { - return false; - } - - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== true) { - if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); - } - $this->removeCookieIfEmpty($cookie); - return false; - } - - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - - // Two cookies are identical, when their path, and domain are - // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() - ) { - continue; - } - - // The previously set cookie is a discard cookie and this one is - // not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - - // If the new cookie's expiration is further into the future, then - // replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - - // The cookie exists, so no need to continue - return false; - } - - $this->cookies[] = $cookie; - - return true; - } - - public function count(): int - { - return \count($this->cookies); - } - - /** - * @return \ArrayIterator - */ - public function getIterator(): \ArrayIterator - { - return new \ArrayIterator(\array_values($this->cookies)); - } - - public function extractCookies(RequestInterface $request, ResponseInterface $response): void - { - if ($cookieHeader = $response->getHeader('Set-Cookie')) { - foreach ($cookieHeader as $cookie) { - $sc = SetCookie::fromString($cookie); - if (!$sc->getDomain()) { - $sc->setDomain($request->getUri()->getHost()); - } - if (0 !== \strpos($sc->getPath(), '/')) { - $sc->setPath($this->getCookiePathFromRequest($request)); - } - $this->setCookie($sc); - } - } - } - - /** - * Computes cookie path following RFC 6265 section 5.1.4 - * - * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 - */ - private function getCookiePathFromRequest(RequestInterface $request): string - { - $uriPath = $request->getUri()->getPath(); - if ('' === $uriPath) { - return '/'; - } - if (0 !== \strpos($uriPath, '/')) { - return '/'; - } - if ('/' === $uriPath) { - return '/'; - } - $lastSlashPos = \strrpos($uriPath, '/'); - if (0 === $lastSlashPos || false === $lastSlashPos) { - return '/'; - } - - return \substr($uriPath, 0, $lastSlashPos); - } - - public function withCookieHeader(RequestInterface $request): RequestInterface - { - $values = []; - $uri = $request->getUri(); - $scheme = $uri->getScheme(); - $host = $uri->getHost(); - $path = $uri->getPath() ?: '/'; - - foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme === 'https') - ) { - $values[] = $cookie->getName() . '=' - . $cookie->getValue(); - } - } - - return $values - ? $request->withHeader('Cookie', \implode('; ', $values)) - : $request; - } - - /** - * If a cookie already exists and the server asks to set it again with a - * null value, the cookie must be deleted. - */ - private function removeCookieIfEmpty(SetCookie $cookie): void - { - $cookieValue = $cookie->getValue(); - if ($cookieValue === null || $cookieValue === '') { - $this->clear( - $cookie->getDomain(), - $cookie->getPath(), - $cookie->getName() - ); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php deleted file mode 100644 index 7df374b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ -interface CookieJarInterface extends \Countable, \IteratorAggregate -{ - /** - * Create a request with added cookie headers. - * - * If no matching cookies are found in the cookie jar, then no Cookie - * header is added to the request and the same request is returned. - * - * @param RequestInterface $request Request object to modify. - * - * @return RequestInterface returns the modified request. - */ - public function withCookieHeader(RequestInterface $request): RequestInterface; - - /** - * Extract cookies from an HTTP response and store them in the CookieJar. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface $response Response that was received - */ - public function extractCookies(RequestInterface $request, ResponseInterface $response): void; - - /** - * Sets a cookie in the cookie jar. - * - * @param SetCookie $cookie Cookie to set. - * - * @return bool Returns true on success or false on failure - */ - public function setCookie(SetCookie $cookie): bool; - - /** - * Remove cookies currently held in the cookie jar. - * - * Invoking this method without arguments will empty the whole cookie jar. - * If given a $domain argument only cookies belonging to that domain will - * be removed. If given a $domain and $path argument, cookies belonging to - * the specified path within that domain are removed. If given all three - * arguments, then the cookie with the specified name, path and domain is - * removed. - * - * @param string|null $domain Clears cookies matching a domain - * @param string|null $path Clears cookies matching a domain and path - * @param string|null $name Clears cookies matching a domain, path, and name - */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; - - /** - * Discard all sessions cookies. - * - * Removes cookies that don't have an expire field or a have a discard - * field set to true. To be called when the user agent shuts down according - * to RFC 2965. - */ - public function clearSessionCookies(): void; - - /** - * Converts the cookie jar to an array. - */ - public function toArray(): array; -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php deleted file mode 100644 index 290236d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +++ /dev/null @@ -1,101 +0,0 @@ -filename = $cookieFile; - $this->storeSessionCookies = $storeSessionCookies; - - if (\file_exists($cookieFile)) { - $this->load($cookieFile); - } - } - - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->save($this->filename); - } - - /** - * Saves the cookies to a file. - * - * @param string $filename File to save - * - * @throws \RuntimeException if the file cannot be found or created - */ - public function save(string $filename): void - { - $json = []; - /** @var SetCookie $cookie */ - foreach ($this as $cookie) { - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $jsonStr = Utils::jsonEncode($json); - if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) { - throw new \RuntimeException("Unable to save file {$filename}"); - } - } - - /** - * Load cookies from a JSON formatted file. - * - * Old cookies are kept unless overwritten by newly loaded ones. - * - * @param string $filename Cookie file to load. - * - * @throws \RuntimeException if the file cannot be loaded. - */ - public function load(string $filename): void - { - $json = \file_get_contents($filename); - if (false === $json) { - throw new \RuntimeException("Unable to load file {$filename}"); - } - if ($json === '') { - return; - } - - $data = Utils::jsonDecode($json, true); - if (\is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (\is_scalar($data) && !empty($data)) { - throw new \RuntimeException("Invalid cookie file: {$filename}"); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index 5d51ca9..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,77 +0,0 @@ -sessionKey = $sessionKey; - $this->storeSessionCookies = $storeSessionCookies; - $this->load(); - } - - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - - /** - * Save cookies to the client session - */ - public function save(): void - { - $json = []; - /** @var SetCookie $cookie */ - foreach ($this as $cookie) { - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $_SESSION[$this->sessionKey] = \json_encode($json); - } - - /** - * Load the contents of the client session into the data array - */ - protected function load(): void - { - if (!isset($_SESSION[$this->sessionKey])) { - return; - } - $data = \json_decode($_SESSION[$this->sessionKey], true); - if (\is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (\strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php deleted file mode 100644 index 602370d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ /dev/null @@ -1,410 +0,0 @@ - null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false - ]; - - /** - * @var array Cookie data - */ - private $data; - - /** - * Create a new SetCookie object from a string. - * - * @param string $cookie Set-Cookie header string - */ - public static function fromString(string $cookie): self - { - // Create the default return array - $data = self::$defaults; - // Explode the cookie string using a series of semicolons - $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); - // The name of the cookie (first kvp) must exist and include an equal sign. - if (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) { - return new self($data); - } - - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - $cookieParts = \explode('=', $part, 2); - $key = \trim($cookieParts[0]); - $value = isset($cookieParts[1]) - ? \trim($cookieParts[1], " \n\r\t\0\x0B") - : true; - - // Only check for non-cookies when cookies have been found - if (!isset($data['Name'])) { - $data['Name'] = $key; - $data['Value'] = $value; - } else { - foreach (\array_keys(self::$defaults) as $search) { - if (!\strcasecmp($search, $key)) { - $data[$search] = $value; - continue 2; - } - } - $data[$key] = $value; - } - } - - return new self($data); - } - - /** - * @param array $data Array of cookie data provided by a Cookie parser - */ - public function __construct(array $data = []) - { - /** @var array|null $replaced will be null in case of replace error */ - $replaced = \array_replace(self::$defaults, $data); - if ($replaced === null) { - throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.'); - } - - $this->data = $replaced; - // Extract the Expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the Expires date - $this->setExpires(\time() + $this->getMaxAge()); - } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) { - $this->setExpires($expires); - } - } - - public function __toString() - { - $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; - foreach ($this->data as $k => $v) { - if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { - if ($k === 'Expires') { - $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; - } else { - $str .= ($v === true ? $k : "{$k}={$v}") . '; '; - } - } - } - - return \rtrim($str, '; '); - } - - public function toArray(): array - { - return $this->data; - } - - /** - * Get the cookie name. - * - * @return string - */ - public function getName() - { - return $this->data['Name']; - } - - /** - * Set the cookie name. - * - * @param string $name Cookie name - */ - public function setName($name): void - { - $this->data['Name'] = $name; - } - - /** - * Get the cookie value. - * - * @return string|null - */ - public function getValue() - { - return $this->data['Value']; - } - - /** - * Set the cookie value. - * - * @param string $value Cookie value - */ - public function setValue($value): void - { - $this->data['Value'] = $value; - } - - /** - * Get the domain. - * - * @return string|null - */ - public function getDomain() - { - return $this->data['Domain']; - } - - /** - * Set the domain of the cookie. - * - * @param string $domain - */ - public function setDomain($domain): void - { - $this->data['Domain'] = $domain; - } - - /** - * Get the path. - * - * @return string - */ - public function getPath() - { - return $this->data['Path']; - } - - /** - * Set the path of the cookie. - * - * @param string $path Path of the cookie - */ - public function setPath($path): void - { - $this->data['Path'] = $path; - } - - /** - * Maximum lifetime of the cookie in seconds. - * - * @return int|null - */ - public function getMaxAge() - { - return $this->data['Max-Age']; - } - - /** - * Set the max-age of the cookie. - * - * @param int $maxAge Max age of the cookie in seconds - */ - public function setMaxAge($maxAge): void - { - $this->data['Max-Age'] = $maxAge; - } - - /** - * The UNIX timestamp when the cookie Expires. - * - * @return string|int|null - */ - public function getExpires() - { - return $this->data['Expires']; - } - - /** - * Set the unix timestamp for which the cookie will expire. - * - * @param int|string $timestamp Unix timestamp or any English textual datetime description. - */ - public function setExpires($timestamp): void - { - $this->data['Expires'] = \is_numeric($timestamp) - ? (int) $timestamp - : \strtotime($timestamp); - } - - /** - * Get whether or not this is a secure cookie. - * - * @return bool|null - */ - public function getSecure() - { - return $this->data['Secure']; - } - - /** - * Set whether or not the cookie is secure. - * - * @param bool $secure Set to true or false if secure - */ - public function setSecure($secure): void - { - $this->data['Secure'] = $secure; - } - - /** - * Get whether or not this is a session cookie. - * - * @return bool|null - */ - public function getDiscard() - { - return $this->data['Discard']; - } - - /** - * Set whether or not this is a session cookie. - * - * @param bool $discard Set to true or false if this is a session cookie - */ - public function setDiscard($discard): void - { - $this->data['Discard'] = $discard; - } - - /** - * Get whether or not this is an HTTP only cookie. - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['HttpOnly']; - } - - /** - * Set whether or not this is an HTTP only cookie. - * - * @param bool $httpOnly Set to true or false if this is HTTP only - */ - public function setHttpOnly($httpOnly): void - { - $this->data['HttpOnly'] = $httpOnly; - } - - /** - * Check if the cookie matches a path value. - * - * A request-path path-matches a given cookie-path if at least one of - * the following conditions holds: - * - * - The cookie-path and the request-path are identical. - * - The cookie-path is a prefix of the request-path, and the last - * character of the cookie-path is %x2F ("/"). - * - The cookie-path is a prefix of the request-path, and the first - * character of the request-path that is not included in the cookie- - * path is a %x2F ("/") character. - * - * @param string $requestPath Path to check against - */ - public function matchesPath(string $requestPath): bool - { - $cookiePath = $this->getPath(); - - // Match on exact matches or when path is the default empty "/" - if ($cookiePath === '/' || $cookiePath == $requestPath) { - return true; - } - - // Ensure that the cookie-path is a prefix of the request path. - if (0 !== \strpos($requestPath, $cookiePath)) { - return false; - } - - // Match if the last character of the cookie-path is "/" - if (\substr($cookiePath, -1, 1) === '/') { - return true; - } - - // Match if the first character not included in cookie path is "/" - return \substr($requestPath, \strlen($cookiePath), 1) === '/'; - } - - /** - * Check if the cookie matches a domain value. - * - * @param string $domain Domain to check against - */ - public function matchesDomain(string $domain): bool - { - $cookieDomain = $this->getDomain(); - if (null === $cookieDomain) { - return true; - } - - // Remove the leading '.' as per spec in RFC 6265. - // https://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = \ltrim($cookieDomain, '.'); - - // Domain not set or exact match. - if (!$cookieDomain || !\strcasecmp($domain, $cookieDomain)) { - return true; - } - - // Matching the subdomain according to RFC 6265. - // https://tools.ietf.org/html/rfc6265#section-5.1.3 - if (\filter_var($domain, \FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); - } - - /** - * Check if the cookie is expired. - */ - public function isExpired(): bool - { - return $this->getExpires() !== null && \time() > $this->getExpires(); - } - - /** - * Check if the cookie is valid according to RFC 6265. - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - $name = $this->getName(); - if ($name === '') { - return 'The cookie name must not be empty'; - } - - // Check if any of the invalid characters are present in the cookie name - if (\preg_match( - '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', - $name - )) { - return 'Cookie name must not contain invalid characters: ASCII ' - . 'Control characters (0-31;127), space, tab and the ' - . 'following characters: ()<>@,;:\"/?={}'; - } - - // Value must not be null. 0 and empty string are valid. Empty strings - // are technically against RFC 6265, but known to happen in the wild. - $value = $this->getValue(); - if ($value === null) { - return 'The cookie value must not be empty'; - } - - // Domains must not be empty, but can be 0. "0" is not a valid internet - // domain, but may be used as server name in a private network. - $domain = $this->getDomain(); - if ($domain === null || $domain === '') { - return 'The cookie domain must not be empty'; - } - - return true; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php deleted file mode 100644 index a80956c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +++ /dev/null @@ -1,39 +0,0 @@ -request = $request; - $this->handlerContext = $handlerContext; - } - - /** - * Get the request that caused the exception - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - */ - public function getHandlerContext(): array - { - return $this->handlerContext; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php deleted file mode 100644 index fa3ed69..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +++ /dev/null @@ -1,9 +0,0 @@ -getStatusCode() : 0; - parent::__construct($message, $code, $previous); - $this->request = $request; - $this->response = $response; - $this->handlerContext = $handlerContext; - } - - /** - * Wrap non-RequestExceptions with a RequestException - */ - public static function wrapException(RequestInterface $request, \Throwable $e): RequestException - { - return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); - } - - /** - * Factory method to create a new exception with a normalized error message - * - * @param RequestInterface $request Request sent - * @param ResponseInterface $response Response received - * @param \Throwable|null $previous Previous exception - * @param array $handlerContext Optional handler context - * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer - */ - public static function create( - RequestInterface $request, - ResponseInterface $response = null, - \Throwable $previous = null, - array $handlerContext = [], - BodySummarizerInterface $bodySummarizer = null - ): self { - if (!$response) { - return new self( - 'Error completing request', - $request, - null, - $previous, - $handlerContext - ); - } - - $level = (int) \floor($response->getStatusCode() / 100); - if ($level === 4) { - $label = 'Client error'; - $className = ClientException::class; - } elseif ($level === 5) { - $label = 'Server error'; - $className = ServerException::class; - } else { - $label = 'Unsuccessful request'; - $className = __CLASS__; - } - - $uri = $request->getUri(); - $uri = static::obfuscateUri($uri); - - // Client Error: `GET /` resulted in a `404 Not Found` response: - // ... (truncated) - $message = \sprintf( - '%s: `%s %s` resulted in a `%s %s` response', - $label, - $request->getMethod(), - $uri, - $response->getStatusCode(), - $response->getReasonPhrase() - ); - - $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response); - - if ($summary !== null) { - $message .= ":\n{$summary}\n"; - } - - return new $className($message, $request, $response, $previous, $handlerContext); - } - - /** - * Obfuscates URI if there is a username and a password present - */ - private static function obfuscateUri(UriInterface $uri): UriInterface - { - $userInfo = $uri->getUserInfo(); - - if (false !== ($pos = \strpos($userInfo, ':'))) { - return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); - } - - return $uri; - } - - /** - * Get the request that caused the exception - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * Get the associated response - */ - public function getResponse(): ?ResponseInterface - { - return $this->response; - } - - /** - * Check if a response was received - */ - public function hasResponse(): bool - { - return $this->response !== null; - } - - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - */ - public function getHandlerContext(): array - { - return $this->handlerContext; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php deleted file mode 100644 index 8055e06..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +++ /dev/null @@ -1,10 +0,0 @@ -maxHandles = $maxHandles; - } - - public function create(RequestInterface $request, array $options): EasyHandle - { - if (isset($options['curl']['body_as_string'])) { - $options['_body_as_string'] = $options['curl']['body_as_string']; - unset($options['curl']['body_as_string']); - } - - $easy = new EasyHandle; - $easy->request = $request; - $easy->options = $options; - $conf = $this->getDefaultConf($easy); - $this->applyMethod($easy, $conf); - $this->applyHandlerOptions($easy, $conf); - $this->applyHeaders($easy, $conf); - unset($conf['_headers']); - - // Add handler options from the request configuration options - if (isset($options['curl'])) { - $conf = \array_replace($conf, $options['curl']); - } - - $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); - $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); - curl_setopt_array($easy->handle, $conf); - - return $easy; - } - - public function release(EasyHandle $easy): void - { - $resource = $easy->handle; - unset($easy->handle); - - if (\count($this->handles) >= $this->maxHandles) { - \curl_close($resource); - } else { - // Remove all callback functions as they can hold onto references - // and are not cleaned up by curl_reset. Using curl_setopt_array - // does not work for some reason, so removing each one - // individually. - \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); - \curl_setopt($resource, \CURLOPT_READFUNCTION, null); - \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); - \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); - \curl_reset($resource); - $this->handles[] = $resource; - } - } - - /** - * Completes a cURL transaction, either returning a response promise or a - * rejected promise. - * - * @param callable(RequestInterface, array): PromiseInterface $handler - * @param CurlFactoryInterface $factory Dictates how the handle is released - */ - public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface - { - if (isset($easy->options['on_stats'])) { - self::invokeStats($easy); - } - - if (!$easy->response || $easy->errno) { - return self::finishError($handler, $easy, $factory); - } - - // Return the response if it is present and there is no error. - $factory->release($easy); - - // Rewind the body of the response if possible. - $body = $easy->response->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - - return new FulfilledPromise($easy->response); - } - - private static function invokeStats(EasyHandle $easy): void - { - $curlStats = \curl_getinfo($easy->handle); - $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME); - $stats = new TransferStats( - $easy->request, - $easy->response, - $curlStats['total_time'], - $easy->errno, - $curlStats - ); - ($easy->options['on_stats'])($stats); - } - - /** - * @param callable(RequestInterface, array): PromiseInterface $handler - */ - private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface - { - // Get error information and release the handle to the factory. - $ctx = [ - 'errno' => $easy->errno, - 'error' => \curl_error($easy->handle), - 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), - ] + \curl_getinfo($easy->handle); - $ctx[self::CURL_VERSION_STR] = \curl_version()['version']; - $factory->release($easy); - - // Retry when nothing is present or when curl failed to rewind. - if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { - return self::retryFailedRewind($handler, $easy, $ctx); - } - - return self::createRejection($easy, $ctx); - } - - private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface - { - static $connectionErrors = [ - \CURLE_OPERATION_TIMEOUTED => true, - \CURLE_COULDNT_RESOLVE_HOST => true, - \CURLE_COULDNT_CONNECT => true, - \CURLE_SSL_CONNECT_ERROR => true, - \CURLE_GOT_NOTHING => true, - ]; - - if ($easy->createResponseException) { - return P\Create::rejectionFor( - new RequestException( - 'An error was encountered while creating the response', - $easy->request, - $easy->response, - $easy->createResponseException, - $ctx - ) - ); - } - - // If an exception was encountered during the onHeaders event, then - // return a rejected promise that wraps that exception. - if ($easy->onHeadersException) { - return P\Create::rejectionFor( - new RequestException( - 'An error was encountered during the on_headers event', - $easy->request, - $easy->response, - $easy->onHeadersException, - $ctx - ) - ); - } - - $message = \sprintf( - 'cURL error %s: %s (%s)', - $ctx['errno'], - $ctx['error'], - 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' - ); - $uriString = (string) $easy->request->getUri(); - if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) { - $message .= \sprintf(' for %s', $uriString); - } - - // Create a connection exception if it was a specific error code. - $error = isset($connectionErrors[$easy->errno]) - ? new ConnectException($message, $easy->request, null, $ctx) - : new RequestException($message, $easy->request, $easy->response, null, $ctx); - - return P\Create::rejectionFor($error); - } - - /** - * @return array - */ - private function getDefaultConf(EasyHandle $easy): array - { - $conf = [ - '_headers' => $easy->request->getHeaders(), - \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), - \CURLOPT_RETURNTRANSFER => false, - \CURLOPT_HEADER => false, - \CURLOPT_CONNECTTIMEOUT => 150, - ]; - - if (\defined('CURLOPT_PROTOCOLS')) { - $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; - } - - $version = $easy->request->getProtocolVersion(); - if ($version == 1.1) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - } elseif ($version == 2.0) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; - } else { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; - } - - return $conf; - } - - private function applyMethod(EasyHandle $easy, array &$conf): void - { - $body = $easy->request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size > 0) { - $this->applyBody($easy->request, $easy->options, $conf); - return; - } - - $method = $easy->request->getMethod(); - if ($method === 'PUT' || $method === 'POST') { - // See https://tools.ietf.org/html/rfc7230#section-3.3.2 - if (!$easy->request->hasHeader('Content-Length')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; - } - } elseif ($method === 'HEAD') { - $conf[\CURLOPT_NOBODY] = true; - unset( - $conf[\CURLOPT_WRITEFUNCTION], - $conf[\CURLOPT_READFUNCTION], - $conf[\CURLOPT_FILE], - $conf[\CURLOPT_INFILE] - ); - } - } - - private function applyBody(RequestInterface $request, array $options, array &$conf): void - { - $size = $request->hasHeader('Content-Length') - ? (int) $request->getHeaderLine('Content-Length') - : null; - - // Send the body as a string if the size is less than 1MB OR if the - // [curl][body_as_string] request value is set. - if (($size !== null && $size < 1000000) || !empty($options['_body_as_string'])) { - $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); - // Don't duplicate the Content-Length header - $this->removeHeader('Content-Length', $conf); - $this->removeHeader('Transfer-Encoding', $conf); - } else { - $conf[\CURLOPT_UPLOAD] = true; - if ($size !== null) { - $conf[\CURLOPT_INFILESIZE] = $size; - $this->removeHeader('Content-Length', $conf); - } - $body = $request->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body) { - return $body->read($length); - }; - } - - // If the Expect header is not present, prevent curl from adding it - if (!$request->hasHeader('Expect')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; - } - - // cURL sometimes adds a content-type by default. Prevent this. - if (!$request->hasHeader('Content-Type')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } - - private function applyHeaders(EasyHandle $easy, array &$conf): void - { - foreach ($conf['_headers'] as $name => $values) { - foreach ($values as $value) { - $value = (string) $value; - if ($value === '') { - // cURL requires a special format for empty headers. - // See https://github.com/guzzle/guzzle/issues/1882 for more details. - $conf[\CURLOPT_HTTPHEADER][] = "$name;"; - } else { - $conf[\CURLOPT_HTTPHEADER][] = "$name: $value"; - } - } - } - - // Remove the Accept header if one was not set - if (!$easy->request->hasHeader('Accept')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; - } - } - - /** - * Remove a header from the options array. - * - * @param string $name Case-insensitive header to remove - * @param array $options Array of options to modify - */ - private function removeHeader(string $name, array &$options): void - { - foreach (\array_keys($options['_headers']) as $key) { - if (!\strcasecmp($key, $name)) { - unset($options['_headers'][$key]); - return; - } - } - } - - private function applyHandlerOptions(EasyHandle $easy, array &$conf): void - { - $options = $easy->options; - if (isset($options['verify'])) { - if ($options['verify'] === false) { - unset($conf[\CURLOPT_CAINFO]); - $conf[\CURLOPT_SSL_VERIFYHOST] = 0; - $conf[\CURLOPT_SSL_VERIFYPEER] = false; - } else { - $conf[\CURLOPT_SSL_VERIFYHOST] = 2; - $conf[\CURLOPT_SSL_VERIFYPEER] = true; - if (\is_string($options['verify'])) { - // Throw an error if the file/folder/link path is not valid or doesn't exist. - if (!\file_exists($options['verify'])) { - throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); - } - // If it's a directory or a link to a directory use CURLOPT_CAPATH. - // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. - if ( - \is_dir($options['verify']) || - ( - \is_link($options['verify']) === true && - ($verifyLink = \readlink($options['verify'])) !== false && - \is_dir($verifyLink) - ) - ) { - $conf[\CURLOPT_CAPATH] = $options['verify']; - } else { - $conf[\CURLOPT_CAINFO] = $options['verify']; - } - } - } - } - - if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) { - $accept = $easy->request->getHeaderLine('Accept-Encoding'); - if ($accept) { - $conf[\CURLOPT_ENCODING] = $accept; - } else { - $conf[\CURLOPT_ENCODING] = ''; - // Don't let curl send the header over the wire - $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; - } - } - - if (!isset($options['sink'])) { - // Use a default temp stream if no sink was set. - $options['sink'] = \fopen('php://temp', 'w+'); - } - $sink = $options['sink']; - if (!\is_string($sink)) { - $sink = \GuzzleHttp\Psr7\stream_for($sink); - } elseif (!\is_dir(\dirname($sink))) { - // Ensure that the directory exists before failing in curl. - throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); - } else { - $sink = new LazyOpenStream($sink, 'w+'); - } - $easy->sink = $sink; - $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int { - return $sink->write($write); - }; - - $timeoutRequiresNoSignal = false; - if (isset($options['timeout'])) { - $timeoutRequiresNoSignal |= $options['timeout'] < 1; - $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; - } - - // CURL default value is CURL_IPRESOLVE_WHATEVER - if (isset($options['force_ip_resolve'])) { - if ('v4' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; - } elseif ('v6' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; - } - } - - if (isset($options['connect_timeout'])) { - $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; - $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; - } - - if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { - $conf[\CURLOPT_NOSIGNAL] = true; - } - - if (isset($options['proxy'])) { - if (!\is_array($options['proxy'])) { - $conf[\CURLOPT_PROXY] = $options['proxy']; - } else { - $scheme = $easy->request->getUri()->getScheme(); - if (isset($options['proxy'][$scheme])) { - $host = $easy->request->getUri()->getHost(); - if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) { - $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; - } - } - } - } - - if (isset($options['cert'])) { - $cert = $options['cert']; - if (\is_array($cert)) { - $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; - $cert = $cert[0]; - } - if (!\file_exists($cert)) { - throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); - } - $conf[\CURLOPT_SSLCERT] = $cert; - } - - if (isset($options['ssl_key'])) { - if (\is_array($options['ssl_key'])) { - if (\count($options['ssl_key']) === 2) { - [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key']; - } else { - [$sslKey] = $options['ssl_key']; - } - } - - $sslKey = $sslKey ?? $options['ssl_key']; - - if (!\file_exists($sslKey)) { - throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); - } - $conf[\CURLOPT_SSLKEY] = $sslKey; - } - - if (isset($options['progress'])) { - $progress = $options['progress']; - if (!\is_callable($progress)) { - throw new \InvalidArgumentException('progress client option must be callable'); - } - $conf[\CURLOPT_NOPROGRESS] = false; - $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) { - $progress($downloadSize, $downloaded, $uploadSize, $uploaded); - }; - } - - if (!empty($options['debug'])) { - $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']); - $conf[\CURLOPT_VERBOSE] = true; - } - } - - /** - * This function ensures that a response was set on a transaction. If one - * was not set, then the request is retried if possible. This error - * typically means you are sending a payload, curl encountered a - * "Connection died, retrying a fresh connect" error, tried to rewind the - * stream, and then encountered a "necessary data rewind wasn't possible" - * error, causing the request to be sent through curl_multi_info_read() - * without an error status. - * - * @param callable(RequestInterface, array): PromiseInterface $handler - */ - private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface - { - try { - // Only rewind if the body has been read from. - $body = $easy->request->getBody(); - if ($body->tell() > 0) { - $body->rewind(); - } - } catch (\RuntimeException $e) { - $ctx['error'] = 'The connection unexpectedly failed without ' - . 'providing an error. The request would have been retried, ' - . 'but attempting to rewind the request body failed. ' - . 'Exception: ' . $e; - return self::createRejection($easy, $ctx); - } - - // Retry no more than 3 times before giving up. - if (!isset($easy->options['_curl_retries'])) { - $easy->options['_curl_retries'] = 1; - } elseif ($easy->options['_curl_retries'] == 2) { - $ctx['error'] = 'The cURL request was retried 3 times ' - . 'and did not succeed. The most likely reason for the failure ' - . 'is that cURL was unable to rewind the body of the request ' - . 'and subsequent retries resulted in the same error. Turn on ' - . 'the debug option to see what went wrong. See ' - . 'https://bugs.php.net/bug.php?id=47204 for more information.'; - return self::createRejection($easy, $ctx); - } else { - $easy->options['_curl_retries']++; - } - - return $handler($easy->request, $easy->options); - } - - private function createHeaderFn(EasyHandle $easy): callable - { - if (isset($easy->options['on_headers'])) { - $onHeaders = $easy->options['on_headers']; - - if (!\is_callable($onHeaders)) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - } else { - $onHeaders = null; - } - - return static function ($ch, $h) use ( - $onHeaders, - $easy, - &$startingResponse - ) { - $value = \trim($h); - if ($value === '') { - $startingResponse = true; - try { - $easy->createResponse(); - } catch (\Exception $e) { - $easy->createResponseException = $e; - return -1; - } - if ($onHeaders !== null) { - try { - $onHeaders($easy->response); - } catch (\Exception $e) { - // Associate the exception with the handle and trigger - // a curl header write error by returning 0. - $easy->onHeadersException = $e; - return -1; - } - } - } elseif ($startingResponse) { - $startingResponse = false; - $easy->headers = [$value]; - } else { - $easy->headers[] = $value; - } - return \strlen($h); - }; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php deleted file mode 100644 index fe57ed5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -factory = $options['handle_factory'] - ?? new CurlFactory(3); - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - if (isset($options['delay'])) { - \usleep($options['delay'] * 1000); - } - - $easy = $this->factory->create($request, $options); - \curl_exec($easy->handle); - $easy->errno = \curl_errno($easy->handle); - - return CurlFactory::finish($this, $easy, $this->factory); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php deleted file mode 100644 index 4e31263..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ /dev/null @@ -1,253 +0,0 @@ - An array of delay times, indexed by handle id in `addRequest`. - * - * @see CurlMultiHandler::addRequest - */ - private $delays = []; - - /** - * @var array An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt() - */ - private $options = []; - - /** - * This handler accepts the following options: - * - * - handle_factory: An optional factory used to create curl handles - * - select_timeout: Optional timeout (in seconds) to block before timing - * out while selecting curl handles. Defaults to 1 second. - * - options: An associative array of CURLMOPT_* options and - * corresponding values for curl_multi_setopt() - */ - public function __construct(array $options = []) - { - $this->factory = $options['handle_factory'] ?? new CurlFactory(50); - - if (isset($options['select_timeout'])) { - $this->selectTimeout = $options['select_timeout']; - } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { - @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED); - $this->selectTimeout = (int) $selectTimeout; - } else { - $this->selectTimeout = 1; - } - - $this->options = $options['options'] ?? []; - } - - /** - * @param string $name - * - * @return resource|\CurlMultiHandle - * - * @throws \BadMethodCallException when another field as `_mh` will be gotten - * @throws \RuntimeException when curl can not initialize a multi handle - */ - public function __get($name) - { - if ($name !== '_mh') { - throw new \BadMethodCallException("Can not get other property as '_mh'."); - } - - $multiHandle = \curl_multi_init(); - - if (false === $multiHandle) { - throw new \RuntimeException('Can not initialize curl multi handle.'); - } - - $this->_mh = $multiHandle; - - foreach ($this->options as $option => $value) { - // A warning is raised in case of a wrong option. - curl_multi_setopt($this->_mh, $option, $value); - } - - return $this->_mh; - } - - public function __destruct() - { - if (isset($this->_mh)) { - \curl_multi_close($this->_mh); - unset($this->_mh); - } - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - $easy = $this->factory->create($request, $options); - $id = (int) $easy->handle; - - $promise = new Promise( - [$this, 'execute'], - function () use ($id) { - return $this->cancel($id); - } - ); - - $this->addRequest(['easy' => $easy, 'deferred' => $promise]); - - return $promise; - } - - /** - * Ticks the curl event loop. - */ - public function tick(): void - { - // Add any delayed handles if needed. - if ($this->delays) { - $currentTime = Utils::currentTime(); - foreach ($this->delays as $id => $delay) { - if ($currentTime >= $delay) { - unset($this->delays[$id]); - \curl_multi_add_handle( - $this->_mh, - $this->handles[$id]['easy']->handle - ); - } - } - } - - // Step through the task queue which may add additional requests. - P\Utils::queue()->run(); - - if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { - // Perform a usleep if a select returns -1. - // See: https://bugs.php.net/bug.php?id=61141 - \usleep(250); - } - - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM); - - $this->processMessages(); - } - - /** - * Runs until all outstanding connections have completed. - */ - public function execute(): void - { - $queue = P\Utils::queue(); - - while ($this->handles || !$queue->isEmpty()) { - // If there are no transfers, then sleep for the next delay - if (!$this->active && $this->delays) { - \usleep($this->timeToNext()); - } - $this->tick(); - } - } - - private function addRequest(array $entry): void - { - $easy = $entry['easy']; - $id = (int) $easy->handle; - $this->handles[$id] = $entry; - if (empty($easy->options['delay'])) { - \curl_multi_add_handle($this->_mh, $easy->handle); - } else { - $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000); - } - } - - /** - * Cancels a handle from sending and removes references to it. - * - * @param int $id Handle ID to cancel and remove. - * - * @return bool True on success, false on failure. - */ - private function cancel($id): bool - { - // Cannot cancel if it has been processed. - if (!isset($this->handles[$id])) { - return false; - } - - $handle = $this->handles[$id]['easy']->handle; - unset($this->delays[$id], $this->handles[$id]); - \curl_multi_remove_handle($this->_mh, $handle); - \curl_close($handle); - - return true; - } - - private function processMessages(): void - { - while ($done = \curl_multi_info_read($this->_mh)) { - $id = (int) $done['handle']; - \curl_multi_remove_handle($this->_mh, $done['handle']); - - if (!isset($this->handles[$id])) { - // Probably was cancelled. - continue; - } - - $entry = $this->handles[$id]; - unset($this->handles[$id], $this->delays[$id]); - $entry['easy']->errno = $done['result']; - $entry['deferred']->resolve( - CurlFactory::finish($this, $entry['easy'], $this->factory) - ); - } - } - - private function timeToNext(): int - { - $currentTime = Utils::currentTime(); - $nextTime = \PHP_INT_MAX; - foreach ($this->delays as $time) { - if ($time < $nextTime) { - $nextTime = $time; - } - } - - return ((int) \max(0, $nextTime - $currentTime)) * 1000000; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php deleted file mode 100644 index a68c62f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ /dev/null @@ -1,118 +0,0 @@ -headers)) { - throw new \RuntimeException('No headers have been received'); - } - - // HTTP-version SP status-code SP reason-phrase - $startLine = \explode(' ', \array_shift($this->headers), 3); - $headers = Utils::headersFromLines($this->headers); - $normalizedKeys = Utils::normalizeHeaderKeys($headers); - - if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - unset($headers[$normalizedKeys['content-encoding']]); - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; - - $bodyLength = (int) $this->sink->getSize(); - if ($bodyLength) { - $headers[$normalizedKeys['content-length']] = $bodyLength; - } else { - unset($headers[$normalizedKeys['content-length']]); - } - } - } - - $statusCode = (int) $startLine[1]; - - // Attach a response to the easy handle with the parsed headers. - $this->response = new Response( - $statusCode, - $headers, - $this->sink, - \substr($startLine[0], 5), - isset($startLine[2]) ? (string) $startLine[2] : null - ); - } - - /** - * @param string $name - * - * @return void - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name; - throw new \BadMethodCallException($msg); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php deleted file mode 100644 index 79664e2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ /dev/null @@ -1,211 +0,0 @@ -|null $queue The parameters to be passed to the append function, as an indexed array. - * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. - * @param callable|null $onRejected Callback to invoke when the return value is rejected. - */ - public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) - { - $this->onFulfilled = $onFulfilled; - $this->onRejected = $onRejected; - - if ($queue) { - // array_values included for BC - $this->append(...array_values($queue)); - } - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - if (!$this->queue) { - throw new \OutOfBoundsException('Mock queue is empty'); - } - - if (isset($options['delay']) && \is_numeric($options['delay'])) { - \usleep((int) $options['delay'] * 1000); - } - - $this->lastRequest = $request; - $this->lastOptions = $options; - $response = \array_shift($this->queue); - - if (isset($options['on_headers'])) { - if (!\is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $response = new RequestException($msg, $request, $response, $e); - } - } - - if (\is_callable($response)) { - $response = $response($request, $options); - } - - $response = $response instanceof \Throwable - ? P\Create::rejectionFor($response) - : P\Create::promiseFor($response); - - return $response->then( - function (?ResponseInterface $value) use ($request, $options) { - $this->invokeStats($request, $options, $value); - if ($this->onFulfilled) { - ($this->onFulfilled)($value); - } - - if ($value !== null && isset($options['sink'])) { - $contents = (string) $value->getBody(); - $sink = $options['sink']; - - if (\is_resource($sink)) { - \fwrite($sink, $contents); - } elseif (\is_string($sink)) { - \file_put_contents($sink, $contents); - } elseif ($sink instanceof StreamInterface) { - $sink->write($contents); - } - } - - return $value; - }, - function ($reason) use ($request, $options) { - $this->invokeStats($request, $options, null, $reason); - if ($this->onRejected) { - ($this->onRejected)($reason); - } - return P\Create::rejectionFor($reason); - } - ); - } - - /** - * Adds one or more variadic requests, exceptions, callables, or promises - * to the queue. - * - * @param mixed ...$values - */ - public function append(...$values): void - { - foreach ($values as $value) { - if ($value instanceof ResponseInterface - || $value instanceof \Throwable - || $value instanceof PromiseInterface - || \is_callable($value) - ) { - $this->queue[] = $value; - } else { - throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value)); - } - } - } - - /** - * Get the last received request. - */ - public function getLastRequest(): ?RequestInterface - { - return $this->lastRequest; - } - - /** - * Get the last received request options. - */ - public function getLastOptions(): array - { - return $this->lastOptions; - } - - /** - * Returns the number of remaining items in the queue. - */ - public function count(): int - { - return \count($this->queue); - } - - public function reset(): void - { - $this->queue = []; - } - - /** - * @param mixed $reason Promise or reason. - */ - private function invokeStats( - RequestInterface $request, - array $options, - ResponseInterface $response = null, - $reason = null - ): void { - if (isset($options['on_stats'])) { - $transferTime = $options['transfer_time'] ?? 0; - $stats = new TransferStats($request, $response, $transferTime, $reason); - ($options['on_stats'])($stats); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php deleted file mode 100644 index f045b52..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +++ /dev/null @@ -1,51 +0,0 @@ -withoutHeader('Expect'); - - // Append a content-length header if body size is zero to match - // cURL's behavior. - if (0 === $request->getBody()->getSize()) { - $request = $request->withHeader('Content-Length', '0'); - } - - return $this->createResponse( - $request, - $options, - $this->createStream($request, $options), - $startTime - ); - } catch (\InvalidArgumentException $e) { - throw $e; - } catch (\Exception $e) { - // Determine if the error was a networking error. - $message = $e->getMessage(); - // This list can probably get more comprehensive. - if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed - || false !== \strpos($message, 'Connection refused') - || false !== \strpos($message, "couldn't connect to host") // error on HHVM - || false !== \strpos($message, "connection attempt failed") - ) { - $e = new ConnectException($e->getMessage(), $request, $e); - } else { - $e = RequestException::wrapException($request, $e); - } - $this->invokeStats($options, $request, $startTime, null, $e); - - return P\Create::rejectionFor($e); - } - } - - private function invokeStats( - array $options, - RequestInterface $request, - ?float $startTime, - ResponseInterface $response = null, - \Throwable $error = null - ): void { - if (isset($options['on_stats'])) { - $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []); - ($options['on_stats'])($stats); - } - } - - /** - * @param resource $stream - */ - private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface - { - $hdrs = $this->lastHeaders; - $this->lastHeaders = []; - $parts = \explode(' ', \array_shift($hdrs), 3); - $ver = \explode('/', $parts[0])[1]; - $status = (int) $parts[1]; - $reason = $parts[2] ?? null; - $headers = Utils::headersFromLines($hdrs); - [$stream, $headers] = $this->checkDecode($options, $headers, $stream); - $stream = Psr7\Utils::streamFor($stream); - $sink = $stream; - - if (\strcasecmp('HEAD', $request->getMethod())) { - $sink = $this->createSink($stream, $options); - } - - $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); - - if (isset($options['on_headers'])) { - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $ex = new RequestException($msg, $request, $response, $e); - return P\Create::rejectionFor($ex); - } - } - - // Do not drain when the request is a HEAD request because they have - // no body. - if ($sink !== $stream) { - $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); - } - - $this->invokeStats($options, $request, $startTime, $response, null); - - return new FulfilledPromise($response); - } - - private function createSink(StreamInterface $stream, array $options): StreamInterface - { - if (!empty($options['stream'])) { - return $stream; - } - - $sink = $options['sink'] ?? \fopen('php://temp', 'r+'); - - return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink); - } - - /** - * @param resource $stream - */ - private function checkDecode(array $options, array $headers, $stream): array - { - // Automatically decode responses when instructed. - if (!empty($options['decode_content'])) { - $normalizedKeys = Utils::normalizeHeaderKeys($headers); - if (isset($normalizedKeys['content-encoding'])) { - $encoding = $headers[$normalizedKeys['content-encoding']]; - if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { - $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream)); - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - - // Remove content-encoding header - unset($headers[$normalizedKeys['content-encoding']]); - - // Fix content-length header - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; - $length = (int) $stream->getSize(); - if ($length === 0) { - unset($headers[$normalizedKeys['content-length']]); - } else { - $headers[$normalizedKeys['content-length']] = [$length]; - } - } - } - } - } - - return [$stream, $headers]; - } - - /** - * Drains the source stream into the "sink" client option. - * - * @param string $contentLength Header specifying the amount of - * data to read. - * - * @throws \RuntimeException when the sink option is invalid. - */ - private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface - { - // If a content-length header is provided, then stop reading once - // that number of bytes has been read. This can prevent infinitely - // reading from a stream when dealing with servers that do not honor - // Connection: Close headers. - Psr7\Utils::copyToStream( - $source, - $sink, - (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 - ); - - $sink->seek(0); - $source->close(); - - return $sink; - } - - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Callable that returns stream resource - * - * @return resource - * - * @throws \RuntimeException on error - */ - private function createResource(callable $callback) - { - $errors = []; - \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { - $errors[] = [ - 'message' => $msg, - 'file' => $file, - 'line' => $line - ]; - return true; - }); - - $resource = $callback(); - \restore_error_handler(); - - if (!$resource) { - $message = 'Error creating resource: '; - foreach ($errors as $err) { - foreach ($err as $key => $value) { - $message .= "[$key] $value" . \PHP_EOL; - } - } - throw new \RuntimeException(\trim($message)); - } - - return $resource; - } - - /** - * @return resource - */ - private function createStream(RequestInterface $request, array $options) - { - static $methods; - if (!$methods) { - $methods = \array_flip(\get_class_methods(__CLASS__)); - } - - // HTTP/1.1 streams using the PHP stream wrapper require a - // Connection: close header - if ($request->getProtocolVersion() == '1.1' - && !$request->hasHeader('Connection') - ) { - $request = $request->withHeader('Connection', 'close'); - } - - // Ensure SSL is verified by default - if (!isset($options['verify'])) { - $options['verify'] = true; - } - - $params = []; - $context = $this->getDefaultContext($request); - - if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - - if (!empty($options)) { - foreach ($options as $key => $value) { - $method = "add_{$key}"; - if (isset($methods[$method])) { - $this->{$method}($request, $context, $value, $params); - } - } - } - - if (isset($options['stream_context'])) { - if (!\is_array($options['stream_context'])) { - throw new \InvalidArgumentException('stream_context must be an array'); - } - $context = \array_replace_recursive($context, $options['stream_context']); - } - - // Microsoft NTLM authentication only supported with curl handler - if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) { - throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); - } - - $uri = $this->resolveHost($request, $options); - - $contextResource = $this->createResource( - static function () use ($context, $params) { - return \stream_context_create($context, $params); - } - ); - - return $this->createResource( - function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) { - $resource = \fopen((string) $uri, 'r', false, $contextResource); - $this->lastHeaders = $http_response_header; - - if (false === $resource) { - throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context); - } - - if (isset($options['read_timeout'])) { - $readTimeout = $options['read_timeout']; - $sec = (int) $readTimeout; - $usec = ($readTimeout - $sec) * 100000; - \stream_set_timeout($resource, $sec, $usec); - } - - return $resource; - } - ); - } - - private function resolveHost(RequestInterface $request, array $options): UriInterface - { - $uri = $request->getUri(); - - if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { - if ('v4' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_A); - if (false === $records || !isset($records[0]['ip'])) { - throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); - } - return $uri->withHost($records[0]['ip']); - } - if ('v6' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_AAAA); - if (false === $records || !isset($records[0]['ipv6'])) { - throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); - } - return $uri->withHost('[' . $records[0]['ipv6'] . ']'); - } - } - - return $uri; - } - - private function getDefaultContext(RequestInterface $request): array - { - $headers = ''; - foreach ($request->getHeaders() as $name => $value) { - foreach ($value as $val) { - $headers .= "$name: $val\r\n"; - } - } - - $context = [ - 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, - 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, - ], - ]; - - $body = (string) $request->getBody(); - - if (!empty($body)) { - $context['http']['content'] = $body; - // Prevent the HTTP handler from adding a Content-Type header. - if (!$request->hasHeader('Content-Type')) { - $context['http']['header'] .= "Content-Type:\r\n"; - } - } - - $context['http']['header'] = \rtrim($context['http']['header']); - - return $context; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void - { - if (!\is_array($value)) { - $options['http']['proxy'] = $value; - } else { - $scheme = $request->getUri()->getScheme(); - if (isset($value[$scheme])) { - if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) { - $options['http']['proxy'] = $value[$scheme]; - } - } - } - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value > 0) { - $options['http']['timeout'] = $value; - } - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value === false) { - $options['ssl']['verify_peer'] = false; - $options['ssl']['verify_peer_name'] = false; - - return; - } - - if (\is_string($value)) { - $options['ssl']['cafile'] = $value; - if (!\file_exists($value)) { - throw new \RuntimeException("SSL CA bundle not found: $value"); - } - } elseif ($value !== true) { - throw new \InvalidArgumentException('Invalid verify request option'); - } - - $options['ssl']['verify_peer'] = true; - $options['ssl']['verify_peer_name'] = true; - $options['ssl']['allow_self_signed'] = false; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void - { - if (\is_array($value)) { - $options['ssl']['passphrase'] = $value[1]; - $value = $value[0]; - } - - if (!\file_exists($value)) { - throw new \RuntimeException("SSL certificate not found: {$value}"); - } - - $options['ssl']['local_cert'] = $value; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void - { - self::addNotification( - $params, - static function ($code, $a, $b, $c, $transferred, $total) use ($value) { - if ($code == \STREAM_NOTIFY_PROGRESS) { - $value($total, $transferred, null, null); - } - } - ); - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value === false) { - return; - } - - static $map = [ - \STREAM_NOTIFY_CONNECT => 'CONNECT', - \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - \STREAM_NOTIFY_PROGRESS => 'PROGRESS', - \STREAM_NOTIFY_FAILURE => 'FAILURE', - \STREAM_NOTIFY_COMPLETED => 'COMPLETED', - \STREAM_NOTIFY_RESOLVE => 'RESOLVE', - ]; - static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; - - $value = Utils::debugResource($value); - $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); - self::addNotification( - $params, - static function (int $code, ...$passed) use ($ident, $value, $map, $args): void { - \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (\array_filter($passed) as $i => $v) { - \fwrite($value, $args[$i] . ': "' . $v . '" '); - } - \fwrite($value, "\n"); - } - ); - } - - private static function addNotification(array &$params, callable $notify): void - { - // Wrap the existing function if needed. - if (!isset($params['notification'])) { - $params['notification'] = $notify; - } else { - $params['notification'] = self::callArray([ - $params['notification'], - $notify - ]); - } - } - - private static function callArray(array $functions): callable - { - return static function (...$args) use ($functions) { - foreach ($functions as $fn) { - $fn(...$args); - } - }; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/HandlerStack.php deleted file mode 100644 index b67239e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ /dev/null @@ -1,271 +0,0 @@ -push(Middleware::httpErrors(), 'http_errors'); - $stack->push(Middleware::redirect(), 'allow_redirects'); - $stack->push(Middleware::cookies(), 'cookies'); - $stack->push(Middleware::prepareBody(), 'prepare_body'); - - return $stack; - } - - /** - * @param null|callable(RequestInterface, array): PromiseInterface $handler Underlying HTTP handler. - */ - public function __construct(callable $handler = null) - { - $this->handler = $handler; - } - - /** - * Invokes the handler stack as a composed handler - * - * @return ResponseInterface|PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $handler = $this->resolve(); - - return $handler($request, $options); - } - - /** - * Dumps a string representation of the stack. - * - * @return string - */ - public function __toString() - { - $depth = 0; - $stack = []; - - if ($this->handler !== null) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); - } - - $result = ''; - foreach (\array_reverse($this->stack) as $tuple) { - $depth++; - $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); - $result = "> {$str}\n{$result}"; - $stack[] = $str; - } - - foreach (\array_keys($stack) as $k) { - $result .= "< {$stack[$k]}\n"; - } - - return $result; - } - - /** - * Set the HTTP handler that actually returns a promise. - * - * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and - * returns a Promise. - */ - public function setHandler(callable $handler): void - { - $this->handler = $handler; - $this->cached = null; - } - - /** - * Returns true if the builder has a handler. - */ - public function hasHandler(): bool - { - return $this->handler !== null ; - } - - /** - * Unshift a middleware to the bottom of the stack. - * - * @param callable(callable): callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function unshift(callable $middleware, ?string $name = null): void - { - \array_unshift($this->stack, [$middleware, $name]); - $this->cached = null; - } - - /** - * Push a middleware to the top of the stack. - * - * @param callable(callable): callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function push(callable $middleware, string $name = ''): void - { - $this->stack[] = [$middleware, $name]; - $this->cached = null; - } - - /** - * Add a middleware before another middleware by name. - * - * @param string $findName Middleware to find - * @param callable(callable): callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function before(string $findName, callable $middleware, string $withName = ''): void - { - $this->splice($findName, $withName, $middleware, true); - } - - /** - * Add a middleware after another middleware by name. - * - * @param string $findName Middleware to find - * @param callable(callable): callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function after(string $findName, callable $middleware, string $withName = ''): void - { - $this->splice($findName, $withName, $middleware, false); - } - - /** - * Remove a middleware by instance or name from the stack. - * - * @param callable|string $remove Middleware to remove by instance or name. - */ - public function remove($remove): void - { - $this->cached = null; - $idx = \is_callable($remove) ? 0 : 1; - $this->stack = \array_values(\array_filter( - $this->stack, - static function ($tuple) use ($idx, $remove) { - return $tuple[$idx] !== $remove; - } - )); - } - - /** - * Compose the middleware and handler into a single callable function. - * - * @return callable(RequestInterface, array): PromiseInterface - */ - public function resolve(): callable - { - if ($this->cached === null) { - if (($prev = $this->handler) === null) { - throw new \LogicException('No handler has been specified'); - } - - foreach (\array_reverse($this->stack) as $fn) { - /** @var callable(RequestInterface, array): PromiseInterface $prev */ - $prev = $fn[0]($prev); - } - - $this->cached = $prev; - } - - return $this->cached; - } - - private function findByName(string $name): int - { - foreach ($this->stack as $k => $v) { - if ($v[1] === $name) { - return $k; - } - } - - throw new \InvalidArgumentException("Middleware not found: $name"); - } - - /** - * Splices a function into the middleware list at a specific position. - */ - private function splice(string $findName, string $withName, callable $middleware, bool $before): void - { - $this->cached = null; - $idx = $this->findByName($findName); - $tuple = [$middleware, $withName]; - - if ($before) { - if ($idx === 0) { - \array_unshift($this->stack, $tuple); - } else { - $replacement = [$tuple, $this->stack[$idx]]; - \array_splice($this->stack, $idx, 1, $replacement); - } - } elseif ($idx === \count($this->stack) - 1) { - $this->stack[] = $tuple; - } else { - $replacement = [$this->stack[$idx], $tuple]; - \array_splice($this->stack, $idx, 1, $replacement); - } - } - - /** - * Provides a debug string for a given callable. - * - * @param callable $fn Function to write as a string. - */ - private function debugCallable($fn): string - { - if (\is_string($fn)) { - return "callable({$fn})"; - } - - if (\is_array($fn)) { - return \is_string($fn[0]) - ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])"; - } - - /** @var object $fn */ - return 'callable(' . \spl_object_hash($fn) . ')'; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatter.php deleted file mode 100644 index 238770f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ /dev/null @@ -1,198 +0,0 @@ ->>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; - public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; - - /** - * @var string Template used to format log messages - */ - private $template; - - /** - * @param string $template Log message template - */ - public function __construct(?string $template = self::CLF) - { - $this->template = $template ?: self::CLF; - } - - /** - * Returns a formatted message string. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface|null $response Response that was received - * @param \Throwable|null $error Exception that was received - */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string - { - $cache = []; - - /** @var string */ - return \preg_replace_callback( - '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', - function (array $matches) use ($request, $response, $error, &$cache) { - if (isset($cache[$matches[1]])) { - return $cache[$matches[1]]; - } - - $result = ''; - switch ($matches[1]) { - case 'request': - $result = Psr7\Message::toString($request); - break; - case 'response': - $result = $response ? Psr7\Message::toString($response) : ''; - break; - case 'req_headers': - $result = \trim($request->getMethod() - . ' ' . $request->getRequestTarget()) - . ' HTTP/' . $request->getProtocolVersion() . "\r\n" - . $this->headers($request); - break; - case 'res_headers': - $result = $response ? - \sprintf( - 'HTTP/%s %d %s', - $response->getProtocolVersion(), - $response->getStatusCode(), - $response->getReasonPhrase() - ) . "\r\n" . $this->headers($response) - : 'NULL'; - break; - case 'req_body': - $result = $request->getBody()->__toString(); - break; - case 'res_body': - if (!$response instanceof ResponseInterface) { - $result = 'NULL'; - break; - } - - $body = $response->getBody(); - - if (!$body->isSeekable()) { - $result = 'RESPONSE_NOT_LOGGEABLE'; - break; - } - - $result = $response->getBody()->__toString(); - break; - case 'ts': - case 'date_iso_8601': - $result = \gmdate('c'); - break; - case 'date_common_log': - $result = \date('d/M/Y:H:i:s O'); - break; - case 'method': - $result = $request->getMethod(); - break; - case 'version': - $result = $request->getProtocolVersion(); - break; - case 'uri': - case 'url': - $result = $request->getUri(); - break; - case 'target': - $result = $request->getRequestTarget(); - break; - case 'req_version': - $result = $request->getProtocolVersion(); - break; - case 'res_version': - $result = $response - ? $response->getProtocolVersion() - : 'NULL'; - break; - case 'host': - $result = $request->getHeaderLine('Host'); - break; - case 'hostname': - $result = \gethostname(); - break; - case 'code': - $result = $response ? $response->getStatusCode() : 'NULL'; - break; - case 'phrase': - $result = $response ? $response->getReasonPhrase() : 'NULL'; - break; - case 'error': - $result = $error ? $error->getMessage() : 'NULL'; - break; - default: - // handle prefixed dynamic headers - if (\strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeaderLine(\substr($matches[1], 11)); - } elseif (\strpos($matches[1], 'res_header_') === 0) { - $result = $response - ? $response->getHeaderLine(\substr($matches[1], 11)) - : 'NULL'; - } - } - - $cache[$matches[1]] = $result; - return $result; - }, - $this->template - ); - } - - /** - * Get headers from message as string - */ - private function headers(MessageInterface $message): string - { - $result = ''; - foreach ($message->getHeaders() as $name => $values) { - $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; - } - - return \trim($result); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php deleted file mode 100644 index a39ac24..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -withCookieHeader($request); - return $handler($request, $options) - ->then( - static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { - $cookieJar->extractCookies($request, $response); - return $response; - } - ); - }; - }; - } - - /** - * Middleware that throws exceptions for 4xx or 5xx responses when the - * "http_error" request option is set to true. - * - * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages. - * - * @return callable(callable): callable Returns a function that accepts the next handler. - */ - public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable - { - return static function (callable $handler) use ($bodySummarizer): callable { - return static function ($request, array $options) use ($handler, $bodySummarizer) { - if (empty($options['http_errors'])) { - return $handler($request, $options); - } - return $handler($request, $options)->then( - static function (ResponseInterface $response) use ($request, $bodySummarizer) { - $code = $response->getStatusCode(); - if ($code < 400) { - return $response; - } - throw RequestException::create($request, $response, null, [], $bodySummarizer); - } - ); - }; - }; - } - - /** - * Middleware that pushes history data to an ArrayAccess container. - * - * @param array|\ArrayAccess $container Container to hold the history (by reference). - * - * @return callable(callable): callable Returns a function that accepts the next handler. - * - * @throws \InvalidArgumentException if container is not an array or ArrayAccess. - */ - public static function history(&$container): callable - { - if (!\is_array($container) && !$container instanceof \ArrayAccess) { - throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); - } - - return static function (callable $handler) use (&$container): callable { - return static function (RequestInterface $request, array $options) use ($handler, &$container) { - return $handler($request, $options)->then( - static function ($value) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => $value, - 'error' => null, - 'options' => $options - ]; - return $value; - }, - static function ($reason) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => null, - 'error' => $reason, - 'options' => $options - ]; - return P\Create::rejectionFor($reason); - } - ); - }; - }; - } - - /** - * Middleware that invokes a callback before and after sending a request. - * - * The provided listener cannot modify or alter the response. It simply - * "taps" into the chain to be notified before returning the promise. The - * before listener accepts a request and options array, and the after - * listener accepts a request, options array, and response promise. - * - * @param callable $before Function to invoke before forwarding the request. - * @param callable $after Function invoked after forwarding. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function tap(callable $before = null, callable $after = null): callable - { - return static function (callable $handler) use ($before, $after): callable { - return static function (RequestInterface $request, array $options) use ($handler, $before, $after) { - if ($before) { - $before($request, $options); - } - $response = $handler($request, $options); - if ($after) { - $after($request, $options, $response); - } - return $response; - }; - }; - } - - /** - * Middleware that handles request redirects. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function redirect(): callable - { - return static function (callable $handler): RedirectMiddleware { - return new RedirectMiddleware($handler); - }; - } - - /** - * Middleware that retries requests based on the boolean result of - * invoking the provided "decider" function. - * - * If no delay function is provided, a simple implementation of exponential - * backoff will be utilized. - * - * @param callable $decider Function that accepts the number of retries, - * a request, [response], and [exception] and - * returns true if the request is to be retried. - * @param callable $delay Function that accepts the number of retries and - * returns the number of milliseconds to delay. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function retry(callable $decider, callable $delay = null): callable - { - return static function (callable $handler) use ($decider, $delay): RetryMiddleware { - return new RetryMiddleware($decider, $handler, $delay); - }; - } - - /** - * Middleware that logs requests, responses, and errors using a message - * formatter. - * - * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. - * - * @param LoggerInterface $logger Logs messages. - * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. - * @param string $logLevel Level at which to log requests. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable - { - // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter - if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) { - throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class)); - } - - return static function (callable $handler) use ($logger, $formatter, $logLevel): callable { - return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) { - return $handler($request, $options)->then( - static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { - $message = $formatter->format($request, $response); - $logger->log($logLevel, $message); - return $response; - }, - static function ($reason) use ($logger, $request, $formatter): PromiseInterface { - $response = $reason instanceof RequestException ? $reason->getResponse() : null; - $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); - $logger->error($message); - return P\Create::rejectionFor($reason); - } - ); - }; - }; - } - - /** - * This middleware adds a default content-type if possible, a default - * content-length or transfer-encoding header, and the expect header. - */ - public static function prepareBody(): callable - { - return static function (callable $handler): PrepareBodyMiddleware { - return new PrepareBodyMiddleware($handler); - }; - } - - /** - * Middleware that applies a map function to the request before passing to - * the next handler. - * - * @param callable $fn Function that accepts a RequestInterface and returns - * a RequestInterface. - */ - public static function mapRequest(callable $fn): callable - { - return static function (callable $handler) use ($fn): callable { - return static function (RequestInterface $request, array $options) use ($handler, $fn) { - return $handler($fn($request), $options); - }; - }; - } - - /** - * Middleware that applies a map function to the resolved promise's - * response. - * - * @param callable $fn Function that accepts a ResponseInterface and - * returns a ResponseInterface. - */ - public static function mapResponse(callable $fn): callable - { - return static function (callable $handler) use ($fn): callable { - return static function (RequestInterface $request, array $options) use ($handler, $fn) { - return $handler($request, $options)->then($fn); - }; - }; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Pool.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Pool.php deleted file mode 100644 index 6277c61..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Pool.php +++ /dev/null @@ -1,125 +0,0 @@ - $rfn) { - if ($rfn instanceof RequestInterface) { - yield $key => $client->sendAsync($rfn, $opts); - } elseif (\is_callable($rfn)) { - yield $key => $rfn($opts); - } else { - throw new \InvalidArgumentException('Each value yielded by the iterator must be a Psr7\Http\Message\RequestInterface or a callable that returns a promise that fulfills with a Psr7\Message\Http\ResponseInterface object.'); - } - } - }; - - $this->each = new EachPromise($requests(), $config); - } - - /** - * Get promise - */ - public function promise(): PromiseInterface - { - return $this->each->promise(); - } - - /** - * Sends multiple requests concurrently and returns an array of responses - * and exceptions that uses the same ordering as the provided requests. - * - * IMPORTANT: This method keeps every request and response in memory, and - * as such, is NOT recommended when sending a large number or an - * indeterminate number of requests concurrently. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send concurrently. - * @param array $options Passes through the options available in - * {@see \GuzzleHttp\Pool::__construct} - * - * @return array Returns an array containing the response or an exception - * in the same order that the requests were sent. - * - * @throws \InvalidArgumentException if the event format is incorrect. - */ - public static function batch(ClientInterface $client, $requests, array $options = []): array - { - $res = []; - self::cmpCallback($options, 'fulfilled', $res); - self::cmpCallback($options, 'rejected', $res); - $pool = new static($client, $requests, $options); - $pool->promise()->wait(); - \ksort($res); - - return $res; - } - - /** - * Execute callback(s) - */ - private static function cmpCallback(array &$options, string $name, array &$results): void - { - if (!isset($options[$name])) { - $options[$name] = static function ($v, $k) use (&$results) { - $results[$k] = $v; - }; - } else { - $currentFn = $options[$name]; - $options[$name] = static function ($v, $k) use (&$results, $currentFn) { - $currentFn($v, $k); - $results[$k] = $v; - }; - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php deleted file mode 100644 index 7ca6283..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ /dev/null @@ -1,104 +0,0 @@ -nextHandler = $nextHandler; - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - $fn = $this->nextHandler; - - // Don't do anything if the request has no body. - if ($request->getBody()->getSize() === 0) { - return $fn($request, $options); - } - - $modify = []; - - // Add a default content-type if possible. - if (!$request->hasHeader('Content-Type')) { - if ($uri = $request->getBody()->getMetadata('uri')) { - if (is_string($uri) && $type = Psr7\MimeType::fromFilename($uri)) { - $modify['set_headers']['Content-Type'] = $type; - } - } - } - - // Add a default content-length or transfer-encoding header. - if (!$request->hasHeader('Content-Length') - && !$request->hasHeader('Transfer-Encoding') - ) { - $size = $request->getBody()->getSize(); - if ($size !== null) { - $modify['set_headers']['Content-Length'] = $size; - } else { - $modify['set_headers']['Transfer-Encoding'] = 'chunked'; - } - } - - // Add the expect header if needed. - $this->addExpectHeader($request, $options, $modify); - - return $fn(Psr7\Utils::modifyRequest($request, $modify), $options); - } - - /** - * Add expect header - */ - private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void - { - // Determine if the Expect header should be used - if ($request->hasHeader('Expect')) { - return; - } - - $expect = $options['expect'] ?? null; - - // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 - if ($expect === false || $request->getProtocolVersion() < 1.1) { - return; - } - - // The expect header is unconditionally enabled - if ($expect === true) { - $modify['set_headers']['Expect'] = '100-Continue'; - return; - } - - // By default, send the expect header when the payload is > 1mb - if ($expect === null) { - $expect = 1048576; - } - - // Always add if the body cannot be rewound, the size cannot be - // determined, or the size is greater than the cutoff threshold - $body = $request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { - $modify['set_headers']['Expect'] = '100-Continue'; - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php deleted file mode 100644 index 1dd3861..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ /dev/null @@ -1,216 +0,0 @@ - 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, - 'track_redirects' => false, - ]; - - /** - * @var callable(RequestInterface, array): PromiseInterface - */ - private $nextHandler; - - /** - * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. - */ - public function __construct(callable $nextHandler) - { - $this->nextHandler = $nextHandler; - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - $fn = $this->nextHandler; - - if (empty($options['allow_redirects'])) { - return $fn($request, $options); - } - - if ($options['allow_redirects'] === true) { - $options['allow_redirects'] = self::$defaultSettings; - } elseif (!\is_array($options['allow_redirects'])) { - throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); - } else { - // Merge the default settings with the provided settings - $options['allow_redirects'] += self::$defaultSettings; - } - - if (empty($options['allow_redirects']['max'])) { - return $fn($request, $options); - } - - return $fn($request, $options) - ->then(function (ResponseInterface $response) use ($request, $options) { - return $this->checkRedirect($request, $options, $response); - }); - } - - /** - * @return ResponseInterface|PromiseInterface - */ - public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response) - { - if (\strpos((string) $response->getStatusCode(), '3') !== 0 - || !$response->hasHeader('Location') - ) { - return $response; - } - - $this->guardMax($request, $response, $options); - $nextRequest = $this->modifyRequest($request, $options, $response); - - if (isset($options['allow_redirects']['on_redirect'])) { - ($options['allow_redirects']['on_redirect'])( - $request, - $response, - $nextRequest->getUri() - ); - } - - $promise = $this($nextRequest, $options); - - // Add headers to be able to track history of redirects. - if (!empty($options['allow_redirects']['track_redirects'])) { - return $this->withTracking( - $promise, - (string) $nextRequest->getUri(), - $response->getStatusCode() - ); - } - - return $promise; - } - - /** - * Enable tracking on promise. - */ - private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface - { - return $promise->then( - static function (ResponseInterface $response) use ($uri, $statusCode) { - // Note that we are pushing to the front of the list as this - // would be an earlier response than what is currently present - // in the history header. - $historyHeader = $response->getHeader(self::HISTORY_HEADER); - $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); - \array_unshift($historyHeader, $uri); - \array_unshift($statusHeader, (string) $statusCode); - - return $response->withHeader(self::HISTORY_HEADER, $historyHeader) - ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); - } - ); - } - - /** - * Check for too many redirects - * - * @throws TooManyRedirectsException Too many redirects. - */ - private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void - { - $current = $options['__redirect_count'] - ?? 0; - $options['__redirect_count'] = $current + 1; - $max = $options['allow_redirects']['max']; - - if ($options['__redirect_count'] > $max) { - throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response); - } - } - - public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface - { - // Request modifications to apply. - $modify = []; - $protocols = $options['allow_redirects']['protocols']; - - // Use a GET request if this is an entity enclosing request and we are - // not forcing RFC compliance, but rather emulating what all browsers - // would do. - $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && !$options['allow_redirects']['strict']) - ) { - $safeMethods = ['GET', 'HEAD', 'OPTIONS']; - $requestMethod = $request->getMethod(); - - $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET'; - $modify['body'] = ''; - } - - $uri = $this->redirectUri($request, $response, $protocols); - if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { - $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion']; - $uri = Utils::idnUriConvert($uri, $idnOptions); - } - - $modify['uri'] = $uri; - Psr7\Message::rewindBody($request); - - // Add the Referer header if it is told to do so and only - // add the header if we are not redirecting from https to http. - if ($options['allow_redirects']['referer'] - && $modify['uri']->getScheme() === $request->getUri()->getScheme() - ) { - $uri = $request->getUri()->withUserInfo(''); - $modify['set_headers']['Referer'] = (string) $uri; - } else { - $modify['remove_headers'][] = 'Referer'; - } - - // Remove Authorization header if host is different. - if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { - $modify['remove_headers'][] = 'Authorization'; - } - - return Psr7\Utils::modifyRequest($request, $modify); - } - - /** - * Set the appropriate URL on the request based on the location header - */ - private function redirectUri(RequestInterface $request, ResponseInterface $response, array $protocols): UriInterface - { - $location = Psr7\UriResolver::resolve( - $request->getUri(), - new Psr7\Uri($response->getHeaderLine('Location')) - ); - - // Ensure that the redirect URI is allowed based on the protocols. - if (!\in_array($location->getScheme(), $protocols)) { - throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); - } - - return $location; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RequestOptions.php deleted file mode 100644 index 20b31bc..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ /dev/null @@ -1,264 +0,0 @@ -decider = $decider; - $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; - } - - /** - * Default exponential backoff delay function. - * - * @return int milliseconds. - */ - public static function exponentialDelay(int $retries): int - { - return (int) \pow(2, $retries - 1) * 1000; - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - if (!isset($options['retries'])) { - $options['retries'] = 0; - } - - $fn = $this->nextHandler; - return $fn($request, $options) - ->then( - $this->onFulfilled($request, $options), - $this->onRejected($request, $options) - ); - } - - /** - * Execute fulfilled closure - */ - private function onFulfilled(RequestInterface $request, array $options): callable - { - return function ($value) use ($request, $options) { - if (!($this->decider)( - $options['retries'], - $request, - $value, - null - )) { - return $value; - } - return $this->doRetry($request, $options, $value); - }; - } - - /** - * Execute rejected closure - */ - private function onRejected(RequestInterface $req, array $options): callable - { - return function ($reason) use ($req, $options) { - if (!($this->decider)( - $options['retries'], - $req, - null, - $reason - )) { - return P\Create::rejectionFor($reason); - } - return $this->doRetry($req, $options); - }; - } - - private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface - { - $options['delay'] = ($this->delay)(++$options['retries'], $response); - - return $this($request, $options); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/TransferStats.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/TransferStats.php deleted file mode 100644 index 7b46c2b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ /dev/null @@ -1,133 +0,0 @@ -request = $request; - $this->response = $response; - $this->transferTime = $transferTime; - $this->handlerErrorData = $handlerErrorData; - $this->handlerStats = $handlerStats; - } - - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * Returns the response that was received (if any). - */ - public function getResponse(): ?ResponseInterface - { - return $this->response; - } - - /** - * Returns true if a response was received. - */ - public function hasResponse(): bool - { - return $this->response !== null; - } - - /** - * Gets handler specific error data. - * - * This might be an exception, a integer representing an error code, or - * anything else. Relying on this value assumes that you know what handler - * you are using. - * - * @return mixed - */ - public function getHandlerErrorData() - { - return $this->handlerErrorData; - } - - /** - * Get the effective URI the request was sent to. - */ - public function getEffectiveUri(): UriInterface - { - return $this->request->getUri(); - } - - /** - * Get the estimated time the request was being transferred by the handler. - * - * @return float|null Time in seconds. - */ - public function getTransferTime(): ?float - { - return $this->transferTime; - } - - /** - * Gets an array of all of the handler specific transfer data. - */ - public function getHandlerStats(): array - { - return $this->handlerStats; - } - - /** - * Get a specific handler statistic from the handler by name. - * - * @param string $stat Handler specific transfer stat to retrieve. - * - * @return mixed|null - */ - public function getHandlerStat(string $stat) - { - return isset($this->handlerStats[$stat]) ? $this->handlerStats[$stat] : null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Utils.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Utils.php deleted file mode 100644 index f4848b7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/Utils.php +++ /dev/null @@ -1,387 +0,0 @@ -getHost()) { - $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); - if ($asciiHost === false) { - $errorBitSet = $info['errors'] ?? 0; - - $errorConstants = array_filter(array_keys(get_defined_constants()), static function ($name) { - return substr($name, 0, 11) === 'IDNA_ERROR_'; - }); - - $errors = []; - foreach ($errorConstants as $errorConstant) { - if ($errorBitSet & constant($errorConstant)) { - $errors[] = $errorConstant; - } - } - - $errorMessage = 'IDN conversion failed'; - if ($errors) { - $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; - } - - throw new InvalidArgumentException($errorMessage); - } - if ($uri->getHost() !== $asciiHost) { - // Replace URI only if the ASCII version is different - $uri = $uri->withHost($asciiHost); - } - } - - return $uri; - } - - /** - * @internal - */ - public static function getenv(string $name): ?string - { - if (isset($_SERVER[$name])) { - return (string) $_SERVER[$name]; - } - - if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) { - return (string) $value; - } - - return null; - } - - /** - * @return string|false - */ - private static function idnToAsci(string $domain, int $options, ?array &$info = []) - { - if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) { - return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info); - } - - throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old'); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/functions.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/functions.php deleted file mode 100644 index a70d2cb..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/guzzle/src/functions.php +++ /dev/null @@ -1,167 +0,0 @@ -setRiskyAllowed(true) - ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => ['operators' => ['=>' => null]], - 'blank_line_after_opening_tag' => true, - 'class_attributes_separation' => ['elements' => ['method']], - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'declare_equal_normalize' => ['space' => 'none'], - 'declare_strict_types' => false, - 'dir_constant' => true, - 'final_static_access' => true, - 'fully_qualified_strict_types' => true, - 'function_to_constant' => true, - 'function_typehint_space' => true, - 'header_comment' => false, - 'is_null' => ['use_yoda_style' => false], - 'list_syntax' => ['syntax' => 'short'], - 'lowercase_cast' => true, - 'magic_method_casing' => true, - 'modernize_types_casting' => true, - 'multiline_comment_opening_closing' => true, - //'native_constant_invocation' => true, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_extra_blank_lines' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_spaces_around_offset' => true, - 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], - 'no_trailing_comma_in_singleline_array' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unset_cast' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'no_whitespace_in_blank_line' => true, - 'normalize_index_brace' => true, - 'ordered_imports' => true, - 'php_unit_construct' => true, - 'php_unit_dedicate_assert' => ['target' => 'newest'], - 'php_unit_dedicate_assert_internal_type' => ['target' => 'newest'], - 'php_unit_expectation' => ['target' => 'newest'], - 'php_unit_mock' => ['target' => 'newest'], - 'php_unit_mock_short_will_return' => true, - 'php_unit_no_expectation_annotation' => ['target' => 'newest'], - 'php_unit_test_annotation' => ['style' => 'prefix'], - //'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], - 'phpdoc_align' => ['align' => 'vertical'], - //'phpdoc_line_span' => ['method' => 'multi', 'property' => 'multi'], - 'phpdoc_no_package' => true, - 'phpdoc_no_useless_inheritdoc' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_trim' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_types' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'phpdoc_var_without_name' => true, - 'return_assignment' => true, - 'short_scalar_cast' => true, - 'single_trait_insert_per_statement' => true, - 'standardize_not_equals' => true, - //'static_lambda' => true, - 'ternary_to_null_coalescing' => true, - 'trim_array_spaces' => true, - 'visibility_required' => true, - 'yoda_style' => false, - // 'native_function_invocation' => true, - 'braces' => ['allow_single_line_closure'=>true], - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->in(__DIR__.'/src') - ->in(__DIR__.'/tests') - ->name('*.php') - ) -; - -return $config; diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/CHANGELOG.md b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/CHANGELOG.md deleted file mode 100644 index 4b63b2c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/CHANGELOG.md +++ /dev/null @@ -1,81 +0,0 @@ -# CHANGELOG - - -## 1.4.0 - 2020-09-30 - -### Added - -- Support for PHP 8 -- Optional `$recursive` flag to `all` -- Replaced functions by static methods - -### Fixed - -- Fix empty `each` processing -- Fix promise handling for Iterators of non-unique keys -- Fixed `method_exists` crashes on PHP 8 -- Memory leak on exceptions - - -## 1.3.1 - 2016-12-20 - -### Fixed - -- `wait()` foreign promise compatibility - - -## 1.3.0 - 2016-11-18 - -### Added - -- Adds support for custom task queues. - -### Fixed - -- Fixed coroutine promise memory leak. - - -## 1.2.0 - 2016-05-18 - -### Changed - -- Update to now catch `\Throwable` on PHP 7+ - - -## 1.1.0 - 2016-03-07 - -### Changed - -- Update EachPromise to prevent recurring on a iterator when advancing, as this - could trigger fatal generator errors. -- Update Promise to allow recursive waiting without unwrapping exceptions. - - -## 1.0.3 - 2015-10-15 - -### Changed - -- Update EachPromise to immediately resolve when the underlying promise iterator - is empty. Previously, such a promise would throw an exception when its `wait` - function was called. - - -## 1.0.2 - 2015-05-15 - -### Changed - -- Conditionally require functions.php. - - -## 1.0.1 - 2015-06-24 - -### Changed - -- Updating EachPromise to call next on the underlying promise iterator as late - as possible to ensure that generators that generate new requests based on - callbacks are not iterated until after callbacks are invoked. - - -## 1.0.0 - 2015-05-12 - -- Initial release diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/LICENSE b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/LICENSE deleted file mode 100644 index 67f91a1..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/Makefile b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/Makefile deleted file mode 100644 index 8d5b3ef..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: clean test - -test: - vendor/bin/phpunit - -coverage: - vendor/bin/phpunit --coverage-html=artifacts/coverage - -view-coverage: - open artifacts/coverage/index.html - -clean: - rm -rf artifacts/* diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/README.md b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/README.md deleted file mode 100644 index a95c605..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/README.md +++ /dev/null @@ -1,532 +0,0 @@ -# Guzzle Promises - -[Promises/A+](https://promisesaplus.com/) implementation that handles promise -chaining and resolution iteratively, allowing for "infinite" promise chaining -while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) -for a general introduction to promises. - -- [Features](#features) -- [Quick start](#quick-start) -- [Synchronous wait](#synchronous-wait) -- [Cancellation](#cancellation) -- [API](#api) - - [Promise](#promise) - - [FulfilledPromise](#fulfilledpromise) - - [RejectedPromise](#rejectedpromise) -- [Promise interop](#promise-interop) -- [Implementation notes](#implementation-notes) - - -# Features - -- [Promises/A+](https://promisesaplus.com/) implementation. -- Promise resolution and chaining is handled iteratively, allowing for - "infinite" promise chaining. -- Promises have a synchronous `wait` method. -- Promises can be cancelled. -- Works with any object that has a `then` function. -- C# style async/await coroutine promises using - `GuzzleHttp\Promise\Coroutine::of()`. - - -# Quick start - -A *promise* represents the eventual result of an asynchronous operation. The -primary way of interacting with a promise is through its `then` method, which -registers callbacks to receive either a promise's eventual value or the reason -why the promise cannot be fulfilled. - - -## Callbacks - -Callbacks are registered with the `then` method by providing an optional -`$onFulfilled` followed by an optional `$onRejected` function. - - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then( - // $onFulfilled - function ($value) { - echo 'The promise was fulfilled.'; - }, - // $onRejected - function ($reason) { - echo 'The promise was rejected.'; - } -); -``` - -*Resolving* a promise means that you either fulfill a promise with a *value* or -reject a promise with a *reason*. Resolving a promises triggers callbacks -registered with the promises's `then` method. These callbacks are triggered -only once and in the order in which they were added. - - -## Resolving a promise - -Promises are fulfilled using the `resolve($value)` method. Resolving a promise -with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger -all of the onFulfilled callbacks (resolving a promise with a rejected promise -will reject the promise and trigger the `$onRejected` callbacks). - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise - ->then(function ($value) { - // Return a value and don't break the chain - return "Hello, " . $value; - }) - // This then is executed after the first then and receives the value - // returned from the first then. - ->then(function ($value) { - echo $value; - }); - -// Resolving the promise triggers the $onFulfilled callbacks and outputs -// "Hello, reader." -$promise->resolve('reader.'); -``` - - -## Promise forwarding - -Promises can be chained one after the other. Each then in the chain is a new -promise. The return value of a promise is what's forwarded to the next -promise in the chain. Returning a promise in a `then` callback will cause the -subsequent promises in the chain to only be fulfilled when the returned promise -has been fulfilled. The next promise in the chain will be invoked with the -resolved value of the promise. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$nextPromise = new Promise(); - -$promise - ->then(function ($value) use ($nextPromise) { - echo $value; - return $nextPromise; - }) - ->then(function ($value) { - echo $value; - }); - -// Triggers the first callback and outputs "A" -$promise->resolve('A'); -// Triggers the second callback and outputs "B" -$nextPromise->resolve('B'); -``` - -## Promise rejection - -When a promise is rejected, the `$onRejected` callbacks are invoked with the -rejection reason. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - echo $reason; -}); - -$promise->reject('Error!'); -// Outputs "Error!" -``` - -## Rejection forwarding - -If an exception is thrown in an `$onRejected` callback, subsequent -`$onRejected` callbacks are invoked with the thrown exception as the reason. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - throw new Exception($reason); -})->then(null, function ($reason) { - assert($reason->getMessage() === 'Error!'); -}); - -$promise->reject('Error!'); -``` - -You can also forward a rejection down the promise chain by returning a -`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or -`$onRejected` callback. - -```php -use GuzzleHttp\Promise\Promise; -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - return new RejectedPromise($reason); -})->then(null, function ($reason) { - assert($reason === 'Error!'); -}); - -$promise->reject('Error!'); -``` - -If an exception is not thrown in a `$onRejected` callback and the callback -does not return a rejected promise, downstream `$onFulfilled` callbacks are -invoked using the value returned from the `$onRejected` callback. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise - ->then(null, function ($reason) { - return "It's ok"; - }) - ->then(function ($value) { - assert($value === "It's ok"); - }); - -$promise->reject('Error!'); -``` - -# Synchronous wait - -You can synchronously force promises to complete using a promise's `wait` -method. When creating a promise, you can provide a wait function that is used -to synchronously force a promise to complete. When a wait function is invoked -it is expected to deliver a value to the promise or reject the promise. If the -wait function does not deliver a value, then an exception is thrown. The wait -function provided to a promise constructor is invoked when the `wait` function -of the promise is called. - -```php -$promise = new Promise(function () use (&$promise) { - $promise->resolve('foo'); -}); - -// Calling wait will return the value of the promise. -echo $promise->wait(); // outputs "foo" -``` - -If an exception is encountered while invoking the wait function of a promise, -the promise is rejected with the exception and the exception is thrown. - -```php -$promise = new Promise(function () use (&$promise) { - throw new Exception('foo'); -}); - -$promise->wait(); // throws the exception. -``` - -Calling `wait` on a promise that has been fulfilled will not trigger the wait -function. It will simply return the previously resolved value. - -```php -$promise = new Promise(function () { die('this is not called!'); }); -$promise->resolve('foo'); -echo $promise->wait(); // outputs "foo" -``` - -Calling `wait` on a promise that has been rejected will throw an exception. If -the rejection reason is an instance of `\Exception` the reason is thrown. -Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason -can be obtained by calling the `getReason` method of the exception. - -```php -$promise = new Promise(); -$promise->reject('foo'); -$promise->wait(); -``` - -> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' - - -## Unwrapping a promise - -When synchronously waiting on a promise, you are joining the state of the -promise into the current state of execution (i.e., return the value of the -promise if it was fulfilled or throw an exception if it was rejected). This is -called "unwrapping" the promise. Waiting on a promise will by default unwrap -the promise state. - -You can force a promise to resolve and *not* unwrap the state of the promise -by passing `false` to the first argument of the `wait` function: - -```php -$promise = new Promise(); -$promise->reject('foo'); -// This will not throw an exception. It simply ensures the promise has -// been resolved. -$promise->wait(false); -``` - -When unwrapping a promise, the resolved value of the promise will be waited -upon until the unwrapped value is not a promise. This means that if you resolve -promise A with a promise B and unwrap promise A, the value returned by the -wait function will be the value delivered to promise B. - -**Note**: when you do not unwrap the promise, no value is returned. - - -# Cancellation - -You can cancel a promise that has not yet been fulfilled using the `cancel()` -method of a promise. When creating a promise you can provide an optional -cancel function that when invoked cancels the action of computing a resolution -of the promise. - - -# API - - -## Promise - -When creating a promise object, you can provide an optional `$waitFn` and -`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is -expected to resolve the promise. `$cancelFn` is a function with no arguments -that is expected to cancel the computation of a promise. It is invoked when the -`cancel()` method of a promise is called. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise( - function () use (&$promise) { - $promise->resolve('waited'); - }, - function () { - // do something that will cancel the promise computation (e.g., close - // a socket, cancel a database query, etc...) - } -); - -assert('waited' === $promise->wait()); -``` - -A promise has the following methods: - -- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` - - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. - -- `otherwise(callable $onRejected) : PromiseInterface` - - Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. - -- `wait($unwrap = true) : mixed` - - Synchronously waits on the promise to complete. - - `$unwrap` controls whether or not the value of the promise is returned for a - fulfilled promise or if an exception is thrown if the promise is rejected. - This is set to `true` by default. - -- `cancel()` - - Attempts to cancel the promise if possible. The promise being cancelled and - the parent most ancestor that has not yet been resolved will also be - cancelled. Any promises waiting on the cancelled promise to resolve will also - be cancelled. - -- `getState() : string` - - Returns the state of the promise. One of `pending`, `fulfilled`, or - `rejected`. - -- `resolve($value)` - - Fulfills the promise with the given `$value`. - -- `reject($reason)` - - Rejects the promise with the given `$reason`. - - -## FulfilledPromise - -A fulfilled promise can be created to represent a promise that has been -fulfilled. - -```php -use GuzzleHttp\Promise\FulfilledPromise; - -$promise = new FulfilledPromise('value'); - -// Fulfilled callbacks are immediately invoked. -$promise->then(function ($value) { - echo $value; -}); -``` - - -## RejectedPromise - -A rejected promise can be created to represent a promise that has been -rejected. - -```php -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new RejectedPromise('Error'); - -// Rejected callbacks are immediately invoked. -$promise->then(null, function ($reason) { - echo $reason; -}); -``` - - -# Promise interop - -This library works with foreign promises that have a `then` method. This means -you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) -for example. When a foreign promise is returned inside of a then method -callback, promise resolution will occur recursively. - -```php -// Create a React promise -$deferred = new React\Promise\Deferred(); -$reactPromise = $deferred->promise(); - -// Create a Guzzle promise that is fulfilled with a React promise. -$guzzlePromise = new GuzzleHttp\Promise\Promise(); -$guzzlePromise->then(function ($value) use ($reactPromise) { - // Do something something with the value... - // Return the React promise - return $reactPromise; -}); -``` - -Please note that wait and cancel chaining is no longer possible when forwarding -a foreign promise. You will need to wrap a third-party promise with a Guzzle -promise in order to utilize wait and cancel functions with foreign promises. - - -## Event Loop Integration - -In order to keep the stack size constant, Guzzle promises are resolved -asynchronously using a task queue. When waiting on promises synchronously, the -task queue will be automatically run to ensure that the blocking promise and -any forwarded promises are resolved. When using promises asynchronously in an -event loop, you will need to run the task queue on each tick of the loop. If -you do not run the task queue, then promises will not be resolved. - -You can run the task queue using the `run()` method of the global task queue -instance. - -```php -// Get the global task queue -$queue = GuzzleHttp\Promise\Utils::queue(); -$queue->run(); -``` - -For example, you could use Guzzle promises with React using a periodic timer: - -```php -$loop = React\EventLoop\Factory::create(); -$loop->addPeriodicTimer(0, [$queue, 'run']); -``` - -*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? - - -# Implementation notes - - -## Promise resolution and chaining is handled iteratively - -By shuffling pending handlers from one owner to another, promises are -resolved iteratively, allowing for "infinite" then chaining. - -```php -then(function ($v) { - // The stack size remains constant (a good thing) - echo xdebug_get_stack_depth() . ', '; - return $v + 1; - }); -} - -$parent->resolve(0); -var_dump($p->wait()); // int(1000) - -``` - -When a promise is fulfilled or rejected with a non-promise value, the promise -then takes ownership of the handlers of each child promise and delivers values -down the chain without using recursion. - -When a promise is resolved with another promise, the original promise transfers -all of its pending handlers to the new promise. When the new promise is -eventually resolved, all of the pending handlers are delivered the forwarded -value. - - -## A promise is the deferred. - -Some promise libraries implement promises using a deferred object to represent -a computation and a promise object to represent the delivery of the result of -the computation. This is a nice separation of computation and delivery because -consumers of the promise cannot modify the value that will be eventually -delivered. - -One side effect of being able to implement promise resolution and chaining -iteratively is that you need to be able for one promise to reach into the state -of another promise to shuffle around ownership of handlers. In order to achieve -this without making the handlers of a promise publicly mutable, a promise is -also the deferred value, allowing promises of the same parent class to reach -into and modify the private properties of promises of the same type. While this -does allow consumers of the value to modify the resolution or rejection of the -deferred, it is a small price to pay for keeping the stack size constant. - -```php -$promise = new Promise(); -$promise->then(function ($value) { echo $value; }); -// The promise is the deferred value, so you can deliver a value to it. -$promise->resolve('foo'); -// prints "foo" -``` - - -## Upgrading from Function API - -A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: - -| Original Function | Replacement Method | -|----------------|----------------| -| `queue` | `Utils::queue` | -| `task` | `Utils::task` | -| `promise_for` | `Create::promiseFor` | -| `rejection_for` | `Create::rejectionFor` | -| `exception_for` | `Create::exceptionFor` | -| `iter_for` | `Create::iterFor` | -| `inspect` | `Utils::inspect` | -| `inspect_all` | `Utils::inspectAll` | -| `unwrap` | `Utils::unwrap` | -| `all` | `Utils::all` | -| `some` | `Utils::some` | -| `any` | `Utils::any` | -| `settle` | `Utils::settle` | -| `each` | `Each::of` | -| `each_limit` | `Each::ofLimit` | -| `each_limit_all` | `Each::ofLimitAll` | -| `!is_fulfilled` | `Is::pending` | -| `is_fulfilled` | `Is::fulfilled` | -| `is_rejected` | `Is::rejected` | -| `is_settled` | `Is::settled` | -| `coroutine` | `Coroutine::of` | diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/composer.json b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/composer.json deleted file mode 100644 index db44d9e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "guzzlehttp/promises", - "description": "Guzzle promises library", - "keywords": ["promise"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.5" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": ["src/functions_include.php"] - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Promise\\Tests\\": "tests/" - } - }, - "scripts": { - "test": "vendor/bin/simple-phpunit", - "test-ci": "vendor/bin/simple-phpunit --coverage-text" - }, - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan-baseline.neon b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan-baseline.neon deleted file mode 100644 index 26012c2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan-baseline.neon +++ /dev/null @@ -1,7 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Parameter \\#1 \\$function of function register_shutdown_function expects callable\\(\\)\\: void, Closure\\(\\)\\: mixed given\\.$#" - count: 1 - path: src/TaskQueue.php - diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan.neon.dist b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan.neon.dist deleted file mode 100644 index b533a8c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/phpstan.neon.dist +++ /dev/null @@ -1,10 +0,0 @@ -includes: - - phpstan-baseline.neon - -parameters: - level: 5 - paths: - - src - - ignoreErrors: - - "#^Dead catch - Exception is already caught by Throwable above\\.$#" diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/psalm.xml b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/psalm.xml deleted file mode 100644 index 3e4e3d0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/psalm.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/AggregateException.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/AggregateException.php deleted file mode 100644 index d2b5712..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/AggregateException.php +++ /dev/null @@ -1,17 +0,0 @@ -then(function ($v) { echo $v; }); - * - * @param callable $generatorFn Generator function to wrap into a promise. - * - * @return Promise - * - * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration - */ -final class Coroutine implements PromiseInterface -{ - /** - * @var PromiseInterface|null - */ - private $currentPromise; - - /** - * @var Generator - */ - private $generator; - - /** - * @var Promise - */ - private $result; - - public function __construct(callable $generatorFn) - { - $this->generator = $generatorFn(); - $this->result = new Promise(function () { - while (isset($this->currentPromise)) { - $this->currentPromise->wait(); - } - }); - try { - $this->nextCoroutine($this->generator->current()); - } catch (\Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * Create a new coroutine. - * - * @return self - */ - public static function of(callable $generatorFn) - { - return new self($generatorFn); - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - return $this->result->then($onFulfilled, $onRejected); - } - - public function otherwise(callable $onRejected) - { - return $this->result->otherwise($onRejected); - } - - public function wait($unwrap = true) - { - return $this->result->wait($unwrap); - } - - public function getState() - { - return $this->result->getState(); - } - - public function resolve($value) - { - $this->result->resolve($value); - } - - public function reject($reason) - { - $this->result->reject($reason); - } - - public function cancel() - { - $this->currentPromise->cancel(); - $this->result->cancel(); - } - - private function nextCoroutine($yielded) - { - $this->currentPromise = Create::promiseFor($yielded) - ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); - } - - /** - * @internal - */ - public function _handleSuccess($value) - { - unset($this->currentPromise); - try { - $next = $this->generator->send($value); - if ($this->generator->valid()) { - $this->nextCoroutine($next); - } else { - $this->result->resolve($value); - } - } catch (Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * @internal - */ - public function _handleFailure($reason) - { - unset($this->currentPromise); - try { - $nextYield = $this->generator->throw(Create::exceptionFor($reason)); - // The throw was caught, so keep iterating on the coroutine - $this->nextCoroutine($nextYield); - } catch (Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Create.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Create.php deleted file mode 100644 index 8d038e9..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Create.php +++ /dev/null @@ -1,84 +0,0 @@ -then([$promise, 'resolve'], [$promise, 'reject']); - return $promise; - } - - return new FulfilledPromise($value); - } - - /** - * Creates a rejected promise for a reason if the reason is not a promise. - * If the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - */ - public static function rejectionFor($reason) - { - if ($reason instanceof PromiseInterface) { - return $reason; - } - - return new RejectedPromise($reason); - } - - /** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - */ - public static function exceptionFor($reason) - { - if ($reason instanceof \Exception || $reason instanceof \Throwable) { - return $reason; - } - - return new RejectionException($reason); - } - - /** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - */ - public static function iterFor($value) - { - if ($value instanceof \Iterator) { - return $value; - } - - if (is_array($value)) { - return new \ArrayIterator($value); - } - - return new \ArrayIterator([$value]); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Each.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Each.php deleted file mode 100644 index 1dda354..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Each.php +++ /dev/null @@ -1,90 +0,0 @@ - $onFulfilled, - 'rejected' => $onRejected - ]))->promise(); - } - - /** - * Like of, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow - * for dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - */ - public static function ofLimit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null - ) { - return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency - ]))->promise(); - } - - /** - * Like limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - */ - public static function ofLimitAll( - $iterable, - $concurrency, - callable $onFulfilled = null - ) { - return each_limit( - $iterable, - $concurrency, - $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate) { - $aggregate->reject($reason); - } - ); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/EachPromise.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/EachPromise.php deleted file mode 100644 index fbb8876..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/EachPromise.php +++ /dev/null @@ -1,253 +0,0 @@ -iterable = Create::iterFor($iterable); - - if (isset($config['concurrency'])) { - $this->concurrency = $config['concurrency']; - } - - if (isset($config['fulfilled'])) { - $this->onFulfilled = $config['fulfilled']; - } - - if (isset($config['rejected'])) { - $this->onRejected = $config['rejected']; - } - } - - /** @psalm-suppress InvalidNullableReturnType */ - public function promise() - { - if ($this->aggregate) { - return $this->aggregate; - } - - try { - $this->createPromise(); - /** @psalm-assert Promise $this->aggregate */ - $this->iterable->rewind(); - if (!$this->checkIfFinished()) { - $this->refillPending(); - } - } catch (\Throwable $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ - $this->aggregate->reject($e); - } catch (\Exception $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ - $this->aggregate->reject($e); - } - - /** - * @psalm-suppress NullableReturnStatement - * @phpstan-ignore-next-line - */ - return $this->aggregate; - } - - private function createPromise() - { - $this->mutex = false; - $this->aggregate = new Promise(function () { - reset($this->pending); - // Consume a potentially fluctuating list of promises while - // ensuring that indexes are maintained (precluding array_shift). - while ($promise = current($this->pending)) { - next($this->pending); - $promise->wait(); - if (Is::settled($this->aggregate)) { - return; - } - } - }); - - // Clear the references when the promise is resolved. - $clearFn = function () { - $this->iterable = $this->concurrency = $this->pending = null; - $this->onFulfilled = $this->onRejected = null; - }; - - $this->aggregate->then($clearFn, $clearFn); - } - - private function refillPending() - { - if (!$this->concurrency) { - // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()); - return; - } - - // Add only up to N pending promises. - $concurrency = is_callable($this->concurrency) - ? call_user_func($this->concurrency, count($this->pending)) - : $this->concurrency; - $concurrency = max($concurrency - count($this->pending), 0); - // Concurrency may be set to 0 to disallow new promises. - if (!$concurrency) { - return; - } - // Add the first pending promise. - $this->addPending(); - // Note this is special handling for concurrency=1 so that we do - // not advance the iterator after adding the first promise. This - // helps work around issues with generators that might not have the - // next value to yield until promise callbacks are called. - while (--$concurrency - && $this->advanceIterator() - && $this->addPending()); - } - - private function addPending() - { - if (!$this->iterable || !$this->iterable->valid()) { - return false; - } - - $promise = Create::promiseFor($this->iterable->current()); - $key = $this->iterable->key(); - - // Iterable keys may not be unique, so we add the promises at the end - // of the pending array and retrieve the array index being used - $this->pending[] = null; - end($this->pending); - $idx = key($this->pending); - - $this->pending[$idx] = $promise->then( - function ($value) use ($idx, $key) { - if ($this->onFulfilled) { - call_user_func( - $this->onFulfilled, - $value, - $key, - $this->aggregate - ); - } - $this->step($idx); - }, - function ($reason) use ($idx, $key) { - if ($this->onRejected) { - call_user_func( - $this->onRejected, - $reason, - $key, - $this->aggregate - ); - } - $this->step($idx); - } - ); - - return true; - } - - private function advanceIterator() - { - // Place a lock on the iterator so that we ensure to not recurse, - // preventing fatal generator errors. - if ($this->mutex) { - return false; - } - - $this->mutex = true; - - try { - $this->iterable->next(); - $this->mutex = false; - return true; - } catch (\Throwable $e) { - $this->aggregate->reject($e); - $this->mutex = false; - return false; - } catch (\Exception $e) { - $this->aggregate->reject($e); - $this->mutex = false; - return false; - } - } - - private function step($idx) - { - // If the promise was already resolved, then ignore this step. - if (Is::settled($this->aggregate)) { - return; - } - - unset($this->pending[$idx]); - - // Only refill pending promises if we are not locked, preventing the - // EachPromise to recursively invoke the provided iterator, which - // cause a fatal error: "Cannot resume an already running generator" - if ($this->advanceIterator() && !$this->checkIfFinished()) { - // Add more pending promises if possible. - $this->refillPending(); - } - } - - private function checkIfFinished() - { - if (!$this->pending && !$this->iterable->valid()) { - // Resolve the promise if there's nothing left to do. - $this->aggregate->resolve(null); - return true; - } - - return false; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/FulfilledPromise.php deleted file mode 100644 index 98f72a6..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/FulfilledPromise.php +++ /dev/null @@ -1,84 +0,0 @@ -value = $value; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - // Return itself if there is no onFulfilled function. - if (!$onFulfilled) { - return $this; - } - - $queue = Utils::queue(); - $p = new Promise([$queue, 'run']); - $value = $this->value; - $queue->add(static function () use ($p, $value, $onFulfilled) { - if (Is::pending($p)) { - try { - $p->resolve($onFulfilled($value)); - } catch (\Throwable $e) { - $p->reject($e); - } catch (\Exception $e) { - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true, $defaultDelivery = null) - { - return $unwrap ? $this->value : null; - } - - public function getState() - { - return self::FULFILLED; - } - - public function resolve($value) - { - if ($value !== $this->value) { - throw new \LogicException("Cannot resolve a fulfilled promise"); - } - } - - public function reject($reason) - { - throw new \LogicException("Cannot reject a fulfilled promise"); - } - - public function cancel() - { - // pass - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Is.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Is.php deleted file mode 100644 index c3ed8d0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Is.php +++ /dev/null @@ -1,46 +0,0 @@ -getState() === PromiseInterface::PENDING; - } - - /** - * Returns true if a promise is fulfilled or rejected. - * - * @return bool - */ - public static function settled(PromiseInterface $promise) - { - return $promise->getState() !== PromiseInterface::PENDING; - } - - /** - * Returns true if a promise is fulfilled. - * - * @return bool - */ - public static function fulfilled(PromiseInterface $promise) - { - return $promise->getState() === PromiseInterface::FULFILLED; - } - - /** - * Returns true if a promise is rejected. - * - * @return bool - */ - public static function rejected(PromiseInterface $promise) - { - return $promise->getState() === PromiseInterface::REJECTED; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Promise.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Promise.php deleted file mode 100644 index 7593905..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/Promise.php +++ /dev/null @@ -1,278 +0,0 @@ -waitFn = $waitFn; - $this->cancelFn = $cancelFn; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - if ($this->state === self::PENDING) { - $p = new Promise(null, [$this, 'cancel']); - $this->handlers[] = [$p, $onFulfilled, $onRejected]; - $p->waitList = $this->waitList; - $p->waitList[] = $this; - return $p; - } - - // Return a fulfilled promise and immediately invoke any callbacks. - if ($this->state === self::FULFILLED) { - $promise = Create::promiseFor($this->result); - return $onFulfilled ? $promise->then($onFulfilled) : $promise; - } - - // It's either cancelled or rejected, so return a rejected promise - // and immediately invoke any callbacks. - $rejection = Create::rejectionFor($this->result); - return $onRejected ? $rejection->then(null, $onRejected) : $rejection; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true) - { - $this->waitIfPending(); - - if ($this->result instanceof PromiseInterface) { - return $this->result->wait($unwrap); - } - if ($unwrap) { - if ($this->state === self::FULFILLED) { - return $this->result; - } - // It's rejected so "unwrap" and throw an exception. - throw Create::exceptionFor($this->result); - } - } - - public function getState() - { - return $this->state; - } - - public function cancel() - { - if ($this->state !== self::PENDING) { - return; - } - - $this->waitFn = $this->waitList = null; - - if ($this->cancelFn) { - $fn = $this->cancelFn; - $this->cancelFn = null; - try { - $fn(); - } catch (\Throwable $e) { - $this->reject($e); - } catch (\Exception $e) { - $this->reject($e); - } - } - - // Reject the promise only if it wasn't rejected in a then callback. - /** @psalm-suppress RedundantCondition */ - if ($this->state === self::PENDING) { - $this->reject(new CancellationException('Promise has been cancelled')); - } - } - - public function resolve($value) - { - $this->settle(self::FULFILLED, $value); - } - - public function reject($reason) - { - $this->settle(self::REJECTED, $reason); - } - - private function settle($state, $value) - { - if ($this->state !== self::PENDING) { - // Ignore calls with the same resolution. - if ($state === $this->state && $value === $this->result) { - return; - } - throw $this->state === $state - ? new \LogicException("The promise is already {$state}.") - : new \LogicException("Cannot change a {$this->state} promise to {$state}"); - } - - if ($value === $this) { - throw new \LogicException('Cannot fulfill or reject a promise with itself'); - } - - // Clear out the state of the promise but stash the handlers. - $this->state = $state; - $this->result = $value; - $handlers = $this->handlers; - $this->handlers = null; - $this->waitList = $this->waitFn = null; - $this->cancelFn = null; - - if (!$handlers) { - return; - } - - // If the value was not a settled promise or a thenable, then resolve - // it in the task queue using the correct ID. - if (!is_object($value) || !method_exists($value, 'then')) { - $id = $state === self::FULFILLED ? 1 : 2; - // It's a success, so resolve the handlers in the queue. - Utils::queue()->add(static function () use ($id, $value, $handlers) { - foreach ($handlers as $handler) { - self::callHandler($id, $value, $handler); - } - }); - } elseif ($value instanceof Promise && Is::pending($value)) { - // We can just merge our handlers onto the next promise. - $value->handlers = array_merge($value->handlers, $handlers); - } else { - // Resolve the handlers when the forwarded promise is resolved. - $value->then( - static function ($value) use ($handlers) { - foreach ($handlers as $handler) { - self::callHandler(1, $value, $handler); - } - }, - static function ($reason) use ($handlers) { - foreach ($handlers as $handler) { - self::callHandler(2, $reason, $handler); - } - } - ); - } - } - - /** - * Call a stack of handlers using a specific callback index and value. - * - * @param int $index 1 (resolve) or 2 (reject). - * @param mixed $value Value to pass to the callback. - * @param array $handler Array of handler data (promise and callbacks). - */ - private static function callHandler($index, $value, array $handler) - { - /** @var PromiseInterface $promise */ - $promise = $handler[0]; - - // The promise may have been cancelled or resolved before placing - // this thunk in the queue. - if (Is::settled($promise)) { - return; - } - - try { - if (isset($handler[$index])) { - /* - * If $f throws an exception, then $handler will be in the exception - * stack trace. Since $handler contains a reference to the callable - * itself we get a circular reference. We clear the $handler - * here to avoid that memory leak. - */ - $f = $handler[$index]; - unset($handler); - $promise->resolve($f($value)); - } elseif ($index === 1) { - // Forward resolution values as-is. - $promise->resolve($value); - } else { - // Forward rejections down the chain. - $promise->reject($value); - } - } catch (\Throwable $reason) { - $promise->reject($reason); - } catch (\Exception $reason) { - $promise->reject($reason); - } - } - - private function waitIfPending() - { - if ($this->state !== self::PENDING) { - return; - } elseif ($this->waitFn) { - $this->invokeWaitFn(); - } elseif ($this->waitList) { - $this->invokeWaitList(); - } else { - // If there's no wait function, then reject the promise. - $this->reject('Cannot wait on a promise that has ' - . 'no internal wait function. You must provide a wait ' - . 'function when constructing the promise to be able to ' - . 'wait on a promise.'); - } - - Utils::queue()->run(); - - /** @psalm-suppress RedundantCondition */ - if ($this->state === self::PENDING) { - $this->reject('Invoking the wait callback did not resolve the promise'); - } - } - - private function invokeWaitFn() - { - try { - $wfn = $this->waitFn; - $this->waitFn = null; - $wfn(true); - } catch (\Exception $reason) { - if ($this->state === self::PENDING) { - // The promise has not been resolved yet, so reject the promise - // with the exception. - $this->reject($reason); - } else { - // The promise was already resolved, so there's a problem in - // the application. - throw $reason; - } - } - } - - private function invokeWaitList() - { - $waitList = $this->waitList; - $this->waitList = null; - - foreach ($waitList as $result) { - do { - $result->waitIfPending(); - $result = $result->result; - } while ($result instanceof Promise); - - if ($result instanceof PromiseInterface) { - $result->wait(false); - } - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/PromiseInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/PromiseInterface.php deleted file mode 100644 index e598331..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/PromiseInterface.php +++ /dev/null @@ -1,97 +0,0 @@ -reason = $reason; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - // If there's no onRejected callback then just return self. - if (!$onRejected) { - return $this; - } - - $queue = Utils::queue(); - $reason = $this->reason; - $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected) { - if (Is::pending($p)) { - try { - // Return a resolved promise if onRejected does not throw. - $p->resolve($onRejected($reason)); - } catch (\Throwable $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } catch (\Exception $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true, $defaultDelivery = null) - { - if ($unwrap) { - throw Create::exceptionFor($this->reason); - } - - return null; - } - - public function getState() - { - return self::REJECTED; - } - - public function resolve($value) - { - throw new \LogicException("Cannot resolve a rejected promise"); - } - - public function reject($reason) - { - if ($reason !== $this->reason) { - throw new \LogicException("Cannot reject a rejected promise"); - } - } - - public function cancel() - { - // pass - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/RejectionException.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/RejectionException.php deleted file mode 100644 index e2f1377..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/RejectionException.php +++ /dev/null @@ -1,48 +0,0 @@ -reason = $reason; - - $message = 'The promise was rejected'; - - if ($description) { - $message .= ' with reason: ' . $description; - } elseif (is_string($reason) - || (is_object($reason) && method_exists($reason, '__toString')) - ) { - $message .= ' with reason: ' . $this->reason; - } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: ' - . json_encode($this->reason, JSON_PRETTY_PRINT); - } - - parent::__construct($message); - } - - /** - * Returns the rejection reason. - * - * @return mixed - */ - public function getReason() - { - return $this->reason; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueue.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueue.php deleted file mode 100644 index f0fba2c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueue.php +++ /dev/null @@ -1,67 +0,0 @@ -run(); - */ -class TaskQueue implements TaskQueueInterface -{ - private $enableShutdown = true; - private $queue = []; - - public function __construct($withShutdown = true) - { - if ($withShutdown) { - register_shutdown_function(function () { - if ($this->enableShutdown) { - // Only run the tasks if an E_ERROR didn't occur. - $err = error_get_last(); - if (!$err || ($err['type'] ^ E_ERROR)) { - $this->run(); - } - } - }); - } - } - - public function isEmpty() - { - return !$this->queue; - } - - public function add(callable $task) - { - $this->queue[] = $task; - } - - public function run() - { - while ($task = array_shift($this->queue)) { - /** @var callable $task */ - $task(); - } - } - - /** - * The task queue will be run and exhausted by default when the process - * exits IFF the exit is not the result of a PHP E_ERROR error. - * - * You can disable running the automatic shutdown of the queue by calling - * this function. If you disable the task queue shutdown process, then you - * MUST either run the task queue (as a result of running your event loop - * or manually using the run() method) or wait on each outstanding promise. - * - * Note: This shutdown will occur before any destructors are triggered. - */ - public function disableShutdown() - { - $this->enableShutdown = false; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueueInterface.php deleted file mode 100644 index 723d4d5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\Utils::queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - */ - public static function queue(TaskQueueInterface $assign = null) - { - static $queue; - - if ($assign) { - $queue = $assign; - } elseif (!$queue) { - $queue = new TaskQueue(); - } - - return $queue; - } - - /** - * Adds a function to run in the task queue when it is next `run()` and - * returns a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - */ - public static function task(callable $task) - { - $queue = self::queue(); - $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise) { - try { - $promise->resolve($task()); - } catch (\Throwable $e) { - $promise->reject($e); - } catch (\Exception $e) { - $promise->reject($e); - } - }); - - return $promise; - } - - /** - * Synchronously waits on a promise to resolve and returns an inspection - * state array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the - * array will contain a "value" key mapping to the fulfilled value of the - * promise. If the promise is rejected, the array will contain a "reason" - * key mapping to the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - */ - public static function inspect(PromiseInterface $promise) - { - try { - return [ - 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait() - ]; - } catch (RejectionException $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; - } catch (\Throwable $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } catch (\Exception $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } - } - - /** - * Waits on all of the provided promises, but does not unwrap rejected - * promises as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - */ - public static function inspectAll($promises) - { - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = inspect($promise); - } - - return $results; - } - - /** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same - * order the promises were provided). An exception is thrown if any of the - * promises are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - */ - public static function unwrap($promises) - { - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = $promise->wait(); - } - - return $results; - } - - /** - * Given an array of promises, return a promise that is fulfilled when all - * the items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface - */ - public static function all($promises, $recursive = false) - { - $results = []; - $promise = Each::of( - $promises, - function ($value, $idx) use (&$results) { - $results[$idx] = $value; - }, - function ($reason, $idx, Promise $aggregate) { - $aggregate->reject($reason); - } - )->then(function () use (&$results) { - ksort($results); - return $results; - }); - - if (true === $recursive) { - $promise = $promise->then(function ($results) use ($recursive, &$promises) { - foreach ($promises as $promise) { - if (Is::pending($promise)) { - return self::all($promises, $recursive); - } - } - return $results; - }); - } - - return $promise; - } - - /** - * Initiate a competitive race between multiple promises or values (values - * will become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise - * is fulfilled with an array that contains the fulfillment values of the - * winners in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number - * of fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ - public static function some($count, $promises) - { - $results = []; - $rejections = []; - - return Each::of( - $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count) { - if (Is::settled($p)) { - return; - } - $results[$idx] = $value; - if (count($results) >= $count) { - $p->resolve(null); - } - }, - function ($reason) use (&$rejections) { - $rejections[] = $reason; - } - )->then( - function () use (&$results, &$rejections, $count) { - if (count($results) !== $count) { - throw new AggregateException( - 'Not enough promises to fulfill count', - $rejections - ); - } - ksort($results); - return array_values($results); - } - ); - } - - /** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ - public static function any($promises) - { - return self::some(1, $promises)->then(function ($values) { - return $values[0]; - }); - } - - /** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ - public static function settle($promises) - { - $results = []; - - return Each::of( - $promises, - function ($value, $idx) use (&$results) { - $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; - }, - function ($reason, $idx) use (&$results) { - $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; - } - )->then(function () use (&$results) { - ksort($results); - return $results; - }); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions.php deleted file mode 100644 index c03d39d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions.php +++ /dev/null @@ -1,363 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - * - * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead. - */ -function queue(TaskQueueInterface $assign = null) -{ - return Utils::queue($assign); -} - -/** - * Adds a function to run in the task queue when it is next `run()` and returns - * a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - * - * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead. - */ -function task(callable $task) -{ - return Utils::task($task); -} - -/** - * Creates a promise for a value if the value is not a promise. - * - * @param mixed $value Promise or value. - * - * @return PromiseInterface - * - * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead. - */ -function promise_for($value) -{ - return Create::promiseFor($value); -} - -/** - * Creates a rejected promise for a reason if the reason is not a promise. If - * the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - * - * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead. - */ -function rejection_for($reason) -{ - return Create::rejectionFor($reason); -} - -/** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - * - * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead. - */ -function exception_for($reason) -{ - return Create::exceptionFor($reason); -} - -/** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - * - * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead. - */ -function iter_for($value) -{ - return Create::iterFor($value); -} - -/** - * Synchronously waits on a promise to resolve and returns an inspection state - * array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the array - * will contain a "value" key mapping to the fulfilled value of the promise. If - * the promise is rejected, the array will contain a "reason" key mapping to - * the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead. - */ -function inspect(PromiseInterface $promise) -{ - return Utils::inspect($promise); -} - -/** - * Waits on all of the provided promises, but does not unwrap rejected promises - * as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead. - */ -function inspect_all($promises) -{ - return Utils::inspectAll($promises); -} - -/** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same order - * the promises were provided). An exception is thrown if any of the promises - * are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - * - * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead. - */ -function unwrap($promises) -{ - return Utils::unwrap($promises); -} - -/** - * Given an array of promises, return a promise that is fulfilled when all the - * items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface - * - * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead. - */ -function all($promises, $recursive = false) -{ - return Utils::all($promises, $recursive); -} - -/** - * Initiate a competitive race between multiple promises or values (values will - * become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise is - * fulfilled with an array that contains the fulfillment values of the winners - * in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number of - * fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead. - */ -function some($count, $promises) -{ - return Utils::some($count, $promises); -} - -/** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead. - */ -function any($promises) -{ - return Utils::any($promises); -} - -/** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead. - */ -function settle($promises) -{ - return Utils::settle($promises); -} - -/** - * Given an iterator that yields promises or values, returns a promise that is - * fulfilled with a null value when the iterator has been consumed or the - * aggregate promise has been fulfilled or rejected. - * - * $onFulfilled is a function that accepts the fulfilled value, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * $onRejected is a function that accepts the rejection reason, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead. - */ -function each( - $iterable, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::of($iterable, $onFulfilled, $onRejected); -} - -/** - * Like each, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow for - * dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead. - */ -function each_limit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected); -} - -/** - * Like each_limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - * - * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead. - */ -function each_limit_all( - $iterable, - $concurrency, - callable $onFulfilled = null -) { - return Each::ofLimitAll($iterable, $concurrency, $onFulfilled); -} - -/** - * Returns true if a promise is fulfilled. - * - * @return bool - * - * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead. - */ -function is_fulfilled(PromiseInterface $promise) -{ - return Is::fulfilled($promise); -} - -/** - * Returns true if a promise is rejected. - * - * @return bool - * - * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead. - */ -function is_rejected(PromiseInterface $promise) -{ - return Is::rejected($promise); -} - -/** - * Returns true if a promise is fulfilled or rejected. - * - * @return bool - * - * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead. - */ -function is_settled(PromiseInterface $promise) -{ - return Is::settled($promise); -} - -/** - * Create a new coroutine. - * - * @see Coroutine - * - * @return PromiseInterface - * - * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead. - */ -function coroutine(callable $generatorFn) -{ - return Coroutine::of($generatorFn); -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions_include.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions_include.php deleted file mode 100644 index 34cd171..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/promises/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -withPath('foo')->withHost('example.com')` will throw an exception - because the path of a URI with an authority must start with a slash "/" or be empty - - `(new Uri())->withScheme('http')` will return `'http://localhost'` - -### Deprecated - -- `Uri::resolve` in favor of `UriResolver::resolve` -- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` - -### Fixed - -- `Stream::read` when length parameter <= 0. -- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. -- `ServerRequest::getUriFromGlobals` when `Host` header contains port. -- Compatibility of URIs with `file` scheme and empty host. - - -## [1.3.1] - 2016-06-25 - -### Fixed - -- `Uri::__toString` for network path references, e.g. `//example.org`. -- Missing lowercase normalization for host. -- Handling of URI components in case they are `'0'` in a lot of places, - e.g. as a user info password. -- `Uri::withAddedHeader` to correctly merge headers with different case. -- Trimming of header values in `Uri::withAddedHeader`. Header values may - be surrounded by whitespace which should be ignored according to RFC 7230 - Section 3.2.4. This does not apply to header names. -- `Uri::withAddedHeader` with an array of header values. -- `Uri::resolve` when base path has no slash and handling of fragment. -- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the - key/value both in encoded as well as decoded form to those methods. This is - consistent with withPath, withQuery etc. -- `ServerRequest::withoutAttribute` when attribute value is null. - - -## [1.3.0] - 2016-04-13 - -### Added - -- Remaining interfaces needed for full PSR7 compatibility - (ServerRequestInterface, UploadedFileInterface, etc.). -- Support for stream_for from scalars. - -### Changed - -- Can now extend Uri. - -### Fixed -- A bug in validating request methods by making it more permissive. - - -## [1.2.3] - 2016-02-18 - -### Fixed - -- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote - streams, which can sometimes return fewer bytes than requested with `fread`. -- Handling of gzipped responses with FNAME headers. - - -## [1.2.2] - 2016-01-22 - -### Added - -- Support for URIs without any authority. -- Support for HTTP 451 'Unavailable For Legal Reasons.' -- Support for using '0' as a filename. -- Support for including non-standard ports in Host headers. - - -## [1.2.1] - 2015-11-02 - -### Changes - -- Now supporting negative offsets when seeking to SEEK_END. - - -## [1.2.0] - 2015-08-15 - -### Changed - -- Body as `"0"` is now properly added to a response. -- Now allowing forward seeking in CachingStream. -- Now properly parsing HTTP requests that contain proxy targets in - `parse_request`. -- functions.php is now conditionally required. -- user-info is no longer dropped when resolving URIs. - - -## [1.1.0] - 2015-06-24 - -### Changed - -- URIs can now be relative. -- `multipart/form-data` headers are now overridden case-insensitively. -- URI paths no longer encode the following characters because they are allowed - in URIs: "(", ")", "*", "!", "'" -- A port is no longer added to a URI when the scheme is missing and no port is - present. - - -## 1.0.0 - 2015-05-19 - -Initial release. - -Currently unsupported: - -- `Psr\Http\Message\ServerRequestInterface` -- `Psr\Http\Message\UploadedFileInterface` - - - -[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD -[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 -[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 -[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 -[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 -[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 -[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 -[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 -[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 -[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 -[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 -[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 -[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 -[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 -[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/LICENSE b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/LICENSE deleted file mode 100644 index 581d95f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/README.md b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/README.md deleted file mode 100644 index acfabfd..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/README.md +++ /dev/null @@ -1,809 +0,0 @@ -# PSR-7 Message Implementation - -This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) -message implementation, several stream decorators, and some helpful -functionality like query string parsing. - - -[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) - - -# Stream implementation - -This package comes with a number of stream implementations and stream -decorators. - - -## AppendStream - -`GuzzleHttp\Psr7\AppendStream` - -Reads from multiple streams, one after the other. - -```php -use GuzzleHttp\Psr7; - -$a = Psr7\Utils::streamFor('abc, '); -$b = Psr7\Utils::streamFor('123.'); -$composed = new Psr7\AppendStream([$a, $b]); - -$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me')); - -echo $composed; // abc, 123. Above all listen to me. -``` - - -## BufferStream - -`GuzzleHttp\Psr7\BufferStream` - -Provides a buffer stream that can be written to fill a buffer, and read -from to remove bytes from the buffer. - -This stream returns a "hwm" metadata value that tells upstream consumers -what the configured high water mark of the stream is, or the maximum -preferred size of the buffer. - -```php -use GuzzleHttp\Psr7; - -// When more than 1024 bytes are in the buffer, it will begin returning -// false to writes. This is an indication that writers should slow down. -$buffer = new Psr7\BufferStream(1024); -``` - - -## CachingStream - -The CachingStream is used to allow seeking over previously read bytes on -non-seekable streams. This can be useful when transferring a non-seekable -entity body fails due to needing to rewind the stream (for example, resulting -from a redirect). Data that is read from the remote stream will be buffered in -a PHP temp stream so that previously read bytes are cached first in memory, -then on disk. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r')); -$stream = new Psr7\CachingStream($original); - -$stream->read(1024); -echo $stream->tell(); -// 1024 - -$stream->seek(0); -echo $stream->tell(); -// 0 -``` - - -## DroppingStream - -`GuzzleHttp\Psr7\DroppingStream` - -Stream decorator that begins dropping data once the size of the underlying -stream becomes too full. - -```php -use GuzzleHttp\Psr7; - -// Create an empty stream -$stream = Psr7\Utils::streamFor(); - -// Start dropping data when the stream has more than 10 bytes -$dropping = new Psr7\DroppingStream($stream, 10); - -$dropping->write('01234567890123456789'); -echo $stream; // 0123456789 -``` - - -## FnStream - -`GuzzleHttp\Psr7\FnStream` - -Compose stream implementations based on a hash of functions. - -Allows for easy testing and extension of a provided stream without needing -to create a concrete class for a simple extension point. - -```php - -use GuzzleHttp\Psr7; - -$stream = Psr7\Utils::streamFor('hi'); -$fnStream = Psr7\FnStream::decorate($stream, [ - 'rewind' => function () use ($stream) { - echo 'About to rewind - '; - $stream->rewind(); - echo 'rewound!'; - } -]); - -$fnStream->rewind(); -// Outputs: About to rewind - rewound! -``` - - -## InflateStream - -`GuzzleHttp\Psr7\InflateStream` - -Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. - -This stream decorator skips the first 10 bytes of the given stream to remove -the gzip header, converts the provided stream to a PHP stream resource, -then appends the zlib.inflate filter. The stream is then converted back -to a Guzzle stream resource to be used as a Guzzle stream. - - -## LazyOpenStream - -`GuzzleHttp\Psr7\LazyOpenStream` - -Lazily reads or writes to a file that is opened only after an IO operation -take place on the stream. - -```php -use GuzzleHttp\Psr7; - -$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); -// The file has not yet been opened... - -echo $stream->read(10); -// The file is opened and read from only when needed. -``` - - -## LimitStream - -`GuzzleHttp\Psr7\LimitStream` - -LimitStream can be used to read a subset or slice of an existing stream object. -This can be useful for breaking a large file into smaller pieces to be sent in -chunks (e.g. Amazon S3's multipart upload API). - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+')); -echo $original->getSize(); -// >>> 1048576 - -// Limit the size of the body to 1024 bytes and start reading from byte 2048 -$stream = new Psr7\LimitStream($original, 1024, 2048); -echo $stream->getSize(); -// >>> 1024 -echo $stream->tell(); -// >>> 0 -``` - - -## MultipartStream - -`GuzzleHttp\Psr7\MultipartStream` - -Stream that when read returns bytes for a streaming multipart or -multipart/form-data stream. - - -## NoSeekStream - -`GuzzleHttp\Psr7\NoSeekStream` - -NoSeekStream wraps a stream and does not allow seeking. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor('foo'); -$noSeek = new Psr7\NoSeekStream($original); - -echo $noSeek->read(3); -// foo -var_export($noSeek->isSeekable()); -// false -$noSeek->seek(0); -var_export($noSeek->read(3)); -// NULL -``` - - -## PumpStream - -`GuzzleHttp\Psr7\PumpStream` - -Provides a read only stream that pumps data from a PHP callable. - -When invoking the provided callable, the PumpStream will pass the amount of -data requested to read to the callable. The callable can choose to ignore -this value and return fewer or more bytes than requested. Any extra data -returned by the provided callable is buffered internally until drained using -the read() function of the PumpStream. The provided callable MUST return -false when there is no more data to read. - - -## Implementing stream decorators - -Creating a stream decorator is very easy thanks to the -`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that -implement `Psr\Http\Message\StreamInterface` by proxying to an underlying -stream. Just `use` the `StreamDecoratorTrait` and implement your custom -methods. - -For example, let's say we wanted to call a specific function each time the last -byte is read from a stream. This could be implemented by overriding the -`read()` method. - -```php -use Psr\Http\Message\StreamInterface; -use GuzzleHttp\Psr7\StreamDecoratorTrait; - -class EofCallbackStream implements StreamInterface -{ - use StreamDecoratorTrait; - - private $callback; - - public function __construct(StreamInterface $stream, callable $cb) - { - $this->stream = $stream; - $this->callback = $cb; - } - - public function read($length) - { - $result = $this->stream->read($length); - - // Invoke the callback when EOF is hit. - if ($this->eof()) { - call_user_func($this->callback); - } - - return $result; - } -} -``` - -This decorator could be added to any existing stream and used like so: - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor('foo'); - -$eofStream = new EofCallbackStream($original, function () { - echo 'EOF!'; -}); - -$eofStream->read(2); -$eofStream->read(1); -// echoes "EOF!" -$eofStream->seek(0); -$eofStream->read(3); -// echoes "EOF!" -``` - - -## PHP StreamWrapper - -You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a -PSR-7 stream as a PHP stream resource. - -Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP -stream from a PSR-7 stream. - -```php -use GuzzleHttp\Psr7\StreamWrapper; - -$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!'); -$resource = StreamWrapper::getResource($stream); -echo fread($resource, 6); // outputs hello! -``` - - -# Static API - -There are various static methods available under the `GuzzleHttp\Psr7` namespace. - - -## `GuzzleHttp\Psr7\Message::toString` - -`public static function toString(MessageInterface $message): string` - -Returns the string representation of an HTTP message. - -```php -$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); -echo GuzzleHttp\Psr7\Message::toString($request); -``` - - -## `GuzzleHttp\Psr7\Message::bodySummary` - -`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null` - -Get a short summary of the message body. - -Will return `null` if the response is not printable. - - -## `GuzzleHttp\Psr7\Message::rewindBody` - -`public static function rewindBody(MessageInterface $message): void` - -Attempts to rewind a message body and throws an exception on failure. - -The body of the message will only be rewound if a call to `tell()` -returns a value other than `0`. - - -## `GuzzleHttp\Psr7\Message::parseMessage` - -`public static function parseMessage(string $message): array` - -Parses an HTTP message into an associative array. - -The array contains the "start-line" key containing the start line of -the message, "headers" key containing an associative array of header -array values, and a "body" key containing the body of the message. - - -## `GuzzleHttp\Psr7\Message::parseRequestUri` - -`public static function parseRequestUri(string $path, array $headers): string` - -Constructs a URI for an HTTP request message. - - -## `GuzzleHttp\Psr7\Message::parseRequest` - -`public static function parseRequest(string $message): Request` - -Parses a request message string into a request object. - - -## `GuzzleHttp\Psr7\Message::parseResponse` - -`public static function parseResponse(string $message): Response` - -Parses a response message string into a response object. - - -## `GuzzleHttp\Psr7\Header::parse` - -`public static function parse(string|array $header): array` - -Parse an array of header values containing ";" separated data into an -array of associative arrays representing the header key value pair data -of the header. When a parameter does not contain a value, but just -contains a key, this function will inject a key with a '' string value. - - -## `GuzzleHttp\Psr7\Header::normalize` - -`public static function normalize(string|array $header): array` - -Converts an array of header values that may contain comma separated -headers into an array of headers with no comma separated values. - - -## `GuzzleHttp\Psr7\Query::parse` - -`public static function parse(string $str, int|bool $urlEncoding = true): array` - -Parse a query string into an associative array. - -If multiple values are found for the same key, the value of that key -value pair will become an array. This function does not parse nested -PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` -will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. - - -## `GuzzleHttp\Psr7\Query::build` - -`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string` - -Build a query string from an array of key value pairs. - -This function can use the return value of `parse()` to build a query -string. This function does not modify the provided keys when an array is -encountered (like `http_build_query()` would). - - -## `GuzzleHttp\Psr7\Utils::caselessRemove` - -`public static function caselessRemove(iterable $keys, $keys, array $data): array` - -Remove the items given by the keys, case insensitively from the data. - - -## `GuzzleHttp\Psr7\Utils::copyToStream` - -`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void` - -Copy the contents of a stream into another stream until the given number -of bytes have been read. - - -## `GuzzleHttp\Psr7\Utils::copyToString` - -`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string` - -Copy the contents of a stream into a string until the given number of -bytes have been read. - - -## `GuzzleHttp\Psr7\Utils::hash` - -`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string` - -Calculate a hash of a stream. - -This method reads the entire stream to calculate a rolling hash, based on -PHP's `hash_init` functions. - - -## `GuzzleHttp\Psr7\Utils::modifyRequest` - -`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface` - -Clone and modify a request with the given changes. - -This method is useful for reducing the number of clones needed to mutate -a message. - -- method: (string) Changes the HTTP method. -- set_headers: (array) Sets the given headers. -- remove_headers: (array) Remove the given headers. -- body: (mixed) Sets the given body. -- uri: (UriInterface) Set the URI. -- query: (string) Set the query string value of the URI. -- version: (string) Set the protocol version. - - -## `GuzzleHttp\Psr7\Utils::readLine` - -`public static function readLine(StreamInterface $stream, int $maxLength = null): string` - -Read a line from the stream up to the maximum allowed buffer length. - - -## `GuzzleHttp\Psr7\Utils::streamFor` - -`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` - -Create a new stream based on the input type. - -Options is an associative array that can contain the following keys: - -- metadata: Array of custom metadata. -- size: Size of the stream. - -This method accepts the following `$resource` types: - -- `Psr\Http\Message\StreamInterface`: Returns the value as-is. -- `string`: Creates a stream object that uses the given string as the contents. -- `resource`: Creates a stream object that wraps the given PHP stream resource. -- `Iterator`: If the provided value implements `Iterator`, then a read-only - stream object will be created that wraps the given iterable. Each time the - stream is read from, data from the iterator will fill a buffer and will be - continuously called until the buffer is equal to the requested read size. - Subsequent read calls will first read from the buffer and then call `next` - on the underlying iterator until it is exhausted. -- `object` with `__toString()`: If the object has the `__toString()` method, - the object will be cast to a string and then a stream will be returned that - uses the string value. -- `NULL`: When `null` is passed, an empty stream object is returned. -- `callable` When a callable is passed, a read-only stream object will be - created that invokes the given callable. The callable is invoked with the - number of suggested bytes to read. The callable can return any number of - bytes, but MUST return `false` when there is no more data to return. The - stream object that wraps the callable will invoke the callable until the - number of requested bytes are available. Any additional bytes will be - buffered and used in subsequent reads. - -```php -$stream = GuzzleHttp\Psr7\Utils::streamFor('foo'); -$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r')); - -$generator = function ($bytes) { - for ($i = 0; $i < $bytes; $i++) { - yield ' '; - } -} - -$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100)); -``` - - -## `GuzzleHttp\Psr7\Utils::tryFopen` - -`public static function tryFopen(string $filename, string $mode): resource` - -Safely opens a PHP stream resource using a filename. - -When fopen fails, PHP normally raises a warning. This function adds an -error handler that checks for errors and throws an exception instead. - - -## `GuzzleHttp\Psr7\Utils::uriFor` - -`public static function uriFor(string|UriInterface $uri): UriInterface` - -Returns a UriInterface for the given value. - -This function accepts a string or UriInterface and returns a -UriInterface for the given value. If the value is already a -UriInterface, it is returned as-is. - - -## `GuzzleHttp\Psr7\MimeType::fromFilename` - -`public static function fromFilename(string $filename): string|null` - -Determines the mimetype of a file by looking at its extension. - - -## `GuzzleHttp\Psr7\MimeType::fromExtension` - -`public static function fromExtension(string $extension): string|null` - -Maps a file extensions to a mimetype. - - -## Upgrading from Function API - -The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: - -| Original Function | Replacement Method | -|----------------|----------------| -| `str` | `Message::toString` | -| `uri_for` | `Utils::uriFor` | -| `stream_for` | `Utils::streamFor` | -| `parse_header` | `Header::parse` | -| `normalize_header` | `Header::normalize` | -| `modify_request` | `Utils::modifyRequest` | -| `rewind_body` | `Message::rewindBody` | -| `try_fopen` | `Utils::tryFopen` | -| `copy_to_string` | `Utils::copyToString` | -| `copy_to_stream` | `Utils::copyToStream` | -| `hash` | `Utils::hash` | -| `readline` | `Utils::readLine` | -| `parse_request` | `Message::parseRequest` | -| `parse_response` | `Message::parseResponse` | -| `parse_query` | `Query::parse` | -| `build_query` | `Query::build` | -| `mimetype_from_filename` | `MimeType::fromFilename` | -| `mimetype_from_extension` | `MimeType::fromExtension` | -| `_parse_message` | `Message::parseMessage` | -| `_parse_request_uri` | `Message::parseRequestUri` | -| `get_message_body_summary` | `Message::bodySummary` | -| `_caseless_remove` | `Utils::caselessRemove` | - - -# Additional URI Methods - -Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, -this library also provides additional functionality when working with URIs as static methods. - -## URI Types - -An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. -An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, -the base URI. Relative references can be divided into several forms according to -[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): - -- network-path references, e.g. `//example.com/path` -- absolute-path references, e.g. `/path` -- relative-path references, e.g. `subpath` - -The following methods can be used to identify the type of the URI. - -### `GuzzleHttp\Psr7\Uri::isAbsolute` - -`public static function isAbsolute(UriInterface $uri): bool` - -Whether the URI is absolute, i.e. it has a scheme. - -### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` - -`public static function isNetworkPathReference(UriInterface $uri): bool` - -Whether the URI is a network-path reference. A relative reference that begins with two slash characters is -termed an network-path reference. - -### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` - -`public static function isAbsolutePathReference(UriInterface $uri): bool` - -Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is -termed an absolute-path reference. - -### `GuzzleHttp\Psr7\Uri::isRelativePathReference` - -`public static function isRelativePathReference(UriInterface $uri): bool` - -Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is -termed a relative-path reference. - -### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` - -`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` - -Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its -fragment component, identical to the base URI. When no base URI is given, only an empty URI reference -(apart from its fragment) is considered a same-document reference. - -## URI Components - -Additional methods to work with URI components. - -### `GuzzleHttp\Psr7\Uri::isDefaultPort` - -`public static function isDefaultPort(UriInterface $uri): bool` - -Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null -or the standard port. This method can be used independently of the implementation. - -### `GuzzleHttp\Psr7\Uri::composeComponents` - -`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` - -Composes a URI reference string from its various components according to -[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called -manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. - -### `GuzzleHttp\Psr7\Uri::fromParts` - -`public static function fromParts(array $parts): UriInterface` - -Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. - - -### `GuzzleHttp\Psr7\Uri::withQueryValue` - -`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` - -Creates a new URI with a specific query string value. Any existing query string values that exactly match the -provided key are removed and replaced with the given key value pair. A value of null will set the query string -key without a value, e.g. "key" instead of "key=value". - -### `GuzzleHttp\Psr7\Uri::withQueryValues` - -`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` - -Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an -associative array of key => value. - -### `GuzzleHttp\Psr7\Uri::withoutQueryValue` - -`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` - -Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the -provided key are removed. - -## Reference Resolution - -`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according -to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers -do when resolving a link in a website based on the current request URI. - -### `GuzzleHttp\Psr7\UriResolver::resolve` - -`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` - -Converts the relative URI into a new URI that is resolved against the base URI. - -### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` - -`public static function removeDotSegments(string $path): string` - -Removes dot segments from a path and returns the new path according to -[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). - -### `GuzzleHttp\Psr7\UriResolver::relativize` - -`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` - -Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): - -```php -(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) -``` - -One use-case is to use the current request URI as base URI and then generate relative links in your documents -to reduce the document size or offer self-contained downloadable document archives. - -```php -$base = new Uri('http://example.com/a/b/'); -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. -echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. -``` - -## Normalization and Comparison - -`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to -[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). - -### `GuzzleHttp\Psr7\UriNormalizer::normalize` - -`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` - -Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. -This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask -of normalizations to apply. The following normalizations are available: - -- `UriNormalizer::PRESERVING_NORMALIZATIONS` - - Default normalizations which only include the ones that preserve semantics. - -- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` - - All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. - - Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` - -- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` - - Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of - ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should - not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved - characters by URI normalizers. - - Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` - -- `UriNormalizer::CONVERT_EMPTY_PATH` - - Converts the empty path to "/" for http and https URIs. - - Example: `http://example.org` → `http://example.org/` - -- `UriNormalizer::REMOVE_DEFAULT_HOST` - - Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host - "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to - RFC 3986. - - Example: `file://localhost/myfile` → `file:///myfile` - -- `UriNormalizer::REMOVE_DEFAULT_PORT` - - Removes the default port of the given URI scheme from the URI. - - Example: `http://example.org:80/` → `http://example.org/` - -- `UriNormalizer::REMOVE_DOT_SEGMENTS` - - Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would - change the semantics of the URI reference. - - Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` - -- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` - - Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes - and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization - may change the semantics. Encoded slashes (%2F) are not removed. - - Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` - -- `UriNormalizer::SORT_QUERY_PARAMETERS` - - Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be - significant (this is not defined by the standard). So this normalization is not safe and may change the semantics - of the URI. - - Example: `?lang=en&article=fred` → `?article=fred&lang=en` - -### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` - -`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` - -Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given -`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. -This of course assumes they will be resolved against the same base URI. If this is not the case, determination of -equivalence or difference of relative references does not mean anything. diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/composer.json b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/composer.json deleted file mode 100644 index 58dcb07..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/composer.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "guzzlehttp/psr7", - "type": "library", - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10", - "ext-zlib": "*" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": ["src/functions_include.php"] - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\Psr7\\": "tests/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/AppendStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/AppendStream.php deleted file mode 100644 index 86e7a23..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/AppendStream.php +++ /dev/null @@ -1,244 +0,0 @@ -addStream($stream); - } - } - - public function __toString() - { - try { - $this->rewind(); - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(StreamInterface $stream) - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = false; - } - - $this->streams[] = $stream; - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Closes each attached stream. - * - * {@inheritdoc} - */ - public function close() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->close(); - } - - $this->streams = []; - } - - /** - * Detaches each attached stream. - * - * Returns null as it's not clear which underlying stream resource to return. - * - * {@inheritdoc} - */ - public function detach() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->detach(); - } - - $this->streams = []; - - return null; - } - - public function tell() - { - return $this->pos; - } - - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - * - * {@inheritdoc} - */ - public function getSize() - { - $size = 0; - - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - - return $size; - } - - public function eof() - { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); - } - - public function rewind() - { - $this->seek(0); - } - - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - * - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if (!$this->seekable) { - throw new \RuntimeException('This AppendStream is not seekable'); - } elseif ($whence !== SEEK_SET) { - throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); - } - - $this->pos = $this->current = 0; - - // Rewind each stream - foreach ($this->streams as $i => $stream) { - try { - $stream->rewind(); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); - } - } - - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $result = $this->read(min(8096, $offset - $this->pos)); - if ($result === '') { - break; - } - } - } - - /** - * Reads from all of the appended streams until the length is met or EOF. - * - * {@inheritdoc} - */ - public function read($length) - { - $buffer = ''; - $total = count($this->streams) - 1; - $remaining = $length; - $progressToNext = false; - - while ($remaining > 0) { - - // Progress to the next stream if needed. - if ($progressToNext || $this->streams[$this->current]->eof()) { - $progressToNext = false; - if ($this->current === $total) { - break; - } - $this->current++; - } - - $result = $this->streams[$this->current]->read($remaining); - - // Using a loose comparison here to match on '', false, and null - if ($result == null) { - $progressToNext = true; - continue; - } - - $buffer .= $result; - $remaining = $length - strlen($buffer); - } - - $this->pos += strlen($buffer); - - return $buffer; - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return false; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to an AppendStream'); - } - - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/BufferStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/BufferStream.php deleted file mode 100644 index 627e4a5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/BufferStream.php +++ /dev/null @@ -1,140 +0,0 @@ -hwm = $hwm; - } - - public function __toString() - { - return $this->getContents(); - } - - public function getContents() - { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - public function close() - { - $this->buffer = ''; - } - - public function detach() - { - $this->close(); - - return null; - } - - public function getSize() - { - return strlen($this->buffer); - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return true; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a BufferStream'); - } - - public function eof() - { - return strlen($this->buffer) === 0; - } - - public function tell() - { - throw new \RuntimeException('Cannot determine the position of a BufferStream'); - } - - /** - * Reads data from the buffer. - */ - public function read($length) - { - $currentLength = strlen($this->buffer); - - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - } - - return $result; - } - - /** - * Writes data to the buffer. - */ - public function write($string) - { - $this->buffer .= $string; - - // TODO: What should happen here? - if (strlen($this->buffer) >= $this->hwm) { - return false; - } - - return strlen($string); - } - - public function getMetadata($key = null) - { - if ($key == 'hwm') { - return $this->hwm; - } - - return $key ? null : []; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/CachingStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/CachingStream.php deleted file mode 100644 index 244d2a0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/CachingStream.php +++ /dev/null @@ -1,139 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); - } - - public function getSize() - { - return max($this->stream->getSize(), $this->remoteStream->getSize()); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - if ($whence == SEEK_SET) { - $byte = $offset; - } elseif ($whence == SEEK_CUR) { - $byte = $offset + $this->tell(); - } elseif ($whence == SEEK_END) { - $size = $this->remoteStream->getSize(); - if ($size === null) { - $size = $this->cacheEntireStream(); - } - $byte = $size + $offset; - } else { - throw new \InvalidArgumentException('Invalid whence'); - } - - $diff = $byte - $this->stream->getSize(); - - if ($diff > 0) { - // Read the remoteStream until we have read in at least the amount - // of bytes requested, or we reach the end of the file. - while ($diff > 0 && !$this->remoteStream->eof()) { - $this->read($diff); - $diff = $byte - $this->stream->getSize(); - } - } else { - // We can just do a normal seek since we've already seen this byte. - $this->stream->seek($byte); - } - } - - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read( - $remaining + $this->skipReadBytes - ); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->stream->write($remoteData); - } - - return $data; - } - - public function write($string) - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->stream->write($string); - } - - public function eof() - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - $this->remoteStream->close() && $this->stream->close(); - } - - private function cacheEntireStream() - { - $target = new FnStream(['write' => 'strlen']); - Utils::copyToStream($this, $target); - - return $this->tell(); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/DroppingStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/DroppingStream.php deleted file mode 100644 index e125642..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ /dev/null @@ -1,43 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - - public function write($string) - { - $diff = $this->maxLength - $this->stream->getSize(); - - // Begin returning 0 when the underlying stream is too large. - if ($diff <= 0) { - return 0; - } - - // Write the stream or a subset of the stream if needed. - if (strlen($string) < $diff) { - return $this->stream->write($string); - } - - return $this->stream->write(substr($string, 0, $diff)); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/FnStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/FnStream.php deleted file mode 100644 index 407577a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/FnStream.php +++ /dev/null @@ -1,160 +0,0 @@ -methods = $methods; - - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - - /** - * Lazily determine which methods are not implemented. - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); - } - - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); - } - } - - /** - * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. - * @throws \LogicException - */ - public function __wakeup() - { - throw new \LogicException('FnStream should never be unserialized'); - } - - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { - $methods[$diff] = [$stream, $diff]; - } - - return new self($methods); - } - - public function __toString() - { - return call_user_func($this->_fn___toString); - } - - public function close() - { - return call_user_func($this->_fn_close); - } - - public function detach() - { - return call_user_func($this->_fn_detach); - } - - public function getSize() - { - return call_user_func($this->_fn_getSize); - } - - public function tell() - { - return call_user_func($this->_fn_tell); - } - - public function eof() - { - return call_user_func($this->_fn_eof); - } - - public function isSeekable() - { - return call_user_func($this->_fn_isSeekable); - } - - public function rewind() - { - call_user_func($this->_fn_rewind); - } - - public function seek($offset, $whence = SEEK_SET) - { - call_user_func($this->_fn_seek, $offset, $whence); - } - - public function isWritable() - { - return call_user_func($this->_fn_isWritable); - } - - public function write($string) - { - return call_user_func($this->_fn_write, $string); - } - - public function isReadable() - { - return call_user_func($this->_fn_isReadable); - } - - public function read($length) - { - return call_user_func($this->_fn_read, $length); - } - - public function getContents() - { - return call_user_func($this->_fn_getContents); - } - - public function getMetadata($key = null) - { - return call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Header.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Header.php deleted file mode 100644 index 865d742..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Header.php +++ /dev/null @@ -1,71 +0,0 @@ -]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - - return $params; - } - - /** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param string|array $header Header to normalize. - * - * @return array Returns the normalized header field values. - */ - public static function normalize($header) - { - if (!is_array($header)) { - return array_map('trim', explode(',', $header)); - } - - $result = []; - foreach ($header as $value) { - foreach ((array) $value as $v) { - if (strpos($v, ',') === false) { - $result[] = $v; - continue; - } - foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { - $result[] = trim($vv); - } - } - } - - return $result; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/InflateStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/InflateStream.php deleted file mode 100644 index c98b96f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/InflateStream.php +++ /dev/null @@ -1,53 +0,0 @@ -read(10); - $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); - // Skip the header, that is 10 + length of filename + 1 (nil) bytes - $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); - $resource = StreamWrapper::getResource($stream); - stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); - $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); - } - - /** - * @param StreamInterface $stream - * @param $header - * @return int - */ - private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) - { - $filename_header_length = 0; - - if (substr(bin2hex($header), 6, 2) === '08') { - // we have a filename, read until nil - $filename_header_length = 1; - while ($stream->read(1) !== chr(0)) { - $filename_header_length++; - } - } - - return $filename_header_length; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LazyOpenStream.php deleted file mode 100644 index 13c7af5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ /dev/null @@ -1,40 +0,0 @@ -filename = $filename; - $this->mode = $mode; - } - - /** - * Creates the underlying stream lazily when required. - * - * @return StreamInterface - */ - protected function createStream() - { - return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LimitStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LimitStream.php deleted file mode 100644 index bef9161..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/LimitStream.php +++ /dev/null @@ -1,156 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - - public function eof() - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return true; - } - - // No limit and the underlying stream is not at EOF - if ($this->limit == -1) { - return false; - } - - return $this->stream->tell() >= $this->offset + $this->limit; - } - - /** - * Returns the size of the limited subset of data - * {@inheritdoc} - */ - public function getSize() - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit == -1) { - return $length - $this->offset; - } else { - return min($this->limit, $length - $this->offset); - } - } - - /** - * Allow for a bounded seek on the read limited stream - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence !== SEEK_SET || $offset < 0) { - throw new \RuntimeException(sprintf( - 'Cannot seek to offset %s with whence %s', - $offset, - $whence - )); - } - - $offset += $this->offset; - - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - - $this->stream->seek($offset); - } - - /** - * Give a relative tell() - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell() - $this->offset; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @throws \RuntimeException if the stream cannot be seeked. - */ - public function setOffset($offset) - { - $current = $this->stream->tell(); - - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if ($this->stream->isSeekable()) { - $this->stream->seek($offset); - } elseif ($current > $offset) { - throw new \RuntimeException("Could not seek to stream offset $offset"); - } else { - $this->stream->read($offset - $current); - } - } - - $this->offset = $offset; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - */ - public function setLimit($limit) - { - $this->limit = $limit; - } - - public function read($length) - { - if ($this->limit == -1) { - return $this->stream->read($length); - } - - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(min($remaining, $length)); - } - - return ''; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Message.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Message.php deleted file mode 100644 index 516d1cb..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Message.php +++ /dev/null @@ -1,252 +0,0 @@ -getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); - if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); - } - } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - - foreach ($message->getHeaders() as $name => $values) { - if (strtolower($name) === 'set-cookie') { - foreach ($values as $value) { - $msg .= "\r\n{$name}: " . $value; - } - } else { - $msg .= "\r\n{$name}: " . implode(', ', $values); - } - } - - return "{$msg}\r\n\r\n" . $message->getBody(); - } - - /** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return string|null - */ - public static function bodySummary(MessageInterface $message, $truncateAt = 120) - { - $body = $message->getBody(); - - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - - $size = $body->getSize(); - - if ($size === 0) { - return null; - } - - $summary = $body->read($truncateAt); - $body->rewind(); - - if ($size > $truncateAt) { - $summary .= ' (truncated...)'; - } - - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) { - return null; - } - - return $summary; - } - - /** - * Attempts to rewind a message body and throws an exception on failure. - * - * The body of the message will only be rewound if a call to `tell()` - * returns a value other than `0`. - * - * @param MessageInterface $message Message to rewind - * - * @throws \RuntimeException - */ - public static function rewindBody(MessageInterface $message) - { - $body = $message->getBody(); - - if ($body->tell()) { - $body->rewind(); - } - } - - /** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - */ - public static function parseMessage($message) - { - if (!$message) { - throw new \InvalidArgumentException('Invalid message'); - } - - $message = ltrim($message, "\r\n"); - - $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); - - if ($messageParts === false || count($messageParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); - } - - list($rawHeaders, $body) = $messageParts; - $rawHeaders .= "\r\n"; // Put back the delimiter we split previously - $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); - - if ($headerParts === false || count($headerParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing status line'); - } - - list($startLine, $rawHeaders) = $headerParts; - - if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { - // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 - $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); - } - - /** @var array[] $headerLines */ - $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); - - // If these aren't the same, then one line didn't match and there's an invalid header. - if ($count !== substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 - if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { - throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); - } - - throw new \InvalidArgumentException('Invalid header syntax'); - } - - $headers = []; - - foreach ($headerLines as $headerLine) { - $headers[$headerLine[1]][] = $headerLine[2]; - } - - return [ - 'start-line' => $startLine, - 'headers' => $headers, - 'body' => $body, - ]; - } - - /** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - */ - public static function parseRequestUri($path, array $headers) - { - $hostKey = array_filter(array_keys($headers), function ($k) { - return strtolower($k) === 'host'; - }); - - // If no host is found, then a full URI cannot be constructed. - if (!$hostKey) { - return $path; - } - - $host = $headers[reset($hostKey)][0]; - $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - - return $scheme . '://' . $host . '/' . ltrim($path, '/'); - } - - /** - * Parses a request message string into a request object. - * - * @param string $message Request message string. - * - * @return Request - */ - public static function parseRequest($message) - { - $data = self::parseMessage($message); - $matches = []; - if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { - throw new \InvalidArgumentException('Invalid request string'); - } - $parts = explode(' ', $data['start-line'], 3); - $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; - - $request = new Request( - $parts[0], - $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], - $data['headers'], - $data['body'], - $version - ); - - return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); - } - - /** - * Parses a response message string into a response object. - * - * @param string $message Response message string. - * - * @return Response - */ - public static function parseResponse($message) - { - $data = self::parseMessage($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. - if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); - } - $parts = explode(' ', $data['start-line'], 3); - - return new Response( - (int) $parts[1], - $data['headers'], - $data['body'], - explode('/', $parts[0])[1], - isset($parts[2]) ? $parts[2] : null - ); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MessageTrait.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MessageTrait.php deleted file mode 100644 index 99203bb..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ /dev/null @@ -1,214 +0,0 @@ - array of values */ - private $headers = []; - - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - - /** @var string */ - private $protocol = '1.1'; - - /** @var StreamInterface|null */ - private $stream; - - public function getProtocolVersion() - { - return $this->protocol; - } - - public function withProtocolVersion($version) - { - if ($this->protocol === $version) { - return $this; - } - - $new = clone $this; - $new->protocol = $version; - return $new; - } - - public function getHeaders() - { - return $this->headers; - } - - public function hasHeader($header) - { - return isset($this->headerNames[strtolower($header)]); - } - - public function getHeader($header) - { - $header = strtolower($header); - - if (!isset($this->headerNames[$header])) { - return []; - } - - $header = $this->headerNames[$header]; - - return $this->headers[$header]; - } - - public function getHeaderLine($header) - { - return implode(', ', $this->getHeader($header)); - } - - public function withHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - - return $new; - } - - public function withAddedHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $new->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - } - - return $new; - } - - public function withoutHeader($header) - { - $normalized = strtolower($header); - - if (!isset($this->headerNames[$normalized])) { - return $this; - } - - $header = $this->headerNames[$normalized]; - - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - - return $new; - } - - public function getBody() - { - if (!$this->stream) { - $this->stream = Utils::streamFor(''); - } - - return $this->stream; - } - - public function withBody(StreamInterface $body) - { - if ($body === $this->stream) { - return $this; - } - - $new = clone $this; - $new->stream = $body; - return $new; - } - - private function setHeaders(array $headers) - { - $this->headerNames = $this->headers = []; - foreach ($headers as $header => $value) { - if (is_int($header)) { - // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec - // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. - $header = (string) $header; - } - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - - private function normalizeHeaderValue($value) - { - if (!is_array($value)) { - return $this->trimHeaderValues([$value]); - } - - if (count($value) === 0) { - throw new \InvalidArgumentException('Header value can not be an empty array.'); - } - - return $this->trimHeaderValues($value); - } - - /** - * Trims whitespace from the header values. - * - * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. - * - * header-field = field-name ":" OWS field-value OWS - * OWS = *( SP / HTAB ) - * - * @param string[] $values Header values - * - * @return string[] Trimmed header values - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function trimHeaderValues(array $values) - { - return array_map(function ($value) { - if (!is_scalar($value) && null !== $value) { - throw new \InvalidArgumentException(sprintf( - 'Header value must be scalar or null but %s provided.', - is_object($value) ? get_class($value) : gettype($value) - )); - } - - return trim((string) $value, " \t"); - }, array_values($values)); - } - - private function assertHeader($header) - { - if (!is_string($header)) { - throw new \InvalidArgumentException(sprintf( - 'Header name must be a string but %s provided.', - is_object($header) ? get_class($header) : gettype($header) - )); - } - - if ($header === '') { - throw new \InvalidArgumentException('Header name can not be empty.'); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MimeType.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MimeType.php deleted file mode 100644 index 205c7b1..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MimeType.php +++ /dev/null @@ -1,140 +0,0 @@ - 'video/3gpp', - '7z' => 'application/x-7z-compressed', - 'aac' => 'audio/x-aac', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'asc' => 'text/plain', - 'asf' => 'video/x-ms-asf', - 'atom' => 'application/atom+xml', - 'avi' => 'video/x-msvideo', - 'bmp' => 'image/bmp', - 'bz2' => 'application/x-bzip2', - 'cer' => 'application/pkix-cert', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'css' => 'text/css', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'deb' => 'application/x-debian-package', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dvi' => 'application/x-dvi', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'etx' => 'text/x-setext', - 'flac' => 'audio/flac', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/gzip', - 'htm' => 'text/html', - 'html' => 'text/html', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ini' => 'text/plain', - 'iso' => 'application/x-iso9660-image', - 'jar' => 'application/java-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'latex' => 'application/x-latex', - 'log' => 'text/plain', - 'm4a' => 'audio/mp4', - 'm4v' => 'video/mp4', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mov' => 'video/quicktime', - 'mkv' => 'video/x-matroska', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4v' => 'video/mp4', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'pbm' => 'image/x-portable-bitmap', - 'pdf' => 'application/pdf', - 'pgm' => 'image/x-portable-graymap', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'ppm' => 'image/x-portable-pixmap', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'ps' => 'application/postscript', - 'qt' => 'video/quicktime', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'svg' => 'image/svg+xml', - 'swf' => 'application/x-shockwave-flash', - 'tar' => 'application/x-tar', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'torrent' => 'application/x-bittorrent', - 'ttf' => 'application/x-font-ttf', - 'txt' => 'text/plain', - 'wav' => 'audio/x-wav', - 'webm' => 'video/webm', - 'webp' => 'image/webp', - 'wma' => 'audio/x-ms-wma', - 'wmv' => 'video/x-ms-wmv', - 'woff' => 'application/x-font-woff', - 'wsdl' => 'application/wsdl+xml', - 'xbm' => 'image/x-xbitmap', - 'xls' => 'application/vnd.ms-excel', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml' => 'application/xml', - 'xpm' => 'image/x-xpixmap', - 'xwd' => 'image/x-xwindowdump', - 'yaml' => 'text/yaml', - 'yml' => 'text/yaml', - 'zip' => 'application/zip', - ]; - - $extension = strtolower($extension); - - return isset($mimetypes[$extension]) - ? $mimetypes[$extension] - : null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MultipartStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MultipartStream.php deleted file mode 100644 index 0cbfea3..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ /dev/null @@ -1,154 +0,0 @@ -boundary = $boundary ?: sha1(uniqid('', true)); - $this->stream = $this->createStream($elements); - } - - /** - * Get the boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - - public function isWritable() - { - return false; - } - - /** - * Get the headers needed before transferring the content of a POST file - */ - private function getHeaders(array $headers) - { - $str = ''; - foreach ($headers as $key => $value) { - $str .= "{$key}: {$value}\r\n"; - } - - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; - } - - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $elements) - { - $stream = new AppendStream(); - - foreach ($elements as $element) { - $this->addElement($stream, $element); - } - - // Add the trailing boundary with CRLF - $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); - - return $stream; - } - - private function addElement(AppendStream $stream, array $element) - { - foreach (['contents', 'name'] as $key) { - if (!array_key_exists($key, $element)) { - throw new \InvalidArgumentException("A '{$key}' key is required"); - } - } - - $element['contents'] = Utils::streamFor($element['contents']); - - if (empty($element['filename'])) { - $uri = $element['contents']->getMetadata('uri'); - if (substr($uri, 0, 6) !== 'php://') { - $element['filename'] = $uri; - } - } - - list($body, $headers) = $this->createElement( - $element['name'], - $element['contents'], - isset($element['filename']) ? $element['filename'] : null, - isset($element['headers']) ? $element['headers'] : [] - ); - - $stream->addStream(Utils::streamFor($this->getHeaders($headers))); - $stream->addStream($body); - $stream->addStream(Utils::streamFor("\r\n")); - } - - /** - * @return array - */ - private function createElement($name, StreamInterface $stream, $filename, array $headers) - { - // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); - if (!$disposition) { - $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf('form-data; name="%s"; filename="%s"', - $name, - basename($filename)) - : "form-data; name=\"{$name}\""; - } - - // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); - if (!$length) { - if ($length = $stream->getSize()) { - $headers['Content-Length'] = (string) $length; - } - } - - // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); - if (!$type && ($filename === '0' || $filename)) { - if ($type = MimeType::fromFilename($filename)) { - $headers['Content-Type'] = $type; - } - } - - return [$stream, $headers]; - } - - private function getHeader(array $headers, $key) - { - $lowercaseHeader = strtolower($key); - foreach ($headers as $k => $v) { - if (strtolower($k) === $lowercaseHeader) { - return $v; - } - } - - return null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/NoSeekStream.php deleted file mode 100644 index 4b04b4c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ /dev/null @@ -1,23 +0,0 @@ -source = $source; - $this->size = isset($options['size']) ? $options['size'] : null; - $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->buffer = new BufferStream(); - } - - public function __toString() - { - try { - return Utils::copyToString($this); - } catch (\Exception $e) { - return ''; - } - } - - public function close() - { - $this->detach(); - } - - public function detach() - { - $this->tellPos = false; - $this->source = null; - - return null; - } - - public function getSize() - { - return $this->size; - } - - public function tell() - { - return $this->tellPos; - } - - public function eof() - { - return !$this->source; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a PumpStream'); - } - - public function isWritable() - { - return false; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to a PumpStream'); - } - - public function isReadable() - { - return true; - } - - public function read($length) - { - $data = $this->buffer->read($length); - $readLen = strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += strlen($data) - $readLen; - } - - return $data; - } - - public function getContents() - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - - return isset($this->metadata[$key]) ? $this->metadata[$key] : null; - } - - private function pump($length) - { - if ($this->source) { - do { - $data = call_user_func($this->source, $length); - if ($data === false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= strlen($data); - } while ($length > 0); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Query.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Query.php deleted file mode 100644 index 99e0930..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Query.php +++ /dev/null @@ -1,108 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - */ - public static function parse($str, $urlEncoding = true) - { - $result = []; - - if ($str === '') { - return $result; - } - - if ($urlEncoding === true) { - $decoder = function ($value) { - return rawurldecode(str_replace('+', ' ', $value)); - }; - } elseif ($urlEncoding === PHP_QUERY_RFC3986) { - $decoder = 'rawurldecode'; - } elseif ($urlEncoding === PHP_QUERY_RFC1738) { - $decoder = 'urldecode'; - } else { - $decoder = function ($str) { return $str; }; - } - - foreach (explode('&', $str) as $kvp) { - $parts = explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - if (!isset($result[$key])) { - $result[$key] = $value; - } else { - if (!is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - - return $result; - } - - /** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * @return string - */ - public static function build(array $params, $encoding = PHP_QUERY_RFC3986) - { - if (!$params) { - return ''; - } - - if ($encoding === false) { - $encoder = function ($str) { return $str; }; - } elseif ($encoding === PHP_QUERY_RFC3986) { - $encoder = 'rawurlencode'; - } elseif ($encoding === PHP_QUERY_RFC1738) { - $encoder = 'urlencode'; - } else { - throw new \InvalidArgumentException('Invalid type'); - } - - $qs = ''; - foreach ($params as $k => $v) { - $k = $encoder($k); - if (!is_array($v)) { - $qs .= $k; - if ($v !== null) { - $qs .= '=' . $encoder($v); - } - $qs .= '&'; - } else { - foreach ($v as $vv) { - $qs .= $k; - if ($vv !== null) { - $qs .= '=' . $encoder($vv); - } - $qs .= '&'; - } - } - } - - return $qs ? (string) substr($qs, 0, -1) : ''; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Request.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Request.php deleted file mode 100644 index 89fbb1e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Request.php +++ /dev/null @@ -1,152 +0,0 @@ -assertMethod($method); - if (!($uri instanceof UriInterface)) { - $uri = new Uri($uri); - } - - $this->method = strtoupper($method); - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!isset($this->headerNames['host'])) { - $this->updateHostFromUri(); - } - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - } - - public function getRequestTarget() - { - if ($this->requestTarget !== null) { - return $this->requestTarget; - } - - $target = $this->uri->getPath(); - if ($target == '') { - $target = '/'; - } - if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); - } - - return $target; - } - - public function withRequestTarget($requestTarget) - { - if (preg_match('#\s#', $requestTarget)) { - throw new InvalidArgumentException( - 'Invalid request target provided; cannot contain whitespace' - ); - } - - $new = clone $this; - $new->requestTarget = $requestTarget; - return $new; - } - - public function getMethod() - { - return $this->method; - } - - public function withMethod($method) - { - $this->assertMethod($method); - $new = clone $this; - $new->method = strtoupper($method); - return $new; - } - - public function getUri() - { - return $this->uri; - } - - public function withUri(UriInterface $uri, $preserveHost = false) - { - if ($uri === $this->uri) { - return $this; - } - - $new = clone $this; - $new->uri = $uri; - - if (!$preserveHost || !isset($this->headerNames['host'])) { - $new->updateHostFromUri(); - } - - return $new; - } - - private function updateHostFromUri() - { - $host = $this->uri->getHost(); - - if ($host == '') { - return; - } - - if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; - } - - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; - } - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } - - private function assertMethod($method) - { - if (!is_string($method) || $method === '') { - throw new \InvalidArgumentException('Method must be a non-empty string.'); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Response.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Response.php deleted file mode 100644 index 36b85fb..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Response.php +++ /dev/null @@ -1,155 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-status', - 208 => 'Already Reported', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Switch Proxy', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Time-out', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', - 415 => 'Unsupported Media Type', - 416 => 'Requested range not satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Unordered Collection', - 426 => 'Upgrade Required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 451 => 'Unavailable For Legal Reasons', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Time-out', - 505 => 'HTTP Version not supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 511 => 'Network Authentication Required', - ]; - - /** @var string */ - private $reasonPhrase = ''; - - /** @var int */ - private $statusCode = 200; - - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|null|resource|StreamInterface $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct( - $status = 200, - array $headers = [], - $body = null, - $version = '1.1', - $reason = null - ) { - $this->assertStatusCodeIsInteger($status); - $status = (int) $status; - $this->assertStatusCodeRange($status); - - $this->statusCode = $status; - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - - $this->setHeaders($headers); - if ($reason == '' && isset(self::$phrases[$this->statusCode])) { - $this->reasonPhrase = self::$phrases[$this->statusCode]; - } else { - $this->reasonPhrase = (string) $reason; - } - - $this->protocol = $version; - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - public function withStatus($code, $reasonPhrase = '') - { - $this->assertStatusCodeIsInteger($code); - $code = (int) $code; - $this->assertStatusCodeRange($code); - - $new = clone $this; - $new->statusCode = $code; - if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { - $reasonPhrase = self::$phrases[$new->statusCode]; - } - $new->reasonPhrase = (string) $reasonPhrase; - return $new; - } - - private function assertStatusCodeIsInteger($statusCode) - { - if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { - throw new \InvalidArgumentException('Status code must be an integer value.'); - } - } - - private function assertStatusCodeRange($statusCode) - { - if ($statusCode < 100 || $statusCode >= 600) { - throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Rfc7230.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Rfc7230.php deleted file mode 100644 index 505e474..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ /dev/null @@ -1,18 +0,0 @@ -@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; - const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/ServerRequest.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/ServerRequest.php deleted file mode 100644 index 72c5566..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ /dev/null @@ -1,378 +0,0 @@ -serverParams = $serverParams; - - parent::__construct($method, $uri, $headers, $body, $version); - } - - /** - * Return an UploadedFile instance array. - * - * @param array $files A array which respect $_FILES structure - * - * @return array - * - * @throws InvalidArgumentException for unrecognized values - */ - public static function normalizeFiles(array $files) - { - $normalized = []; - - foreach ($files as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = self::createUploadedFileFromSpec($value); - } elseif (is_array($value)) { - $normalized[$key] = self::normalizeFiles($value); - continue; - } else { - throw new InvalidArgumentException('Invalid value in files specification'); - } - } - - return $normalized; - } - - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * @return array|UploadedFileInterface - */ - private static function createUploadedFileFromSpec(array $value) - { - if (is_array($value['tmp_name'])) { - return self::normalizeNestedFileSpec($value); - } - - return new UploadedFile( - $value['tmp_name'], - (int) $value['size'], - (int) $value['error'], - $value['name'], - $value['type'] - ); - } - - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @param array $files - * @return UploadedFileInterface[] - */ - private static function normalizeNestedFileSpec(array $files = []) - { - $normalizedFiles = []; - - foreach (array_keys($files['tmp_name']) as $key) { - $spec = [ - 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key], - 'error' => $files['error'][$key], - 'name' => $files['name'][$key], - 'type' => $files['type'][$key], - ]; - $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); - } - - return $normalizedFiles; - } - - /** - * Return a ServerRequest populated with superglobals: - * $_GET - * $_POST - * $_COOKIE - * $_FILES - * $_SERVER - * - * @return ServerRequestInterface - */ - public static function fromGlobals() - { - $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - $headers = getallheaders(); - $uri = self::getUriFromGlobals(); - $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); - $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; - - $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); - - return $serverRequest - ->withCookieParams($_COOKIE) - ->withQueryParams($_GET) - ->withParsedBody($_POST) - ->withUploadedFiles(self::normalizeFiles($_FILES)); - } - - private static function extractHostAndPortFromAuthority($authority) - { - $uri = 'http://'.$authority; - $parts = parse_url($uri); - if (false === $parts) { - return [null, null]; - } - - $host = isset($parts['host']) ? $parts['host'] : null; - $port = isset($parts['port']) ? $parts['port'] : null; - - return [$host, $port]; - } - - /** - * Get a Uri populated with values from $_SERVER. - * - * @return UriInterface - */ - public static function getUriFromGlobals() - { - $uri = new Uri(''); - - $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); - - $hasPort = false; - if (isset($_SERVER['HTTP_HOST'])) { - list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); - if ($host !== null) { - $uri = $uri->withHost($host); - } - - if ($port !== null) { - $hasPort = true; - $uri = $uri->withPort($port); - } - } elseif (isset($_SERVER['SERVER_NAME'])) { - $uri = $uri->withHost($_SERVER['SERVER_NAME']); - } elseif (isset($_SERVER['SERVER_ADDR'])) { - $uri = $uri->withHost($_SERVER['SERVER_ADDR']); - } - - if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { - $uri = $uri->withPort($_SERVER['SERVER_PORT']); - } - - $hasQuery = false; - if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); - $uri = $uri->withPath($requestUriParts[0]); - if (isset($requestUriParts[1])) { - $hasQuery = true; - $uri = $uri->withQuery($requestUriParts[1]); - } - } - - if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { - $uri = $uri->withQuery($_SERVER['QUERY_STRING']); - } - - return $uri; - } - - - /** - * {@inheritdoc} - */ - public function getServerParams() - { - return $this->serverParams; - } - - /** - * {@inheritdoc} - */ - public function getUploadedFiles() - { - return $this->uploadedFiles; - } - - /** - * {@inheritdoc} - */ - public function withUploadedFiles(array $uploadedFiles) - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getCookieParams() - { - return $this->cookieParams; - } - - /** - * {@inheritdoc} - */ - public function withCookieParams(array $cookies) - { - $new = clone $this; - $new->cookieParams = $cookies; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getQueryParams() - { - return $this->queryParams; - } - - /** - * {@inheritdoc} - */ - public function withQueryParams(array $query) - { - $new = clone $this; - $new->queryParams = $query; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getParsedBody() - { - return $this->parsedBody; - } - - /** - * {@inheritdoc} - */ - public function withParsedBody($data) - { - $new = clone $this; - $new->parsedBody = $data; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function getAttribute($attribute, $default = null) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $default; - } - - return $this->attributes[$attribute]; - } - - /** - * {@inheritdoc} - */ - public function withAttribute($attribute, $value) - { - $new = clone $this; - $new->attributes[$attribute] = $value; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function withoutAttribute($attribute) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $this; - } - - $new = clone $this; - unset($new->attributes[$attribute]); - - return $new; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Stream.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Stream.php deleted file mode 100644 index 3865d6d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Stream.php +++ /dev/null @@ -1,270 +0,0 @@ -size = $options['size']; - } - - $this->customMetadata = isset($options['metadata']) - ? $options['metadata'] - : []; - - $this->stream = $stream; - $meta = stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); - $this->uri = $this->getMetadata('uri'); - } - - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - public function getContents() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $contents = stream_get_contents($this->stream); - - if ($contents === false) { - throw new \RuntimeException('Unable to read stream contents'); - } - - return $contents; - } - - public function close() - { - if (isset($this->stream)) { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->detach(); - } - } - - public function detach() - { - if (!isset($this->stream)) { - return null; - } - - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - - if (!isset($this->stream)) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($this->uri) { - clearstatcache(true, $this->uri); - } - - $stats = fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - - return null; - } - - public function isReadable() - { - return $this->readable; - } - - public function isWritable() - { - return $this->writable; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function eof() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - return feof($this->stream); - } - - public function tell() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $result = ftell($this->stream); - - if ($result === false) { - throw new \RuntimeException('Unable to determine stream position'); - } - - return $result; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $whence = (int) $whence; - - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } - if (fseek($this->stream, $offset, $whence) === -1) { - throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); - } - } - - public function read($length) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - if ($length < 0) { - throw new \RuntimeException('Length parameter cannot be negative'); - } - - if (0 === $length) { - return ''; - } - - $string = fread($this->stream, $length); - if (false === $string) { - throw new \RuntimeException('Unable to read from stream'); - } - - return $string; - } - - public function write($string) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - - // We can't know the size after writing anything - $this->size = null; - $result = fwrite($this->stream, $string); - - if ($result === false) { - throw new \RuntimeException('Unable to write to stream'); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - - $meta = stream_get_meta_data($this->stream); - - return isset($meta[$key]) ? $meta[$key] : null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php deleted file mode 100644 index 093023b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,151 +0,0 @@ -stream = $stream; - } - - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - * - * @param string $name Name of the property (allows "stream" only). - * - * @return StreamInterface - */ - public function __get($name) - { - if ($name == 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - - throw new \UnexpectedValueException("$name not found on class"); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - // Really, PHP? https://bugs.php.net/bug.php?id=53648 - trigger_error('StreamDecorator::__toString exception: ' - . (string) $e, E_USER_ERROR); - return ''; - } - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - $result = call_user_func_array([$this->stream, $method], $args); - - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - - public function close() - { - $this->stream->close(); - } - - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - - public function detach() - { - return $this->stream->detach(); - } - - public function getSize() - { - return $this->stream->getSize(); - } - - public function eof() - { - return $this->stream->eof(); - } - - public function tell() - { - return $this->stream->tell(); - } - - public function isReadable() - { - return $this->stream->isReadable(); - } - - public function isWritable() - { - return $this->stream->isWritable(); - } - - public function isSeekable() - { - return $this->stream->isSeekable(); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $this->stream->seek($offset, $whence); - } - - public function read($length) - { - return $this->stream->read($length); - } - - public function write($string) - { - return $this->stream->write($string); - } - - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @return StreamInterface - * - * @throws \BadMethodCallException - */ - protected function createStream() - { - throw new \BadMethodCallException('Not implemented'); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamWrapper.php deleted file mode 100644 index eac6535..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ /dev/null @@ -1,163 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); - } - - return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); - } - - /** - * Creates a stream context that can be used to open a stream as a php stream resource. - * - * @param StreamInterface $stream - * - * @return resource - */ - public static function createStreamContext(StreamInterface $stream) - { - return stream_context_create([ - 'guzzle' => ['stream' => $stream] - ]); - } - - /** - * Registers the stream wrapper if needed - */ - public static function register() - { - if (!in_array('guzzle', stream_get_wrappers())) { - stream_wrapper_register('guzzle', __CLASS__); - } - } - - public function stream_open($path, $mode, $options, &$opened_path) - { - $options = stream_context_get_options($this->context); - - if (!isset($options['guzzle']['stream'])) { - return false; - } - - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - - return true; - } - - public function stream_read($count) - { - return $this->stream->read($count); - } - - public function stream_write($data) - { - return (int) $this->stream->write($data); - } - - public function stream_tell() - { - return $this->stream->tell(); - } - - public function stream_eof() - { - return $this->stream->eof(); - } - - public function stream_seek($offset, $whence) - { - $this->stream->seek($offset, $whence); - - return true; - } - - public function stream_cast($cast_as) - { - $stream = clone($this->stream); - - return $stream->detach(); - } - - public function stream_stat() - { - static $modeMap = [ - 'r' => 33060, - 'rb' => 33060, - 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188 - ]; - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } - - public function url_stat($path, $flags) - { - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UploadedFile.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UploadedFile.php deleted file mode 100644 index a0ea59e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ /dev/null @@ -1,325 +0,0 @@ -setError($errorStatus); - $this->setSize($size); - $this->setClientFilename($clientFilename); - $this->setClientMediaType($clientMediaType); - - if ($this->isOk()) { - $this->setStreamOrFile($streamOrFile); - } - } - - /** - * Depending on the value set file or stream variable - * - * @param mixed $streamOrFile - * - * @throws InvalidArgumentException - */ - private function setStreamOrFile($streamOrFile) - { - if (is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (is_resource($streamOrFile)) { - $this->stream = new Stream($streamOrFile); - } elseif ($streamOrFile instanceof StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new InvalidArgumentException( - 'Invalid stream or file provided for UploadedFile' - ); - } - } - - /** - * @param int $error - * - * @throws InvalidArgumentException - */ - private function setError($error) - { - if (false === is_int($error)) { - throw new InvalidArgumentException( - 'Upload file error status must be an integer' - ); - } - - if (false === in_array($error, UploadedFile::$errors)) { - throw new InvalidArgumentException( - 'Invalid error status for UploadedFile' - ); - } - - $this->error = $error; - } - - /** - * @param int $size - * - * @throws InvalidArgumentException - */ - private function setSize($size) - { - if (false === is_int($size)) { - throw new InvalidArgumentException( - 'Upload file size must be an integer' - ); - } - - $this->size = $size; - } - - /** - * @param mixed $param - * @return boolean - */ - private function isStringOrNull($param) - { - return in_array(gettype($param), ['string', 'NULL']); - } - - /** - * @param mixed $param - * @return boolean - */ - private function isStringNotEmpty($param) - { - return is_string($param) && false === empty($param); - } - - /** - * @param string|null $clientFilename - * - * @throws InvalidArgumentException - */ - private function setClientFilename($clientFilename) - { - if (false === $this->isStringOrNull($clientFilename)) { - throw new InvalidArgumentException( - 'Upload file client filename must be a string or null' - ); - } - - $this->clientFilename = $clientFilename; - } - - /** - * @param string|null $clientMediaType - * - * @throws InvalidArgumentException - */ - private function setClientMediaType($clientMediaType) - { - if (false === $this->isStringOrNull($clientMediaType)) { - throw new InvalidArgumentException( - 'Upload file client media type must be a string or null' - ); - } - - $this->clientMediaType = $clientMediaType; - } - - /** - * Return true if there is no upload error - * - * @return boolean - */ - private function isOk() - { - return $this->error === UPLOAD_ERR_OK; - } - - /** - * @return boolean - */ - public function isMoved() - { - return $this->moved; - } - - /** - * @throws RuntimeException if is moved or not ok - */ - private function validateActive() - { - if (false === $this->isOk()) { - throw new RuntimeException('Cannot retrieve stream due to upload error'); - } - - if ($this->isMoved()) { - throw new RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - - /** - * {@inheritdoc} - * - * @throws RuntimeException if the upload was not successful. - */ - public function getStream() - { - $this->validateActive(); - - if ($this->stream instanceof StreamInterface) { - return $this->stream; - } - - return new LazyOpenStream($this->file, 'r+'); - } - - /** - * {@inheritdoc} - * - * @see http://php.net/is_uploaded_file - * @see http://php.net/move_uploaded_file - * - * @param string $targetPath Path to which to move the uploaded file. - * - * @throws RuntimeException if the upload was not successful. - * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. - */ - public function moveTo($targetPath) - { - $this->validateActive(); - - if (false === $this->isStringNotEmpty($targetPath)) { - throw new InvalidArgumentException( - 'Invalid path provided for move operation; must be a non-empty string' - ); - } - - if ($this->file) { - $this->moved = php_sapi_name() == 'cli' - ? rename($this->file, $targetPath) - : move_uploaded_file($this->file, $targetPath); - } else { - Utils::copyToStream( - $this->getStream(), - new LazyOpenStream($targetPath, 'w') - ); - - $this->moved = true; - } - - if (false === $this->moved) { - throw new RuntimeException( - sprintf('Uploaded file could not be moved to %s', $targetPath) - ); - } - } - - /** - * {@inheritdoc} - * - * @return int|null The file size in bytes or null if unknown. - */ - public function getSize() - { - return $this->size; - } - - /** - * {@inheritdoc} - * - * @see http://php.net/manual/en/features.file-upload.errors.php - * @return int One of PHP's UPLOAD_ERR_XXX constants. - */ - public function getError() - { - return $this->error; - } - - /** - * {@inheritdoc} - * - * @return string|null The filename sent by the client or null if none - * was provided. - */ - public function getClientFilename() - { - return $this->clientFilename; - } - - /** - * {@inheritdoc} - */ - public function getClientMediaType() - { - return $this->clientMediaType; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Uri.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Uri.php deleted file mode 100644 index a0d7391..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Uri.php +++ /dev/null @@ -1,761 +0,0 @@ - 80, - 'https' => 443, - 'ftp' => 21, - 'gopher' => 70, - 'nntp' => 119, - 'news' => 119, - 'telnet' => 23, - 'tn3270' => 23, - 'imap' => 143, - 'pop' => 110, - 'ldap' => 389, - ]; - - private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; - private static $charSubDelims = '!\$&\'\(\)\*\+,;='; - private static $replaceQuery = ['=' => '%3D', '&' => '%26']; - - /** @var string Uri scheme. */ - private $scheme = ''; - - /** @var string Uri user info. */ - private $userInfo = ''; - - /** @var string Uri host. */ - private $host = ''; - - /** @var int|null Uri port. */ - private $port; - - /** @var string Uri path. */ - private $path = ''; - - /** @var string Uri query string. */ - private $query = ''; - - /** @var string Uri fragment. */ - private $fragment = ''; - - /** - * @param string $uri URI to parse - */ - public function __construct($uri = '') - { - // weak type check to also accept null until we can add scalar type hints - if ($uri != '') { - $parts = parse_url($uri); - if ($parts === false) { - throw new \InvalidArgumentException("Unable to parse URI: $uri"); - } - $this->applyParts($parts); - } - } - - public function __toString() - { - return self::composeComponents( - $this->scheme, - $this->getAuthority(), - $this->path, - $this->query, - $this->fragment - ); - } - - /** - * Composes a URI reference string from its various components. - * - * Usually this method does not need to be called manually but instead is used indirectly via - * `Psr\Http\Message\UriInterface::__toString`. - * - * PSR-7 UriInterface treats an empty component the same as a missing component as - * getQuery(), getFragment() etc. always return a string. This explains the slight - * difference to RFC 3986 Section 5.3. - * - * Another adjustment is that the authority separator is added even when the authority is missing/empty - * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with - * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But - * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to - * that format). - * - * @param string $scheme - * @param string $authority - * @param string $path - * @param string $query - * @param string $fragment - * - * @return string - * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 - */ - public static function composeComponents($scheme, $authority, $path, $query, $fragment) - { - $uri = ''; - - // weak type checks to also accept null until we can add scalar type hints - if ($scheme != '') { - $uri .= $scheme . ':'; - } - - if ($authority != ''|| $scheme === 'file') { - $uri .= '//' . $authority; - } - - $uri .= $path; - - if ($query != '') { - $uri .= '?' . $query; - } - - if ($fragment != '') { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Whether the URI has the default port of the current scheme. - * - * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used - * independently of the implementation. - * - * @param UriInterface $uri - * - * @return bool - */ - public static function isDefaultPort(UriInterface $uri) - { - return $uri->getPort() === null - || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); - } - - /** - * Whether the URI is absolute, i.e. it has a scheme. - * - * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true - * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative - * to another URI, the base URI. Relative references can be divided into several forms: - * - network-path references, e.g. '//example.com/path' - * - absolute-path references, e.g. '/path' - * - relative-path references, e.g. 'subpath' - * - * @param UriInterface $uri - * - * @return bool - * @see Uri::isNetworkPathReference - * @see Uri::isAbsolutePathReference - * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 - */ - public static function isAbsolute(UriInterface $uri) - { - return $uri->getScheme() !== ''; - } - - /** - * Whether the URI is a network-path reference. - * - * A relative reference that begins with two slash characters is termed an network-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isNetworkPathReference(UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() !== ''; - } - - /** - * Whether the URI is a absolute-path reference. - * - * A relative reference that begins with a single slash character is termed an absolute-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isAbsolutePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && isset($uri->getPath()[0]) - && $uri->getPath()[0] === '/'; - } - - /** - * Whether the URI is a relative-path reference. - * - * A relative reference that does not begin with a slash character is termed a relative-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isRelativePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); - } - - /** - * Whether the URI is a same-document reference. - * - * A same-document reference refers to a URI that is, aside from its fragment - * component, identical to the base URI. When no base URI is given, only an empty - * URI reference (apart from its fragment) is considered a same-document reference. - * - * @param UriInterface $uri The URI to check - * @param UriInterface|null $base An optional base URI to compare against - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.4 - */ - public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) - { - if ($base !== null) { - $uri = UriResolver::resolve($base, $uri); - - return ($uri->getScheme() === $base->getScheme()) - && ($uri->getAuthority() === $base->getAuthority()) - && ($uri->getPath() === $base->getPath()) - && ($uri->getQuery() === $base->getQuery()); - } - - return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; - } - - /** - * Removes dot segments from a path and returns the new path. - * - * @param string $path - * - * @return string - * - * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. - * @see UriResolver::removeDotSegments - */ - public static function removeDotSegments($path) - { - return UriResolver::removeDotSegments($path); - } - - /** - * Converts the relative URI into a new URI that is resolved against the base URI. - * - * @param UriInterface $base Base URI - * @param string|UriInterface $rel Relative URI - * - * @return UriInterface - * - * @deprecated since version 1.4. Use UriResolver::resolve instead. - * @see UriResolver::resolve - */ - public static function resolve(UriInterface $base, $rel) - { - if (!($rel instanceof UriInterface)) { - $rel = new self($rel); - } - - return UriResolver::resolve($base, $rel); - } - - /** - * Creates a new URI with a specific query string value removed. - * - * Any existing query string values that exactly match the provided key are - * removed. - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Query string key to remove. - * - * @return UriInterface - */ - public static function withoutQueryValue(UriInterface $uri, $key) - { - $result = self::getFilteredQueryString($uri, [$key]); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with a specific query string value. - * - * Any existing query string values that exactly match the provided key are - * removed and replaced with the given key value pair. - * - * A value of null will set the query string key without a value, e.g. "key" - * instead of "key=value". - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Key to set. - * @param string|null $value Value to set - * - * @return UriInterface - */ - public static function withQueryValue(UriInterface $uri, $key, $value) - { - $result = self::getFilteredQueryString($uri, [$key]); - - $result[] = self::generateQueryString($key, $value); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with multiple specific query string values. - * - * It has the same behavior as withQueryValue() but for an associative array of key => value. - * - * @param UriInterface $uri URI to use as a base. - * @param array $keyValueArray Associative array of key and values - * - * @return UriInterface - */ - public static function withQueryValues(UriInterface $uri, array $keyValueArray) - { - $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); - - foreach ($keyValueArray as $key => $value) { - $result[] = self::generateQueryString($key, $value); - } - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a URI from a hash of `parse_url` components. - * - * @param array $parts - * - * @return UriInterface - * @link http://php.net/manual/en/function.parse-url.php - * - * @throws \InvalidArgumentException If the components do not form a valid URI. - */ - public static function fromParts(array $parts) - { - $uri = new self(); - $uri->applyParts($parts); - $uri->validateState(); - - return $uri; - } - - public function getScheme() - { - return $this->scheme; - } - - public function getAuthority() - { - $authority = $this->host; - if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; - } - - if ($this->port !== null) { - $authority .= ':' . $this->port; - } - - return $authority; - } - - public function getUserInfo() - { - return $this->userInfo; - } - - public function getHost() - { - return $this->host; - } - - public function getPort() - { - return $this->port; - } - - public function getPath() - { - return $this->path; - } - - public function getQuery() - { - return $this->query; - } - - public function getFragment() - { - return $this->fragment; - } - - public function withScheme($scheme) - { - $scheme = $this->filterScheme($scheme); - - if ($this->scheme === $scheme) { - return $this; - } - - $new = clone $this; - $new->scheme = $scheme; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withUserInfo($user, $password = null) - { - $info = $this->filterUserInfoComponent($user); - if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); - } - - if ($this->userInfo === $info) { - return $this; - } - - $new = clone $this; - $new->userInfo = $info; - $new->validateState(); - - return $new; - } - - public function withHost($host) - { - $host = $this->filterHost($host); - - if ($this->host === $host) { - return $this; - } - - $new = clone $this; - $new->host = $host; - $new->validateState(); - - return $new; - } - - public function withPort($port) - { - $port = $this->filterPort($port); - - if ($this->port === $port) { - return $this; - } - - $new = clone $this; - $new->port = $port; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withPath($path) - { - $path = $this->filterPath($path); - - if ($this->path === $path) { - return $this; - } - - $new = clone $this; - $new->path = $path; - $new->validateState(); - - return $new; - } - - public function withQuery($query) - { - $query = $this->filterQueryAndFragment($query); - - if ($this->query === $query) { - return $this; - } - - $new = clone $this; - $new->query = $query; - - return $new; - } - - public function withFragment($fragment) - { - $fragment = $this->filterQueryAndFragment($fragment); - - if ($this->fragment === $fragment) { - return $this; - } - - $new = clone $this; - $new->fragment = $fragment; - - return $new; - } - - /** - * Apply parse_url parts to a URI. - * - * @param array $parts Array of parse_url parts to apply. - */ - private function applyParts(array $parts) - { - $this->scheme = isset($parts['scheme']) - ? $this->filterScheme($parts['scheme']) - : ''; - $this->userInfo = isset($parts['user']) - ? $this->filterUserInfoComponent($parts['user']) - : ''; - $this->host = isset($parts['host']) - ? $this->filterHost($parts['host']) - : ''; - $this->port = isset($parts['port']) - ? $this->filterPort($parts['port']) - : null; - $this->path = isset($parts['path']) - ? $this->filterPath($parts['path']) - : ''; - $this->query = isset($parts['query']) - ? $this->filterQueryAndFragment($parts['query']) - : ''; - $this->fragment = isset($parts['fragment']) - ? $this->filterQueryAndFragment($parts['fragment']) - : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); - } - - $this->removeDefaultPort(); - } - - /** - * @param string $scheme - * - * @return string - * - * @throws \InvalidArgumentException If the scheme is invalid. - */ - private function filterScheme($scheme) - { - if (!is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - - return strtolower($scheme); - } - - /** - * @param string $component - * - * @return string - * - * @throws \InvalidArgumentException If the user info is invalid. - */ - private function filterUserInfoComponent($component) - { - if (!is_string($component)) { - throw new \InvalidArgumentException('User info must be a string'); - } - - return preg_replace_callback( - '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $component - ); - } - - /** - * @param string $host - * - * @return string - * - * @throws \InvalidArgumentException If the host is invalid. - */ - private function filterHost($host) - { - if (!is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - - return strtolower($host); - } - - /** - * @param int|null $port - * - * @return int|null - * - * @throws \InvalidArgumentException If the port is invalid. - */ - private function filterPort($port) - { - if ($port === null) { - return null; - } - - $port = (int) $port; - if (0 > $port || 0xffff < $port) { - throw new \InvalidArgumentException( - sprintf('Invalid port: %d. Must be between 0 and 65535', $port) - ); - } - - return $port; - } - - /** - * @param UriInterface $uri - * @param array $keys - * - * @return array - */ - private static function getFilteredQueryString(UriInterface $uri, array $keys) - { - $current = $uri->getQuery(); - - if ($current === '') { - return []; - } - - $decodedKeys = array_map('rawurldecode', $keys); - - return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { - return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); - }); - } - - /** - * @param string $key - * @param string|null $value - * - * @return string - */ - private static function generateQueryString($key, $value) - { - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $queryString = strtr($key, self::$replaceQuery); - - if ($value !== null) { - $queryString .= '=' . strtr($value, self::$replaceQuery); - } - - return $queryString; - } - - private function removeDefaultPort() - { - if ($this->port !== null && self::isDefaultPort($this)) { - $this->port = null; - } - } - - /** - * Filters the path of a URI - * - * @param string $path - * - * @return string - * - * @throws \InvalidArgumentException If the path is invalid. - */ - private function filterPath($path) - { - if (!is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $path - ); - } - - /** - * Filters the query string or fragment of a URI. - * - * @param string $str - * - * @return string - * - * @throws \InvalidArgumentException If the query or fragment is invalid. - */ - private function filterQueryAndFragment($str) - { - if (!is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $str - ); - } - - private function rawurlencodeMatchZero(array $match) - { - return rawurlencode($match[0]); - } - - private function validateState() - { - if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { - $this->host = self::HTTP_DEFAULT_HOST; - } - - if ($this->getAuthority() === '') { - if (0 === strpos($this->path, '//')) { - throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); - } - if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { - throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); - } - } elseif (isset($this->path[0]) && $this->path[0] !== '/') { - @trigger_error( - 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . - 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', - E_USER_DEPRECATED - ); - $this->path = '/'. $this->path; - //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriNormalizer.php deleted file mode 100644 index 2b9174a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ /dev/null @@ -1,217 +0,0 @@ -getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') - ) { - $uri = $uri->withPath('/'); - } - - if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { - $uri = $uri->withHost(''); - } - - if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { - $uri = $uri->withPort(null); - } - - if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { - $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); - } - - if ($flags & self::REMOVE_DUPLICATE_SLASHES) { - $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); - } - - if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { - $queryKeyValues = explode('&', $uri->getQuery()); - sort($queryKeyValues); - $uri = $uri->withQuery(implode('&', $queryKeyValues)); - } - - return $uri; - } - - /** - * Whether two URIs can be considered equivalent. - * - * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also - * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be - * resolved against the same base URI. If this is not the case, determination of equivalence or difference of - * relative references does not mean anything. - * - * @param UriInterface $uri1 An URI to compare - * @param UriInterface $uri2 An URI to compare - * @param int $normalizations A bitmask of normalizations to apply, see constants - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-6.1 - */ - public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) - { - return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); - } - - private static function capitalizePercentEncoding(UriInterface $uri) - { - $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - - $callback = function (array $match) { - return strtoupper($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private static function decodeUnreservedCharacters(UriInterface $uri) - { - $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - - $callback = function (array $match) { - return rawurldecode($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriResolver.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriResolver.php deleted file mode 100644 index 26cecd5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/UriResolver.php +++ /dev/null @@ -1,220 +0,0 @@ -getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = strrpos($base->getPath(), '/'); - if ($lastSlashPos === false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - - return new Uri(Uri::composeComponents( - $base->getScheme(), - $targetAuthority, - $targetPath, - $targetQuery, - $rel->getFragment() - )); - } - - /** - * Returns the target URI as a relative reference from the base URI. - * - * This method is the counterpart to resolve(): - * - * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) - * - * One use-case is to use the current request URI as base URI and then generate relative links in your documents - * to reduce the document size or offer self-contained downloadable document archives. - * - * $base = new Uri('http://example.com/a/b/'); - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. - * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. - * - * This method also accepts a target that is already relative and will try to relativize it further. Only a - * relative-path reference will be returned as-is. - * - * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well - * - * @param UriInterface $base Base URI - * @param UriInterface $target Target URI - * - * @return UriInterface The relative URI reference - */ - public static function relativize(UriInterface $base, UriInterface $target) - { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') - ) { - return $target; - } - - if (Uri::isRelativePathReference($target)) { - // As the target is already highly relative we return it as-is. It would be possible to resolve - // the target with `$target = self::resolve($base, $target);` and then try make it more relative - // by removing a duplicate query. But let's not do that automatically. - return $target; - } - - if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { - return $target->withScheme(''); - } - - // We must remove the path before removing the authority because if the path starts with two slashes, the URI - // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also - // invalid. - $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); - - if ($base->getPath() !== $target->getPath()) { - return $emptyPathUri->withPath(self::getRelativePath($base, $target)); - } - - if ($base->getQuery() === $target->getQuery()) { - // Only the target fragment is left. And it must be returned even if base and target fragment are the same. - return $emptyPathUri->withQuery(''); - } - - // If the base URI has a query but the target has none, we cannot return an empty path reference as it would - // inherit the base query component when resolving. - if ($target->getQuery() === '') { - $segments = explode('/', $target->getPath()); - $lastSegment = end($segments); - - return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); - } - - return $emptyPathUri; - } - - private static function getRelativePath(UriInterface $base, UriInterface $target) - { - $sourceSegments = explode('/', $base->getPath()); - $targetSegments = explode('/', $target->getPath()); - array_pop($sourceSegments); - $targetLastSegment = array_pop($targetSegments); - foreach ($sourceSegments as $i => $segment) { - if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { - unset($sourceSegments[$i], $targetSegments[$i]); - } else { - break; - } - } - $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); - - // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. - if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { - $relativePath = "./$relativePath"; - } elseif ('/' === $relativePath[0]) { - if ($base->getAuthority() != '' && $base->getPath() === '') { - // In this case an extra slash is added by resolve() automatically. So we must not add one here. - $relativePath = ".$relativePath"; - } else { - $relativePath = "./$relativePath"; - } - } - - return $relativePath; - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Utils.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Utils.php deleted file mode 100644 index 86960dd..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/Utils.php +++ /dev/null @@ -1,398 +0,0 @@ - $keys - * - * @return array - */ - public static function caselessRemove($keys, array $data) - { - $result = []; - - foreach ($keys as &$key) { - $key = strtolower($key); - } - - foreach ($data as $k => $v) { - if (!in_array(strtolower($k), $keys)) { - $result[$k] = $v; - } - } - - return $result; - } - - /** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ - public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1) - { - $bufferSize = 8192; - - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read($bufferSize))) { - break; - } - } - } else { - $remaining = $maxLen; - while ($remaining > 0 && !$source->eof()) { - $buf = $source->read(min($bufferSize, $remaining)); - $len = strlen($buf); - if (!$len) { - break; - } - $remaining -= $len; - $dest->write($buf); - } - } - } - - /** - * Copy the contents of a stream into a string until the given number of - * bytes have been read. - * - * @param StreamInterface $stream Stream to read - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * @return string - * - * @throws \RuntimeException on error. - */ - public static function copyToString(StreamInterface $stream, $maxLen = -1) - { - $buffer = ''; - - if ($maxLen === -1) { - while (!$stream->eof()) { - $buf = $stream->read(1048576); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - } - return $buffer; - } - - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - $len = strlen($buffer); - } - - return $buffer; - } - - /** - * Calculate a hash of a stream. - * - * This method reads the entire stream to calculate a rolling hash, based - * on PHP's `hash_init` functions. - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return string Returns the hash of the stream - * - * @throws \RuntimeException on error. - */ - public static function hash(StreamInterface $stream, $algo, $rawOutput = false) - { - $pos = $stream->tell(); - - if ($pos > 0) { - $stream->rewind(); - } - - $ctx = hash_init($algo); - while (!$stream->eof()) { - hash_update($ctx, $stream->read(1048576)); - } - - $out = hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - - return $out; - } - - /** - * Clone and modify a request with the given changes. - * - * This method is useful for reducing the number of clones needed to mutate - * a message. - * - * The changes can be one of: - * - method: (string) Changes the HTTP method. - * - set_headers: (array) Sets the given headers. - * - remove_headers: (array) Remove the given headers. - * - body: (mixed) Sets the given body. - * - uri: (UriInterface) Set the URI. - * - query: (string) Set the query string value of the URI. - * - version: (string) Set the protocol version. - * - * @param RequestInterface $request Request to clone and modify. - * @param array $changes Changes to apply. - * - * @return RequestInterface - */ - public static function modifyRequest(RequestInterface $request, array $changes) - { - if (!$changes) { - return $request; - } - - $headers = $request->getHeaders(); - - if (!isset($changes['uri'])) { - $uri = $request->getUri(); - } else { - // Remove the host header if one is on the URI - if ($host = $changes['uri']->getHost()) { - $changes['set_headers']['Host'] = $host; - - if ($port = $changes['uri']->getPort()) { - $standardPorts = ['http' => 80, 'https' => 443]; - $scheme = $changes['uri']->getScheme(); - if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':'.$port; - } - } - } - $uri = $changes['uri']; - } - - if (!empty($changes['remove_headers'])) { - $headers = self::caselessRemove($changes['remove_headers'], $headers); - } - - if (!empty($changes['set_headers'])) { - $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers); - $headers = $changes['set_headers'] + $headers; - } - - if (isset($changes['query'])) { - $uri = $uri->withQuery($changes['query']); - } - - if ($request instanceof ServerRequestInterface) { - return (new ServerRequest( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion(), - $request->getServerParams() - )) - ->withParsedBody($request->getParsedBody()) - ->withQueryParams($request->getQueryParams()) - ->withCookieParams($request->getCookieParams()) - ->withUploadedFiles($request->getUploadedFiles()); - } - - return new Request( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion() - ); - } - - /** - * Read a line from the stream up to the maximum allowed buffer length. - * - * @param StreamInterface $stream Stream to read from - * @param int|null $maxLength Maximum buffer length - * - * @return string - */ - public static function readLine(StreamInterface $stream, $maxLength = null) - { - $buffer = ''; - $size = 0; - - while (!$stream->eof()) { - // Using a loose equality here to match on '' and false. - if (null == ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte === "\n" || ++$size === $maxLength - 1) { - break; - } - } - - return $buffer; - } - - /** - * Create a new stream based on the input type. - * - * Options is an associative array that can contain the following keys: - * - metadata: Array of custom metadata. - * - size: Size of the stream. - * - * This method accepts the following `$resource` types: - * - `Psr\Http\Message\StreamInterface`: Returns the value as-is. - * - `string`: Creates a stream object that uses the given string as the contents. - * - `resource`: Creates a stream object that wraps the given PHP stream resource. - * - `Iterator`: If the provided value implements `Iterator`, then a read-only - * stream object will be created that wraps the given iterable. Each time the - * stream is read from, data from the iterator will fill a buffer and will be - * continuously called until the buffer is equal to the requested read size. - * Subsequent read calls will first read from the buffer and then call `next` - * on the underlying iterator until it is exhausted. - * - `object` with `__toString()`: If the object has the `__toString()` method, - * the object will be cast to a string and then a stream will be returned that - * uses the string value. - * - `NULL`: When `null` is passed, an empty stream object is returned. - * - `callable` When a callable is passed, a read-only stream object will be - * created that invokes the given callable. The callable is invoked with the - * number of suggested bytes to read. The callable can return any number of - * bytes, but MUST return `false` when there is no more data to return. The - * stream object that wraps the callable will invoke the callable until the - * number of requested bytes are available. Any additional bytes will be - * buffered and used in subsequent reads. - * - * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data - * @param array $options Additional options - * - * @return StreamInterface - * - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ - public static function streamFor($resource = '', array $options = []) - { - if (is_scalar($resource)) { - $stream = fopen('php://temp', 'r+'); - if ($resource !== '') { - fwrite($stream, $resource); - fseek($stream, 0); - } - return new Stream($stream, $options); - } - - switch (gettype($resource)) { - case 'resource': - return new Stream($resource, $options); - case 'object': - if ($resource instanceof StreamInterface) { - return $resource; - } elseif ($resource instanceof \Iterator) { - return new PumpStream(function () use ($resource) { - if (!$resource->valid()) { - return false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } elseif (method_exists($resource, '__toString')) { - return Utils::streamFor((string) $resource, $options); - } - break; - case 'NULL': - return new Stream(fopen('php://temp', 'r+'), $options); - } - - if (is_callable($resource)) { - return new PumpStream($resource, $options); - } - - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); - } - - /** - * Safely opens a PHP stream resource using a filename. - * - * When fopen fails, PHP normally raises a warning. This function adds an - * error handler that checks for errors and throws an exception instead. - * - * @param string $filename File to open - * @param string $mode Mode used to open the file - * - * @return resource - * - * @throws \RuntimeException if the file cannot be opened - */ - public static function tryFopen($filename, $mode) - { - $ex = null; - set_error_handler(function () use ($filename, $mode, &$ex) { - $ex = new \RuntimeException(sprintf( - 'Unable to open %s using mode %s: %s', - $filename, - $mode, - func_get_args()[1] - )); - }); - - $handle = fopen($filename, $mode); - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $handle; - } - - /** - * Returns a UriInterface for the given value. - * - * This function accepts a string or UriInterface and returns a - * UriInterface for the given value. If the value is already a - * UriInterface, it is returned as-is. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * - * @throws \InvalidArgumentException - */ - public static function uriFor($uri) - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if (is_string($uri)) { - return new Uri($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions.php deleted file mode 100644 index e4cc136..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions.php +++ /dev/null @@ -1,417 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - * - * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead. - */ -function parse_query($str, $urlEncoding = true) -{ - return Query::parse($str, $urlEncoding); -} - -/** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse_query()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * @return string - * - * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. - */ -function build_query(array $params, $encoding = PHP_QUERY_RFC3986) -{ - return Query::build($params, $encoding); -} - -/** - * Determines the mimetype of a file by looking at its extension. - * - * @param string $filename - * - * @return string|null - * - * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead. - */ -function mimetype_from_filename($filename) -{ - return MimeType::fromFilename($filename); -} - -/** - * Maps a file extensions to a mimetype. - * - * @param $extension string The file extension. - * - * @return string|null - * - * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types - * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead. - */ -function mimetype_from_extension($extension) -{ - return MimeType::fromExtension($extension); -} - -/** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - * - * @internal - * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. - */ -function _parse_message($message) -{ - return Message::parseMessage($message); -} - -/** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - * - * @internal - * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. - */ -function _parse_request_uri($path, array $headers) -{ - return Message::parseRequestUri($path, $headers); -} - -/** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return string|null - * - * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead. - */ -function get_message_body_summary(MessageInterface $message, $truncateAt = 120) -{ - return Message::bodySummary($message, $truncateAt); -} - -/** - * Remove the items given by the keys, case insensitively from the data. - * - * @param iterable $keys - * - * @return array - * - * @internal - * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. - */ -function _caseless_remove($keys, array $data) -{ - return Utils::caselessRemove($keys, $data); -} diff --git a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions_include.php b/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions_include.php deleted file mode 100644 index 96a4a83..0000000 --- a/woocommerce-qenta-checkout-page/vendor/guzzlehttp/psr7/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ - Serban Ghita, Nick Ilyin and contributors. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Developer’s Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.json b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.json deleted file mode 100644 index 2b807e1..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.8.34","headerMatch":{"HTTP_ACCEPT":{"matches":["application\/x-obml2d","application\/vnd.rim.html","text\/vnd.wap.wml","application\/vnd.wap.xhtml+xml"]},"HTTP_X_WAP_PROFILE":null,"HTTP_X_WAP_CLIENTID":null,"HTTP_WAP_CONNECTION":null,"HTTP_PROFILE":null,"HTTP_X_OPERAMINI_PHONE_UA":null,"HTTP_X_NOKIA_GATEWAY_ID":null,"HTTP_X_ORANGE_ID":null,"HTTP_X_VODAFONE_3GPDPCONTEXT":null,"HTTP_X_HUAWEI_USERID":null,"HTTP_UA_OS":null,"HTTP_X_MOBILE_GATEWAY":null,"HTTP_X_ATT_DEVICEID":null,"HTTP_UA_CPU":{"matches":["ARM"]}},"uaHttpHeaders":["HTTP_USER_AGENT","HTTP_X_OPERAMINI_PHONE_UA","HTTP_X_DEVICE_USER_AGENT","HTTP_X_ORIGINAL_USER_AGENT","HTTP_X_SKYFIRE_PHONE","HTTP_X_BOLT_PHONE_UA","HTTP_DEVICE_STOCK_UA","HTTP_X_UCBROWSER_DEVICE_UA"],"uaMatch":{"phones":{"iPhone":"\\biPhone\\b|\\biPod\\b","BlackBerry":"BlackBerry|\\bBB10\\b|rim[0-9]+|\\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\\b-[0-9]+","HTC":"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel","Nexus":"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6","Dell":"Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b","Motorola":"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052","Samsung":"\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F","LG":"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710","Sony":"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533","Asus":"Asus.*Galaxy|PadFone.*Mobile","NokiaLumia":"Lumia [0-9]{3,4}","Micromax":"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b","Palm":"PalmSource|Palm","Vertu":"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature","Pantech":"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790","Fly":"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250","Wiko":"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM","iMobile":"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)","SimValley":"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b","Wolfgang":"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q","Alcatel":"Alcatel","Nintendo":"Nintendo (3DS|Switch)","Amoi":"Amoi","INQ":"INQ","OnePlus":"ONEPLUS","GenericPhone":"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},"tablets":{"iPad":"iPad|iPad.*Mobile","NexusTablet":"Android.*Nexus[\\s]+(7|9|10)","GoogleTablet":"Android.*Pixel C","SamsungTablet":"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V","Kindle":"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk\/[0-9.]+ like Chrome\/[0-9.]+ (?!Mobile)","SurfaceTablet":"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)","HPTablet":"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10","AsusTablet":"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b","BlackBerryTablet":"PlayBook|RIM Tablet","HTCtablet":"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410","MotorolaTablet":"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617","NookTablet":"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2","AcerTablet":"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30","ToshibaTablet":"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO","LGTablet":"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b","FujitsuTablet":"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b","PrestigioTablet":"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002","LenovoTablet":"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X","DellTablet":"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7","YarvikTablet":"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b","MedionTablet":"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB","ArnovaTablet":"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2","IntensoTablet":"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004","IRUTablet":"M702pro","MegafonTablet":"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b","EbodaTablet":"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)","AllViewTablet":"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)","ArchosTablet":"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b","AinolTablet":"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark","NokiaLumiaTablet":"Lumia 2520","SonyTablet":"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712","PhilipsTablet":"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b","CubeTablet":"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT","CobyTablet":"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010","MIDTablet":"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10","MSITablet":"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b","SMiTTablet":"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)","RockChipTablet":"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A","FlyTablet":"IQ310|Fly Vision","bqTablet":"Android.*(bq)?.*\\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\\b|Maxwell.*Lite|Maxwell.*Plus","HuaweiTablet":"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19","NecTablet":"\\bN-06D|\\bN-08D","PantechTablet":"Pantech.*P4100","BronchoTablet":"Broncho.*(N701|N708|N802|a710)","VersusTablet":"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b","ZyncTablet":"z1000|Z99 2G|z930|z990|z909|Z919|z900","PositivoTablet":"TB07STA|TB10STA|TB07FTA|TB10FTA","NabiTablet":"Android.*\\bNabi","KoboTablet":"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build","DanewTablet":"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b","TexetTablet":"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE","PlaystationTablet":"Playstation.*(Portable|Vita)","TrekstorTablet":"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab","PyleAudioTablet":"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b","AdvanTablet":"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ","DanyTechTablet":"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1","GalapadTablet":"Android.*\\bG1\\b(?!\\))","MicromaxTablet":"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b","KarbonnTablet":"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b","AllFineTablet":"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide","PROSCANTablet":"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b","YONESTablet":"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026","ChangJiaTablet":"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503","GUTablet":"TX-A1301|TX-M9002|Q702|kf026","PointOfViewTablet":"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10","OvermaxTablet":"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027","HCLTablet":"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync","DPSTablet":"DPS Dream 9|DPS Dual 7","VistureTablet":"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10","CrestaTablet":"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989","MediatekTablet":"\\bMT8125|MT8389|MT8135|MT8377\\b","ConcordeTablet":"Concorde([ ]+)?Tab|ConCorde ReadMan","GoCleverTablet":"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042","ModecomTablet":"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003","VoninoTablet":"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b","ECSTablet":"V07OT2|TM105A|S10OT1|TR10CS1","StorexTablet":"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab","VodafoneTablet":"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400","EssentielBTablet":"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2","RossMoorTablet":"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711","iMobileTablet":"i-mobile i-note","TolinoTablet":"tolino tab [0-9.]+|tolino shine","AudioSonicTablet":"\\bC-22Q|T7-QC|T-17B|T-17P\\b","AMPETablet":"Android.* A78 ","SkkTablet":"Android.* (SKYPAD|PHOENIX|CYCLOPS)","TecnoTablet":"TECNO P9|TECNO DP8D","JXDTablet":"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b","iJoyTablet":"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)","FX2Tablet":"FX2 PAD7|FX2 PAD10","XoroTablet":"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151","ViewsonicTablet":"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a","VerizonTablet":"QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1","OdysTablet":"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10","CaptivaTablet":"CAPTIVA PAD","IconbitTablet":"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S","TeclastTablet":"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi","OndaTablet":"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+|V10 \\b4G\\b","JaytechTablet":"TPC-PA762","BlaupunktTablet":"Endeavour 800NG|Endeavour 1010","DigmaTablet":"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b","EvolioTablet":"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b","LavaTablet":"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b","AocTablet":"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712","MpmanTablet":"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010","CelkonTablet":"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b","WolderTablet":"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b","MediacomTablet":"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA","MiTablet":"\\bMI PAD\\b|\\bHM NOTE 1W\\b","NibiruTablet":"Nibiru M1|Nibiru Jupiter One","NexoTablet":"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI","LeaderTablet":"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100","UbislateTablet":"UbiSlate[\\s]?7C","PocketBookTablet":"Pocketbook","KocasoTablet":"\\b(TB-1207)\\b","HisenseTablet":"\\b(F5281|E2371)\\b","Hudl":"Hudl HT7S3|Hudl 2","TelstraTablet":"T-Hub2","GenericTablet":"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107"},"browsers":{"Chrome":"\\bCrMo\\b|CriOS|Android.*Chrome\/[.0-9]* (Mobile)?","Dolfin":"\\bDolfin\\b","Opera":"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR\/[0-9.]+$|Coast\/[0-9.]+","Skyfire":"Skyfire","Edge":"Mobile Safari\/[.0-9]* Edge","IE":"IEMobile|MSIEMobile","Firefox":"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS","Bolt":"bolt","TeaShark":"teashark","Blazer":"Blazer","Safari":"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari","WeChat":"\\bMicroMessenger\\b","UCBrowser":"UC.*Browser|UCWEB","baiduboxapp":"baiduboxapp","baidubrowser":"baidubrowser","DiigoBrowser":"DiigoBrowser","Mercury":"\\bMercury\\b","ObigoBrowser":"Obigo","NetFront":"NF-Browser","GenericBrowser":"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger","PaleMoon":"Android.*PaleMoon|Mobile.*PaleMoon"},"os":{"AndroidOS":"Android","BlackBerryOS":"blackberry|\\bBB10\\b|rim tablet os","PalmOS":"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino","SymbianOS":"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b","WindowsMobileOS":"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;","WindowsPhoneOS":"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;","iOS":"\\biPhone.*Mobile|\\biPod|\\biPad|AppleCoreMedia","iPadOS":"CPU OS 13","MeeGoOS":"MeeGo","MaemoOS":"Maemo","JavaOS":"J2ME\/|\\bMIDP\\b|\\bCLDC\\b","webOS":"webOS|hpwOS","badaOS":"\\bBada\\b","BREWOS":"BREW"},"utilities":{"Bot":"Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp","MobileBot":"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker\/M1A1-R2D2","DesktopMode":"WPDesktop","TV":"SonyDTV|HbbTV","WebKit":"(webkit)[ \/]([\\w.]+)","Console":"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\\b","Watch":"SM-V700"}}} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php deleted file mode 100644 index b105eb7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php +++ /dev/null @@ -1,1477 +0,0 @@ - - * @author Nick Ilyin - * Original author: Victor Stanciu - * - * @version 2.8.34 - */ -class Mobile_Detect -{ - /** - * Mobile detection type. - * - * @deprecated since version 2.6.9 - */ - const DETECTION_TYPE_MOBILE = 'mobile'; - - /** - * Extended detection type. - * - * @deprecated since version 2.6.9 - */ - const DETECTION_TYPE_EXTENDED = 'extended'; - - /** - * A frequently used regular expression to extract version #s. - * - * @deprecated since version 2.6.9 - */ - const VER = '([\w._\+]+)'; - - /** - * Top-level device. - */ - const MOBILE_GRADE_A = 'A'; - - /** - * Mid-level device. - */ - const MOBILE_GRADE_B = 'B'; - - /** - * Low-level device. - */ - const MOBILE_GRADE_C = 'C'; - - /** - * Stores the version number of the current release. - */ - const VERSION = '2.8.34'; - - /** - * A type for the version() method indicating a string return value. - */ - const VERSION_TYPE_STRING = 'text'; - - /** - * A type for the version() method indicating a float return value. - */ - const VERSION_TYPE_FLOAT = 'float'; - - /** - * A cache for resolved matches - * @var array - */ - protected $cache = array(); - - /** - * The User-Agent HTTP header is stored in here. - * @var string - */ - protected $userAgent = null; - - /** - * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE. - * @var array - */ - protected $httpHeaders = array(); - - /** - * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer. - * @var array - */ - protected $cloudfrontHeaders = array(); - - /** - * The matching Regex. - * This is good for debug. - * @var string - */ - protected $matchingRegex = null; - - /** - * The matches extracted from the regex expression. - * This is good for debug. - * - * @var string - */ - protected $matchesArray = null; - - /** - * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED. - * - * @deprecated since version 2.6.9 - * - * @var string - */ - protected $detectionType = self::DETECTION_TYPE_MOBILE; - - /** - * HTTP headers that trigger the 'isMobile' detection - * to be true. - * - * @var array - */ - protected static $mobileHeaders = array( - - 'HTTP_ACCEPT' => array('matches' => array( - // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/ - 'application/x-obml2d', - // BlackBerry devices. - 'application/vnd.rim.html', - 'text/vnd.wap.wml', - 'application/vnd.wap.xhtml+xml' - )), - 'HTTP_X_WAP_PROFILE' => null, - 'HTTP_X_WAP_CLIENTID' => null, - 'HTTP_WAP_CONNECTION' => null, - 'HTTP_PROFILE' => null, - // Reported by Opera on Nokia devices (eg. C3). - 'HTTP_X_OPERAMINI_PHONE_UA' => null, - 'HTTP_X_NOKIA_GATEWAY_ID' => null, - 'HTTP_X_ORANGE_ID' => null, - 'HTTP_X_VODAFONE_3GPDPCONTEXT' => null, - 'HTTP_X_HUAWEI_USERID' => null, - // Reported by Windows Smartphones. - 'HTTP_UA_OS' => null, - // Reported by Verizon, Vodafone proxy system. - 'HTTP_X_MOBILE_GATEWAY' => null, - // Seen this on HTC Sensation. SensationXE_Beats_Z715e. - 'HTTP_X_ATT_DEVICEID' => null, - // Seen this on a HTC. - 'HTTP_UA_CPU' => array('matches' => array('ARM')), - ); - - /** - * List of mobile devices (phones). - * - * @var array - */ - protected static $phoneDevices = array( - 'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes - 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+|\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\b-[0-9]+', - 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel', - 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6', - // @todo: Is 'Dell Streak' a tablet or a phone? ;) - 'Dell' => 'Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b', - 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b|XT1068|XT1092|XT1052', - 'Samsung' => '\bSamsung\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F', - 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710', - 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533', - 'Asus' => 'Asus.*Galaxy|PadFone.*Mobile', - 'NokiaLumia' => 'Lumia [0-9]{3,4}', - // http://www.micromaxinfo.com/mobiles/smartphones - // Added because the codes might conflict with Acer Tablets. - 'Micromax' => 'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b', - // @todo Complete the regex. - 'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ; - 'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;) - // http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH) - // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android. - 'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790', - // http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones. - 'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250', - // http://fr.wikomobile.com - 'Wiko' => 'KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM', - 'iMobile' => 'i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)', - // Added simvalley mobile just for fun. They have some interesting devices. - // http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html - 'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b', - // Wolfgang - a brand that is sold by Aldi supermarkets. - // http://www.wolfgangmobile.com/ - 'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q', - 'Alcatel' => 'Alcatel', - 'Nintendo' => 'Nintendo (3DS|Switch)', - // http://en.wikipedia.org/wiki/Amoi - 'Amoi' => 'Amoi', - // http://en.wikipedia.org/wiki/INQ - 'INQ' => 'INQ', - 'OnePlus' => 'ONEPLUS', - // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039 - 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser', - ); - - /** - * List of tablet devices. - * - * @var array - */ - protected static $tabletDevices = array( - // @todo: check for mobile friendly emails topic. - 'iPad' => 'iPad|iPad.*Mobile', - // Removed |^.*Android.*Nexus(?!(?:Mobile).)*$ - // @see #442 - // @todo Merge NexusTablet into GoogleTablet. - 'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)', - // https://en.wikipedia.org/wiki/Pixel_C - 'GoogleTablet' => 'Android.*Pixel C', - 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone. - // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html - 'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)', - // Only the Surface tablets with Windows RT are considered mobile. - // http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx - 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)', - // http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT - 'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10', - // Watch out for PadFone, see #132. - // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/ - 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\bP027\b|\bP024\b|\bP00C\b', - 'BlackBerryTablet' => 'PlayBook|RIM Tablet', - 'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410', - 'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617', - 'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2', - // http://www.acer.ro/ac/ro/RO/content/drivers - // http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer) - // http://us.acer.com/ac/en/US/content/group/tablets - // http://www.acer.de/ac/de/DE/content/models/tablets/ - // Can conflict with Micromax and Motorola phones codes. - 'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b|\bA3-A11\b|\bA3-A20\b|\bA3-A30', - // http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/ - // http://us.toshiba.com/tablets/tablet-finder - // http://www.toshiba.co.jp/regza/tablet/ - 'ToshibaTablet' => 'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO', - // http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html - // http://www.lg.com/us/tablets - 'LGTablet' => '\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b', - 'FujitsuTablet' => 'Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b', - // Prestigio Tablets http://www.prestigio.com/support - 'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002', - // http://support.lenovo.com/en_GB/downloads/default.page?# - 'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X', - // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets - 'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7', - // http://www.yarvik.com/en/matrix/tablets/ - 'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b', - 'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB', - 'ArnovaTablet' => '97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2', - // http://www.intenso.de/kategorie_en.php?kategorie=33 - // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate - 'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004', - // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/ - 'IRUTablet' => 'M702pro', - 'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b', - // http://www.e-boda.ro/tablete-pc.html - 'EbodaTablet' => 'E-Boda (Supreme|Impresspeed|Izzycomm|Essential)', - // http://www.allview.ro/produse/droseries/lista-tablete-pc/ - 'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)', - // http://wiki.archosfans.com/index.php?title=Main_Page - // @note Rewrite the regex format after we add more UAs. - 'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b', - // http://www.ainol.com/plugin.php?identifier=ainol&module=product - 'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark', - 'NokiaLumiaTablet' => 'Lumia 2520', - // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER - // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser - // http://www.sony.jp/support/tablet/ - 'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712', - // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8 - 'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b', - // db + http://www.cube-tablet.com/buy-products.html - 'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT', - // http://www.cobyusa.com/?p=pcat&pcat_id=3001 - 'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010', - // http://www.match.net.cn/products.asp - 'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10', - // http://www.msi.com/support - // @todo Research the Windows Tablets. - 'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b', - // @todo http://www.kyoceramobile.com/support/drivers/ - // 'KyoceraTablet' => null, - // @todo http://intexuae.com/index.php/category/mobile-devices/tablets-products/ - // 'IntextTablet' => null, - // http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets) - // http://www.imp3.net/14/show.php?itemid=20454 - 'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)', - // http://www.rock-chips.com/index.php?do=prod&pid=2 - 'RockChipTablet' => 'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A', - // http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/ - 'FlyTablet' => 'IQ310|Fly Vision', - // http://www.bqreaders.com/gb/tablets-prices-sale.html - 'bqTablet' => 'Android.*(bq)?.*\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\b|Maxwell.*Lite|Maxwell.*Plus', - // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290 - // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets) - 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19', - // Nec or Medias Tab - 'NecTablet' => '\bN-06D|\bN-08D', - // Pantech Tablets: http://www.pantechusa.com/phones/ - 'PantechTablet' => 'Pantech.*P4100', - // Broncho Tablets: http://www.broncho.cn/ (hard to find) - 'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)', - // http://versusuk.com/support.html - 'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b', - // http://www.zync.in/index.php/our-products/tablet-phablets - 'ZyncTablet' => 'z1000|Z99 2G|z930|z990|z909|Z919|z900', // Removed "z999" because of https://github.com/serbanghita/Mobile-Detect/issues/717 - // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/ - 'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA', - // https://www.nabitablet.com/ - 'NabiTablet' => 'Android.*\bNabi', - 'KoboTablet' => 'Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build', - // French Danew Tablets http://www.danew.com/produits-tablette.php - 'DanewTablet' => 'DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b', - // Texet Tablets and Readers http://www.texet.ru/tablet/ - 'TexetTablet' => 'NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE', - // Avoid detecting 'PLAYSTATION 3' as mobile. - 'PlaystationTablet' => 'Playstation.*(Portable|Vita)', - // http://www.trekstor.de/surftabs.html - 'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab', - // http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets - 'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b', - // http://www.advandigital.com/index.php?link=content-product&jns=JP001 - // because of the short codenames we have to include whitespaces to reduce the possible conflicts. - 'AdvanTablet' => 'Android.* \b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\b ', - // http://www.danytech.com/category/tablet-pc - 'DanyTechTablet' => 'Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1', - // http://www.galapad.net/product.html - 'GalapadTablet' => 'Android.*\bG1\b(?!\))', - // http://www.micromaxinfo.com/tablet/funbook - 'MicromaxTablet' => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b', - // http://www.karbonnmobiles.com/products_tablet.php - 'KarbonnTablet' => 'Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b', - // http://www.myallfine.com/Products.asp - 'AllFineTablet' => 'Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide', - // http://www.proscanvideo.com/products-search.asp?itemClass=TABLET&itemnmbr= - 'PROSCANTablet' => '\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\b', - // http://www.yonesnav.com/products/products.php - 'YONESTablet' => 'BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026', - // http://www.cjshowroom.com/eproducts.aspx?classcode=004001001 - // China manufacturer makes tablets for different small brands (eg. http://www.zeepad.net/index.html) - 'ChangJiaTablet' => 'TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503', - // http://www.gloryunion.cn/products.asp - // http://www.allwinnertech.com/en/apply/mobile.html - // http://www.ptcl.com.pk/pd_content.php?pd_id=284 (EVOTAB) - // @todo: Softwiner tablets? - // aka. Cute or Cool tablets. Not sure yet, must research to avoid collisions. - 'GUTablet' => 'TX-A1301|TX-M9002|Q702|kf026', // A12R|D75A|D77|D79|R83|A95|A106C|R15|A75|A76|D71|D72|R71|R73|R77|D82|R85|D92|A97|D92|R91|A10F|A77F|W71F|A78F|W78F|W81F|A97F|W91F|W97F|R16G|C72|C73E|K72|K73|R96G - // http://www.pointofview-online.com/showroom.php?shop_mode=product_listing&category_id=118 - 'PointOfViewTablet' => 'TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10', - // http://www.overmax.pl/pl/katalog-produktow,p8/tablety,c14/ - // @todo: add more tests. - 'OvermaxTablet' => 'OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027', - // http://hclmetablet.com/India/index.php - 'HCLTablet' => 'HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync', - // http://www.edigital.hu/Tablet_es_e-book_olvaso/Tablet-c18385.html - 'DPSTablet' => 'DPS Dream 9|DPS Dual 7', - // http://www.visture.com/index.asp - 'VistureTablet' => 'V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10', - // http://www.mijncresta.nl/tablet - 'CrestaTablet' => 'CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989', - // MediaTek - http://www.mediatek.com/_en/01_products/02_proSys.php?cata_sn=1&cata1_sn=1&cata2_sn=309 - 'MediatekTablet' => '\bMT8125|MT8389|MT8135|MT8377\b', - // Concorde tab - 'ConcordeTablet' => 'Concorde([ ]+)?Tab|ConCorde ReadMan', - // GoClever Tablets - http://www.goclever.com/uk/products,c1/tablet,c5/ - 'GoCleverTablet' => 'GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042', - // Modecom Tablets - http://www.modecom.eu/tablets/portal/ - 'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003', - // Vonino Tablets - 'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b', - // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0 - 'ECSTablet' => 'V07OT2|TM105A|S10OT1|TR10CS1', - // Storex Tablets - http://storex.fr/espace_client/support.html - // @note: no need to add all the tablet codes since they are guided by the first regex. - 'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab', - // Generic Vodafone tablets. - 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400', - // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb - // Aka: http://www.essentielb.fr/ - 'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2', - // Ross & Moor - http://ross-moor.ru/ - 'RossMoorTablet' => 'RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711', - // i-mobile http://product.i-mobilephone.com/Mobile_Device - 'iMobileTablet' => 'i-mobile i-note', - // http://www.tolino.de/de/vergleichen/ - 'TolinoTablet' => 'tolino tab [0-9.]+|tolino shine', - // AudioSonic - a Kmart brand - // http://www.kmart.com.au/webapp/wcs/stores/servlet/Search?langId=-1&storeId=10701&catalogId=10001&categoryId=193001&pageSize=72¤tPage=1&searchCategory=193001%2b4294965664&sortBy=p_MaxPrice%7c1 - 'AudioSonicTablet' => '\bC-22Q|T7-QC|T-17B|T-17P\b', - // AMPE Tablets - http://www.ampe.com.my/product-category/tablets/ - // @todo: add them gradually to avoid conflicts. - 'AMPETablet' => 'Android.* A78 ', - // Skk Mobile - http://skkmobile.com.ph/product_tablets.php - 'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)', - // Tecno Mobile (only tablet) - http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1 - 'TecnoTablet' => 'TECNO P9|TECNO DP8D', - // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3 - 'JXDTablet' => 'Android.* \b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b', - // i-Joy tablets - http://www.i-joy.es/en/cat/products/tablets/ - 'iJoyTablet' => 'Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)', - // http://www.intracon.eu/tablet - 'FX2Tablet' => 'FX2 PAD7|FX2 PAD10', - // http://www.xoro.de/produkte/ - // @note: Might be the same brand with 'Simply tablets' - 'XoroTablet' => 'KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151', - // http://www1.viewsonic.com/products/computing/tablets/ - 'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a', - // https://www.verizonwireless.com/tablets/verizon/ - 'VerizonTablet' => 'QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1', - // http://www.odys.de/web/internet-tablet_en.html - 'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10', - // http://www.captiva-power.de/products.html#tablets-en - 'CaptivaTablet' => 'CAPTIVA PAD', - // IconBIT - http://www.iconbit.com/products/tablets/ - 'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S', - // http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63 - 'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98 Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98 3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d 3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18 3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h 3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi', - // Onda - http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price - 'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+|V10 \b4G\b', - 'JaytechTablet' => 'TPC-PA762', - 'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010', - // http://www.digma.ru/support/download/ - // @todo: Ebooks also (if requested) - 'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b', - // http://www.evolioshop.com/ro/tablete-pc.html - // http://www.evolio.ro/support/downloads_static.html?cat=2 - // @todo: Research some more - 'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b', - // @todo http://www.lavamobiles.com/tablets-data-cards - 'LavaTablet' => 'QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b', - // http://www.breezetablet.com/ - 'AocTablet' => 'MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712', - // http://www.mpmaneurope.com/en/products/internet-tablets-14/android-tablets-14/ - 'MpmanTablet' => 'MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\bMPG7\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010', - // https://www.celkonmobiles.com/?_a=categoryphones&sid=2 - 'CelkonTablet' => 'CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b', - // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab - 'WolderTablet' => 'miTab \b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\b', - 'MediacomTablet' => 'M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA', - // http://www.mi.com/en - 'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b', - // http://www.nbru.cn/index.html - 'NibiruTablet' => 'Nibiru M1|Nibiru Jupiter One', - // http://navroad.com/products/produkty/tablety/ - // http://navroad.com/products/produkty/tablety/ - 'NexoTablet' => 'NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI', - // http://leader-online.com/new_site/product-category/tablets/ - // http://www.leader-online.net.au/List/Tablet - 'LeaderTablet' => 'TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100', - // http://www.datawind.com/ubislate/ - 'UbislateTablet' => 'UbiSlate[\s]?7C', - // http://www.pocketbook-int.com/ru/support - 'PocketBookTablet' => 'Pocketbook', - // http://www.kocaso.com/product_tablet.html - 'KocasoTablet' => '\b(TB-1207)\b', - // http://global.hisense.com/product/asia/tablet/Sero7/201412/t20141215_91832.htm - 'HisenseTablet' => '\b(F5281|E2371)\b', - // http://www.tesco.com/direct/hudl/ - 'Hudl' => 'Hudl HT7S3|Hudl 2', - // http://www.telstra.com.au/home-phone/thub-2/ - 'TelstraTablet' => 'T-Hub2', - 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bTP750\b|\bQTAQZ3\b|WVT101|TM1088|KT107' - ); - - /** - * List of mobile Operating Systems. - * - * @var array - */ - protected static $operatingSystems = array( - 'AndroidOS' => 'Android', - 'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet os', - 'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino', - 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b', - // @reference: http://en.wikipedia.org/wiki/Windows_Mobile - 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;', - // @reference: http://en.wikipedia.org/wiki/Windows_Phone - // http://wifeng.cn/?r=blog&a=view&id=106 - // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx - // http://msdn.microsoft.com/library/ms537503.aspx - // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx - 'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;', - 'iOS' => '\biPhone.*Mobile|\biPod|\biPad|AppleCoreMedia', - // https://en.wikipedia.org/wiki/IPadOS - 'iPadOS' => 'CPU OS 13', - // http://en.wikipedia.org/wiki/MeeGo - // @todo: research MeeGo in UAs - 'MeeGoOS' => 'MeeGo', - // http://en.wikipedia.org/wiki/Maemo - // @todo: research Maemo in UAs - 'MaemoOS' => 'Maemo', - 'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135 - 'webOS' => 'webOS|hpwOS', - 'badaOS' => '\bBada\b', - 'BREWOS' => 'BREW', - ); - - /** - * List of mobile User Agents. - * - * IMPORTANT: This is a list of only mobile browsers. - * Mobile Detect 2.x supports only mobile browsers, - * it was never designed to detect all browsers. - * The change will come in 2017 in the 3.x release for PHP7. - * - * @var array - */ - protected static $browsers = array( - //'Vivaldi' => 'Vivaldi', - // @reference: https://developers.google.com/chrome/mobile/docs/user-agent - 'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?', - 'Dolfin' => '\bDolfin\b', - 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+', - 'Skyfire' => 'Skyfire', - 'Edge' => 'Mobile Safari/[.0-9]* Edge', - 'IE' => 'IEMobile|MSIEMobile', // |Trident/[.0-9]+ - 'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS', - 'Bolt' => 'bolt', - 'TeaShark' => 'teashark', - 'Blazer' => 'Blazer', - // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3 - 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari', - // http://en.wikipedia.org/wiki/Midori_(web_browser) - //'Midori' => 'midori', - //'Tizen' => 'Tizen', - 'WeChat' => '\bMicroMessenger\b', - 'UCBrowser' => 'UC.*Browser|UCWEB', - 'baiduboxapp' => 'baiduboxapp', - 'baidubrowser' => 'baidubrowser', - // https://github.com/serbanghita/Mobile-Detect/issues/7 - 'DiigoBrowser' => 'DiigoBrowser', - // http://www.puffinbrowser.com/index.php - // https://github.com/serbanghita/Mobile-Detect/issues/752 - // 'Puffin' => 'Puffin', - // http://mercury-browser.com/index.html - 'Mercury' => '\bMercury\b', - // http://en.wikipedia.org/wiki/Obigo_Browser - 'ObigoBrowser' => 'Obigo', - // http://en.wikipedia.org/wiki/NetFront - 'NetFront' => 'NF-Browser', - // @reference: http://en.wikipedia.org/wiki/Minimo - // http://en.wikipedia.org/wiki/Vision_Mobile_Browser - 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger', - // @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser) - 'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon', - ); - - /** - * Utilities. - * - * @var array - */ - protected static $utilities = array( - // Experimental. When a mobile device wants to switch to 'Desktop Mode'. - // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/ - // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011 - // https://developers.facebook.com/docs/sharing/best-practices - 'Bot' => 'Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp', - 'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2', - 'DesktopMode' => 'WPDesktop', - 'TV' => 'SonyDTV|HbbTV', // experimental - 'WebKit' => '(webkit)[ /]([\w.]+)', - // @todo: Include JXD consoles. - 'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\b', - 'Watch' => 'SM-V700', - ); - - /** - * All possible HTTP headers that represent the - * User-Agent string. - * - * @var array - */ - protected static $uaHttpHeaders = array( - // The default User-Agent string. - 'HTTP_USER_AGENT', - // Header can occur on devices using Opera Mini. - 'HTTP_X_OPERAMINI_PHONE_UA', - // Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/ - 'HTTP_X_DEVICE_USER_AGENT', - 'HTTP_X_ORIGINAL_USER_AGENT', - 'HTTP_X_SKYFIRE_PHONE', - 'HTTP_X_BOLT_PHONE_UA', - 'HTTP_DEVICE_STOCK_UA', - 'HTTP_X_UCBROWSER_DEVICE_UA' - ); - - /** - * The individual segments that could exist in a User-Agent string. VER refers to the regular - * expression defined in the constant self::VER. - * - * @var array - */ - protected static $properties = array( - - // Build - 'Mobile' => 'Mobile/[VER]', - 'Build' => 'Build/[VER]', - 'Version' => 'Version/[VER]', - 'VendorID' => 'VendorID/[VER]', - - // Devices - 'iPad' => 'iPad.*CPU[a-z ]+[VER]', - 'iPhone' => 'iPhone.*CPU[a-z ]+[VER]', - 'iPod' => 'iPod.*CPU[a-z ]+[VER]', - //'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'), - 'Kindle' => 'Kindle/[VER]', - - // Browser - 'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'), - 'Coast' => array('Coast/[VER]'), - 'Dolfin' => 'Dolfin/[VER]', - // @reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox - 'Firefox' => array('Firefox/[VER]', 'FxiOS/[VER]'), - 'Fennec' => 'Fennec/[VER]', - // http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx - // https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx - 'Edge' => 'Edge/[VER]', - 'IE' => array('IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]'), - // http://en.wikipedia.org/wiki/NetFront - 'NetFront' => 'NetFront/[VER]', - 'NokiaBrowser' => 'NokiaBrowser/[VER]', - 'Opera' => array( ' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]' ), - 'Opera Mini' => 'Opera Mini/[VER]', - 'Opera Mobi' => 'Version/[VER]', - 'UCBrowser' => array( 'UCWEB[VER]', 'UC.*Browser/[VER]' ), - 'MQQBrowser' => 'MQQBrowser/[VER]', - 'MicroMessenger' => 'MicroMessenger/[VER]', - 'baiduboxapp' => 'baiduboxapp/[VER]', - 'baidubrowser' => 'baidubrowser/[VER]', - 'SamsungBrowser' => 'SamsungBrowser/[VER]', - 'Iron' => 'Iron/[VER]', - // @note: Safari 7534.48.3 is actually Version 5.1. - // @note: On BlackBerry the Version is overwriten by the OS. - 'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ), - 'Skyfire' => 'Skyfire/[VER]', - 'Tizen' => 'Tizen/[VER]', - 'Webkit' => 'webkit[ /][VER]', - 'PaleMoon' => 'PaleMoon/[VER]', - - // Engine - 'Gecko' => 'Gecko/[VER]', - 'Trident' => 'Trident/[VER]', - 'Presto' => 'Presto/[VER]', - 'Goanna' => 'Goanna/[VER]', - - // OS - 'iOS' => ' \bi?OS\b [VER][ ;]{1}', - 'Android' => 'Android [VER]', - 'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]'), - 'BREW' => 'BREW [VER]', - 'Java' => 'Java/[VER]', - // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx - // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases - 'Windows Phone OS' => array( 'Windows Phone OS [VER]', 'Windows Phone [VER]'), - 'Windows Phone' => 'Windows Phone [VER]', - 'Windows CE' => 'Windows CE/[VER]', - // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd - 'Windows NT' => 'Windows NT [VER]', - 'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'), - 'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'), - ); - - /** - * Construct an instance of this class. - * - * @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored. - * If left empty, will use the global _SERVER['HTTP_*'] vars instead. - * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT - * from the $headers array instead. - */ - public function __construct( - array $headers = null, - $userAgent = null - ) { - $this->setHttpHeaders($headers); - $this->setUserAgent($userAgent); - } - - /** - * Get the current script version. - * This is useful for the demo.php file, - * so people can check on what version they are testing - * for mobile devices. - * - * @return string The version number in semantic version format. - */ - public static function getScriptVersion() - { - return self::VERSION; - } - - /** - * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers. - * - * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract - * the headers. The default null is left for backwards compatibility. - */ - public function setHttpHeaders($httpHeaders = null) - { - // use global _SERVER if $httpHeaders aren't defined - if (!is_array($httpHeaders) || !count($httpHeaders)) { - $httpHeaders = $_SERVER; - } - - // clear existing headers - $this->httpHeaders = array(); - - // Only save HTTP headers. In PHP land, that means only _SERVER vars that - // start with HTTP_. - foreach ($httpHeaders as $key => $value) { - if (substr($key, 0, 5) === 'HTTP_') { - $this->httpHeaders[$key] = $value; - } - } - - // In case we're dealing with CloudFront, we need to know. - $this->setCfHeaders($httpHeaders); - } - - /** - * Retrieves the HTTP headers. - * - * @return array - */ - public function getHttpHeaders() - { - return $this->httpHeaders; - } - - /** - * Retrieves a particular header. If it doesn't exist, no exception/error is caused. - * Simply null is returned. - * - * @param string $header The name of the header to retrieve. Can be HTTP compliant such as - * "User-Agent" or "X-Device-User-Agent" or can be php-esque with the - * all-caps, HTTP_ prefixed, underscore seperated awesomeness. - * - * @return string|null The value of the header. - */ - public function getHttpHeader($header) - { - // are we using PHP-flavored headers? - if (strpos($header, '_') === false) { - $header = str_replace('-', '_', $header); - $header = strtoupper($header); - } - - // test the alternate, too - $altHeader = 'HTTP_' . $header; - - //Test both the regular and the HTTP_ prefix - if (isset($this->httpHeaders[$header])) { - return $this->httpHeaders[$header]; - } elseif (isset($this->httpHeaders[$altHeader])) { - return $this->httpHeaders[$altHeader]; - } - - return null; - } - - public function getMobileHeaders() - { - return self::$mobileHeaders; - } - - /** - * Get all possible HTTP headers that - * can contain the User-Agent string. - * - * @return array List of HTTP headers. - */ - public function getUaHttpHeaders() - { - return self::$uaHttpHeaders; - } - - - /** - * Set CloudFront headers - * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device - * - * @param array $cfHeaders List of HTTP headers - * - * @return boolean If there were CloudFront headers to be set - */ - public function setCfHeaders($cfHeaders = null) { - // use global _SERVER if $cfHeaders aren't defined - if (!is_array($cfHeaders) || !count($cfHeaders)) { - $cfHeaders = $_SERVER; - } - - // clear existing headers - $this->cloudfrontHeaders = array(); - - // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that - // start with cloudfront-. - $response = false; - foreach ($cfHeaders as $key => $value) { - if (substr(strtolower($key), 0, 16) === 'http_cloudfront_') { - $this->cloudfrontHeaders[strtoupper($key)] = $value; - $response = true; - } - } - - return $response; - } - - /** - * Retrieves the cloudfront headers. - * - * @return array - */ - public function getCfHeaders() - { - return $this->cloudfrontHeaders; - } - - /** - * @param string $userAgent - * @return string - */ - private function prepareUserAgent($userAgent) { - $userAgent = trim($userAgent); - $userAgent = substr($userAgent, 0, 500); - return $userAgent; - } - - /** - * Set the User-Agent to be used. - * - * @param string $userAgent The user agent string to set. - * - * @return string|null - */ - public function setUserAgent($userAgent = null) - { - // Invalidate cache due to #375 - $this->cache = array(); - - if (false === empty($userAgent)) { - return $this->userAgent = $this->prepareUserAgent($userAgent); - } else { - $this->userAgent = null; - foreach ($this->getUaHttpHeaders() as $altHeader) { - if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban) - $this->userAgent .= $this->httpHeaders[$altHeader] . " "; - } - } - - if (!empty($this->userAgent)) { - return $this->userAgent = $this->prepareUserAgent($this->userAgent); - } - } - - if (count($this->getCfHeaders()) > 0) { - return $this->userAgent = 'Amazon CloudFront'; - } - return $this->userAgent = null; - } - - /** - * Retrieve the User-Agent. - * - * @return string|null The user agent if it's set. - */ - public function getUserAgent() - { - return $this->userAgent; - } - - /** - * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or - * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set. - * - * @deprecated since version 2.6.9 - * - * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default - * parameter is null which will default to self::DETECTION_TYPE_MOBILE. - */ - public function setDetectionType($type = null) - { - if ($type === null) { - $type = self::DETECTION_TYPE_MOBILE; - } - - if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) { - return; - } - - $this->detectionType = $type; - } - - public function getMatchingRegex() - { - return $this->matchingRegex; - } - - public function getMatchesArray() - { - return $this->matchesArray; - } - - /** - * Retrieve the list of known phone devices. - * - * @return array List of phone devices. - */ - public static function getPhoneDevices() - { - return self::$phoneDevices; - } - - /** - * Retrieve the list of known tablet devices. - * - * @return array List of tablet devices. - */ - public static function getTabletDevices() - { - return self::$tabletDevices; - } - - /** - * Alias for getBrowsers() method. - * - * @return array List of user agents. - */ - public static function getUserAgents() - { - return self::getBrowsers(); - } - - /** - * Retrieve the list of known browsers. Specifically, the user agents. - * - * @return array List of browsers / user agents. - */ - public static function getBrowsers() - { - return self::$browsers; - } - - /** - * Retrieve the list of known utilities. - * - * @return array List of utilities. - */ - public static function getUtilities() - { - return self::$utilities; - } - - /** - * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*(). - * - * @deprecated since version 2.6.9 - * - * @return array All the rules (but not extended). - */ - public static function getMobileDetectionRules() - { - static $rules; - - if (!$rules) { - $rules = array_merge( - self::$phoneDevices, - self::$tabletDevices, - self::$operatingSystems, - self::$browsers - ); - } - - return $rules; - - } - - /** - * Method gets the mobile detection rules + utilities. - * The reason this is separate is because utilities rules - * don't necessary imply mobile. This method is used inside - * the new $detect->is('stuff') method. - * - * @deprecated since version 2.6.9 - * - * @return array All the rules + extended. - */ - public function getMobileDetectionRulesExtended() - { - static $rules; - - if (!$rules) { - // Merge all rules together. - $rules = array_merge( - self::$phoneDevices, - self::$tabletDevices, - self::$operatingSystems, - self::$browsers, - self::$utilities - ); - } - - return $rules; - } - - /** - * Retrieve the current set of rules. - * - * @deprecated since version 2.6.9 - * - * @return array - */ - public function getRules() - { - if ($this->detectionType == self::DETECTION_TYPE_EXTENDED) { - return self::getMobileDetectionRulesExtended(); - } else { - return self::getMobileDetectionRules(); - } - } - - /** - * Retrieve the list of mobile operating systems. - * - * @return array The list of mobile operating systems. - */ - public static function getOperatingSystems() - { - return self::$operatingSystems; - } - - /** - * Check the HTTP headers for signs of mobile. - * This is the fastest mobile check possible; it's used - * inside isMobile() method. - * - * @return bool - */ - public function checkHttpHeadersForMobile() - { - - foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) { - if (isset($this->httpHeaders[$mobileHeader])) { - if (is_array($matchType['matches'])) { - foreach ($matchType['matches'] as $_match) { - if (strpos($this->httpHeaders[$mobileHeader], $_match) !== false) { - return true; - } - } - - return false; - } else { - return true; - } - } - } - - return false; - - } - - /** - * Magic overloading method. - * - * @method boolean is[...]() - * @param string $name - * @param array $arguments - * @return mixed - * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is' - */ - public function __call($name, $arguments) - { - // make sure the name starts with 'is', otherwise - if (substr($name, 0, 2) !== 'is') { - throw new BadMethodCallException("No such method exists: $name"); - } - - $this->setDetectionType(self::DETECTION_TYPE_MOBILE); - - $key = substr($name, 2); - - return $this->matchUAAgainstKey($key); - } - - /** - * Find a detection rule that matches the current User-agent. - * - * @param null $userAgent deprecated - * @return boolean - */ - protected function matchDetectionRulesAgainstUA($userAgent = null) - { - // Begin general search. - foreach ($this->getRules() as $_regex) { - if (empty($_regex)) { - continue; - } - - if ($this->match($_regex, $userAgent)) { - return true; - } - } - - return false; - } - - /** - * Search for a certain key in the rules array. - * If the key is found then try to match the corresponding - * regex against the User-Agent. - * - * @param string $key - * - * @return boolean - */ - protected function matchUAAgainstKey($key) - { - // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc. - $key = strtolower($key); - if (false === isset($this->cache[$key])) { - - // change the keys to lower case - $_rules = array_change_key_case($this->getRules()); - - if (false === empty($_rules[$key])) { - $this->cache[$key] = $this->match($_rules[$key]); - } - - if (false === isset($this->cache[$key])) { - $this->cache[$key] = false; - } - } - - return $this->cache[$key]; - } - - /** - * Check if the device is mobile. - * Returns true if any type of mobile device detected, including special ones - * @param null $userAgent deprecated - * @param null $httpHeaders deprecated - * @return bool - */ - public function isMobile($userAgent = null, $httpHeaders = null) - { - - if ($httpHeaders) { - $this->setHttpHeaders($httpHeaders); - } - - if ($userAgent) { - $this->setUserAgent($userAgent); - } - - // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' - if ($this->getUserAgent() === 'Amazon CloudFront') { - $cfHeaders = $this->getCfHeaders(); - if(array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') { - return true; - } - } - - $this->setDetectionType(self::DETECTION_TYPE_MOBILE); - - if ($this->checkHttpHeadersForMobile()) { - return true; - } else { - return $this->matchDetectionRulesAgainstUA(); - } - - } - - /** - * Check if the device is a tablet. - * Return true if any type of tablet device is detected. - * - * @param string $userAgent deprecated - * @param array $httpHeaders deprecated - * @return bool - */ - public function isTablet($userAgent = null, $httpHeaders = null) - { - // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' - if ($this->getUserAgent() === 'Amazon CloudFront') { - $cfHeaders = $this->getCfHeaders(); - if(array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') { - return true; - } - } - - $this->setDetectionType(self::DETECTION_TYPE_MOBILE); - - foreach (self::$tabletDevices as $_regex) { - if ($this->match($_regex, $userAgent)) { - return true; - } - } - - return false; - } - - /** - * This method checks for a certain property in the - * userAgent. - * @todo: The httpHeaders part is not yet used. - * - * @param string $key - * @param string $userAgent deprecated - * @param string $httpHeaders deprecated - * @return bool|int|null - */ - public function is($key, $userAgent = null, $httpHeaders = null) - { - // Set the UA and HTTP headers only if needed (eg. batch mode). - if ($httpHeaders) { - $this->setHttpHeaders($httpHeaders); - } - - if ($userAgent) { - $this->setUserAgent($userAgent); - } - - $this->setDetectionType(self::DETECTION_TYPE_EXTENDED); - - return $this->matchUAAgainstKey($key); - } - - /** - * Some detection rules are relative (not standard), - * because of the diversity of devices, vendors and - * their conventions in representing the User-Agent or - * the HTTP headers. - * - * This method will be used to check custom regexes against - * the User-Agent string. - * - * @param $regex - * @param string $userAgent - * @return bool - * - * @todo: search in the HTTP headers too. - */ - public function match($regex, $userAgent = null) - { - $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches); - // If positive match is found, store the results for debug. - if ($match) { - $this->matchingRegex = $regex; - $this->matchesArray = $matches; - } - - return $match; - } - - /** - * Get the properties array. - * - * @return array - */ - public static function getProperties() - { - return self::$properties; - } - - /** - * Prepare the version number. - * - * @todo Remove the error supression from str_replace() call. - * - * @param string $ver The string version, like "2.6.21.2152"; - * - * @return float - */ - public function prepareVersionNo($ver) - { - $ver = str_replace(array('_', ' ', '/'), '.', $ver); - $arrVer = explode('.', $ver, 2); - - if (isset($arrVer[1])) { - $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions. - } - - return (float) implode('.', $arrVer); - } - - /** - * Check the version of the given property in the User-Agent. - * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31) - * - * @param string $propertyName The name of the property. See self::getProperties() array - * keys for all possible properties. - * @param string $type Either self::VERSION_TYPE_STRING to get a string value or - * self::VERSION_TYPE_FLOAT indicating a float value. This parameter - * is optional and defaults to self::VERSION_TYPE_STRING. Passing an - * invalid parameter will default to the this type as well. - * - * @return string|float The version of the property we are trying to extract. - */ - public function version($propertyName, $type = self::VERSION_TYPE_STRING) - { - if (empty($propertyName)) { - return false; - } - - // set the $type to the default if we don't recognize the type - if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) { - $type = self::VERSION_TYPE_STRING; - } - - $properties = self::getProperties(); - - // Check if the property exists in the properties array. - if (true === isset($properties[$propertyName])) { - - // Prepare the pattern to be matched. - // Make sure we always deal with an array (string is converted). - $properties[$propertyName] = (array) $properties[$propertyName]; - - foreach ($properties[$propertyName] as $propertyMatchString) { - - $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString); - - // Identify and extract the version. - preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match); - - if (false === empty($match[1])) { - $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]); - - return $version; - } - - } - - } - - return false; - } - - /** - * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants. - * - * @return string One of the self::MOBILE_GRADE_* constants. - */ - public function mobileGrade() - { - $isMobile = $this->isMobile(); - - if ( - // Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0), iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5 (6.0), and iPhone 5S (7.0) - $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) >= 4.3 || - $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 || - $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 || - - // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5) - // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM - // Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices - // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7 - ( $this->version('Android', self::VERSION_TYPE_FLOAT)>2.1 && $this->is('Webkit') ) || - - // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8) - $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 || - - // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10) - $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 || - // Blackberry Playbook (1.0-2.0) - Tested on PlayBook - $this->match('Playbook.*Tablet') || - - // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0) - ( $this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi') ) || - // Palm WebOS 3.0 - Tested on HP TouchPad - $this->match('hp.*TouchPad') || - - // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices - ( $this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18 ) || - - // Chrome for Android - Tested on Android 4.0, 4.1 device - ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0 ) || - - // Skyfire 4.1 - Tested on Android 2.3 device - ( $this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || - - // Opera Mobile 11.5-12: Tested on Android 2.3 - ( $this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS') ) || - - // Meego 1.2 - Tested on Nokia 950 and N9 - $this->is('MeeGoOS') || - - // Tizen (pre-release) - Tested on early hardware - $this->is('Tizen') || - - // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser - // @todo: more tests here! - $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 || - - // UC Browser - Tested on Android 2.3 device - ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || - - // Kindle 3 and Fire - Tested on the built-in WebKit browser for each - ( $this->match('Kindle Fire') || - $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0 ) || - - // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet - $this->is('AndroidOS') && $this->is('NookTablet') || - - // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7 - $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile || - - // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7 - $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile || - - // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7 - $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile || - - // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7 - $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile || - - // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7 - $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile - ){ - return self::MOBILE_GRADE_A; - } - - if ( - $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT)<4.3 || - $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT)<4.3 || - $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT)<4.3 || - - // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770 - $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT)<6 || - - //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3 - ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 && - ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS')) ) || - - // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1) - $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') || - - // @todo: report this (tested on Nokia N71) - $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS') - ){ - return self::MOBILE_GRADE_B; - } - - if ( - // Blackberry 4.x - Tested on the Curve 8330 - $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) <= 5.0 || - // Windows Mobile - Tested on the HTC Leo (WinMo 5.2) - $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 || - - // Tested on original iPhone (3.1), iPhone 3 (3.2) - $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 || - $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 || - $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 || - - // Internet Explorer 7 and older - Tested on Windows XP - $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile - ){ - return self::MOBILE_GRADE_C; - } - - // All older smartphone platforms and featurephones - Any device that doesn't support media queries - // will receive the basic, C grade experience. - return self::MOBILE_GRADE_C; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/README.md b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/README.md deleted file mode 100644 index d73757b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/README.md +++ /dev/null @@ -1,344 +0,0 @@ -![Mobile Detect](http://demo.mobiledetect.net/logo-github.png) - -> Motto: "Every business should have a detection script to detect mobile readers." - -[![Build Status](https://travis-ci.org/serbanghita/Mobile-Detect.svg?branch=devel)](https://travis-ci.org/serbanghita/Mobile-Detect) -[![Latest Stable Version](https://poser.pugx.org/mobiledetect/mobiledetectlib/v/stable.svg)](https://packagist.org/packages/mobiledetect/mobiledetectlib) -[![Total Downloads](https://poser.pugx.org/mobiledetect/mobiledetectlib/downloads.svg)](https://packagist.org/packages/mobiledetect/mobiledetectlib) -[![Daily Downloads](https://poser.pugx.org/mobiledetect/mobiledetectlib/d/daily.png)](https://packagist.org/packages/mobiledetect/mobiledetectlib) -[![License](https://poser.pugx.org/mobiledetect/mobiledetectlib/license.svg)](https://packagist.org/packages/mobiledetect/mobiledetectlib) -[![Chat on Slack](https://img.shields.io/badge/Slack%20%23general-join-orange.svg)](https://join.slack.com/t/mobiledetect/shared_invite/enQtMjg1NDY0OTg5NzgzLTcwMzEzMWJjZjRlOWFkY2ZiNzE1ZmRmNzEwM2VhOGY5OGVkYWMxNjdkZDU5YjQ5MmM5MGUxYjhlZDQwOGVjZjE) - -#### About - -Mobile Detect is a lightweight PHP class for detecting mobile devices (including tablets). -It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. - -*Why* - -Your website's _content strategy_ is important! You need a complete toolkit to deliver an experience that is _optimized_, -_fast_ and _relevant_ to your users. Mobile Detect class is a -[server-side detection](http://www.w3.org/TR/mwabp/#bp-devcap-detection) tool that can help you with your RWD strategy, -it is not a replacement for CSS3 media queries or other forms of client-side feature detection. - -*How* - -We're committed to make Mobile_Detect the best open-source mobile detection resource and this is why before -each release we're running [unit tests](./tests) and research and update the detection rules on **monthly** basis. - -*Who* - -See [the history](./docs/HISTORY.md) of the project. - -#### Announcements - -* **JetBrains** is sponsoring the project by providing licenses for [PHPStorm](https://www.jetbrains.com/phpstorm/) and -[DataGrip](https://www.jetbrains.com/datagrip/). -* **Mobile_Detect `2.x.x`** is only integrating new regexes, User-Agents and tests. We are focusing on **new tablets only**. -The rest of the PRs about TVs, bots or optimizations will be closed and analyzed after `3.0.0-beta` is released. -* **Mobile_Detect `3.x.x`** is experimental and WIP. - - -#### Install - -**Download and include manually** -> Use this to quickly test the demo. - -* [Download latest release](../../tags) -* [Mobile_Detect.php](./Mobile_Detect.php) - -```php -require_once "libs/Mobile_Detect.php"; -``` - -**Install as a [composer package](https://packagist.org/packages/mobiledetect/mobiledetectlib)** -> Use this method to get continuous updates. - -``` -composer require mobiledetect/mobiledetectlib -``` -or include the dependency in the `composer.json` file: -```json -{ - "require": { - "mobiledetect/mobiledetectlib": "^2.8" - } -} -``` - -#### Demo - -* [:iphone: Live demo!](http://demo.mobiledetect.net) -* [Code examples](../../wiki/Code-examples) - -#### Contribute - -*Submit a PR* -> Submit a pull request but before make sure you read [how to contribute](docs/CONTRIBUTING.md) guide. - -*Donate* - -|Paypal| -|------| -|[Donate :+1:](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mobiledetectlib%40gmail%2ecom&lc=US&item_name=Mobile%20Detect¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)| - - -I'm currently paying for hosting and spend a lot of my family time to maintain the project and planning the future releases. -I would highly appreciate any money donations that will keep the research going. - -Special thanks to the community :+1: for donations, JetBrains team for the continuous support and [Dragos Gavrila](https://twitter.com/grafician) who contributed with the logo. - -#### Modules, plugins, ports -> [Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.) - -:point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates. -:point_right: When including the class into your `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts. - -**JavaScript** - -* mobile-detect.js - A [JavaScript port](https://github.com/hgoebl/mobile-detect.js) of Mobile-Detect class. Made by [Heinrich Goebl](https://github.com/hgoebl). - -**Varnish Cache** - -* [Varnish Mobile Detect](https://github.com/willemk/varnish-mobiletranslate) - Drop-in varnish solution to mobile user -detection based on the Mobile-Detect library. Made by [willemk](https://github.com/willemk). -* [mobiledetect2vcl](https://github.com/carlosabalde/mobiledetect2vcl) - Python script to transform the Mobile -Detect JSON database into an UA-based mobile detection VCL subroutine easily integrable in any Varnish Cache -configuration. Made by [Carlos Abalde](https://github.com/carlosabalde). - -**LUA** - -* [mobile-detect.lua](https://github.com/yourpalmark/mobile-detect.lua) is a port of Mobile-Detect to Lua for -NGINX HTTP servers. Follows closely to mobile-detect.js. Supports all methods that server-side -mobile-detect.js supports. Fully unit-tested and synced with Travis CI (Build Passing badge included). -Made by [Mark Walters](https://github.com/yourpalmark). - -**PHP** - -**WordPress** - -* [Mobile Detect for WordPress](https://wordpress.org/plugins/tinywp-mobile-detect/) - WordPress has a built-in function -(`wp_is_mobile()`) to detect mobile devices. There is (at least) one catch, though. It considers iPad (iPad pro, -and any tablet) as a mobile. So, this 3rd party module changes the way `wp_is_mobile()` works with the help of -Mobile Detect PHP library! -Made by [Pothi Kalimuthu](https://github.com/pothi) - -* [WordPress Mobile Detect](https://wordpress.org/plugins/wp-mobile-detect/) - Gives you the ability to wrap that -infographic in a `[notdevice][/notdevice]` shortcode so at the server level WordPress will -decide to show that content only if the user is NOT on a phone or tablet. -Made by [Jesse Friedman](https://profiles.wordpress.org/professor44/). - -* [mobble](https://wordpress.org/plugins/mobble/) - provides mobile related conditional functions for your site. -e.g. `is_iphone()`, `is_mobile()` and `is_tablet()`. Made by Scott Evans. - -* [WordPress Responsage](https://github.com/iamspacehead/responsage) - A small WordPress theme plugin that allows -you to make your images responsive. Made by [Adrian Ciaschetti](https://github.com/iamspacehead). - -* [WP247 Body Classes](https://wordpress.org/plugins/wp247-body-classes/) - Add unique classes to the `body` tag for -easy styling based on various attributes (archive, user, post, mobile) and various WordPress "is" functions. -Mobile attributes include type of device, Operating System, Browser, etc. Examples: .is-mobile, .is-not-mobile, -.is-tablet, .is-ios, .is-not-ios, .is-androidos, .is-chromebrowser. -Made by [wescleveland56](https://github.com/wescleveland56). - -* [Adaptive Content](https://wordpress.org/plugins/addfunc-adaptive-content/) for WordPress provides the most -intuitive set of shortcodes for including/excluding content on mobile devices, tablets desktops and other -more specific device parameters. This lightweight plugin lets content writers and theme authors choose when -WordPress should or shouldn’t show any give content item using shortcodes and quicktags or theme elements using functions. -Made by [AddFunc](https://profiles.wordpress.org/addfunc). - -* [AddFunc Mobile Detect](https://wordpress.org/plugins/addfunc-mobile-detect/) for WordPress redirects -mobile traffic to your mobile website and, basically, gives you loads of control over your mobile redirects. -Made by [AddFunc](https://profiles.wordpress.org/addfunc). - -**Drupal** - -* [Drupal Mobile Switch](https://www.drupal.org/project/mobile_switch) - The Mobile Switch Drupal module provides a -automatic theme switch functionality for mobile devices, detected by Browscap or Mobile Detect. -Made by [Siegfried Neumann](https://www.drupal.org/user/45267). - -* [Drupal Context Mobile Detect](https://www.drupal.org/project/context_mobile_detect) - This is a Drupal context module -which integrates Context and PHP Mobile Detect library. -Created by [Artem Shymko](https://www.drupal.org/user/432492). - -* [Drupal Mobile Detect](https://www.drupal.org/project/mobile_detect) - Lightweight mobile detect module for Drupal - created by [Matthew Donadio](https://www.drupal.org/user/325244). - -**Joomla** - -* [yagendoo Joomla! Mobile Detection Plugin](http://www.yagendoo.com/en/blog/free-mobile-detection-plugin-for-joomla.html) - Lightweight PHP plugin for Joomla! -that detects a mobile browser using the Mobile Detect class. -Made by yagendoo media. - -* [User Agent Detector plugin](https://github.com/renekreijveld/UserAgentDetector) - This system plugin detects the user -agent of your website visitor and sets a session variable accordingly. Based on the user agent, the plugin detects if the -site is running on a desktop pc, tablet or smartphone. It can also detect if the visitor is a spider bot (search engine). -Session variable that is set: `ualayout`. Possible values: desktop, tablet, mobile, bot. -Made by @ReneKreijveld. - -**Magento** - -* [Magento helper](http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16835/) from Optimise Web enables -the use of all functions provided by Mobile Detect. Made by [Kathir Vel](http://www.kathirvel.com). - -* [Magento 2 Mobile Detect Theme Change](https://github.com/EaDesgin/magento2-mobiledetect) is an extension for Magento 2 -that will change the theme or redirect to a different URL. Also containing a helper to check for the device type. - -**PrestaShop** - -* [PrestaShop](https://www.prestashop.com) is a free, secure and open source shopping cart platform. Mobile_Detect -is included in the default package since 1.5.x. - -**Laravel** - -* [Agent](https://github.com/jenssegers/agent) is a user agent class for Laravel based on Mobile Detect with some -additional functionality. -Made by [Jens Segers](https://github.com/jenssegers). - -* [Laravel Mobile Detect](https://github.com/riverskies/laravel-mobile-detect) is a package that enables you to use device detection right in your Laravel Blade templates. (Utilises the well-known, constantly updated PHP mobile detection library.) -Made by [Barnabas Kecskes](https://github.com/barnabaskecskes). - -* [BrowserDetect](https://github.com/hisorange/browser-detect) is a browser and mobile detection package, collects -and wrap together the best user-agent identifiers for Laravel. -Created by [Varga Zsolt](https://github.com/hisorange). - -**Zend Framework** - -* [ZF2 Mobile-Detect](https://github.com/neilime/zf2-mobile-detect.git) is a Zend Framework 2 module that provides -Mobile-Detect features (Mobile_Detect class as a service, helper for views and plugin controllers). -Made by [neilime](https://github.com/neilime). - -* [ZF2 MobileDetectModule](https://github.com/nikolaposa/MobileDetectModule) facilitates integration of a PHP MobileDetect -class with some ZF2-based application. Has similar idea like the existing ZF2 Mobile-Detect module, -but differs in initialization and provision routine of the actual Mobile_Detect class. -Appropriate view helper and controller plugin also have different conceptions. -Made by [Nikola Posa](https://github.com/nikolaposa). - -**Symfony** - -* [Symfony2 Mobile Detect Bundle](https://github.com/suncat2000/MobileDetectBundle) is a bundle for detecting mobile devices, -manage mobile view and redirect to the mobile and tablet version. -Made by [Nikolay Ivlev](https://github.com/suncat2000). - -* [Silex Mobile Detect Service Provider](https://github.com/jbinfo/MobileDetectServiceProvider) is a service provider to -interact with Mobile detect class methods. -Made by [Lhassan Baazzi](https://github.com/jbinfo). - -**Slim Framework** - -* [Slim_Mobile_Detect](https://github.com/zguillez/slim_mobile_detect) implements Mobile_Detect lib for different -responses write on Slim Framework App. - -**ExpressionEngine** - -* [EE2 Detect Mobile](https://github.com/garethtdavies/detect-mobile) is a lightweight PHP plugin for EE2 that detects - a mobile browser using the Mobile Detect class. Made by [Gareth Davies](https://github.com/garethtdavies). - -**Yii Framework** - -* [Yii Extension](https://github.com/iamsalnikov/MobileDetect) - Mobile detect plugin for Yii framework. -Made by [Alexey Salnikov](https://github.com/iamsalnikov). - -* [Yii Extension](https://github.com/candasm/yii1-mobile-detect-component) - Mobile detect component for Yii framework -1.x version which supports composer package manager. Made by [Candas Minareci](https://github.com/candasm). - -* [Yii2 Device Detect](https://github.com/alexandernst/yii2-device-detect/) - Yii2 extension for Mobile-Detect library. -Made by [Alexander Nestorov](https://github.com/alexandernst). - -**CakePHP** - -* [CakePHP MobileDetect](https://github.com/chronon/CakePHP-MobileDetectComponent-Plugin) is a plugin component for -CakePHP 2.x. Made by [Gregory Gaskill](https://github.com/chronon). - -**FuelPHP** - -* [Special Agent](https://github.com/rob-bar/special_agent) is a FuelPHP package which uses php-mobile-detect to -determine whether a device is mobile or not. It overrides the Fuelphp Agent class its methods. -Made by [Robbie Bardjin](https://github.com/rob-bar). - - -**TYPO3** - -* [px_mobiledetect](https://typo3.org/extensions/repository/view/px_mobiledetect) is an extension that helps to detect -visitor's mobile device class (if that’s tablet or mobile device like smartphone). Made by Alexander Tretyak. - -**Other** - -* [PageCache](https://github.com/mmamedov/page-cache) is a lightweight PHP library for full page cache, -with built-in Mobile-Detect support. Made by [Muhammed Mamedov](https://github.com/mmamedov). - -* [Statamic CMS Mobile Detect](https://github.com/haikulab/statamic-mobile-detect) is a plugin. -Made by [Sergei Filippov](https://github.com/haikulab/statamic-mobile-detect) of Haiku Lab. - -* [Kohana Mobile Detect](https://github.com/madeinnordeste/kohana-mobile-detect) is an example of implementation of -Mobile_Detect class with Kohana framework. -Written by [Luiz Alberto S. Ribeiro](https://github.com/madeinnordeste). - -* [MemHT](https://www.memht.com) is a Free PHP CMS and Blog that permit the creation and the management online -of websites with few and easy steps. Has the class included in the core. - -* [concrete5](https://www.concrete5.org) is a CMS that is free and open source. The library is included in the core. - -* [engine7](https://github.com/QOXCorp/exengine) is PHP Open Source Framework. The Mobile_Detect class is included in -the engine. - -* [Zikula](http://zikula.org) is a free and open-source Content Management Framework, which allows you to run -impressive websites and build powerful online applications. The core uses Mobile-Detect to switch to a special -Mobile theme, using jQueryMobile. - -* [UserAgentInfo](https://github.com/quentin389/UserAgentInfo) is a PHP class for parsing user agent strings -(HTTP_USER_AGENT). Includes mobile checks, bot checks, browser types/versions and more. -Based on browscap, Mobile_Detect and ua-parser. Created for high traffic websites and fast batch processing. -Made by [quentin389](https://github.com/quentin389). - -* [LJ Mobile Detect](https://github.com/lewisjenkins/craft-lj-mobiledetect) is a simple implementation of Mobile Detect -for Craft CMS. Made by [Lewis Jenkins](https://github.com/lewisjenkins). - -* [Detect Craft](https://github.com/mmikkel/Detect-Craft) is a Craft CMS wrapper for the Mobile_Detect library. Made by [Mikkel Rummelhoff](https://github.com/mmikkel). - -* [Grav Plugin Mobile Detect](https://github.com/dimitrilongo/grav-plugin-mobile-detect/) is a simple implementation -of Mobile Detect for Grav CMS. Made by [Dimitri Longo](https://github.com/dimitrilongo). - -* [Mobile_Detect module for UliCMS](https://github.com/derUli/ulicms-Mobile_Detect). -Made by [derUli](https://github.com/derUli). - -**Perl** - - * [MobileDetect.pm](https://www.buzzerstar.com/development/) is a Perl module for Mobile Detect. - Made by [Sebastian Enger](https://devop.tools/). - -**Python** - -* [pymobiledetect](https://pypi.python.org/pypi/pymobiledetect) - Mobile detect python package. -Made by Bas van Oostveen. - -**Ruby** - -* [mobile_detect.rb](https://github.com/ktaragorn/mobile_detect) is a Ruby gem using the JSON data exposed by the -php project and implementing a basic subset of the API (as much as can be done by the exposed data). -Made by [Karthik T](https://github.com/ktaragorn). - -**Go** - -* [GoMobileDetect](https://github.com/Shaked/gomobiledetect) is a Go port of Mobile Detect class. -Made by [https://github.com/Shaked](Shaked). - - -**LUA** - -* [ua-lua](https://github.com/robinef/ua-lua) is a small lib written in LUA providing device type detection. -ua-lua is detecting mobile or tablet devices based on user-agent inside nginx daemon. -Made by [Frédéric Robinet](https://github.com/robinef). - -**.Net** - -* [mobile-detect](https://github.com/validide/mobile-detect) is a .Net partial port written in C#. -Made by [Valentin Dide](https://github.com/validide). - -**ColdFusion** - -* [MobileDetect](https://github.com/GiancarloGomez/ColdFusion-MobileDetect) is a CFC port of the -Mobile_Detect PHP Library. Made by [Giancarlo Gomez](https://github.com/GiancarloGomez). - -**Experiments** :bulb: - -* [Mobile Detect Fast](https://bitbucket.org/lanaguani/mobile-detect-fast/) (See: [#474](https://github.com/serbanghita/Mobile-Detect/issues/474)) is a class to increase the performance of Mobile Detect lib. Made by [LanaGuani](https://github.com/lanaguanifw). diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.json b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.json deleted file mode 100644 index 25cd99a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "mobiledetect/mobiledetectlib", - "type": "library", - "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", - "keywords": ["mobile", "mobile detect", "mobile detector", "php mobile detect", "detect mobile devices"], - "homepage": "https://github.com/serbanghita/Mobile-Detect", - "license": "MIT", - "authors": [ - { - "name": "Serban Ghita", - "email": "serbanghita@gmail.com", - "homepage": "http://mobiledetect.net", - "role": "Developer" - } - ], - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.35||~5.7" - }, - "autoload": { - "classmap": ["Mobile_Detect.php"], - "psr-0": { - "Detection": "namespaced/" - } - }, - "archive": { - "exclude": ["docs", "examples", "export"] - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.lock b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.lock deleted file mode 100644 index 2e39472..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/composer.lock +++ /dev/null @@ -1,983 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "4a5fd4cd7cc7247a6df7411b031d4845", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14T21:17:01+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2016-01-25T08:17:30+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.7.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", - "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2017-11-24T13:59:53+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.12", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-12-04T08:55:13+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.36", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-06-21T08:07:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2017-05-22T07:24:03+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "symfony/yaml", - "version": "v2.8.32", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "968ef42161e4bc04200119da473077f9e7015128" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/968ef42161e4bc04200119da473077f9e7015128", - "reference": "968ef42161e4bc04200119da473077f9e7015128", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-11-29T09:33:18+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.0.0" - }, - "platform-dev": [] -} diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docker-compose.yml b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docker-compose.yml deleted file mode 100644 index 58ce75e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -app: - restart: 'on-failure' - image: php:7 - working_dir: /app - command: vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text --strict-coverage --stop-on-risky - ports: - - "8000:8000" - volumes: - - .:/app - -composer: - restart: 'no' - image: composer/composer:php7 - command: install - volumes: - - .:/app \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/CONTRIBUTING.md b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/CONTRIBUTING.md deleted file mode 100644 index 01a266e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/CONTRIBUTING.md +++ /dev/null @@ -1,48 +0,0 @@ -**Reporting issues** - -1. Specify the User-agent by visiting [http://demo.mobiledetect.net](http://demo.mobiledetect.net). -1. Specify the expected behaviour. - -**Developing** - -1. Fork Mobile Detect repository. See ["How to fork"](https://help.github.com/articles/fork-a-repo/#fork-an-example-repository) example. -1. `git clone https://github.com/[yourname]/Mobile-Detect.git` -1. `git add remote serbanghita https://github.com/serbanghita/Mobile-Detect.git` -1. `git remote -v` - You should see: - ``` - origin git@github.com:serbanghita/Mobile-Detect.git - serbanghita https://github.com/serbanghita/Mobile-Detect.git - ``` -1. `git checkout -b devel origin/devel` -1. `composer install` -1. Start working on your changes. - 1. If you add new methods or make structural changes to the `Mobile_Detect.php` class - you need to add unit tests! - 1. If you add new regexes make sure you commit the User-Agents in [`tests/providers/vendors`](https://github.com/serbanghita/Mobile-Detect/tree/master/tests/providers/vendors) -1. Run tests `vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text --strict-coverage --stop-on-risky` -1. `git status` or `git diff` - inspect your changes -1 `git stage .` -1. `git commit -m "[your commit message here]` -1. `git push origin devel` -1. Go to your repo on GitHub and ["Submit the PR"](https://help.github.com/articles/about-pull-requests/) - -**New module, plugin, plugin or port** - -[Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.) - including the following information: -* Module name -* Description -* Link -* Author - -Or you can submit a PR against `README.md`. - -**Website updates** - -1. Our official website is hosted at [http://mobiledetect.net](http://mobiledetect.net). -1. The files are found on the `gh-pages` branch. -1. `git checkout gh-pages` -1. `npm install -g browser-sync` -1. `browser-sync start --s . --f . --port 3000 --reload-debounce 1500 --no-ui` -1. Go to `http://localhost:3000` and make changes. -1. Commit, push and submit the PR against `serbanghita:gh-pages`. \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/HISTORY.md b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/HISTORY.md deleted file mode 100644 index 3483985..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/HISTORY.md +++ /dev/null @@ -1,11 +0,0 @@ -The first version of the script was developed in 2009 and it was hosted at https://code.google.com/p/php-mobile-detect/, it was a small project with around 30 stars. (Original blog post by Victor: http://victorstanciu.ro/detectarea-platformelor-mobile-in-php/) - -In December 2011 it received a major update from the first version, an important number of issues were fixed, then 2.0 was launched. The new version marks a new mindset and also featuring tablet detection. - -Throughout 2012 the script has been updated constantly and we have received tons of feedback and requests. - -In July 2012 we moved the repository from Google Code to GitHub in order to quickly accommodate the frequent updates and to involve more people. - -In August 2013 the library has 1800+ stargazers and support for: composer, PHPUnit tests, PSR standards and a new webpage http://mobiledetect.net - -Mobile Detect library and user contributions are MIT Licensed. diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/ISSUE_TEMPLATE.md b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/ISSUE_TEMPLATE.md deleted file mode 100644 index 8d6384f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,15 +0,0 @@ --------------delete this message------------- -* By submitting a new issue I acknowledge that I already read the README, CODE EXAMPLES and KNOWN LIMITATIONS. -* I understand that the current version `2.x` is only meant to detect `mobile` devices. -* Please post your User-Agent string! On a real device/s, the library is expected to work correctly. --------------delete this message------------- - - - -**Issue description** - - -**User-Agent(s)** - - -**Suggestions** \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md deleted file mode 100644 index 1d761e3..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md +++ /dev/null @@ -1,12 +0,0 @@ -**Known limitations** - -* Mobile Detect script was designed to detect `mobile` devices. Implicitly other devices are considered to be `desktop`. -* User-Agent and HTTP headers sniffing is a non reliable method of detecting a mobile device. -* If the mobile browser is set on `Desktop mode`, the Mobile Detect script has no way of knowing that the device is `mobile`. -* Some touchscreen devices (eg. Microsoft Surface) are tough to detect as mobile since they can be used in a laptop mode. See: [#32](https://github.com/serbanghita/Mobile-Detect/issues/32), [#461](https://github.com/serbanghita/Mobile-Detect/issues/461), [#667](https://github.com/serbanghita/Mobile-Detect/issues/667) -* Some mobile devices (eg. IPadOS, Google Pixel Slate). See: [#795](https://github.com/serbanghita/Mobile-Detect/issues/795), [#788](https://github.com/serbanghita/Mobile-Detect/issues/788) -* Detecting the device brand (eg. Apple, Samsung, HTC) is not 100% reliable. -* We don't monitor the quality of the 3rd party tools based on Mobile Detect script. -We cannot guarantee that they are using the class properly or if they provide the latest version. -* Version `2.x` is made to be PHP 5.3 compatible because of the backward compatibility changes of PHP. -* There are hundreds of devices launched every month, we cannot keep a 100% up to date detection rate. \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php deleted file mode 100644 index e2c72ae..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php +++ /dev/null @@ -1,67 +0,0 @@ - $detect->getScriptVersion(), - - // All headers that trigger 'isMobile' to be 'true', - // before reaching the User-Agent match detection. - 'headerMatch' => $detect->getMobileHeaders(), - - // All possible User-Agent headers. - 'uaHttpHeaders' => $detect->getUaHttpHeaders(), - - // All the regexes that trigger 'isMobile' or 'isTablet' - // to be true. - 'uaMatch' => array( - // If match is found, triggers 'isMobile' to be true. - 'phones' => $detect->getPhoneDevices(), - // Triggers 'isTablet' to be true. - 'tablets' => $detect->getTabletDevices(), - // If match is found, triggers 'isMobile' to be true. - 'browsers' => $detect->getBrowsers(), - // If match is found, triggers 'isMobile' to be true. - 'os' => $detect->getOperatingSystems(), - // Various utilities. To be further discussed. - 'utilities' => $detect->getUtilities() - ) -); - -$fileName = dirname(__FILE__).'/../Mobile_Detect.json'; -// Write the JSON file to disk.11 -// You can import this file in your app. -if (file_put_contents( - $fileName, - function_exists('json_format') ? json_format($json) : json_encode($json) -)) { - echo 'Done. Check '.realpath($fileName).' file.'; -} -else { - echo 'Failed to write '.realpath($fileName).' to disk.'; -} diff --git a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php b/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php deleted file mode 100644 index ca7efec..0000000 --- a/woocommerce-qenta-checkout-page/vendor/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php +++ /dev/null @@ -1,22 +0,0 @@ - - - The PSR-2 coding standard extended. - - - - - - - - - - error - - - - - - - \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-client/CHANGELOG.md b/woocommerce-qenta-checkout-page/vendor/psr/http-client/CHANGELOG.md deleted file mode 100644 index e2dc25f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-client/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - -Allow installation with PHP 8. No code changes. - -## 1.0.0 - -First stable release. No changes since 0.3.0. - -## 0.3.0 - -Added Interface suffix on exceptions - -## 0.2.0 - -All exceptions are in `Psr\Http\Client` namespace - -## 0.1.0 - -First release diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-client/LICENSE b/woocommerce-qenta-checkout-page/vendor/psr/http-client/LICENSE deleted file mode 100644 index cd5e002..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-client/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-client/README.md b/woocommerce-qenta-checkout-page/vendor/psr/http-client/README.md deleted file mode 100644 index 6876b84..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-client/README.md +++ /dev/null @@ -1,12 +0,0 @@ -HTTP Client -=========== - -This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url]. - -Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: http://www.php-fig.org/psr/psr-18 -[package-url]: https://packagist.org/packages/psr/http-client -[implementation-url]: https://packagist.org/providers/psr/http-client-implementation diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-client/composer.json b/woocommerce-qenta-checkout-page/vendor/psr/http-client/composer.json deleted file mode 100644 index c195f8f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-client/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "psr/http-client", - "description": "Common interface for HTTP clients", - "keywords": ["psr", "psr-18", "http", "http-client"], - "homepage": "https://github.com/php-fig/http-client", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-client/src/ClientExceptionInterface.php b/woocommerce-qenta-checkout-page/vendor/psr/http-client/src/ClientExceptionInterface.php deleted file mode 100644 index aa0b9cf..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-client/src/ClientExceptionInterface.php +++ /dev/null @@ -1,10 +0,0 @@ -=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/MessageInterface.php b/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/MessageInterface.php deleted file mode 100644 index dd46e5e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/MessageInterface.php +++ /dev/null @@ -1,187 +0,0 @@ -getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * // Emit headers iteratively: - * foreach ($message->getHeaders() as $name => $values) { - * foreach ($values as $value) { - * header(sprintf('%s: %s', $name, $value), false); - * } - * } - * - * While header names are not case-sensitive, getHeaders() will preserve the - * exact case in which headers were originally specified. - * - * @return string[][] Returns an associative array of the message's headers. Each - * key MUST be a header name, and each value MUST be an array of strings - * for that header. - */ - public function getHeaders(); - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $name Case-insensitive header field name. - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader($name); - - /** - * Retrieves a message header value by the given case-insensitive name. - * - * This method returns an array of all the header values of the given - * case-insensitive header name. - * - * If the header does not appear in the message, this method MUST return an - * empty array. - * - * @param string $name Case-insensitive header field name. - * @return string[] An array of string values as provided for the given - * header. If the header does not appear in the message, this method MUST - * return an empty array. - */ - public function getHeader($name); - - /** - * Retrieves a comma-separated string of the values for a single header. - * - * This method returns all of the header values of the given - * case-insensitive header name as a string concatenated together using - * a comma. - * - * NOTE: Not all header values may be appropriately represented using - * comma concatenation. For such headers, use getHeader() instead - * and supply your own delimiter when concatenating. - * - * If the header does not appear in the message, this method MUST return - * an empty string. - * - * @param string $name Case-insensitive header field name. - * @return string A string of values as provided for the given header - * concatenated together using a comma. If the header does not appear in - * the message, this method MUST return an empty string. - */ - public function getHeaderLine($name); - - /** - * Return an instance with the provided value replacing the specified header. - * - * While header names are case-insensitive, the casing of the header will - * be preserved by this function, and returned from getHeaders(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new and/or updated header and value. - * - * @param string $name Case-insensitive header field name. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withHeader($name, $value); - - /** - * Return an instance with the specified header appended with the given value. - * - * Existing values for the specified header will be maintained. The new - * value(s) will be appended to the existing list. If the header did not - * exist previously, it will be added. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new header and/or value. - * - * @param string $name Case-insensitive header field name to add. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withAddedHeader($name, $value); - - /** - * Return an instance without the specified header. - * - * Header resolution MUST be done without case-sensitivity. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the named header. - * - * @param string $name Case-insensitive header field name to remove. - * @return static - */ - public function withoutHeader($name); - - /** - * Gets the body of the message. - * - * @return StreamInterface Returns the body as a stream. - */ - public function getBody(); - - /** - * Return an instance with the specified message body. - * - * The body MUST be a StreamInterface object. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return a new instance that has the - * new body stream. - * - * @param StreamInterface $body Body. - * @return static - * @throws \InvalidArgumentException When the body is not valid. - */ - public function withBody(StreamInterface $body); -} diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/RequestInterface.php b/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/RequestInterface.php deleted file mode 100644 index a96d4fd..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/RequestInterface.php +++ /dev/null @@ -1,129 +0,0 @@ -getQuery()` - * or from the `QUERY_STRING` server param. - * - * @return array - */ - public function getQueryParams(); - - /** - * Return an instance with the specified query string arguments. - * - * These values SHOULD remain immutable over the course of the incoming - * request. They MAY be injected during instantiation, such as from PHP's - * $_GET superglobal, or MAY be derived from some other value such as the - * URI. In cases where the arguments are parsed from the URI, the data - * MUST be compatible with what PHP's parse_str() would return for - * purposes of how duplicate query parameters are handled, and how nested - * sets are handled. - * - * Setting query string arguments MUST NOT change the URI stored by the - * request, nor the values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated query string arguments. - * - * @param array $query Array of query string arguments, typically from - * $_GET. - * @return static - */ - public function withQueryParams(array $query); - - /** - * Retrieve normalized file upload data. - * - * This method returns upload metadata in a normalized tree, with each leaf - * an instance of Psr\Http\Message\UploadedFileInterface. - * - * These values MAY be prepared from $_FILES or the message body during - * instantiation, or MAY be injected via withUploadedFiles(). - * - * @return array An array tree of UploadedFileInterface instances; an empty - * array MUST be returned if no data is present. - */ - public function getUploadedFiles(); - - /** - * Create a new instance with the specified uploaded files. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param array $uploadedFiles An array tree of UploadedFileInterface instances. - * @return static - * @throws \InvalidArgumentException if an invalid structure is provided. - */ - public function withUploadedFiles(array $uploadedFiles); - - /** - * Retrieve any parameters provided in the request body. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, this method MUST - * return the contents of $_POST. - * - * Otherwise, this method may return any results of deserializing - * the request body content; as parsing returns structured content, the - * potential types MUST be arrays or objects only. A null value indicates - * the absence of body content. - * - * @return null|array|object The deserialized body parameters, if any. - * These will typically be an array or object. - */ - public function getParsedBody(); - - /** - * Return an instance with the specified body parameters. - * - * These MAY be injected during instantiation. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, use this method - * ONLY to inject the contents of $_POST. - * - * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of - * deserializing the request body content. Deserialization/parsing returns - * structured data, and, as such, this method ONLY accepts arrays or objects, - * or a null value if nothing was available to parse. - * - * As an example, if content negotiation determines that the request data - * is a JSON payload, this method could be used to create a request - * instance with the deserialized parameters. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param null|array|object $data The deserialized body data. This will - * typically be in an array or object. - * @return static - * @throws \InvalidArgumentException if an unsupported argument type is - * provided. - */ - public function withParsedBody($data); - - /** - * Retrieve attributes derived from the request. - * - * The request "attributes" may be used to allow injection of any - * parameters derived from the request: e.g., the results of path - * match operations; the results of decrypting cookies; the results of - * deserializing non-form-encoded message bodies; etc. Attributes - * will be application and request specific, and CAN be mutable. - * - * @return array Attributes derived from the request. - */ - public function getAttributes(); - - /** - * Retrieve a single derived request attribute. - * - * Retrieves a single derived request attribute as described in - * getAttributes(). If the attribute has not been previously set, returns - * the default value as provided. - * - * This method obviates the need for a hasAttribute() method, as it allows - * specifying a default value to return if the attribute is not found. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $default Default value to return if the attribute does not exist. - * @return mixed - */ - public function getAttribute($name, $default = null); - - /** - * Return an instance with the specified derived request attribute. - * - * This method allows setting a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $value The value of the attribute. - * @return static - */ - public function withAttribute($name, $value); - - /** - * Return an instance that removes the specified derived request attribute. - * - * This method allows removing a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @return static - */ - public function withoutAttribute($name); -} diff --git a/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/StreamInterface.php b/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/StreamInterface.php deleted file mode 100644 index f68f391..0000000 --- a/woocommerce-qenta-checkout-page/vendor/psr/http-message/src/StreamInterface.php +++ /dev/null @@ -1,158 +0,0 @@ - - * [user-info@]host[:port] - * - * - * If the port component is not set or is the standard port for the current - * scheme, it SHOULD NOT be included. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.2 - * @return string The URI authority, in "[user-info@]host[:port]" format. - */ - public function getAuthority(); - - /** - * Retrieve the user information component of the URI. - * - * If no user information is present, this method MUST return an empty - * string. - * - * If a user is present in the URI, this will return that value; - * additionally, if the password is also present, it will be appended to the - * user value, with a colon (":") separating the values. - * - * The trailing "@" character is not part of the user information and MUST - * NOT be added. - * - * @return string The URI user information, in "username[:password]" format. - */ - public function getUserInfo(); - - /** - * Retrieve the host component of the URI. - * - * If no host is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.2.2. - * - * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 - * @return string The URI host. - */ - public function getHost(); - - /** - * Retrieve the port component of the URI. - * - * If a port is present, and it is non-standard for the current scheme, - * this method MUST return it as an integer. If the port is the standard port - * used with the current scheme, this method SHOULD return null. - * - * If no port is present, and no scheme is present, this method MUST return - * a null value. - * - * If no port is present, but a scheme is present, this method MAY return - * the standard port for that scheme, but SHOULD return null. - * - * @return null|int The URI port. - */ - public function getPort(); - - /** - * Retrieve the path component of the URI. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * Normally, the empty path "" and absolute path "/" are considered equal as - * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically - * do this normalization because in contexts with a trimmed base path, e.g. - * the front controller, this difference becomes significant. It's the task - * of the user to handle both "" and "/". - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.3. - * - * As an example, if the value should include a slash ("/") not intended as - * delimiter between path segments, that value MUST be passed in encoded - * form (e.g., "%2F") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.3 - * @return string The URI path. - */ - public function getPath(); - - /** - * Retrieve the query string of the URI. - * - * If no query string is present, this method MUST return an empty string. - * - * The leading "?" character is not part of the query and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.4. - * - * As an example, if a value in a key/value pair of the query string should - * include an ampersand ("&") not intended as a delimiter between values, - * that value MUST be passed in encoded form (e.g., "%26") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.4 - * @return string The URI query string. - */ - public function getQuery(); - - /** - * Retrieve the fragment component of the URI. - * - * If no fragment is present, this method MUST return an empty string. - * - * The leading "#" character is not part of the fragment and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.5. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.5 - * @return string The URI fragment. - */ - public function getFragment(); - - /** - * Return an instance with the specified scheme. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. - * - * Implementations MUST support the schemes "http" and "https" case - * insensitively, and MAY accommodate other schemes if required. - * - * An empty scheme is equivalent to removing the scheme. - * - * @param string $scheme The scheme to use with the new instance. - * @return static A new instance with the specified scheme. - * @throws \InvalidArgumentException for invalid or unsupported schemes. - */ - public function withScheme($scheme); - - /** - * Return an instance with the specified user information. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified user information. - * - * Password is optional, but the user information MUST include the - * user; an empty string for the user is equivalent to removing user - * information. - * - * @param string $user The user name to use for authority. - * @param null|string $password The password associated with $user. - * @return static A new instance with the specified user information. - */ - public function withUserInfo($user, $password = null); - - /** - * Return an instance with the specified host. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified host. - * - * An empty host value is equivalent to removing the host. - * - * @param string $host The hostname to use with the new instance. - * @return static A new instance with the specified host. - * @throws \InvalidArgumentException for invalid hostnames. - */ - public function withHost($host); - - /** - * Return an instance with the specified port. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified port. - * - * Implementations MUST raise an exception for ports outside the - * established TCP and UDP port ranges. - * - * A null value provided for the port is equivalent to removing the port - * information. - * - * @param null|int $port The port to use with the new instance; a null value - * removes the port information. - * @return static A new instance with the specified port. - * @throws \InvalidArgumentException for invalid ports. - */ - public function withPort($port); - - /** - * Return an instance with the specified path. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified path. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * If the path is intended to be domain-relative rather than path relative then - * it must begin with a slash ("/"). Paths not starting with a slash ("/") - * are assumed to be relative to some base path known to the application or - * consumer. - * - * Users can provide both encoded and decoded path characters. - * Implementations ensure the correct encoding as outlined in getPath(). - * - * @param string $path The path to use with the new instance. - * @return static A new instance with the specified path. - * @throws \InvalidArgumentException for invalid paths. - */ - public function withPath($path); - - /** - * Return an instance with the specified query string. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified query string. - * - * Users can provide both encoded and decoded query characters. - * Implementations ensure the correct encoding as outlined in getQuery(). - * - * An empty query string value is equivalent to removing the query string. - * - * @param string $query The query string to use with the new instance. - * @return static A new instance with the specified query string. - * @throws \InvalidArgumentException for invalid query strings. - */ - public function withQuery($query); - - /** - * Return an instance with the specified URI fragment. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified URI fragment. - * - * Users can provide both encoded and decoded fragment characters. - * Implementations ensure the correct encoding as outlined in getFragment(). - * - * An empty fragment value is equivalent to removing the fragment. - * - * @param string $fragment The fragment to use with the new instance. - * @return static A new instance with the specified fragment. - */ - public function withFragment($fragment); - - /** - * Return the string representation as a URI reference. - * - * Depending on which components of the URI are present, the resulting - * string is either a full URI or relative reference according to RFC 3986, - * Section 4.1. The method concatenates the various components of the URI, - * using the appropriate delimiters: - * - * - If a scheme is present, it MUST be suffixed by ":". - * - If an authority is present, it MUST be prefixed by "//". - * - The path can be concatenated without delimiters. But there are two - * cases where the path has to be adjusted to make the URI reference - * valid as PHP does not allow to throw an exception in __toString(): - * - If the path is rootless and an authority is present, the path MUST - * be prefixed by "/". - * - If the path is starting with more than one "/" and no authority is - * present, the starting slashes MUST be reduced to one. - * - If a query is present, it MUST be prefixed by "?". - * - If a fragment is present, it MUST be prefixed by "#". - * - * @see http://tools.ietf.org/html/rfc3986#section-4.1 - * @return string - */ - public function __toString(); -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.github/workflows/phpunit.yml b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.github/workflows/phpunit.yml deleted file mode 100644 index 0651092..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.github/workflows/phpunit.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: CI - -on: [push] - -jobs: - build-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: php-actions/composer@v1 - - name: Setup PHP - uses: shivammathur/setup-php@2.7.0 - with: - php-version: '7.3' - tools: phpunit - extension: mbstring, intl, simplexml, dom, - ini-values: post_max_size=256M, short_open_tag=On - coverage: xdebug - pecl: false - - - name: Run tests - run: phpunit -c tests/configuration.xml diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.gitignore b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.gitignore deleted file mode 100644 index 8e371ff..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.idea/ -composer.phar -composer.lock -composer.phar -vendor diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/LICENSE b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/LICENSE deleted file mode 100644 index 23cb790..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {description} - Copyright (C) {year} {fullname} - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - {signature of Ty Coon}, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/README.md b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/README.md deleted file mode 100644 index 8ca7467..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# checkout-client-library - -[![License](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://raw.githubusercontent.com/qenta-cee/checkout-client-library/master/LICENSE) -[![PHP v7.2](https://img.shields.io/badge/php-v7.2-green.svg)](http://www.php.net) -[![PHP v7.3](https://img.shields.io/badge/php-v7.3-green.svg)](http://www.php.net) -[![PHP v7.4](https://img.shields.io/badge/php-v7.4-green.svg)](http://www.php.net) - -Client library used by QENTA Checkout Page and Seamless plugins for payment processing. diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/composer.json b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/composer.json deleted file mode 100755 index ec68cdb..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "qenta/checkout-client-library", - "license": "GPL-2.0", - "type": "library", - "description": "QENTA Client Library for Checkout Page and Checkout Seamless", - "keywords": ["QENTA", "checkout", "page", "seamless", "payment"], - "homepage": "https://www.qenta-cee.at", - "support": { - "email": "support@qenta.com", - "docs": "https://guides.qenta.com" - }, - "require": { - "php": "~7.2.5|~7.3.0|~7.4.0", - "guzzlehttp/guzzle": "^7.2", - "mobiledetect/mobiledetectlib": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^8.0" - }, - "autoload": { - "psr-0": { - "QentaCEE": "library" - } - }, - "prefer-stable" : true -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/BackendClient.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/BackendClient.php deleted file mode 100644 index 1c3337c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/BackendClient.php +++ /dev/null @@ -1,619 +0,0 @@ -_fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - //if no config was sent fallback to default config file - if (is_null($config)) { - $config = QentaCEE_QMore_Module::getConfig(); - } - - if (is_array($config) && isset( $config['QentaCEEQMoreConfig'] )) { - // we only need the QentaCEEQMoreConfig here - $config = $config['QentaCEEQMoreConfig']; - } - - // let's store configuration details in internal objects - $this->oUserConfig = is_object($config) ? $config : new QentaCEE_Stdlib_Config($config); - $this->oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_QMore_Module::getClientConfig()); - - // now let's check if the CUSTOMER_ID, SHOP_ID, LANGUAGE and SECRET - // exist in $this->oUserConfig object that we created from config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - $sPassword = isset( $this->oUserConfig->PASSWORD ) ? trim($this->oUserConfig->PASSWORD) : null; - - // If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || is_null($sCustomerId)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sLanguage ) || is_null($sLanguage)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sSecret ) || is_null($sSecret)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sPassword ) || is_null($sPassword)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('PASSWORD passed to %s is invalid.', - __METHOD__)); - } - - // everything ok! let's set the fields - $this->_setField(self::CUSTOMER_ID, $sCustomerId); - $this->_setField(self::SHOP_ID, $sShopId); - $this->_setField(self::LANGUAGE, $sLanguage); - $this->_setField(self::PASSWORD, $sPassword); - - $this->_setSecret($sSecret); - } - - public function getFinancialInstitutions($paymentType, $bankCountry = null, $transactionType = 'ONLINE') - { - $this->_requestData[self::COMMAND] = self::$COMMAND_GET_FINANCIAL_INSTITUTIONS; - $this->_setField(self::PAYMENTTYPE, $paymentType); - - $order = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::PAYMENTTYPE, - ); - - if (strlen($transactionType)) { - $this->_setField(self::TRANSACTIONTYPE, $transactionType); - $order[] = self::TRANSACTIONTYPE; - } - - if (strlen($bankCountry)) { - $this->_setField(self::BANKCOUNTRY, $bankCountry); - $order[] = self::BANKCOUNTRY; - } - - $this->_fingerprintOrder->setOrder($order); - - return new QentaCEE_QMore_Response_Backend_GetFinancialInstitutions($this->_send()); - } - - /** - * Refund - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_Refund - */ - public function refund($iOrderNumber, $iAmount, $sCurrency, $basket=null) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_REFUND; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::AMOUNT, $iAmount); - $this->_setField(self::CURRENCY, strtoupper($sCurrency)); - $this->_setBasket($basket); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER, - self::AMOUNT, - self::CURRENCY - )); - $this->_appendBasketFingerprintOrder($basket); - - return new QentaCEE_QMore_Response_Backend_Refund($this->_send()); - } - - /** - * Refund reversal - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_RefundReversal - */ - public function refundReversal($iOrderNumber, $iCreditNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_REFUND_REVERSAL; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::CREDIT_NUMBER, $iCreditNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER, - self::CREDIT_NUMBER - )); - - return new QentaCEE_QMore_Response_Backend_RefundReversal($this->_send()); - } - - /** - * Recur payment - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_RecurPayment - */ - public function recurPayment( - $iSourceOrderNumber, - $iAmount, - $sCurrency, - $sOrderDescription, - $iOrderNumber = null, - $bDepositFlag = null - ) { - $this->_requestData[self::COMMAND] = self::$COMMAND_RECUR_PAYMENT; - - if (!is_null($iOrderNumber)) { - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - } - - $this->_setField(self::SOURCE_ORDER_NUMBER, $iSourceOrderNumber); - $this->_setField(self::AMOUNT, $iAmount); - $this->_setField(self::CURRENCY, strtoupper($sCurrency)); - - if (!is_null($bDepositFlag)) { - $this->_setField(self::AUTO_DEPOSIT, $bDepositFlag ? self::$BOOL_TRUE : self::$BOOL_FALSE); - } - - $this->_setField(self::ORDER_DESCRIPTION, $sOrderDescription); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER, - self::SOURCE_ORDER_NUMBER, - self::AUTO_DEPOSIT, - self::ORDER_DESCRIPTION, - self::AMOUNT, - self::CURRENCY - )); - - return new QentaCEE_QMore_Response_Backend_RecurPayment($this->_send()); - } - - /** - * Returns order details - * - * @param int $iOrderNumber - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_GetOrderDetails - */ - public function getOrderDetails($iOrderNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_GET_ORDER_DETAILS; - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER - )); - - return new QentaCEE_QMore_Response_Backend_GetOrderDetails($this->_send()); - } - - /** - * Approve reversal - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_ApproveReversal - */ - public function approveReversal($iOrderNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_APPROVE_REVERSAL; - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER - )); - - return new QentaCEE_QMore_Response_Backend_ApproveReversal($this->_send()); - } - - /** - * Deposit - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_Deposit - */ - public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket=null) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::AMOUNT, $iAmount); - $this->_setField(self::CURRENCY, strtoupper($sCurrency)); - $this->_setBasket($basket); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER, - self::AMOUNT, - self::CURRENCY - )); - $this->_appendBasketFingerprintOrder($basket); - - return new QentaCEE_QMore_Response_Backend_Deposit($this->_send()); - } - - /** - * Deposit reversal - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QMore_Response_Backend_DepositReversal - */ - public function depositReversal($iOrderNumber, $iPaymentNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT_REVERSAL; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::PAYMENT_NUMBER, $iPaymentNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE, - self::ORDER_NUMBER, - self::PAYMENT_NUMBER - )); - - return new QentaCEE_QMore_Response_Backend_DepositReversal($this->_send()); - } - - /** - * TransferFund - * - * @throws QentaCEE_Stdlib_Exception_InvalidTypeException - * @return QentaCEE_QMore_Request_Backend_TransferFund - */ - public function transferFund($fundTransferType) - { - - switch ($fundTransferType) { - case self::$TRANSFER_FUND_TYPE_EXISTING: - $client = new QentaCEE_QMore_Request_Backend_TransferFund_Existing($this->oUserConfig); - break; - - case self::$TRANSFER_FUND_TYPE_SKIRLLWALLET: - $client = new QentaCEE_QMore_Request_Backend_TransferFund_SkrillWallet($this->oUserConfig); - break; - - case self::$TRANSFER_FUND_TYPE_MONETA: - $client = new QentaCEE_QMore_Request_Backend_TransferFund_Moneta($this->oUserConfig); - break; - - case self::$TRANSFER_FUND_TYPE_SEPACT: - $client = new QentaCEE_QMore_Request_Backend_TransferFund_SepaCT($this->oUserConfig); - break; - - default: - throw new QentaCEE_Stdlib_Exception_InvalidTypeException('Invalid fundTransferType'); - } - - $client->setType($fundTransferType); - - return $client; - } - - /** - * ******************* - * PROTECTED METHODS * - * ******************* - */ - - /** - * Backend URL for POST-Requests - * - * @see QentaCEE_Stdlib_Client_ClientAbstract::_getRequestUrl() - * @return string - */ - protected function _getRequestUrl() - { - return $this->oClientConfig->BACKEND_URL . "/" . $this->_getField(self::COMMAND); - } - - /** - * getter for given field - * - * @param string $name - * - * @return string|null - */ - protected function _getField($name) - { - return array_key_exists($name, $this->_requestData) ? $this->_requestData[$name] : null; - } - - /** - * Returns the user agent string - * - * @return string - */ - protected function _getUserAgent() - { - return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/client.config.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/client.config.php deleted file mode 100644 index 9578743..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/client.config.php +++ /dev/null @@ -1,41 +0,0 @@ - 'https://checkout.wirecard.com/seamless/dataStorage', - 'FRONTEND_URL' => 'https://checkout.wirecard.com/seamless/frontend', - 'BACKEND_URL' => 'https://checkout.wirecard.com/seamless/backend', - 'MODULE_NAME' => 'QentaCEE_QMore', - 'MODULE_VERSION' => '3.3.0', - 'DEPENDENCIES' => array(), - 'USE_DEBUG' => false -); \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/user.config.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/user.config.php deleted file mode 100644 index f1677ce..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Config/user.config.php +++ /dev/null @@ -1,46 +0,0 @@ - Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => 'qmore', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en', - 'PASSWORD' => 'jcv45z' - ) -); diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Exception/ExceptionInterface.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Exception/ExceptionInterface.php deleted file mode 100644 index b0a91ae..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Exception/ExceptionInterface.php +++ /dev/null @@ -1,42 +0,0 @@ -_fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - //if no config was sent fallback to default config file - if (is_null($aConfig)) { - $aConfig = QentaCEE_QMore_Module::getConfig(); - } - - if (isset( $aConfig['QentaCEEQMoreConfig'] )) { - //we only need the QentaCEEQMoreConfig here - $aConfig = $aConfig['QentaCEEQMoreConfig']; - } - - //let's store configuration details in internal objects - $this->oUserConfig = new QentaCEE_Stdlib_Config($aConfig); - $this->oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_QMore_Module::getClientConfig()); - - //now let's check if the CUSTOMER_ID, SHOP_ID, LANGUAGE and SECRET exist in $this->oUserConfig object that we created from config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - - - //If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || is_null($sCustomerId)) { - throw new QentaCEE_QMore_DataStorage_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sLanguage ) || is_null($sLanguage)) { - throw new QentaCEE_QMore_DataStorage_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sSecret ) || is_null($sSecret)) { - throw new QentaCEE_QMore_DataStorage_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); - } - - //everything ok! let's set the fields - $this->_setField(self::CUSTOMER_ID, $sCustomerId); - $this->_setField(self::SHOP_ID, $sShopId); - $this->_setField(self::LANGUAGE, $sLanguage); - $this->_setSecret($sSecret); - } - - /** - * - * @param mixed $storageId - * - * @return QentaCEE_QMore_DataStorage_Response_Read - */ - public function read($storageId) - { - $this->_setField(self::STORAGE_ID, $storageId); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::STORAGE_ID, - self::SECRET - )); - - return new QentaCEE_QMore_DataStorage_Response_Read($this->_send()); - } - - /** - * @see QentaCEE_Stdlib_Client_ClientAbstract::_getRequestUrl() - * @return string - */ - protected function _getRequestUrl() - { - return $this->oClientConfig->DATA_STORAGE_URL . '/read'; - } - - /** - * Returns the user agent string - * - * @return string - */ - protected function _getUserAgent() - { - return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Initiation.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Initiation.php deleted file mode 100644 index b660ea4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Initiation.php +++ /dev/null @@ -1,93 +0,0 @@ -_getField(self::$STORAGE_ID) ) ? self::STATE_SUCCESS : self::STATE_FAILURE; - } - - /** - * getter for storageId returned by the dataStorage - * - * @return string - */ - public function getStorageId() - { - return $this->_getField(self::$STORAGE_ID); - } - - /** - * getter for javascriptUrl returned by the dataStorage - * - * the script behind this url is used by the shopsystem to save - * paymentInformation in the dataStorage - * - * @return string - */ - public function getJavascriptUrl() - { - return $this->_getField(self::$JAVASCRIPT_URL); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Read.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Read.php deleted file mode 100644 index e145aa2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorage/Response/Read.php +++ /dev/null @@ -1,237 +0,0 @@ -_getField(self::STORAGE_ID)) { - return ( $this->_getField(self::$PAYMENT_INFORMATION) ) ? self::STATE_NOT_EMPTY : self::STATE_EXISTING; - } else { - return ( $this->_getField(self::$ERRORS) ) ? self::STATE_FAILURE : self::STATE_NOT_EXISTING; - } - } - - /** - * getter for all stored anonymized paymentInformation - * - * @param string $paymentType - * - filter only one paymenttype - * - * @return mixed[] - */ - public function getPaymentInformation($paymentType = null) - { - $paymentInformation = $this->_getField(self::$PAYMENT_INFORMATION); - if (is_array($paymentInformation)) { - if (!is_null($paymentType)) { - $paymentType = strtoupper($paymentType); - foreach ($paymentInformation as $singlePaymentInformation) { - if ($singlePaymentInformation['paymentType'] == $paymentType) { - return $singlePaymentInformation; - } - } - - return Array(); - } else { - return $paymentInformation; - } - } else { - return Array(); - } - } - - /** - * Returns the number of payment information - * - * @return int - */ - public function getNumberOfPaymentInformation() - { - return $this->_getField(self::$PAYMENT_INFORMATIONS); - } - - /** - * Cheks if the given payment type has any payment information - * - * @param string $paymentType - * - * @return boolean - */ - public function hasPaymentInformation($paymentType) - { - $paymentInformation = $this->getPaymentInformation($paymentType); - - return !empty( $paymentInformation ); - } - - /** - * getter for storageId returned by the dataStorage - * - * @return string - */ - public function getStorageId() - { - return (string) $this->_getField(self::STORAGE_ID); - } - - /** - * getter for javascriptUrl returned by the dataStorage - * - * the script behind this url is used by the shopsystem to save - * paymentInformation in the dataStorage - * - * @return string - */ - public function getJavascriptUrl() - { - return (string) $this->_getField(self::JAVASCRIPT_URL); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorageClient.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorageClient.php deleted file mode 100644 index e23ae94..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/DataStorageClient.php +++ /dev/null @@ -1,504 +0,0 @@ -_fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - //if no config was sent fallback to default config file - if (is_null($config)) { - $config = QentaCEE_QMore_Module::getConfig(); - } - - if (isset( $config['QentaCEEQMoreConfig'] )) { - //we only need QentaCEEQMoreConfig here - $config = $config['QentaCEEQMoreConfig']; - } - - $this->oUserConfig = is_object($config) ? $config : new QentaCEE_Stdlib_Config($config); - $this->oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_QMore_Module::getClientConfig()); - - //now let's check if the CUSTOMER_ID, SHOP_ID, LANGUAGE and SECRET exist in config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - - //If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || is_null($sCustomerId)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sLanguage ) || is_null($sLanguage)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sSecret ) || is_null($sSecret)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); - } - - $this->_setField(self::SHOP_ID, $sShopId); - $this->_setField(self::CUSTOMER_ID, $sCustomerId); - $this->_setField(self::LANGUAGE, $sLanguage); - $this->_setSecret($sSecret); - } - - /** - * - * @return QentaCEE_QMore_DataStorage_Response_Initiation - */ - public function initiate() - { - $aMissingFields = new ArrayObject(); - - if (!$this->_isFieldSet(self::CUSTOMER_ID)) { - $aMissingFields->append(self::CUSTOMER_ID); - } - if (!$this->_isFieldSet(self::ORDER_IDENT)) { - $aMissingFields->append(self::ORDER_IDENT); - } - if (!$this->_isFieldSet(self::RETURN_URL)) { - $aMissingFields->append(self::RETURN_URL); - } - if (!$this->_isFieldSet(self::LANGUAGE)) { - $aMissingFields->append(self::LANGUAGE); - } - if (empty( $this->_secret )) { - $aMissingFields->append(self::SECRET); - } - - //Are there any errors in the $aMissingFields object? - //If so throw the InvalidArgumentException and print all the fields that are missing! - if ($aMissingFields->count()) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf("Could not initiate DataStorage! Missing mandatory field(s): %s; thrown in %s", - implode(", ", (array) $aMissingFields), __METHOD__)); - } - - if (!$this->_isFieldSet(self::JAVASCRIPT_SCRIPT_VERSION)) { - $this->setJavascriptScriptVersion(''); - } - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::ORDER_IDENT, - self::RETURN_URL, - self::LANGUAGE, - self::JAVASCRIPT_SCRIPT_VERSION, - self::SECRET - )); - - $this->oInitResponse = new QentaCEE_QMore_DataStorage_Response_Initiation($this->_send()); - - return $this->oInitResponse; - } - - /** - * - * @throws QentaCEE_QMore_Exception_InvalidArgumentException - */ - public function read() - { - $aMissingFields = new ArrayObject(); - - if (!$this->_isFieldSet(self::CUSTOMER_ID)) { - $aMissingFields->append(self::CUSTOMER_ID); - } - - // check if storageId has been set from outside. If not fallback to - // response and see if response can give us storageId - if (!$this->_isFieldSet(self::STORAGE_ID)) { - if (!$this->oInitResponse instanceof QentaCEE_QMore_DataStorage_Response_Initiation) { - throw new QentaCEE_QMore_Exception_BadMethodCallException(sprintf("StorageId hasn't been found. Use 'initiate()' or 'setStorageId()'! Thrown in %s", - __METHOD__)); - } - - $sStorageId = $this->oInitResponse->getStorageId(); - - if (empty( $sStorageId ) || is_null($sStorageId)) { - $aMissingFields->append(self::STORAGE_ID); - } else { - $this->setStorageId($sStorageId); - } - } - - //Are there any errors in the $aMissingFields object? - //If so throw the InvalidArgumentException and print all the fields that are missing! - if ($aMissingFields->count()) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf("Could not initiate DataStorage Read! Missing mandatory field(s): %s; thrown in %s", - implode(", ", (array) $aMissingFields), __METHOD__)); - } - - $_dataStorageRead = new QentaCEE_QMore_DataStorage_Request_Read($this->oUserConfig->toArray()); - $this->oDataStorageReadResponse = $_dataStorageRead->read($this->_requestData[self::STORAGE_ID]); - - return $this->oDataStorageReadResponse; - } - - - /** - * setter for parameter javascriptScriptVersion - * - * @param string $javascriptScriptVersion - * - * @return QentaCEE_QMore_DataStorageClient - */ - public function setJavascriptScriptVersion($javascriptScriptVersion) - { - $this->_setField(self::JAVASCRIPT_SCRIPT_VERSION, $javascriptScriptVersion); - - return $this; - } - - /** - * Setter for returnUrl - * - * @param string $sUrl - * - * @return QentaCEE_QMore_DataStorageClient - */ - public function setReturnUrl($sUrl) - { - $this->_setField(self::RETURN_URL, $sUrl); - - return $this; - } - - /** - * Setter for order identification - * (uniqueness of the order identification number must be provided by the merchant) - * - * @param string $sOrderIdent - * - * @return QentaCEE_QMore_DataStorageClient - */ - public function setOrderIdent($sOrderIdent) - { - $this->_setField(self::ORDER_IDENT, $sOrderIdent); - - return $this; - } - - /** - * - * @param string $sStorageId - * - * @return QentaCEE_QMore_DataStorageClient - */ - public function setStorageId($sStorageId) - { - $this->_setField(self::STORAGE_ID, $sStorageId); - - return $this; - } - - /** - * setter for parameter iframeCssUrl - * - * @param $iframeCssUrl - */ - public function setIframeCssUrl($iframeCssUrl) - { - $this->_setField(self::IFRAME_CSS_URL, $iframeCssUrl); - } - - /** - * setter for parameter showIssueDateFields - * - * @param $showIssueDateField - */ - public function setCreditCardShowIssueDateField($showIssueDateField) - { - $this->_setField(self::CREDITCARD_SHOW_ISSUE_DATEFIELD, $showIssueDateField ? 'true' : 'false'); - } - - /** - * setter for parameter showIssueNumberField - * - * @param $showIssueNumberField - */ - public function setCreditCardShowIssueNumberField($showIssueNumberField) - { - $this->_setField(self::CREDITCARD_SHOW_ISSUE_NUMBERFIELD, $showIssueNumberField ? 'true' : 'false'); - } - - /** - * setter for parameter showCardholderField - * - * @param $showCardholderField - */ - public function setCreditCardShowCardholderNameField($showCardholderField) - { - $this->_setField(self::CREDITCARD_SHOW_CARDHOLDER_NAMEFIELD, $showCardholderField ? 'true' : 'false'); - } - - /** - * setter for parameter showCvcField - * - * @param $showCvcField - */ - public function setCreditCardShowCvcField($showCvcField) - { - $this->_setField(self::CREDITCARD_SHOW_CVC_FIELD, $showCvcField ? 'true' : 'false'); - } - - /** - * setter for parameter creditcardPanPlaceholder - * - * @param $placeholder - */ - public function setCreditCardPanPlaceholder($placeholder) - { - $this->_setField(self::CREDITCARD_PAN_PLACEHOLDER, $placeholder); - } - - /** - * setter for parameter creditcardCvcPlaceholder - * - * @param $placeholder - */ - public function setCreditCardCvcPlaceholder($placeholder) - { - $this->_setField(self::CREDITCARD_CVC_PLACEHOLDER, $placeholder); - } - - /** - * setter for parameter creditcardCardholderNamePlaceholder - * - * @param $placeholder - */ - public function setCreditCardCardholderNamePlaceholder($placeholder) - { - $this->_setField(self::CREDITCARD_CARDHOLDERNAME_PLACEHOLDER, $placeholder); - } - - /** - * setter for parameter creditcardIssueNumberPlaceholder - * - * @param $placeholder - */ - public function setCreditCardCardIssueNumberPlaceholder($placeholder) - { - $this->_setField(self::CREDITCARD_ISSUENUMBER_PLACEHOLDER, $placeholder); - } - - /** - * setter for creditcardShowExpirationDatePlaceholder - * - * @param $showPlaceholder - */ - public function setCreditCardShowExpirationDatePlaceholder($showPlaceholder) - { - $this->_setField(self::CREDITCARD_SHOW_EXPIRATIONDATE_PLACEHOLDER, $showPlaceholder ? 'true' : 'false'); - } - - /** - * setter for creditcardShowIssueDatePlaceholder - * - * @param $showPlaceholder - */ - public function setCreditCardShowIssueDatePlaceholder($showPlaceholder) - { - $this->_setField(self::CREDITCARD_SHOW_ISSUEDATE_PLACEHOLDER, $showPlaceholder ? 'true' : 'false'); - } - - /** - * ******************* - * PROTECTED METHODS * - * ******************* - */ - - /** - * @see QentaCEE_Stdlib_Client_Request_Abstract::_getRequestUrl() - * @return string - */ - protected function _getRequestUrl() - { - return $this->oClientConfig->DATA_STORAGE_URL . '/init'; - } - - /** - * Returns the user agent string - * - * @return string - */ - protected function _getUserAgent() - { - return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Error.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Error.php deleted file mode 100644 index 0f31dc6..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Error.php +++ /dev/null @@ -1,100 +0,0 @@ -_errorCode = $errorCode; - $this->setMessage($message); - } - - /** - * Error code getter - * - * @return int - */ - public function getErrorCode() - { - return $this->_errorCode; - } - - /** - * Payment system message setter - * - * @param string $paySysMessage - * - * @return QentaCEE_QMore_Error - */ - public function setPaySysMessage($paySysMessage) - { - $this->_paySysMessage = (string) $paySysMessage; - - return $this; - } - - /** - * Payment system message getter - * - * @return string - */ - public function getPaySysMessage() - { - return (string) $this->_paySysMessage; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/BadMethodCallException.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/BadMethodCallException.php deleted file mode 100644 index 16f4247..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Exception/BadMethodCallException.php +++ /dev/null @@ -1,42 +0,0 @@ -_fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - //if no config was sent fallback to default config file - if (is_null($config)) { - $config = QentaCEE_QMore_Module::getConfig(); - } - - if (isset( $config['QentaCEEQMoreConfig'] )) { - //we only need the QentaCEEQMoreConfig here - $config = $config['QentaCEEQMoreConfig']; - } - - //let's store configuration details in internal objects - $this->oUserConfig = is_object($config) ? $config : new QentaCEE_Stdlib_Config($config); - $this->oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_QMore_Module::getClientConfig()); - - //now let's check if the CUSTOMER_ID, SHOP_ID, LANGUAGE and SECRET exist in $this->oUserConfig object that we've created from config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - - - //If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || !isset($sCustomerId)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sLanguage ) || !isset($sLanguage)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sSecret ) || !isset($sSecret)) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); - } - - //everything ok! let's set the fields - $this->_setField(self::SHOP_ID, $sShopId); - $this->_setField(self::CUSTOMER_ID, $sCustomerId); - $this->_setField(self::LANGUAGE, $sLanguage); - $this->_setSecret($sSecret); - } - - /** - * - * @throws QentaCEE_QMore_Exception_InvalidArgumentException - */ - public function initiate() - { - $aMissingFields = new ArrayObject(); - - if (!$this->_isFieldSet(self::CUSTOMER_ID)) { - $aMissingFields->append(self::CUSTOMER_ID); - } - if (!$this->_isFieldSet(self::AMOUNT)) { - $aMissingFields->append(self::AMOUNT); - } - if (!$this->_isFieldSet(self::CURRENCY)) { - $aMissingFields->append(self::CURRENCY); - } - if (!$this->_isFieldSet(self::PAYMENT_TYPE)) { - $aMissingFields->append(self::PAYMENT_TYPE); - } - if (!$this->_isFieldSet(self::LANGUAGE)) { - $aMissingFields->append(self::LANGUAGE); - } - if (!$this->_isFieldSet(self::ORDER_DESCRIPTION)) { - $aMissingFields->append(self::ORDER_DESCRIPTION); - } - if (!$this->_isFieldSet(self::SUCCESS_URL)) { - $aMissingFields->append(self::SUCCESS_URL); - } - if (!$this->_isFieldSet(self::CANCEL_URL)) { - $aMissingFields->append(self::CANCEL_URL); - } - if (!$this->_isFieldSet(self::FAILURE_URL)) { - $aMissingFields->append(self::FAILURE_URL); - } - if (!$this->_isFieldSet(self::SERVICE_URL)) { - $aMissingFields->append(self::SERVICE_URL); - } - if (!$this->_isFieldSet(self::CONFIRM_URL)) { - $aMissingFields->append(self::CONFIRM_URL); - } - if (!$this->_isConsumerDataValid()) { - $aMissingFields->append('Consumer Data Object (IP and USER_AGENT fields are madatory)'); - } - - //Are there any errors in the $aMissingFields object? - //If so throw the InvalidArgumentException and print all the fields that are missing! - if ($aMissingFields->count()) { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(sprintf( - "Could not initiate QMore! Missing mandatory field(s): %s; thrown in %s; Please use the appropriate setter functions to set the missing fields!", - implode(", ", (array) $aMissingFields), __METHOD__)); - } - - //this is where the magic happens! We send our data to response object and hopefully get back the response object with 'redirectUrl'. - //Reponse object is also the one who will, if anything goes wrong, return the errors in an array! - try { - $this->oResponse = new QentaCEE_QMore_Response_Initiation($this->_send()); - - return $this->oResponse; - } catch (QentaCEE_Stdlib_Client_Exception_InvalidResponseException $e) { - throw $e; - } - } - - /** - * Setter for amount - * - * @param int|float $amount - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setAmount($amount) - { - $this->_setField(self::AMOUNT, $amount); - - return $this; - } - - /** - * Setter for currency - * - * @param string $sCurrency - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setCurrency($sCurrency) - { - $this->_setField(self::CURRENCY, $sCurrency); - - return $this; - } - - /** - * Setter for payment type - * - * @param string $sPaymentType - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setPaymentType($sPaymentType) - { - $this->_setField(self::PAYMENT_TYPE, $sPaymentType); - - return $this; - } - - /** - * Setter for order description - * - * @param string $sDesc - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setOrderDescription($sDesc) - { - $this->_setField(self::ORDER_DESCRIPTION, $sDesc); - - return $this; - } - - /** - * Setter for success url - * - * @param string $sUrl - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setSuccessUrl($sUrl) - { - $this->_setField(self::SUCCESS_URL, $sUrl); - - return $this; - } - - /** - * Setter for cancel url - * - * @param string $sUrl - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setCancelUrl($sUrl) - { - $this->_setField(self::CANCEL_URL, $sUrl); - - return $this; - } - - /** - * Setter for failure url - * - * @param string $sUrl - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setFailureUrl($sUrl) - { - $this->_setField(self::FAILURE_URL, $sUrl); - - return $this; - } - - /** - * Setter for service url - * - * @param string $sUrl - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setServiceUrl($sUrl) - { - $this->_setField(self::SERVICE_URL, $sUrl); - - return $this; - } - - /** - * Setter for the QMore parameter financialInstitution - * - * @param string $financialInstitution - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setFinancialInstitution($financialInstitution) - { - $this->_setField(self::FINANCIAL_INSTITUTION, $financialInstitution); - - return $this; - } - - /** - * setter for the QMore parameter confirmUrl - * - * @param string $confirmUrl - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setConfirmUrl($confirmUrl) - { - $this->_setField(self::CONFIRM_URL, $confirmUrl); - - return $this; - } - - /** - * setter for the QMore parameter pendingUrl - * - * @param string $pendingUrl - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setPendingUrl($pendingUrl) - { - $this->_setField(self::PENDING_URL, $pendingUrl); - - return $this; - } - - /** - * setter for the QMore parameter windowName - * - * @param string $windowName - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setWindowName($windowName) - { - $this->_requestData[self::WINDOW_NAME] = $windowName; - - return $this; - } - - /** - * setter for the QMore parameter duplicateRequestCheck - * - * @param bool $duplicateRequestCheck - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setDuplicateRequestCheck($duplicateRequestCheck) - { - if ($duplicateRequestCheck) { - $this->_setField(self::DUPLICATE_REQUEST_CHECK, self::$BOOL_TRUE); - } - - return $this; - } - - /** - * Setter for TransactionIdentifier - * - * @param string $sTxIdent - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setTransactionIdentifier($sTxIdent) - { - $this->_setField(self::TX_IDENT, $sTxIdent); - - return $this; - } - - /** - * setter for the QMore parameter customerStatement - * - * @param string $customerStatement - * - * @return $this - */ - public function setCustomerStatement($customerStatement) - { - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - - return $this; - } - - /** - * @param string|null $prefix Prefix, e.g. Shopname - * @param string|null $uniqString Uniqid - * - * @return $this - * @throws Exception - */ - public function generateCustomerStatement($prefix = null, $uniqString = null) - { - if (!$this->_isFieldSet(self::PAYMENT_TYPE)) { - throw new Exception('Paymenttype field is not set.'); - } - - $this->_setField( - self::CUSTOMER_STATEMENT, - $this->_composeCustomerStatement($this->_requestData[self::PAYMENT_TYPE], $prefix, $uniqString)); - - return $this; - } - - /** - * getter for the QMore parameter customerStatement - * - * @return string|null - */ - public function getCustomerStatement() - { - if (!$this->_isFieldSet(self::CUSTOMER_STATEMENT)) { - return null; - } - - return $this->_requestData[self::CUSTOMER_STATEMENT]; - } - - /** - * setter for the QMore parameter orderReference - * - * @param string $orderReference - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setOrderReference($orderReference) - { - $this->_setField(self::ORDER_REFERENCE, $orderReference); - - return $this; - } - - /** - * setter for the QMore paramter autoDeposit - * - * @param string $autoDeposit - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setAutoDeposit($autoDeposit) - { - if ($autoDeposit) { - $this->_setField(self::AUTO_DEPOSIT, self::$BOOL_TRUE); - } - - return $this; - } - - /** - * setter for the QMore parameter orderNumber - * - * @param string $orderNumber - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setOrderNumber($orderNumber) - { - $this->_setField(self::ORDER_NUMBER, $orderNumber); - - return $this; - } - - /** - * setter for the QMore parameter confirmMail - * - * @param string $confirmMail - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setConfirmMail($confirmMail) - { - $this->_setField(self::CONFIRM_MAIL, $confirmMail); - - return $this; - } - - /** - * adds given consumerData to QMore request - * - * @param QentaCEE_Stdlib_ConsumerData $consumerData - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setConsumerData(QentaCEE_Stdlib_ConsumerData $consumerData) - { - $this->oConsumerData = $consumerData; - foreach ($consumerData->getData() as $key => $value) { - $this->_setField($key, $value); - } - - return $this; - } - - /** - * @param QentaCEE_Stdlib_Basket $basket - * @return $this - */ - public function setBasket(QentaCEE_Stdlib_Basket $basket) { - $this->oBasket = $basket; - foreach($basket->getData() AS $key => $value) { - $this->_setField($key, $value); - } - return $this; - } - - /** - * setter for dataStorage reference data ONLY IN QMORE - * - * @param string $orderIdent - * @param string $storageId - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setStorageReference($orderIdent, $storageId) - { - $this->setStorageId($storageId)->setOrderIdent($orderIdent); - - return $this; - } - - /** - * Storage ID setter - * - * @param string $sStorageId - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setStorageId($sStorageId) - { - $this->_setField(self::STORAGE_ID, $sStorageId); - - return $this; - } - - /** - * Order identification setter - * - * @param string $sOrderIdent - * - * @return QentaCEE_QMore_FrontendClient - */ - public function setOrderIdent($sOrderIdent) - { - $this->_setField(self::ORDER_IDENT, $sOrderIdent); - - return $this; - } - - /** - * @param string $sPluginVersion - * - * @return $this - */ - public function setPluginVersion($sPluginVersion) - { - $this->_setField(self::PLUGIN_VERSION, $sPluginVersion); - - return $this; - } - - /** - * setter for the customer merchant crm id - * @param $userEmail - * - * @return $this - */ - public function createConsumerMerchantCrmId($userEmail) - { - $this->_setField(self::CONSUMER_MERCHANT_CRM_ID, md5($userEmail)); - return $this; - } - - /** - * Getter for response object - * - * @return QentaCEE_QMore_Response_Initiation - * @throws Exception - */ - public function getResponse() - { - if (!$this->oResponse instanceof QentaCEE_QMore_Response_Initiation) { - throw new Exception(sprintf("%s should be called after the initiate() function!", __METHOD__)); - } - - return $this->oResponse; - } - - /** - * Magic method for setting request parameters. - * may be used for additional parameters - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - $this->_setField($name, $value); - } - - /** - * generates an base64 encoded pluginVersion string from the given shop- plugin- and library-versions - * QMore Client Libary Version will be added automatically - * - * @param string $shopName - * @param string $shopVersion - * @param string $pluginName - * @param string $pluginVersion - * @param array|null $libraries - * - * @return string base64 encoded pluginVersion - */ - public static function generatePluginVersion( - $shopName, - $shopVersion, - $pluginName, - $pluginVersion, - $libraries = null - ) { - $libraryString = self::_getQMoreClientVersionString(); - if (is_array($libraries)) { - foreach ($libraries AS $libName => $libVersion) { - $libraryString .= ", {$libName} {$libVersion}"; - } - } - - $version = base64_encode("{$shopName};{$shopVersion};{$libraryString};{$pluginName};{$pluginVersion}"); - - return $version; - } - - - /*************************** - * PROTECTED METHODS * - ***************************/ - - /** - * Checks to see if the consumer data object is set and has at least madatory fields set - * - * @return boolean - */ - protected function _isConsumerDataValid() - { - // if consumer data is not an instance of QentaCEE_Stdlib_ConsumerData - // or if it's empty don't even bother with any checkings... - if (empty( $this->oConsumerData ) || !$this->oConsumerData instanceof QentaCEE_Stdlib_ConsumerData) { - return false; - } - - // @see QentaCEE_QMore_Request_Initiation_ConsumerData - $sConsumerIpAddressField = QentaCEE_Stdlib_ConsumerData::getConsumerIpAddressFieldName(); - $sConsumerUserAgentField = QentaCEE_Stdlib_ConsumerData::getConsumerUserAgentFieldName(); - - // get all the consumer data in an array - // @todo when 5.4 becomes available on our server we coulde use eg. $this->oConsumerData->getData()[$sConsumerIpAddressField] - $aConsumerData = $this->oConsumerData->getData(); - - // check - return ( isset( $aConsumerData[$sConsumerIpAddressField] ) && !empty( $aConsumerData[$sConsumerIpAddressField] ) ) && - ( isset( $aConsumerData[$sConsumerUserAgentField] ) && !empty( $aConsumerData[$sConsumerUserAgentField] ) ); - } - - /** - * Getter for QMore Client Library Versionstring - * - * @access private - * @return String - */ - protected static function _getQMoreClientVersionString() - { - return self::$LIBRARY_NAME . ' ' . self::$LIBRARY_VERSION; - } - - /** - * @see QentaCEE_Stdlib_Client_ClientAbstract::_getRequestUrl() - */ - protected function _getRequestUrl() - { - return $this->oClientConfig->FRONTEND_URL . '/init'; - } - - /** - * Returns the user agent string - * - * @return string - */ - protected function _getUserAgent() - { - return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Module.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Module.php deleted file mode 100644 index 52ad30e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Module.php +++ /dev/null @@ -1,64 +0,0 @@ -_requestData[self::COMMAND] = self::$COMMAND_TRANSFER_FUND; - } - - /** - * seter for fundTransferType field - * - * @param $fundTransferType - */ - public function setType($fundTransferType) - { - $this->_requestData[self::FUNDTRANSFERTYPE] = $fundTransferType; - } - - /** - * seter for orderNumber field - * - * @param $orderNumber - * - * @return $this - */ - public function setOrderNumber($orderNumber) - { - $this->_setField(self::ORDER_NUMBER, $orderNumber); - - return $this; - } - - /** - * seter for orderReference field - * - * @param $orderReference - * - * @return $this - */ - public function setOrderReference($orderReference) - { - $this->_setField(self::ORDER_REFERENCE, $orderReference); - - return $this; - } - - /** - * seter for creditNumber field - * - * @param $creditNumber - * - * @return $this - */ - public function setCreditNumber($creditNumber) - { - $this->_setField(self::CREDIT_NUMBER, $creditNumber); - - return $this; - } - - /** - * seter for customerStatement field - * - * @param $customerStatement - * - * @return $this - */ - public function setCustomerStatement($customerStatement) - { - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - - return $this; - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Existing.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Existing.php deleted file mode 100644 index a1aa810..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Existing.php +++ /dev/null @@ -1,83 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - $this->_setField(self::SOURCE_ORDER_NUMBER, $sourceOrderNumber); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - $orderArray[] = self::ORDER_DESCRIPTION; - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::SOURCE_ORDER_NUMBER; - - $this->_fingerprintOrder->setOrder($this->_fingerprintOrder->setOrder($orderArray)); - - return new QentaCEE_QMore_Response_Backend_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Moneta.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Moneta.php deleted file mode 100644 index 385369f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/Moneta.php +++ /dev/null @@ -1,84 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - $this->_setField(self::CONSUMERWALLETID, $consumerWalletId); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - $orderArray[] = self::ORDER_DESCRIPTION; - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::CONSUMERWALLETID; - - $this->_fingerprintOrder->setOrder($this->_fingerprintOrder->setOrder($orderArray)); - - return new QentaCEE_QMore_Response_Backend_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SepaCT.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SepaCT.php deleted file mode 100644 index af20769..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SepaCT.php +++ /dev/null @@ -1,90 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - //$this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - $this->_setField(self::BANKACCOUNTOWNER, $bankAccountOwner); - $this->_setField(self::BANKBIC, $bankBic); - $this->_setField(self::BANKACCOUNTIBAN, $bankAccountIban); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - if ($this->_getField(self::ORDER_DESCRIPTION) !== null) { - $orderArray[] = self::ORDER_DESCRIPTION; - } - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::BANKACCOUNTOWNER; - $orderArray[] = self::BANKBIC; - $orderArray[] = self::BANKACCOUNTIBAN; - - $this->_fingerprintOrder->setOrder($this->_fingerprintOrder->setOrder($orderArray)); - - return new QentaCEE_QMore_Response_Backend_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SkrillWallet.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SkrillWallet.php deleted file mode 100644 index 9ce330b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Request/Backend/TransferFund/SkrillWallet.php +++ /dev/null @@ -1,84 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - $this->_setField(self::CONSUMEREMAIL, $consumerEmail); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::PASSWORD, - self::SECRET, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - $orderArray[] = self::ORDER_DESCRIPTION; - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::CONSUMEREMAIL; - - $this->_fingerprintOrder->setOrder($this->_fingerprintOrder->setOrder($orderArray)); - - return new QentaCEE_QMore_Response_Backend_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/ApproveReversal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/ApproveReversal.php deleted file mode 100644 index 702f053..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/ApproveReversal.php +++ /dev/null @@ -1,42 +0,0 @@ -_getField(self::$PAYMENT_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/DepositReversal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/DepositReversal.php deleted file mode 100644 index 385c1fa..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/DepositReversal.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - protected function _getField($name) - { - return ( array_key_exists($name, $this->_data) ) ? $this->_data[$name] : false; - } - - - /** - * returns internal data array - * - * @return bool - */ - public function getData() - { - return $this->_data; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetFinancialInstitutions.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetFinancialInstitutions.php deleted file mode 100644 index 7ce5c14..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetFinancialInstitutions.php +++ /dev/null @@ -1,47 +0,0 @@ -_response['financialInstitution']; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetOrderDetails.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetOrderDetails.php deleted file mode 100644 index c149f0a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/GetOrderDetails.php +++ /dev/null @@ -1,111 +0,0 @@ -_getField(self::$ORDER); - $payments = $this->_getField(self::$PAYMENT); - $credits = $this->_getField(self::$CREDIT); - if(!isset($orders)){ - $orders = Array(); - } - if(!isset($payments)){ - $payments = Array(); - } - if(!isset($credits)){ - $credits = Array(); - } - - $order = isset($orders[0]) ? $orders[0] : Array(); - $order['paymentData'] = isset($payments[0]) ? $payments[0] : Array(); - $order['creditData'] = isset($credits[0]) ? $credits[0] : Array(); - - $this->_order = new QentaCEE_QMore_Response_Backend_Order($order); - } - - /** - * getter for the returned order object - * - * @return QentaCEE_QMore_Response_Backend_Order - */ - public function getOrder() - { - return $this->_order; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order.php deleted file mode 100644 index 8b97954..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order.php +++ /dev/null @@ -1,465 +0,0 @@ -_setPayments($orderData['paymentData']); - unset( $orderData['paymentData'] ); - $this->_setCredits($orderData['creditData']); - unset( $orderData['creditData'] ); - $this->_data = $orderData; - } - - /** - * getter for order merchant number - * - * @return string - */ - public function getMerchantNumber() - { - return $this->_getField(self::$MERCHANT_NUMBER); - } - - /** - * getter for order number - * - * @return string - */ - public function getOrderNumber() - { - return $this->_getField(self::$ORDER_NUMBER); - } - - /** - * getter for used payment type - * - * @return string - */ - public function getPaymentType() - { - return $this->_getField(self::$PAYMENT_TYPE); - } - - /** - * getter for orders amount - * - * @return string - */ - public function getAmount() - { - return $this->_getField(self::$AMOUNT); - } - - /** - * getter for orders brand - * - * @return string - */ - public function getBrand() - { - return $this->_getField(self::$BRAND); - } - - /** - * getter for orders currency - * - * @return type - */ - public function getCurrency() - { - return $this->_getField(self::$CURRENCY); - } - - /** - * getter for the order description - * - * @return string - */ - public function getOrderDescription() - { - return $this->_getField(self::$ORDER_DESCRIPTION); - } - - /** - * getter for the acquirer name - * - * @return string - */ - public function getAcquirer() - { - return $this->_getField(self::$ACQUIRER); - } - - /** - * getter for the contract number - * - * @return string - */ - public function getContractNumber() - { - return $this->_getField(self::$CONTRACT_NUMBER); - } - - /** - * getter for allowed follow-up operations - * - * @return string[] - */ - public function getOperationsAllowed() - { - if ($this->_getField(self::$OPERATIONS_ALLOWED) == '') { - return Array(); - } else { - return explode(',', $this->_getField(self::$OPERATIONS_ALLOWED)); - } - } - - /** - * getter for order reference - * - * @return string - */ - public function getOrderReference() - { - return $this->_getField(self::$ORDER_REFERENCE); - } - - /** - * getter for customer statement text - * - * @return string - */ - public function getCustomerStatement() - { - return $this->_getField(self::$CUSTOMER_STATEMENT); - } - - /** - * getter for the order text - * - * @return string - */ - public function getOrderText() - { - return $this->_getField(self::$ORDER_TEXT); - } - - /** - * getter for the time this order has been created - * - * @return DateTime - */ - public function getTimeCreated() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_CREATED)); - } - - /** - * getter for the last time this order has been modified - * - * @return DateTime - */ - public function getTimeModified() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_MODIFIED)); - } - - /** - * getter for the current order state - * - * @return string - */ - public function getState() - { - return $this->_getField(self::$STATE); - } - - /** - * getter for the source order number - * - * @return string - */ - public function getSourceOrderNumber() - { - return $this->_getField(self::$SOURCE_ORDER_NUMBER); - } - - /** - * getter for corresponding payment objects - * - * @return QentaCEE_QMore_Response_Backend_Order_PaymentIterator - */ - public function getPayments() - { - return $this->_payments; - } - - /** - * getter for corresponding credit objects - * - * @return QentaCEE_QMore_Response_Backend_Order_CreditIterator - */ - public function getCredits() - { - return $this->_credits; - } - - /** - * setter for payment object iterator - * - * @param array $paymentEntries - */ - protected function _setPayments($paymentEntries) - { - $payments = Array(); - foreach ($paymentEntries as $paymentEntry) { - switch ($paymentEntry['paymentType']) { - case self::$PAYMENTTYPE_PAYPAL: - $payments[] = new QentaCEE_QMore_Response_Backend_Order_Payment_Paypal($paymentEntry); - break; - case self::$PAYMENTTYPE_SOFORTUEBERWEISUNG: - $payments[] = new QentaCEE_QMore_Response_Backend_Order_Payment_Sofortueberweisung($paymentEntry); - break; - case self::$PAYMENTTYPE_IDEAL: - $payments[] = new QentaCEE_QMore_Response_Backend_Order_Payment_Ideal($paymentEntry); - break; - default: - $payments[] = new QentaCEE_QMore_Response_Backend_Order_Payment($paymentEntry); - break; - } - } - $this->_payments = new QentaCEE_QMore_Response_Backend_Order_PaymentIterator($payments); - } - - /** - * setter for credit object iterator - * - * @param array $credits - */ - protected function _setCredits($creditEntries) - { - $credits = Array(); - foreach ($creditEntries as $creditEntry) { - $credits[] = new QentaCEE_QMore_Response_Backend_Order_Credit($creditEntry); - } - $this->_credits = new QentaCEE_QMore_Response_Backend_Order_CreditIterator($credits); - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Credit.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Credit.php deleted file mode 100644 index f56e30c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Credit.php +++ /dev/null @@ -1,250 +0,0 @@ -_data = $creditData; - } - - /** - * getter for credits merchant number - * - * @return string - */ - public function getMerchantNumber() - { - return $this->_getField(self::$MERCHANT_NUMBER); - } - - /** - * getter for credit number - * - * @return string - */ - public function getCreditNumber() - { - return $this->_getField(self::$CREDIT_NUMBER); - } - - /** - * getter for the corresponding order number - * - * @return string - */ - public function getOrderNumber() - { - return $this->_getField(self::$ORDER_NUMBER); - } - - /** - * getter for the corresponding batch number - * - * @return string - */ - public function getBatchNumber() - { - return $this->_getField(self::$BATCH_NUMBER); - } - - /** - * getter for the credit amount - * - * @return string - */ - public function getAmount() - { - return $this->_getField(self::$AMOUNT); - } - - /** - * getter for the credit currency - * - * @return string - */ - public function getCurrency() - { - return $this->_getField(self::$CURRENCY); - } - - /** - * getter for the creation time - * - * @return DateTime - */ - public function getTimeCreated() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_CREATED)); - } - - /** - * getter for the last time this credit has been updated - * - * @return DateTime - */ - public function getTimeModified() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_MODIFIED)); - } - - /** - * getter for the currenc credit state - * - * @return string - */ - public function getState() - { - return $this->_getField(self::$STATE); - } - - /** - * getter for the allowed follow-up operations - * - * @return string[] - */ - public function getOperationsAllowed() - { - return explode(',', $this->_getField(self::$OPERATIONS_ALLOWED)); - } - - /** - * getter for the gateway reference number - * - * @return string - */ - public function getGatewayReferenceNumber() - { - return $this->_getField(self::$GATEWAY_REFERENCE_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/CreditIterator.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/CreditIterator.php deleted file mode 100644 index 43a820d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/CreditIterator.php +++ /dev/null @@ -1,42 +0,0 @@ -_position = 0; - $this->_objectArray = $objectArray; - } - - /** - * resets the current position to 0(first entry) - */ - public function rewind() - { - $this->_position = 0; - } - - /** - * Returns the current object - * - * @return Object - */ - public function current() - { - return $this->_objectArray[$this->_position]; - } - - /** - * Returns the current position - * - * @return int - */ - public function key() - { - return (int) $this->_position; - } - - /** - * go to the next position - */ - public function next() - { - ++ $this->_position; - } - - /** - * checks if position is valid - * - * @return bool - */ - public function valid() - { - return isset($this->_objectArray[$this->_position]); - } - - public function getArray() - { - return $this->_objectArray; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment.php deleted file mode 100644 index 7bdca14..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment.php +++ /dev/null @@ -1,304 +0,0 @@ -_data = $paymentData; - } - - /** - * getter for payments merchant number - * - * @return string - */ - public function getMerchantNumber() - { - return $this->_getField(self::$MERCHANT_NUMBER); - } - - /** - * getter for the payment number - * - * @return string - */ - public function getPaymentNumber() - { - return $this->_getField(self::$PAYMENT_NUMBER); - } - - /** - * getter for the corrensponding order number - * - * @return string - */ - public function getOrderNumber() - { - return $this->_getField(self::$ORDER_NUMBER); - } - - /** - * getter for the approved amount - * - * @return string - */ - public function getApproveAmount() - { - return $this->_getField(self::$APPROVE_AMOUNT); - } - - /** - * getter for the deposited amount - * - * @return string - */ - public function getDepositAmount() - { - return $this->_getField(self::$DEPOSIT_AMOUNT); - } - - /** - * getter for the payment currency - * - * @return string - */ - public function getCurrency() - { - return $this->_getField(self::$CURRENCY); - } - - /** - * getter for the creation time of this payment - * - * @return DateTime - */ - public function getTimeCreated() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_CREATED)); - } - - /** - * getter for the last time this payment has been updated - * - * @return DateTime - */ - public function getTimeModified() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_MODIFIED)); - } - - /** - * getter for the current payment state - * - * @return string - */ - public function getState() - { - return $this->_getField(self::$STATE); - } - - /** - * getter for the paymenttype - * - * @return string - */ - public function getPaymentType() - { - return $this->_getField(self::$PAYMENT_TYPE); - } - - /** - * getter for the allowed follow-up operations - * - * @return string[] - */ - public function getOperationsAllowed() - { - return explode(',', $this->_getField(self::$OPERATIONS_ALLOWED)); - } - - /** - * getter for the gateway reference number - * - * @return string - */ - public function getGatewayReferencenumber() - { - return $this->_getField(self::$GATEWAY_REFERENCE_NUMBER); - } - - /** - * getter for the AVS result-code - * - * @return string - */ - public function getAvsResultCode() - { - return $this->_getField(self::$AVS_RESULT_CODE); - } - - /** - * getter for the AVS result-message - * - * @return string - */ - public function getAvsResultMessage() - { - return $this->_getField(self::$AVS_RESULT_MESSAGE); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Ideal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Ideal.php deleted file mode 100644 index 7579081..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Ideal.php +++ /dev/null @@ -1,95 +0,0 @@ -_getField(self::$CONSUMER_NAME); - } - - /** - * getter for iDEAL consumer City - * - * @return string - */ - public function getConsumerCity() - { - return $this->_getField(self::$CONSUMER_CITY); - } - - /** - * getter for iDEAL consumer account-number - * - * @return string - */ - public function getConsumerAccountNumber() - { - return $this->_getField(self::$CONSUMER_ACCOUNT_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Paypal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Paypal.php deleted file mode 100644 index 4048d16..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Paypal.php +++ /dev/null @@ -1,275 +0,0 @@ -_getField(self::$PAYER_ID); - } - - /** - * getter for PayPal payer email - * - * @return string - */ - public function getPayerEmail() - { - return $this->_getField(self::$PAYER_EMAIL); - } - - /** - * getter for PayPal payer firstname - * - * @return string - */ - public function getPayerFirstName() - { - return $this->_getField(self::$PAYER_FIRST_NAME); - } - - /** - * getter for PayPal payer lastname - * - * @return string - */ - public function getPayerLastName() - { - return $this->_getField(self::$PAYER_LAST_NAME); - } - - /** - * getter for PayPal payer country address field - * - * @return string - */ - public function getPayerAddressCountry() - { - return $this->_getField(self::$PAYER_ADDRESS_COUNTRY); - } - - /** - * getter for PayPal payer city address field - * - * @return string - */ - public function getPayerAddressCity() - { - return $this->_getField(self::$PAYER_ADDRESS_CITY); - } - - /** - * getter for PayPal payer state address field - * - * @return string - */ - public function getPayerAddressState() - { - return $this->_getField(self::$PAYER_ADDRESS_STATE); - } - - /** - * getter for PayPal payer name address field - * - * @return string - */ - public function getPayerAddressName() - { - return $this->_getField(self::$PAYER_ADDRESS_NAME); - } - - /** - * getter for PayPal payer street 1 address field - * - * @return string - */ - public function getPayerAddressStreet1() - { - return $this->_getField(self::$PAYER_ADDRESS_STREET_1); - } - - /** - * getter for PayPal payer street 2 address field - * - * @return string - */ - public function getPayerAddressStreet2() - { - return $this->_getField(self::$PAYER_ADDRESS_STREET_2); - } - - /** - * getter for PayPal payer zipcode address field - * - * @return string - */ - public function getPayerAddressZip() - { - return $this->_getField(self::$PAYER_ADDRESS_ZIP); - } - - /** - * getter for PayPal payer address status - * - * @return string - */ - public function getPayerAddressStatus() - { - return $this->_getField(self::$PAYER_ADDRESS_STATUS); - } - - /** - * getter for PayPal protection eligibility - * - * @return string - */ - public function getProtectionEligibility() - { - return $this->_getField(self::$PROTECTION_ELIGIBILITY); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Sofortueberweisung.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Sofortueberweisung.php deleted file mode 100644 index bd72081..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/Payment/Sofortueberweisung.php +++ /dev/null @@ -1,185 +0,0 @@ -_getField(self::$SENDER_ACCOUNT_OWNER); - } - - /** - * getter for sofortueberweisung.de sender account number - * - * @return string - */ - public function getSenderAccountNumber() - { - return $this->_getField(self::$SENDER_ACCOUNT_NUMBER); - } - - /** - * getter for sofortueberweisung.de sender bank number - * - * @return string - */ - public function getSenderBankNumber() - { - return $this->_getField(self::$SENDER_BANK_NUMBER); - } - - /** - * getter for sofortueberweisung.de sender bank name - * - * @return string - */ - public function getSenderBankName() - { - return $this->_getField(self::$SENDER_BANK_NAME); - } - - /** - * getter for sofortueberweisung.de sender BIC - * - * @return string - */ - public function getSenderBic() - { - return $this->_getField(self::$SENDER_BIC); - } - - /** - * getter for sofortueberweisung.de sender IBAN - * - * @return string - */ - public function getSenderIban() - { - return $this->_getField(self::$SENDER_IBAN); - } - - /** - * getter for sofortueberweisung.de sender country - * - * @return string - */ - public function getSenderCountry() - { - return $this->_getField(self::$SENDER_COUNTRY); - } - - /** - * getter for sofortueberweisung.de Security criteria - * - * @return string - */ - public function getSecurityCriteria() - { - return $this->_getField(self::$SECURITY_CRITERIA); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/PaymentIterator.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/PaymentIterator.php deleted file mode 100644 index 3e81f3a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Order/PaymentIterator.php +++ /dev/null @@ -1,42 +0,0 @@ -_getField(self::$ORDER_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Refund.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Refund.php deleted file mode 100644 index 66b80c5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/Refund.php +++ /dev/null @@ -1,59 +0,0 @@ -_getField(self::$CREDIT_NUMBER); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/RefundReversal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/RefundReversal.php deleted file mode 100644 index 9425f6f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/RefundReversal.php +++ /dev/null @@ -1,42 +0,0 @@ -_getField(self::$STATUS); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/TransferFund.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/TransferFund.php deleted file mode 100644 index 20241d9..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Backend/TransferFund.php +++ /dev/null @@ -1,59 +0,0 @@ -_getField(self::$CREDIT_NUMBER); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Initiation.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Initiation.php deleted file mode 100644 index b4ae98e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/Initiation.php +++ /dev/null @@ -1,54 +0,0 @@ -_getField(self::REDIRECT_URL) ) ? self::STATE_SUCCESS : self::STATE_FAILURE; - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/ResponseAbstract.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/ResponseAbstract.php deleted file mode 100644 index 13031e0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Response/ResponseAbstract.php +++ /dev/null @@ -1,124 +0,0 @@ -_getField(self::$ERRORS); - } - - /** - * getter for list of errors that occured - * - * @return QentaCEE_QMore_Error[] - */ - public function getErrors() - { - $aErrors = Array(); - if (empty( $this->_errors )) { - if (is_array($this->_getField(self::$ERROR))) { - foreach ($this->_getField(self::$ERROR) as $error) { - $errorCode = isset( $error[self::$ERROR_CODE] ) ? $error[self::$ERROR_CODE] : 0; - $message = isset( $error[self::$ERROR_MESSAGE] ) ? $error[self::$ERROR_MESSAGE] : ''; - $consumerMessage = isset( $error[self::$ERROR_CONSUMER_MESSAGE] ) ? $error[self::$ERROR_CONSUMER_MESSAGE] : ''; - $paySysMessage = isset( $error[self::$ERROR_PAYSYS_MESSAGE] ) ? $error[self::$ERROR_PAYSYS_MESSAGE] : ''; - - $error = new QentaCEE_QMore_Error($errorCode, $message); - $error->setConsumerMessage($consumerMessage); - $error->setPaySysMessage($paySysMessage); - - $aErrors[] = $error; - } - } - - $this->_errors = $aErrors; - } - - return $this->_errors; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Cancel.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Cancel.php deleted file mode 100644 index 2800ef7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Cancel.php +++ /dev/null @@ -1,42 +0,0 @@ -__get(self::$ERRORS); - } - - /** - * Returns all the errors - * return Array - */ - public function getErrors() - { - if (empty( $this->_errors )) { - $errorList = Array(); - - foreach ($this->__get(self::$ERROR) as $error) { - $errorCode = $error[self::$ERROR_ERROR_CODE]; - $message = $error[self::$ERROR_MESSAGE]; - $consumerMessage = $error[self::$ERROR_CONSUMER_MESSAGE]; - $paySysMessage = $error[self::$ERROR_PAY_SYS_MESSAGE]; - - $errorObject = new QentaCEE_QMore_Error($errorCode, $message); - $errorObject->setPaySysMessage($paySysMessage); - $errorObject->setConsumerMessage($consumerMessage); - - array_push($errorList, $errorObject); - } - - $this->_errors = $errorList; - } - - return $this->_errors; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Pending.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Pending.php deleted file mode 100644 index e500a44..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QMore/Return/Pending.php +++ /dev/null @@ -1,47 +0,0 @@ - 'https://checkout.wirecard.com/page/init-server.php', - 'TOOLKIT_URL' => 'https://checkout.wirecard.com/page/toolkit.php', - 'MODULE_NAME' => 'QentaCEE_QPay', - 'MODULE_VERSION' => '3.3.0', - 'DEPENDENCIES' => Array(), - 'USE_DEBUG' => false -); \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Config/user.config.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Config/user.config.php deleted file mode 100644 index bfcae7d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Config/user.config.php +++ /dev/null @@ -1,47 +0,0 @@ - Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => '', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en', - 'TOOLKIT_PASSWORD' => 'jcv45z' - ) -); \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Error.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Error.php deleted file mode 100644 index 46a462e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Error.php +++ /dev/null @@ -1,51 +0,0 @@ -setMessage($message); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/BadMethodCallException.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/BadMethodCallException.php deleted file mode 100644 index 2ee98a2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Exception/BadMethodCallException.php +++ /dev/null @@ -1,42 +0,0 @@ -_fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - //if no config was sent fallback to default config file - if (is_null($aConfig)) { - $aConfig = QentaCEE_QPay_Module::getConfig(); - } - - if (isset( $aConfig['QentaCEEQPayConfig'] )) { - //we only need the QentaCEEQPayConfig here - $aConfig = $aConfig['QentaCEEQPayConfig']; - } - - //let's store configuration details in internal objects - $this->oUserConfig = new QentaCEE_Stdlib_Config($aConfig); - $this->oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_QPay_Module::getClientConfig()); - - //now let's check if the CUSTOMER_ID, SHOP_ID, LANGUAGE and SECRET exist in $this->oUserConfig object that we created from config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - - //If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || is_null($sCustomerId)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sLanguage ) || is_null($sLanguage)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sSecret ) || is_null($sSecret)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); - } - - // we're using hmac sha512 for hash-ing - QentaCEE_Stdlib_Fingerprint::setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_HMAC_SHA512); - - //everything ok! let's set the fields - $this->_setField(self::CUSTOMER_ID, $sCustomerId); - $this->_setField(self::SHOP_ID, $sShopId); - $this->_setField(self::LANGUAGE, $sLanguage); - $this->_setSecret($sSecret); - } - - /** - * Initialization of QPay Client - * This function should be called AFTER you've set all the mandatory fields - * (for a list of mandatory fields please consult the integration manual) - * - * @throws QentaCEE_QPay_Exception_InvalidArgumentException - * @return QentaCEE_QPay_Response_Initiation - */ - public function initiate() - { - //First let's check if all mandatory fields are set! If not add them to $aMissingFields Array Object - $aMissingFields = new ArrayObject(); - - if (!$this->_isFieldSet(self::AMOUNT)) { - $aMissingFields->append(self::AMOUNT); - } - if (!$this->_isFieldSet(self::PAYMENT_TYPE)) { - $aMissingFields->append(self::PAYMENT_TYPE); - } - if (!$this->_isFieldSet(self::ORDER_DESCRIPTION)) { - $aMissingFields->append(self::ORDER_DESCRIPTION); - } - if (!$this->_isFieldSet(self::SUCCESS_URL)) { - $aMissingFields->append(self::SUCCESS_URL); - } - if (!$this->_isFieldSet(self::CANCEL_URL)) { - $aMissingFields->append(self::CANCEL_URL); - } - if (!$this->_isFieldSet(self::FAILURE_URL)) { - $aMissingFields->append(self::FAILURE_URL); - } - if (!$this->_isFieldSet(self::SERVICE_URL)) { - $aMissingFields->append(self::SERVICE_URL); - } - if (!$this->_isFieldSet(self::CURRENCY)) { - $aMissingFields->append(self::CURRENCY); - } - if (!$this->_isFieldSet(self::LANGUAGE)) { - $aMissingFields->append(self::LANGUAGE); - } - if (!$this->_isConsumerDataValid()) { - $aMissingFields->append('Consumer IP Address, Consumer User Agent'); - } - - //Are there any errors in the $aMissingFields object? - //If so throw the InvalidArgumentException and print all the fields that are missing! - if ($aMissingFields->count()) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf( - "Could not initiate QPay! Missing mandatory field(s): %s; thrown in %s; Please use the appropriate setter functions to set missing fields.", - implode(", ", (array) $aMissingFields), __METHOD__)); - } - - //this is where the magic happens! We send our data to response object and hopefully get back the response object with 'redirectUrl'. - //Reponse object is also the one who will, if anything goes wrong, return the errors in an array! - $this->oResponse = new QentaCEE_QPay_Response_Initiation($this->_send()); - - //and return the Response object - return $this->oResponse; - } - - /** - * Setter for amount - * - * @param int|float $amount - * - * @return QentaCEE_QPay_FrontendClient - * @formatter:on - */ - public function setAmount($amount) - { - $this->_setField(self::AMOUNT, $amount); - - return $this; - } - - /** - * Setter for currency - * - * @param string $sCurrency - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setCurrency($sCurrency) - { - $this->_setField(self::CURRENCY, $sCurrency); - - return $this; - } - - /** - * Setter for payment type - * - * @param string $sPaymentType - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setPaymentType($sPaymentType) - { - $this->_setField(self::PAYMENT_TYPE, $sPaymentType); - - return $this; - } - - /** - * Setter for order description - * - * @param string $sDesc - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setOrderDescription($sDesc) - { - $this->_setField(self::ORDER_DESCRIPTION, $sDesc); - - return $this; - } - - /** - * Setter for success url - * - * @param string $sUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setSuccessUrl($sUrl) - { - $this->_setField(self::SUCCESS_URL, $sUrl); - - return $this; - } - - /** - * Setter for cancel url - * - * @param string $sUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setCancelUrl($sUrl) - { - $this->_setField(self::CANCEL_URL, $sUrl); - - return $this; - } - - /** - * Setter for failure url - * - * @param string $sUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setFailureUrl($sUrl) - { - $this->_setField(self::FAILURE_URL, $sUrl); - - return $this; - } - - /** - * Setter for service url - * - * @param string $sUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setServiceUrl($sUrl) - { - $this->_setField(self::SERVICE_URL, $sUrl); - - return $this; - } - - /** - * setter for the QPay parameter pendingUrl - * - * @param string $pendingUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setPendingUrl($pendingUrl) - { - $this->_setField(self::PENDING_URL, $pendingUrl); - - return $this; - } - - /** - * Setter for the qpay parameter financialInstitution - * Only applicable if payment type is EPS or IDL (iDeal) - * - * @param string $financialInstitution - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setFinancialInstitution($financialInstitution) - { - $this->_setField(self::FINANCIAL_INSTITUTION, $financialInstitution); - - return $this; - } - - /** - * setter for the qpay parameter displaytext - * - * @param string $displayText - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setDisplayText($displayText) - { - $this->_setField(self::DISPLAY_TEXT, $displayText); - - return $this; - } - - /** - * setter for the qpay parameter confirmUrl - * - * @param string $confirmUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setConfirmUrl($confirmUrl) - { - $this->_setField(self::CONFIRM_URL, $confirmUrl); - - return $this; - } - - /** - * setter for the qpay parameter imageUrl - * - * @param string $imageUrl - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setImageUrl($imageUrl) - { - $this->_setField(self::IMAGE_URL, $imageUrl); - - return $this; - } - - /** - * setter for the qpay parameter windowName - * - * @param string $windowName - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setWindowName($windowName) - { - $this->_requestData[self::WINDOW_NAME] = $windowName; - - return $this; - } - - /** - * setter for the qpay parameter duplicateRequestCheck - * - * @param bool $duplicateRequestCheck - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setDuplicateRequestCheck($duplicateRequestCheck) - { - if ($duplicateRequestCheck) { - $this->_setField(self::DUPLICATE_REQUEST_CHECK, self::$BOOL_TRUE); - } - - return $this; - } - - /** - * setter for the QMore parameter customerStatement - * - * @param string $customerStatement - * - * @return $this - */ - public function setCustomerStatement($customerStatement) - { - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - - return $this; - } - - /** - * Setter for TransactionIdentifier - * - * @param string $sTxIdent - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setTransactionIdentifier($sTxIdent) - { - $this->_setField(self::TX_IDENT, $sTxIdent); - - return $this; - } - - /** - * setter for Paymenttype sort oder - * - * @param array $paymentTypes - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setPaymenttypeSortOrder($paymentTypes) - { - $this->_setField(self::PAYMENTTYPE_SORTORDER, implode(',', $paymentTypes)); - - return $this; - } - - - /** - * @param string|null $prefix Prefix, e.g. Shopname - * @param string|null $uniqString Uniqid - * - * @return $this - * @throws Exception - */ - public function generateCustomerStatement($prefix = null, $uniqString = null) - { - if (!$this->_isFieldSet(self::PAYMENT_TYPE)) { - throw new Exception('Paymenttype field is not set.'); - } - - $this->_setField( - self::CUSTOMER_STATEMENT, - $this->_composeCustomerStatement($this->_requestData[self::PAYMENT_TYPE], $prefix, $uniqString)); - - return $this; - } - - /** - * getter for the QMore parameter customerStatement - * - * @return string|null - */ - public function getCustomerStatement() - { - if (!$this->_isFieldSet(self::CUSTOMER_STATEMENT)) { - return null; - } - - return $this->_requestData[self::CUSTOMER_STATEMENT]; - } - - /** - * setter for the qpay parameter orderReference - * - * @param string $orderReference - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setOrderReference($orderReference) - { - $this->_setField(self::ORDER_REFERENCE, $orderReference); - - return $this; - } - - /** - * setter for the qpay paramter autoDeposit - * - * @param string $bBool - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setAutoDeposit($bBool) - { - $this->_setField(self::AUTO_DEPOSIT, ( $bBool ) ? self::$BOOL_TRUE : self::$BOOL_FALSE); - - return $this; - } - - /** - * setter for the qpay parameter maxRetries - * - * @param string $maxRetries - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setMaxRetries($maxRetries) - { - $maxRetries = intval($maxRetries); - if ($maxRetries >= 0) { - $this->_setField(self::MAX_RETRIES, $maxRetries); - } - - return $this; - } - - /** - * setter for the customer merchant crm id - * @param $userEmail - * - * @return $this - */ - public function createConsumerMerchantCrmId($userEmail) - { - $this->_setField(self::CONSUMER_MERCHANT_CRM_ID, md5($userEmail)); - - return $this; - } - - - /** - * setter for the qpay parameter orderNumber - * - * @param int $orderNumber - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setOrderNumber($orderNumber) - { - $this->_setField(self::ORDER_NUMBER, $orderNumber); - - return $this; - } - - /** - * setter for the qpay parameter confirmMail - * - * @param string $confirmMail - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setConfirmMail($confirmMail) - { - $this->_setField(self::CONFIRM_MAIL, $confirmMail); - - return $this; - } - - /** - * setter for the qpay parameter backgroundColor - * - * @param string $backgroundColor - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setBackgroundColor($backgroundColor) - { - $this->_setField(self::BACKGROUND_COLOR, $backgroundColor); - - return $this; - } - - /** - * setter for the qpay parameter backgroundColor - * - * @param string $layout - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setLayout($layout) - { - $this->_setField(self::LAYOUT, $layout); - - return $this; - } - - /** - * adds given consumerData to qpay request - * - * @param QentaCEE_Stdlib_ConsumerData $consumerData - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setConsumerData(QentaCEE_Stdlib_ConsumerData $consumerData) - { - $this->oConsumerData = $consumerData; - foreach ($consumerData->getData() as $key => $value) { - $this->_setField($key, $value); - } - - return $this; - } - - /** - * @param QentaCEE_Stdlib_Basket $basket - * @return $this - */ - public function setBasket(QentaCEE_Stdlib_Basket $basket) { - $this->oBasket = $basket; - foreach($basket->getData() AS $key => $value) { - $this->_setField($key, $value); - } - return $this; - } - - /** - * - * @param string $sPluginVersion - * - * @return QentaCEE_QPay_FrontendClient - */ - public function setPluginVersion($sPluginVersion) - { - $this->_setField(self::PLUGIN_VERSION, $sPluginVersion); - - return $this; - } - - public function setShippingProfile($shippingProfile) - { - $this->_setField(self::SHIPPING_PROFILE, $shippingProfile); - } - - /** - * Getter for response object - * - * @return QentaCEE_QPay_Response_Initiation - * @throws Exception - */ - public function getResponse() - { - if (!$this->oResponse instanceof QentaCEE_QPay_Response_Initiation) { - throw new Exception(sprintf("%s should be called after the initiate() function!", __METHOD__)); - } - - return $this->oResponse; - } - - /** - * Magic method for setting request parameters. - * may be used for additional parameters - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - $this->_setField($name, $value); - } - - /** - * generates an base64 encoded pluginVersion string from the given shop- - * plugin- and library-versions - * QPAY Client Libary Version will be added automatically - * - * @param string $shopName - * @param string $shopVersion - * @param string $pluginName - * @param string $pluginVersion - * @param array|null $libraries - * - * @return string base64 encoded pluginVersion - */ - public static function generatePluginVersion( - $shopName, - $shopVersion, - $pluginName, - $pluginVersion, - $libraries = null - ) { - $libraryString = self::_getQPayClientVersionString(); - if (is_array($libraries)) { - foreach ($libraries as $libName => $libVersion) { - $libraryString .= ", {$libName} {$libVersion}"; - } - } - - $version = base64_encode("{$shopName};{$shopVersion};{$libraryString};{$pluginName};{$pluginVersion}"); - - return $version; - } - - #----------------------------# - # PROTECTED METHODS # - #----------------------------# - - /** - * Checks to see if the consumer data object is set and has at least - * madatory fields set - * - * @return boolean - */ - protected function _isConsumerDataValid() - { - // if consumer data is not an instance of QentaCEE_Stdlib_ConsumerData - // or if it's empty don't even bother with any checkings... - if (empty( $this->oConsumerData ) || !$this->oConsumerData instanceof QentaCEE_Stdlib_ConsumerData) { - return false; - } - - // @see QentaCEE_QPay_Request_Initiation_ConsumerData - $sConsumerIpAddressField = QentaCEE_Stdlib_ConsumerData::getConsumerIpAddressFieldName(); - $sConsumerUserAgentField = QentaCEE_Stdlib_ConsumerData::getConsumerUserAgentFieldName(); - - // get all the consumer data in an array - // @todo when 5.4 becomes available on our server we coulde use eg. - // $this->oConsumerData->getData()[$sConsumerIpAddressField] - $aConsumerData = $this->oConsumerData->getData(); - - // check - return ( isset( $aConsumerData[$sConsumerIpAddressField] ) && !empty( $aConsumerData[$sConsumerIpAddressField] ) ) && - ( isset( $aConsumerData[$sConsumerUserAgentField] ) && !empty( $aConsumerData[$sConsumerUserAgentField] ) ); - } - - /** - * Returns the requestUrl - * - * @see QentaCEE_Stdlib_Client_ClientAbstract::_getRequestUrl() - * @return string - */ - protected function _getRequestUrl() - { - return $this->oClientConfig->FRONTEND_URL . '/init'; - } - - /** - * Getter for QPay Client Library Versionstring - * - * @access private - * @return String - */ - protected static function _getQPayClientVersionString() - { - return self::$LIBRARY_NAME . ' ' . self::$LIBRARY_VERSION; - } - - /** - * Returns the user agent string - * - * @return string - */ - protected function _getUserAgent() - { - return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/MobileDetect.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/MobileDetect.php deleted file mode 100644 index e80bb06..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/MobileDetect.php +++ /dev/null @@ -1,53 +0,0 @@ -detector = new Mobile_Detect($headers, $userAgent); - } - - public function __call($name, $arguments) - { - return call_user_func_array(array($this->detector, $name), $arguments); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Module.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Module.php deleted file mode 100644 index ed26bf5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Module.php +++ /dev/null @@ -1,63 +0,0 @@ -_requestData[self::COMMAND] = self::$COMMAND_TRANSFER_FUND; - } - - /** - * seter for fundTransferType field - * - * @param $fundTransferType - */ - public function setType($fundTransferType) - { - $this->_requestData[self::FUNDTRANSFERTYPE] = $fundTransferType; - } - - /** - * seter for orderNumber field - * - * @param $orderNumber - * - * @return $this - */ - public function setOrderNumber($orderNumber) - { - $this->_setField(self::ORDER_NUMBER, $orderNumber); - - return $this; - } - - /** - * seter for orderReference field - * - * @param $orderReference - * - * @return $this - */ - public function setOrderReference($orderReference) - { - $this->_setField(self::ORDER_REFERENCE, $orderReference); - - return $this; - } - - /** - * seter for creditNumber field - * - * @param $creditNumber - * - * @return $this - */ - public function setCreditNumber($creditNumber) - { - $this->_setField(self::CREDIT_NUMBER, $creditNumber); - - return $this; - } - - /** - * seter for customerStatement field - * - * @param $customerStatement - * - * @return $this - */ - public function setCustomerStatement($customerStatement) - { - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - - return $this; - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Existing.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Existing.php deleted file mode 100644 index 89bcfbd..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Existing.php +++ /dev/null @@ -1,84 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - $this->_setField(self::SOURCE_ORDER_NUMBER, $sourceOrderNumber); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - $orderArray[] = self::ORDER_DESCRIPTION; - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::SOURCE_ORDER_NUMBER; - - $this->_fingerprintOrder->setOrder($orderArray); - - return new QentaCEE_QPay_Response_Toolkit_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Moneta.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Moneta.php deleted file mode 100644 index b43ef87..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/Moneta.php +++ /dev/null @@ -1,85 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - $this->_setField(self::CONSUMERWALLETID, $consumerWalletId); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - $orderArray[] = self::ORDER_DESCRIPTION; - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::CONSUMERWALLETID; - - $this->_fingerprintOrder->setOrder($orderArray); - - return new QentaCEE_QPay_Response_Toolkit_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SepaCT.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SepaCT.php deleted file mode 100644 index 3b5b1d8..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SepaCT.php +++ /dev/null @@ -1,90 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - //$this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - $this->_setField(self::BANKACCOUNTOWNER, $bankAccountOwner); - $this->_setField(self::BANKBIC, $bankBic); - $this->_setField(self::BANKACCOUNTIBAN, $bankAccountIban); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - if ($this->_getField(self::ORDER_DESCRIPTION) !== null) { - $orderArray[] = self::ORDER_DESCRIPTION; - } - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::BANKACCOUNTOWNER; - $orderArray[] = self::BANKBIC; - $orderArray[] = self::BANKACCOUNTIBAN; - - $this->_fingerprintOrder->setOrder($orderArray); - - return new QentaCEE_QPay_Response_Toolkit_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SkrillWallet.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SkrillWallet.php deleted file mode 100644 index 46c9d0d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Request/Backend/TransferFund/SkrillWallet.php +++ /dev/null @@ -1,85 +0,0 @@ -_setField(self::AMOUNT, $amount); - $this->_setField(self::CURRENCY, $currency); - $this->_setField(self::ORDER_DESCRIPTION, $orderDescription); - $this->_setField(self::CUSTOMER_STATEMENT, $customerStatement); - $this->_setField(self::CONSUMEREMAIL, $consumerEmail); - - $orderArray = Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE - ); - if ($this->_getField(self::ORDER_NUMBER) !== null) { - $orderArray[] = self::ORDER_NUMBER; - } - - if ($this->_getField(self::CREDIT_NUMBER) !== null) { - $orderArray[] = self::CREDIT_NUMBER; - } - - $orderArray[] = self::ORDER_DESCRIPTION; - $orderArray[] = self::AMOUNT; - $orderArray[] = self::CURRENCY; - - if ($this->_getField(self::ORDER_REFERENCE) !== null) { - $orderArray[] = self::ORDER_REFERENCE; - } - - if ($this->_getField(self::CUSTOMER_STATEMENT) !== null) { - $orderArray[] = self::CUSTOMER_STATEMENT; - } - - $orderArray[] = self::FUNDTRANSFERTYPE; - $orderArray[] = self::CONSUMEREMAIL; - - $this->_fingerprintOrder->setOrder($orderArray); - - return new QentaCEE_QPay_Response_Toolkit_TransferFund($this->_send()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Initiation.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Initiation.php deleted file mode 100644 index ad2c346..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Initiation.php +++ /dev/null @@ -1,51 +0,0 @@ -_getField(self::REDIRECT_URL) ) ? self::STATE_SUCCESS : self::STATE_FAILURE; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/ResponseAbstract.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/ResponseAbstract.php deleted file mode 100644 index d3ad300..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/ResponseAbstract.php +++ /dev/null @@ -1,72 +0,0 @@ -_response[self::$ERROR_MESSAGE] )) { - $oError = new QentaCEE_QPay_Error($this->_response[self::$ERROR_MESSAGE]); - - if (isset( $this->_response[self::$ERROR_CONSUMER_MESSAGE] )) { - $oError->setConsumerMessage($this->_response[self::$ERROR_CONSUMER_MESSAGE]); - } - } - - return $oError; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/ApproveReversal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/ApproveReversal.php deleted file mode 100644 index 44b18de..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/ApproveReversal.php +++ /dev/null @@ -1,42 +0,0 @@ -_getField(self::$PAYMENT_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/DepositReversal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/DepositReversal.php deleted file mode 100644 index dc7b492..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/DepositReversal.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - protected function _getField($name) - { - return ( array_key_exists($name, $this->_data) ) ? $this->_data[$name] : false; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/GetOrderDetails.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/GetOrderDetails.php deleted file mode 100644 index e2a14ef..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/GetOrderDetails.php +++ /dev/null @@ -1,110 +0,0 @@ -_getField(self::$ORDER); - $payments = $this->_getField(self::$PAYMENT); - $credits = $this->_getField(self::$CREDIT); - if(!isset($orders)){ - $orders = Array(); - } - if(!isset($payments)){ - $payments = Array(); - } - if(!isset($credits)){ - $credits = Array(); - } - - $order = isset($orders[0]) ? $orders[0] : Array(); - $order['paymentData'] = isset($payments[0]) ? $payments[0] : Array(); - $order['creditData'] = isset($credits[0]) ? $credits[0] : Array(); - - $this->_order = new QentaCEE_QPay_Response_Toolkit_Order($order); - - } - - /** - * getter for the returned order object - * - * @return QentaCEE_QPay_Response_Toolkit_Order - */ - public function getOrder() - { - return $this->_order; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order.php deleted file mode 100644 index 5df7c32..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order.php +++ /dev/null @@ -1,473 +0,0 @@ -_setPayments($orderData['paymentData']); - $this->_setCredits($orderData['creditData']); - - unset( $orderData['paymentData'] ); - unset( $orderData['creditData'] ); - - $this->_data = $orderData; - } - - /** - * setter for payment object iterator - * - * @access private - * - * @param string[] $payments - */ - private function _setPayments($paymentEntries) - { - $payments = Array(); - foreach ($paymentEntries as $paymentEntry) { - switch ($paymentEntry['paymentType']) { - case self::$PAYMENTTYPE_PAYPAL: - $payments[] = new QentaCEE_QPay_Response_Toolkit_Order_Payment_Paypal($paymentEntry); - break; - case self::$PAYMENTTYPE_SOFORTUEBERWEISUNG: - $payments[] = new QentaCEE_QPay_Response_Toolkit_Order_Payment_Sofortueberweisung($paymentEntry); - break; - case self::$PAYMENTTYPE_IDEAL: - $payments[] = new QentaCEE_QPay_Response_Toolkit_Order_Payment_Ideal($paymentEntry); - break; - default: - $payments[] = new QentaCEE_QPay_Response_Toolkit_Order_Payment($paymentEntry); - break; - } - } - $this->_payments = new QentaCEE_QPay_Response_Toolkit_Order_PaymentIterator($payments); - } - - /** - * setter for credit object iterator - * - * @access private - * - * @param string[] $credits - */ - private function _setCredits($creditEntries) - { - $credits = Array(); - foreach ($creditEntries as $creditEntry) { - $credits[] = new QentaCEE_QPay_Response_Toolkit_Order_Credit($creditEntry); - } - $this->_credits = new QentaCEE_QPay_Response_Toolkit_Order_CreditIterator($credits); - } - - /** - * getter for order merchant number - * - * @return string - */ - public function getMerchantNumber() - { - return $this->_getField(self::$MERCHANT_NUMBER); - } - - /** - * getter for order number - * - * @return string - */ - public function getOrderNumber() - { - return $this->_getField(self::$ORDER_NUMBER); - } - - /** - * getter for used payment type - * - * @return string - */ - public function getPaymentType() - { - return $this->_getField(self::$PAYMENT_TYPE); - } - - /** - * getter for orders amount - * - * @return string - */ - public function getAmount() - { - return $this->_getField(self::$AMOUNT); - } - - /** - * getter for orders brand - * - * @return string - */ - public function getBrand() - { - return $this->_getField(self::$BRAND); - } - - /** - * getter for orders currency - * - * @return type - */ - public function getCurrency() - { - return $this->_getField(self::$CURRENCY); - } - - /** - * getter for the order description - * - * @return string - */ - public function getOrderDescription() - { - return $this->_getField(self::$ORDER_DESCRIPTION); - } - - /** - * getter for the acquirer name - * - * @return string - */ - public function getAcquirer() - { - return $this->_getField(self::$ACQUIRER); - } - - /** - * getter for the contract number - * - * @return string - */ - public function getContractNumber() - { - return $this->_getField(self::$CONTRACT_NUMBER); - } - - /** - * getter for allowed follow-up operations - * - * @return string[] - */ - public function getOperationsAllowed() - { - if ($this->_getField(self::$OPERATIONS_ALLOWED) == '') { - return Array(); - } else { - return explode(',', $this->_getField(self::$OPERATIONS_ALLOWED)); - } - } - - /** - * getter for order reference - * - * @return string - */ - public function getOrderReference() - { - return $this->_getField(self::$ORDER_REFERENCE); - } - - /** - * getter for customer statement text - * - * @return string - */ - public function getCustomerStatement() - { - return $this->_getField(self::$CUSTOMER_STATEMENT); - } - - /** - * getter for the order text - * - * @return string - */ - public function getOrderText() - { - return $this->_getField(self::$ORDER_TEXT); - } - - /** - * getter for the time this order has been created - * - * @return DateTime - */ - public function getTimeCreated() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_CREATED)); - } - - /** - * getter for the last time this order has been modified - * - * @return DateTime - */ - public function getTimeModified() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_MODIFIED)); - } - - /** - * getter for the current order state - * - * @return string - */ - public function getState() - { - return $this->_getField(self::$STATE); - } - - /** - * getter for the source order number - * - * @return string - */ - public function getSourceOrderNumber() - { - return $this->_getField(self::$SOURCE_ORDER_NUMBER); - } - - /** - * getter for corresponding payment objects - * - * @return QentaCEE_QPay_Response_Toolkit_Order_PaymentIterator - */ - public function getPayments() - { - return $this->_payments; - } - - /** - * getter for corresponding credit objects - * - * @return QentaCEE_QPay_Response_Toolkit_Order_CreditIterator - */ - public function getCredits() - { - return $this->_credits; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Credit.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Credit.php deleted file mode 100644 index 46b398d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Credit.php +++ /dev/null @@ -1,251 +0,0 @@ -_data = $creditData; - } - - /** - * getter for credits merchant number - * - * @return string - */ - public function getMerchantNumber() - { - return (string) $this->_getField(self::$MERCHANT_NUMBER); - } - - /** - * getter for credit number - * - * @return string - */ - public function getCreditNumber() - { - return (string) $this->_getField(self::$CREDIT_NUMBER); - } - - /** - * getter for the corresponding order number - * - * @return string - */ - public function getOrderNumber() - { - return $this->_getField(self::$ORDER_NUMBER); - } - - /** - * getter for the corresponding batch number - * - * @return string - */ - public function getBatchNumber() - { - return $this->_getField(self::$BATCH_NUMBER); - } - - /** - * getter for the credit amount - * - * @return string - */ - public function getAmount() - { - return $this->_getField(self::$AMOUNT); - } - - /** - * getter for the credit currency - * - * @return string - */ - public function getCurrency() - { - return (string) $this->_getField(self::$CURRENCY); - } - - /** - * getter for the creation time - * - * @return DateTime - */ - public function getTimeCreated() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_CREATED)); - } - - /** - * getter for the last time this credit has been updated - * - * @return DateTime - */ - public function getTimeModified() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_MODIFIED)); - } - - /** - * getter for the currenc credit state - * - * @return string - */ - public function getState() - { - return $this->_getField(self::$STATE); - } - - /** - * getter for the allowed follow-up operations - * - * @return array - */ - public function getOperationsAllowed() - { - return explode(',', $this->_getField(self::$OPERATIONS_ALLOWED)); - } - - /** - * getter for the gateway reference number - * - * @return string - */ - public function getGatewayReferenceNumber() - { - return $this->_getField(self::$GATEWAY_REFERENCE_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/CreditIterator.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/CreditIterator.php deleted file mode 100644 index 4375d7b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/CreditIterator.php +++ /dev/null @@ -1,43 +0,0 @@ -_position = 0; - $this->_objectArray = $objectArray; - } - - /** - * resets the current position to 0(first entry) - */ - public function rewind() - { - $this->_position = 0; - } - - /** - * the current Object - * - * @return Object - */ - public function current() - { - return $this->_objectArray[$this->_position]; - } - - /** - * the current position - * - * @return int - */ - public function key() - { - return $this->_position; - } - - /** - * go to the next position - */ - public function next() - { - ++ $this->_position; - } - - /** - * checks if position is valid - * - * @see Iterator::valid() - */ - public function valid() - { - return isset($this->_objectArray[$this->_position]); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment.php deleted file mode 100644 index 8c55d3e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment.php +++ /dev/null @@ -1,304 +0,0 @@ -_data = $paymentData; - } - - /** - * getter for payments merchant number - * - * @return string - */ - public function getMerchantNumber() - { - return $this->_getField(self::$MERCHANT_NUMBER); - } - - /** - * getter for the payment number - * - * @return string - */ - public function getPaymentNumber() - { - return $this->_getField(self::$PAYMENT_NUMBER); - } - - /** - * getter for the corrensponding order number - * - * @return string - */ - public function getOrderNumber() - { - return $this->_getField(self::$ORDER_NUMBER); - } - - /** - * getter for the approved amount - * - * @return string - */ - public function getApproveAmount() - { - return $this->_getField(self::$APPROVE_AMOUNT); - } - - /** - * getter for the deposited amount - * - * @return string - */ - public function getDepositAmount() - { - return $this->_getField(self::$DEPOSIT_AMOUNT); - } - - /** - * getter for the payment currency - * - * @return string - */ - public function getCurrency() - { - return $this->_getField(self::$CURRENCY); - } - - /** - * getter for the creation time of this payment - * - * @return DateTime - */ - public function getTimeCreated() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_CREATED)); - } - - /** - * getter for the last time this payment has been updated - * - * @return DateTime - */ - public function getTimeModified() - { - return DateTime::createFromFormat(self::$DATETIME_FORMAT, $this->_getField(self::$TIME_MODIFIED)); - } - - /** - * getter for the current payment state - * - * @return string - */ - public function getState() - { - return $this->_getField(self::$STATE); - } - - /** - * getter for the paymenttype - * - * @return string - */ - public function getPaymentType() - { - return $this->_getField(self::$PAYMENT_TYPE); - } - - /** - * getter for the allowed follow-up operations - * - * @return string[] - */ - public function getOperationsAllowed() - { - return explode(',', $this->_getField(self::$OPERATIONS_ALLOWED)); - } - - /** - * getter for the gateway reference number - * - * @return string - */ - public function getGatewayReferencenumber() - { - return $this->_getField(self::$GATEWAY_REFERENCE_NUMBER); - } - - /** - * getter for the AVS result-code - * - * @return string - */ - public function getAvsResultCode() - { - return $this->_getField(self::$AVS_RESULT_CODE); - } - - /** - * getter for the AVS result-message - * - * @return string - */ - public function getAvsResultMessage() - { - return $this->_getField(self::$AVS_RESULT_MESSAGE); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Ideal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Ideal.php deleted file mode 100644 index 736c379..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Ideal.php +++ /dev/null @@ -1,95 +0,0 @@ -_getField(self::$CONSUMER_NAME); - } - - /** - * getter for iDEAL consumer City - * - * @return string - */ - public function getConsumerCity() - { - return $this->_getField(self::$CONSUMER_CITY); - } - - /** - * getter for iDEAL consumer account-number - * - * @return string - */ - public function getConsumerAccountNumber() - { - return $this->_getField(self::$CONSUMER_ACCOUNT_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Paypal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Paypal.php deleted file mode 100644 index 7bc750f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Paypal.php +++ /dev/null @@ -1,275 +0,0 @@ -_getField(self::$PAYER_ID); - } - - /** - * getter for PayPal payer email - * - * @return string - */ - public function getPayerEmail() - { - return $this->_getField(self::$PAYER_EMAIL); - } - - /** - * getter for PayPal payer firstname - * - * @return string - */ - public function getPayerFirstName() - { - return $this->_getField(self::$PAYER_FIRST_NAME); - } - - /** - * getter for PayPal payer lastname - * - * @return string - */ - public function getPayerLastName() - { - return $this->_getField(self::$PAYER_LAST_NAME); - } - - /** - * getter for PayPal payer country address field - * - * @return string - */ - public function getPayerAddressCountry() - { - return $this->_getField(self::$PAYER_ADDRESS_COUNTRY); - } - - /** - * getter for PayPal payer city address field - * - * @return string - */ - public function getPayerAddressCity() - { - return $this->_getField(self::$PAYER_ADDRESS_CITY); - } - - /** - * getter for PayPal payer state address field - * - * @return string - */ - public function getPayerAddressState() - { - return $this->_getField(self::$PAYER_ADDRESS_STATE); - } - - /** - * getter for PayPal payer name address field - * - * @return string - */ - public function getPayerAddressName() - { - return $this->_getField(self::$PAYER_ADDRESS_NAME); - } - - /** - * getter for PayPal payer street 1 address field - * - * @return string - */ - public function getPayerAddressStreet1() - { - return $this->_getField(self::$PAYER_ADDRESS_STREET_1); - } - - /** - * getter for PayPal payer street 2 address field - * - * @return string - */ - public function getPayerAddressStreet2() - { - return $this->_getField(self::$PAYER_ADDRESS_STREET_2); - } - - /** - * getter for PayPal payer zipcode address field - * - * @return string - */ - public function getPayerAddressZip() - { - return $this->_getField(self::$PAYER_ADDRESS_ZIP); - } - - /** - * getter for PayPal payer address status - * - * @return string - */ - public function getPayerAddressStatus() - { - return $this->_getField(self::$PAYER_ADDRESS_STATUS); - } - - /** - * getter for PayPal protection eligibility - * - * @return string - */ - public function getProtectionEligibility() - { - return $this->_getField(self::$PROTECTION_ELIGIBILITY); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Sofortueberweisung.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Sofortueberweisung.php deleted file mode 100644 index 2f2259f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/Payment/Sofortueberweisung.php +++ /dev/null @@ -1,185 +0,0 @@ -_getField(self::$SENDER_ACCOUNT_OWNER); - } - - /** - * getter for sofortueberweisung.de sender account number - * - * @return string - */ - public function getSenderAccountNumber() - { - return $this->_getField(self::$SENDER_ACCOUNT_NUMBER); - } - - /** - * getter for sofortueberweisung.de sender bank number - * - * @return string - */ - public function getSenderBankNumber() - { - return $this->_getField(self::$SENDER_BANK_NUMBER); - } - - /** - * getter for sofortueberweisung.de sender bank name - * - * @return string - */ - public function getSenderBankName() - { - return $this->_getField(self::$SENDER_BANK_NAME); - } - - /** - * getter for sofortueberweisung.de sender BIC - * - * @return string - */ - public function getSenderBic() - { - return $this->_getField(self::$SENDER_BIC); - } - - /** - * getter for sofortueberweisung.de sender IBAN - * - * @return string - */ - public function getSenderIban() - { - return $this->_getField(self::$SENDER_IBAN); - } - - /** - * getter for sofortueberweisung.de sender country - * - * @return string - */ - public function getSenderCountry() - { - return $this->_getField(self::$SENDER_COUNTRY); - } - - /** - * getter for sofortueberweisung.de Security criteria - * - * @return string - */ - public function getSecurityCriteria() - { - return $this->_getField(self::$SECURITY_CRITERIA); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/PaymentIterator.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/PaymentIterator.php deleted file mode 100644 index 682313d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Order/PaymentIterator.php +++ /dev/null @@ -1,42 +0,0 @@ -_getField(self::$ORDER_NUMBER); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Refund.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Refund.php deleted file mode 100644 index 90d3bbc..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/Refund.php +++ /dev/null @@ -1,59 +0,0 @@ -_getField(self::$CREDIT_NUMBER); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/RefundReversal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/RefundReversal.php deleted file mode 100644 index 5c26414..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/RefundReversal.php +++ /dev/null @@ -1,42 +0,0 @@ -_getField(self::$STATUS); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/TransferFund.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/TransferFund.php deleted file mode 100644 index a38632c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Response/Toolkit/TransferFund.php +++ /dev/null @@ -1,59 +0,0 @@ -_getField(self::$CREDIT_NUMBER); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Cancel.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Cancel.php deleted file mode 100644 index cde1db4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Cancel.php +++ /dev/null @@ -1,42 +0,0 @@ -_returnData[self::$ERROR_MESSAGE]); - - if (isset( $this->_returnData[self::$ERROR_CONSUMER_MESSAGE] )) { - $oError->setConsumerMessage($this->_returnData[self::$ERROR_CONSUMER_MESSAGE]); - } - - return $oError; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Pending.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Pending.php deleted file mode 100644 index e5261a2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/Return/Pending.php +++ /dev/null @@ -1,42 +0,0 @@ -|QentaCEE_QPay_Return_Cancel|QentaCEE_QPay_Return_Failure - */ - protected static function _getInstance($return, $secret) - { - switch (strtoupper($return['paymentState'])) { - case self::STATE_SUCCESS: - return self::_getSuccessInstance($return, $secret); - break; - case self::STATE_CANCEL: - return new QentaCEE_QPay_Return_Cancel($return); - break; - case self::STATE_FAILURE: - return new QentaCEE_QPay_Return_Failure($return); - break; - case parent::STATE_PENDING: - return new QentaCEE_QPay_Return_Pending($return, $secret); - break; - default: - throw new QentaCEE_QPay_Exception_InvalidResponseException('Invalid response from QPAY. Unexpected paymentState: ' . $return['paymentState']); - break; - } - } - - /** - * getter for the correct qpay success return instance - * - * @param string[] $return - * @param string $secret - * - * @return QentaCEE_QPay_Return_Success|QentaCEE_QPay_Return_Success_CreditCard|QentaCEE_QPay_Return_Success_Ideal|QentaCEE_QPay_Return_Success_PayPal|QentaCEE_QPay_Return_Success_Sofortueberweisung - * @throws QentaCEE_QPay_Exception_InvalidResponseException - */ - protected static function _getSuccessInstance($return, $secret) - { - if (!array_key_exists('paymentType', $return)) { - throw new QentaCEE_QPay_Exception_InvalidResponseException('Invalid response from QPAY. Paymenttype is missing.'); - } - - switch (strtoupper($return['paymentType'])) { - case QentaCEE_Stdlib_PaymentTypeAbstract::CCARD: - case QentaCEE_Stdlib_PaymentTypeAbstract::CCARD_MOTO: - case QentaCEE_Stdlib_PaymentTypeAbstract::MAESTRO: - return new QentaCEE_QPay_Return_Success_CreditCard($return, $secret); - break; - case QentaCEE_Stdlib_PaymentTypeAbstract::PAYPAL: - return new QentaCEE_QPay_Return_Success_PayPal($return, $secret); - break; - case QentaCEE_Stdlib_PaymentTypeAbstract::SOFORTUEBERWEISUNG: - return new QentaCEE_QPay_Return_Success_Sofortueberweisung($return, $secret); - break; - case QentaCEE_Stdlib_PaymentTypeAbstract::IDL: - return new QentaCEE_QPay_Return_Success_Ideal($return, $secret); - break; - default: - return new QentaCEE_QPay_Return_Success($return, $secret); - break; - } - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/ToolkitClient.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/ToolkitClient.php deleted file mode 100644 index b6bae97..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/QPay/ToolkitClient.php +++ /dev/null @@ -1,592 +0,0 @@ -_fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - if (is_null($aConfig)) { - $aConfig = QentaCEE_QPay_Module::getConfig(); - } - - if (is_array($aConfig) && isset( $aConfig['QentaCEEQPayConfig'] )) { - // we only need the QentaCEEQPayConfig here - $aConfig = $aConfig['QentaCEEQPayConfig']; - } - - // let's store configuration details in internal objects - $this->oUserConfig = is_object($aConfig) ? $aConfig : new QentaCEE_Stdlib_Config($aConfig); - $this->oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_QPay_Module::getClientConfig()); - - // now let's check if the CUSTOMER_ID, SHOP_ID, LANGUAGE and SECRET - // exist in $this->oUserConfig object that we created from config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - $sToolkitPassword = isset( $this->oUserConfig->TOOLKIT_PASSWORD ) ? trim($this->oUserConfig->TOOLKIT_PASSWORD) : null; - - // If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || is_null($sCustomerId)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sLanguage ) || is_null($sLanguage)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sSecret ) || is_null($sSecret)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); - } - - if (empty( $sToolkitPassword ) || is_null($sToolkitPassword)) { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(sprintf('TOOLKIT PASSWORD passed to %s is invalid.', - __METHOD__)); - } - - // we're using hmac sha512 for hash-ing - QentaCEE_Stdlib_Fingerprint::setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_HMAC_SHA512); - - // everything ok! let's set the fields - $this->_setField(self::CUSTOMER_ID, $sCustomerId); - $this->_setField(self::SHOP_ID, $sShopId); - $this->_setField(self::LANGUAGE, $sLanguage); - $this->_setField(self::TOOLKIT_PASSWORD, $sToolkitPassword); - $this->_setSecret($sSecret); - } - - /** - * Refund - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_Refund - */ - public function refund($iOrderNumber, $iAmount, $sCurrency, $basket=null) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_REFUND; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::AMOUNT, $iAmount); - $this->_setField(self::CURRENCY, strtoupper($sCurrency)); - $this->_setBasket($basket); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER, - self::AMOUNT, - self::CURRENCY - )); - $this->_appendBasketFingerprintOrder($basket); - - return new QentaCEE_QPay_Response_Toolkit_Refund($this->_send()); - } - - /** - * Refund reversal - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_RefundReversal - */ - public function refundReversal($iOrderNumber, $iCreditNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_REFUND_REVERSAL; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::CREDIT_NUMBER, $iCreditNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER, - self::CREDIT_NUMBER - )); - - return new QentaCEE_QPay_Response_Toolkit_RefundReversal($this->_send()); - } - - /** - * Recur payment - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_RecurPayment - */ - public function recurPayment( - $iSourceOrderNumber, - $iAmount, - $sCurrency, - $sOrderDescription, - $iOrderNumber = null, - $bDepositFlag = null - ) { - $this->_requestData[self::COMMAND] = self::$COMMAND_RECUR_PAYMENT; - - $this->_setField(self::SOURCE_ORDER_NUMBER, $iSourceOrderNumber); - $this->_setField(self::AMOUNT, $iAmount); - $this->_setField(self::CURRENCY, strtoupper($sCurrency)); - - $this->_setField(self::ORDER_DESCRIPTION, $sOrderDescription); - - if (!is_null($iOrderNumber)) { - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - } - - if (!is_null($bDepositFlag)) { - $this->_setField(self::AUTO_DEPOSIT, $bDepositFlag ? self::$BOOL_TRUE : self::$BOOL_FALSE); - } - - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER, - self::SOURCE_ORDER_NUMBER, - self::AUTO_DEPOSIT, - self::ORDER_DESCRIPTION, - self::AMOUNT, - self::CURRENCY - )); - - return new QentaCEE_QPay_Response_Toolkit_RecurPayment($this->_send()); - } - - /** - * Returns order details - * - * @param int|string $iOrderNumber - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_GetOrderDetails - */ - public function getOrderDetails($iOrderNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_GET_ORDER_DETAILS; - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER - )); - - return new QentaCEE_QPay_Response_Toolkit_GetOrderDetails($this->_send()); - } - - /** - * Approve reversal - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_ApproveReversal - */ - public function approveReversal($iOrderNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_APPROVE_REVERSAL; - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER - )); - - return new QentaCEE_QPay_Response_Toolkit_ApproveReversal($this->_send()); - } - - /** - * Deposit - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_Deposit - */ - public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket=null) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::AMOUNT, $iAmount); - $this->_setField(self::CURRENCY, strtoupper($sCurrency)); - $this->_setBasket($basket); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER, - self::AMOUNT, - self::CURRENCY - )); - $this->_appendBasketFingerprintOrder($basket); - - return new QentaCEE_QPay_Response_Toolkit_Deposit($this->_send()); - } - - /** - * Deposit reversal - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return QentaCEE_QPay_Response_Toolkit_DepositReversal - */ - public function depositReversal($iOrderNumber, $iPaymentNumber) - { - $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT_REVERSAL; - - $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_setField(self::PAYMENT_NUMBER, $iPaymentNumber); - - $this->_fingerprintOrder->setOrder(Array( - self::CUSTOMER_ID, - self::SHOP_ID, - self::TOOLKIT_PASSWORD, - self::SECRET, - self::COMMAND, - self::LANGUAGE, - self::ORDER_NUMBER, - self::PAYMENT_NUMBER - )); - - return new QentaCEE_QPay_Response_Toolkit_DepositReversal($this->_send()); - } - - - /** - * TransferFund - * - * @param string $fundTransferType - * - * @return QentaCEE_QPay_Request_Backend_TransferFund - * @throws QentaCEE_Stdlib_Exception_InvalidTypeException - */ - public function transferFund($fundTransferType) - { - - switch ($fundTransferType) { - case self::$TRANSFER_FUND_TYPE_EXISTING: - $client = new QentaCEE_QPay_Request_Backend_TransferFund_Existing($this->oUserConfig); - break; - - case self::$TRANSFER_FUND_TYPE_SKIRLLWALLET: - $client = new QentaCEE_QPay_Request_Backend_TransferFund_SkrillWallet($this->oUserConfig); - break; - - case self::$TRANSFER_FUND_TYPE_MONETA: - $client = new QentaCEE_QPay_Request_Backend_TransferFund_Moneta($this->oUserConfig); - break; - - case self::$TRANSFER_FUND_TYPE_SEPACT: - $client = new QentaCEE_QPay_Request_Backend_TransferFund_SepaCT($this->oUserConfig); - break; - - default: - throw new QentaCEE_Stdlib_Exception_InvalidTypeException('Invalid fundTransferType'); - } - - $client->setType($fundTransferType); - - return $client; - } - - /** - * ******************* - * PROTECTED METHODS * - * ******************* - */ - - /** - * - * @see QentaCEE_Stdlib_Client_ClientAbstract::_getRequestUrl() - * @return string - */ - protected function _getRequestUrl() - { - return (string) $this->oClientConfig->TOOLKIT_URL; - } - - /** - * getter for given field - * - * @param string $name - * - * @return string|null - */ - protected function _getField($name) - { - return array_key_exists($name, $this->_requestData) ? $this->_requestData[$name] : null; - } - - /** - * Returns the user agent string - * - * @return string - */ - protected function _getUserAgent() - { - return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket.php deleted file mode 100644 index 02471a8..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket.php +++ /dev/null @@ -1,164 +0,0 @@ -getArticleNumber(); - $_quantity = $this->_getItemQuantity($_mArticleNumber); - - if (!$_quantity) { - $this->_items[md5($_mArticleNumber)] = Array( - 'instance' => $oItem, - self::QUANTITY => $iQuantity - ); - } else { - $this->_increaseQuantity($_mArticleNumber, $iQuantity); - } - - return $this; - } - - /** - * Returns the basket as pre-defined array (defined by QentaCEE) - * - * @return Array - */ - public function getData() - { - $_basketItems = $this->_items; - $_counter = 1; - - $this->_basket[self::BASKET_ITEMS] = count($_basketItems); - - foreach ($_basketItems as $oItem) { - $mArticleNumber = $oItem['instance']->getArticleNumber(); - $oItem = $oItem['instance']; - - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_ARTICLE_NUMBER] = $mArticleNumber; - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . self::QUANTITY] = $this->_getItemQuantity($mArticleNumber); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_GROSS_AMOUNT] = $oItem->getUnitGrossAmount(); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_NET_AMOUNT] = $oItem->getUnitNetAmount(); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_TAX_AMOUNT] = $oItem->getUnitTaxAmount(); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_TAX_RATE] = $oItem->getUnitTaxRate(); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_DESCRIPTION] = $oItem->getDescription(); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_NAME] = $oItem->getName(); - $this->_basket[self::BASKET_ITEM_PREFIX . $_counter . QentaCEE_Stdlib_Basket_Item::ITEM_IMAGE_URL] = $oItem->getImageUrl(); - - $_counter ++; - } - - return $this->_basket; - } - - /*************************************** - * PROTECTED METHODS * - ***************************************/ - - /** - * Updates the quantity for an item already in basket - * - * @param mixed(integer|string) $mArticleNumber - * @param int $iQuantity - */ - protected function _increaseQuantity($mArticleNumber, $iQuantity) - { - if (!isset( $this->_items[md5($mArticleNumber)] )) { - throw new Exception(sprintf("There is no item in the basket with article number '%s'. Thrown in %s.", - $mArticleNumber, __METHOD__)); - } - - $this->_items[md5($mArticleNumber)][self::QUANTITY] += $iQuantity; - - return true; - } - - /** - * Returns the quantity of item in basket - * - * @param mixed(integer|string) $mArticleNumber - * - * @return integer - */ - protected function _getItemQuantity($mArticleNumber) - { - return (int) isset( $this->_items[md5($mArticleNumber)] ) ? $this->_items[md5($mArticleNumber)][self::QUANTITY] : 0; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket/Item.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket/Item.php deleted file mode 100644 index 0dfda9b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Basket/Item.php +++ /dev/null @@ -1,276 +0,0 @@ -setArticleNumber($mArticleNumber); - } - } - - /** - * Sets the item tax amount - * - * @param mixed(integer|float) $fTaxAmount - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setUnitTaxAmount($fTaxAmount) - { - $this->_setField(self::ITEM_UNIT_TAX_AMOUNT, $fTaxAmount); - return $this; - } - - /** - * Returns the tax amount - * - * @return mixed(integer|float) - */ - public function getUnitTaxAmount() - { - return $this->_itemData[self::ITEM_UNIT_TAX_AMOUNT]; - } - - /** - * Sets the item tax rate - * - * @param mixed(integer|float) $fTaxRate - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setUnitTaxRate($fTaxRate) - { - $this->_setField(self::ITEM_UNIT_TAX_RATE, $fTaxRate); - return $this; - } - - /** - * Returns the tax rate - * - * @return mixed(integer|float) - */ - public function getUnitTaxRate() - { - return $this->_itemData[self::ITEM_UNIT_TAX_RATE]; - } - - /** - * Sets the article number for an item - * - * @param mixed(string|integer) $mArticleNumber - * - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setArticleNumber($mArticleNumber) - { - $this->_setField(self::ITEM_ARTICLE_NUMBER, $mArticleNumber); - - return $this; - } - - /** - * Returns the article number of an item - * - * @return mixed(string|integer) - */ - public function getArticleNumber() - { - return $this->_itemData[self::ITEM_ARTICLE_NUMBER]; - } - - /** - * Sets the gross amount for a unit - * - * @param mixed(integer|float) $fAmount - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setUnitGrossAmount($fAmount) - { - $this->_setField(self::ITEM_UNIT_GROSS_AMOUNT, $fAmount); - return $this; - } - - /** - * Returns the gross amount for a unit - * - * @return mixed(integer|float) - */ - public function getUnitGrossAmount() - { - return $this->_itemData[self::ITEM_UNIT_GROSS_AMOUNT]; - } - - /** - * Sets the net amount for a unit - * - * @param mixed(integer|float) $fAmount - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setUnitNetAmount($fAmount) - { - $this->_setField(self::ITEM_UNIT_NET_AMOUNT, $fAmount); - return $this; - } - - /** - * Returns the net amount for a unit - * - * @return mixed(integer|float) - */ - public function getUnitNetAmount() - { - return $this->_itemData[self::ITEM_UNIT_NET_AMOUNT]; - } - - /** - * Sets the item description - * - * @param string $sDescription - * - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setDescription($sDescription) - { - $this->_setField(self::ITEM_DESCRIPTION, (string) $sDescription); - - return $this; - } - - /** - * Returns the item description - * - * @return string - */ - public function getDescription() - { - if(array_key_exists(self::ITEM_DESCRIPTION, $this->_itemData)) { - return (string) $this->_itemData[self::ITEM_DESCRIPTION]; - } - return null; - } - - /** - * Sets the item name - * - * @param string $sName - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setName($sName) { - $this->_setField(self::ITEM_NAME, (string) $sName); - return $this; - } - - /** - * Returns the item name - * - * @return string - */ - public function getName() - { - return (string) $this->_itemData[self::ITEM_NAME]; - } - - - /** - * Sets the item image url - * - * @param string $sImageUrl - * @return QentaCEE_Stdlib_Basket_Item - */ - public function setImageUrl($sImageUrl) { - $this->_setField(self::ITEM_IMAGE_URL, (string) $sImageUrl); - return $this; - } - - /** - * Returns the item image url - * - * @return string - */ - public function getImageUrl() - { - if(array_key_exists(self::ITEM_IMAGE_URL, $this->_itemData)) { - return (string) $this->_itemData[self::ITEM_IMAGE_URL]; - } - return null; - } - - /*************************************** - * PROTECTED METHODS * - ***************************************/ - - /** - * Field setter - * - * @param string $sName - * @param mixed $mValue - */ - protected function _setField($sName, $mValue) - { - $this->_itemData[$sName] = $mValue; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/ClientAbstract.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/ClientAbstract.php deleted file mode 100644 index 25a0ee2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/ClientAbstract.php +++ /dev/null @@ -1,537 +0,0 @@ -_httpClient = $httpClient; - - return $this; - } - - /** - * private getter for the Guzzle Http Client - * if not set yet it will be instantiated - * - * @return GuzzleHttp\Client - */ - protected function _getHttpClient() - { - if (is_null($this->_httpClient)) { - // @todo implement SSL check here - $this->_httpClient = new GuzzleHttp\Client(); - } - - return $this->_httpClient; - } - - - /** - * Returns the user configuration object - * - * @return QentaCEE_Stdlib_Config - */ - public function getUserConfig() - { - return $this->oUserConfig; - } - - /** - * Returns the client configuration object - * - * @return QentaCEE_Stdlib_Config - */ - public function getClientConfig() - { - return $this->oClientConfig; - } - - /** - * Returns the user agent string - * - * @return string - */ - public function getUserAgentString() - { - $oClientConfig = new QentaCEE_Stdlib_Config(QentaCEE_Stdlib_Module::getClientConfig()); - - $sUserAgent = $this->_getUserAgent() . ";{$oClientConfig->MODULE_NAME};{$oClientConfig->MODULE_VERSION};"; - - foreach ($oClientConfig->DEPENDENCIES as $sValue) { - $sUserAgent .= is_string($sValue) ? $sValue . ";" : $sValue->CURRENT . ";"; - } - - return $sUserAgent; - } - - /** - * Returns all the request data as an array - * - * @return array - */ - public function getRequestData() - { - return (array) $this->_requestData; - } - - /************************** - * PROTECTED METHODS * - **************************/ - - /** - * Must be implemented in the client - * - * @return string - * @abstract - */ - abstract protected function _getRequestUrl(); - - /** - * Must be implemented in the client - * - * @return string - * @abstract - */ - abstract protected function _getUserAgent(); - - /** - * 'Secret' setter - * - * @param string $secret - */ - protected function _setSecret($secret) - { - $this->_secret = $secret; - $this->_fingerprintOrder[] = self::SECRET; - } - - /** - * sends the request and returns the zend http response object instance - * - * @throws QentaCEE_Stdlib_Client_Exception_InvalidResponseException - * @return ResponseInterface - */ - protected function _send() - { - if (count($this->_fingerprintOrder)) { - $this->_fingerprintString = $this->_calculateFingerprint(); - if (!is_null($this->_fingerprintString)) { - $this->_requestData[self::REQUEST_FINGERPRINT] = $this->_fingerprintString; - } - } - - try { - $response = $this->_sendRequest(); - } catch (RequestException $e) { - throw new QentaCEE_Stdlib_Client_Exception_InvalidResponseException($e->getMessage(), $e->getCode(), $e); - } - - return $response; - } - - /** - * method to calculate fingerprint from given fields. - * - * @return string - fingerprint hash - */ - protected function _calculateFingerprint() - { - $oFingerprintOrder = $this->_fingerprintOrder; - - if ($this->_fingerprintOrderType == self::$FINGERPRINT_TYPE_DYNAMIC) { - // we have to add REQUESTFINGERPRINTORDER to local fingerprintOrder to add correct value to param list - $oFingerprintOrder[] = self::REQUEST_FINGERPRINT_ORDER; - $this->_requestData[self::REQUEST_FINGERPRINT_ORDER] = (string) $oFingerprintOrder; - } - // fingerprintFields == requestFields + secret - secret MUST NOT be send as param - $fingerprintFields = $this->_requestData; - $fingerprintFields[self::SECRET] = $this->_secret; - - return QentaCEE_Stdlib_Fingerprint::generate($fingerprintFields, $oFingerprintOrder); - } - - /** - * Sends the request and returns the zend http response object instance - * - * @throws RequestException - * @return ResponseInterface - */ - protected function _sendRequest() - { - $httpClient = $this->_getHttpClient(); - - $request = $httpClient->post($this->_getRequestUrl(), [ - 'form_params' => $this->_requestData, - 'headers' => [ - 'User-Agent' => $this->getUserAgentString() - ] - ]); - - return $request; - } - - /** - * Setter for requestfield. - * Bare in mind that $this->_fingerprintOrder is an QentaCEE_Stdlib_FingerprintOrder object which implements - * the ArrayAccess interface meaning we can use the array annotation [] on an object - * - * @see QentaCEE_Stdlib_FingerprintOrder - * - * @param string $name - * @param mixed $value - */ - protected function _setField($name, $value) - { - $this->_requestData[(string) $name] = (string) $value; - $this->_fingerprintOrder[] = (string) $name; - } - - /** - * Check if we the field is set in the _requestData array - * - * @param string $sFieldname - * - * @return boolean - */ - protected function _isFieldSet($sFieldname) - { - return isset($this->_requestData[$sFieldname] ) && !empty( $this->_requestData[$sFieldname]); - } - - /** - * Sets shopping basket data to _requestData - * - * @param QentaCEE_Stdlib_Basket $basket - */ - protected function _setBasket($basket) - { - if($basket == null) { - return; - } - - foreach($basket->getData() AS $key => $value) { - $this->_setField($key, $value); - } - } - - /** - * Appends basket to fingerprint order - * - * @param QentaCEE_Stdlib_Basket $basket - */ - protected function _appendBasketFingerprintOrder($basket) - { - if($basket == null) { - return; - } - - $data = $basket->getData(); - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEMS; - for ($i = 1; $i <= (int)$data[QentaCEE_Stdlib_Basket::BASKET_ITEMS]; $i++) { - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_ARTICLE_NUMBER; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_QUANTITY; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_DESCRIPTION; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_NAME; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_IMAGE_URL; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_GROSS_AMOUNT; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_NET_AMOUNT; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_TAX_AMOUNT; - $this->_fingerprintOrder[] = QentaCEE_Stdlib_Basket::BASKET_ITEM_PREFIX . $i . QentaCEE_Stdlib_Basket_Item::ITEM_UNIT_TAX_RATE; - } - } - - protected function _composeCustomerStatement($paymenttype, $prefix = null, $uniqString = null) - { - if ($prefix === null) { - $prefix = 'Web Shop'; - } - - $prefix = substr($prefix, 0, 9); - - if (!strlen($uniqString)) { - $uniqString = $this->generateUniqString(10); - } - - if ($paymenttype == QentaCEE_Stdlib_PaymentTypeAbstract::POLI) { - $customerStatement = $prefix; - } else { - $customerStatement = sprintf('%s Id:%s', $prefix, $uniqString); - } - - return $customerStatement; - } - - /** - * returns a uniq String with default length 10. - * - * @param int $length - * - * @return string - */ - public function generateUniqString($length = 10) - { - $tid = ''; - - $alphabet = "023456789abcdefghikmnopqrstuvwxyzABCDEFGHIKMNOPQRSTUVWXYZ"; - - for ($i = 0; $i < $length; $i ++) { - $c = substr($alphabet, mt_rand(0, strlen($alphabet) - 1), 1); - - if (( ( $i % 2 ) == 0 ) && !is_numeric($c)) { - $i --; - continue; - } - if (( ( $i % 2 ) == 1 ) && is_numeric($c)) { - $i --; - continue; - } - - $alphabet = str_replace($c, '', $alphabet); - $tid .= $c; - } - - return $tid; - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/Exception/ExceptionInterface.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/Exception/ExceptionInterface.php deleted file mode 100644 index a3a0dd3..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Client/Exception/ExceptionInterface.php +++ /dev/null @@ -1,42 +0,0 @@ -_index = 0; - $this->_data = array(); - foreach ($array as $key => $value) { - if (is_array($value)) { - $this->_data[$key] = new self($value); - } else { - $this->_data[$key] = $value; - } - } - $this->_count = count($this->_data); - } - - /** - * Support isset() overloading on PHP 5.1 - * - * @param string $name - * - * @return boolean - */ - public function __isset($name) - { - return isset($this->_data[$name]); - } - - /** - * Support unset() overloading on PHP 5.1 - * - * @param string $name - * - * @return void - */ - public function __unset($name) - { - unset( $this->_data[$name] ); - $this->_count = count($this->_data); - $this->_skipNextIteration = true; - } - - /** - * Magic function so that $obj->value will work. - * - * @param string $name - * - * @return mixed - */ - public function __get($name) - { - return $this->get($name); - } - - /** - * Retrieve a value and return $default if there is no element set. - * - * @param string $name - * @param mixed $default - * - * @return mixed - */ - public function get($name, $default = null) - { - $result = $default; - if (array_key_exists($name, $this->_data)) { - $result = $this->_data[$name]; - } - - return $result; - } - - /** - * Defined by Countable interface - * - * @return int - */ - public function count() - { - return $this->_count; - } - - /** - * Defined by Iterator interface - * - * @return mixed - */ - public function current() - { - $this->_skipNextIteration = false; - - return current($this->_data); - } - - /** - * Defined by Iterator interface - * - * @return mixed - */ - public function key() - { - return key($this->_data); - } - - /** - * Defined by Iterator interface - */ - public function next() - { - if ($this->_skipNextIteration) { - $this->_skipNextIteration = false; - - return; - } - next($this->_data); - $this->_index ++; - } - - /** - * Defined by Iterator interface - */ - public function rewind() - { - $this->_skipNextIteration = false; - reset($this->_data); - $this->_index = 0; - } - - /** - * Defined by Iterator interface - * - * @return boolean - */ - public function valid() - { - return $this->_index < $this->_count; - } - - /** - * Return an associative array of the stored data. - * - * @return array - */ - public function toArray() - { - $array = array(); - $data = $this->_data; - foreach ($data as $key => $value) { - if ($value instanceof QentaCEE_Stdlib_Config) { - $array[$key] = $value->toArray(); - } else { - $array[$key] = $value; - } - } - - return $array; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Config/client.config.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Config/client.config.php deleted file mode 100644 index 3d80e9e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Config/client.config.php +++ /dev/null @@ -1,41 +0,0 @@ - 'QentaCEE_Stdlib', - 'MODULE_VERSION' => '3.0.3', - 'DEPENDENCIES' => array( - 'SCRIPTING_LANG' => 'PHP', - 'SCRIPTING_LANG_VERSION' => '5.2' - ), - 'USE_DEBUG' => false -); \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData.php deleted file mode 100644 index 8fe840d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData.php +++ /dev/null @@ -1,332 +0,0 @@ -_setField(self::$EMAIL, $mailAddress); - - return $this; - } - - /** - * setter for the birthdate of the consumer - * - * @param DateTime $birthDate - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setBirthDate(DateTime $birthDate) - { - $this->_setField(self::$BIRTH_DATE, $birthDate->format(self::$BIRTH_DATE_FORMAT)); - - return $this; - } - - /** - * setter for the tax identification number of the consumer - * - * @param string $taxIdentificationNumber - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setTaxIdentificationNumber($taxIdentificationNumber) - { - $this->_setField(self::$TAX_IDENTIFICATION_NUMBER, $taxIdentificationNumber); - - return $this; - } - - /** - * setter for the drivers license number of the consumer - * - * @param string $driversLicenseNumber - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setDriversLicenseNumber($driversLicenseNumber) - { - $this->_setField(self::$DRIVERS_LICENSE_NUMBER, $driversLicenseNumber); - - return $this; - } - - /** - * setter for the drivers license country of the consumer - * - * @param string $driversLicenseCountry - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setDriversLicenseCountry($driversLicenseCountry) - { - $this->_setField(self::$DRIVERS_LICENSE_COUNTRY, $driversLicenseCountry); - - return $this; - } - - /** - * setter for the drivers license state of the consumer - * - * @param string $driversLicenseState - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setDriversLicenseState($driversLicenseState) - { - $this->_setField(self::$DRIVERS_LICENSE_STATE, $driversLicenseState); - - return $this; - } - - /** - * @param string $companyName - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setCompanyName($companyName) - { - $this->_setField(self::$COMPANY_NAME, $companyName); - - return $this; - } - - /** - * @param string $companyVatId - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setCompanyVatId($companyVatId) - { - $this->_setField(self::$COMPANY_VAT_ID, $companyVatId); - - return $this; - } - - /** - * @param string $companyTradeRegistryNumber - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setCompanyTradeRegistryNumber($companyTradeRegistryNumber) - { - $this->_setField(self::$COMPANY_TRADE_REGISTRY_NUMBER, $companyTradeRegistryNumber); - - return $this; - } - - /** - * adds addressinformation to the consumerdata. - * used {@link QentaCEE_Stdlib_ConsumerData::getData()} - * - * @param QentaCEE_Stdlib_ConsumerData_Address $address - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function addAddressInformation(QentaCEE_Stdlib_ConsumerData_Address $address) - { - $consumerData = array_merge($this->_consumerData, $address->getData()); - $this->_consumerData = $consumerData; - - return $this; - } - - /** - * setter for the consumer IP-Address - * - * @param string $consumerIpAddress - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setIpAddress($consumerIpAddress) - { - $this->_setField(self::$IP_ADDRESS, $consumerIpAddress); - - return $this; - } - - /** - * setter for the consumer user-agent - * - * @param string $consumerUserAgent - * - * @return QentaCEE_Stdlib_ConsumerData - */ - public function setUserAgent($consumerUserAgent) - { - $this->_setField(self::$USER_AGENT, $consumerUserAgent); - - return $this; - } - - /** - * Getter for all consumerData - * - * @return string[] - */ - public function getData() - { - return $this->_consumerData; - } - - /** - * Static getter for consumerUserAgentField - * - * @return string - */ - public static function getConsumerUserAgentFieldName() - { - return self::$PREFIX . self::$USER_AGENT; - } - - /** - * Static getter for consumerIpField - * - * @return string - */ - public static function getConsumerIpAddressFieldName() - { - return self::$PREFIX . self::$IP_ADDRESS; - } - - /** - * setter for consumerdata fields - * - * @param string $name - * @param string $value - * - * @access private - */ - protected function _setField($name, $value) - { - // e.g. consumerBillingFirstname - $this->_consumerData[self::$PREFIX . $name] = (string) $value; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData/Address.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData/Address.php deleted file mode 100644 index be1867d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ConsumerData/Address.php +++ /dev/null @@ -1,332 +0,0 @@ -_addressType = $addressType; - } - - /** - * setter for the firstname used for the given address. - * - * @param string $firstname - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setFirstname($firstname) - { - $this->_setField(self::$FIRSTNAME, $firstname); - - return $this; - } - - /** - * setter for the lastname used for the given address. - * - * @param string $lastname - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setLastname($lastname) - { - $this->_setField(self::$LASTNAME, $lastname); - - return $this; - } - - /** - * setter for the addressfield 1 used for the given address. - * - * @param string $address1 - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setAddress1($address1) - { - $this->_setField(self::$ADDRESS1, $address1); - - return $this; - } - - /** - * setter for the addressfield 2 used for the given address. - * - * @param string $address2 - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setAddress2($address2) - { - $this->_setField(self::$ADDRESS2, $address2); - - return $this; - } - - /** - * setter for the city used for the given address. - * - * @param string $city - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setCity($city) - { - $this->_setField(self::$CITY, $city); - - return $this; - } - - /** - * setter for the country used for the given address. - * - * @param string $country - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setCountry($country) - { - $this->_setField(self::$COUNTRY, $country); - - return $this; - } - - /** - * setter for the state used for the given address. - * - * @param string $state - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setState($state) - { - $this->_setField(self::$STATE, $state); - - return $this; - } - - /** - * setter for the zip code used for the given address. - * - * @param string $zipCode - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setZipCode($zipCode) - { - $this->_setField(self::$ZIP_CODE, $zipCode); - - return $this; - } - - /** - * setter for the phone number used for the given address. - * - * @param string $phone - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setPhone($phone) - { - $this->_setField(self::$PHONE, $phone); - - return $this; - } - - /** - * setter for the fax number used for the given address. - * - * @param string $fax - * - * @return QentaCEE_Stdlib_ConsumerData_Address - */ - public function setFax($fax) - { - $this->_setField(self::$FAX, $fax); - - return $this; - } - - /** - * setter for an addressfield. - * - * @param string $name - * @param string $value - */ - protected function _setField($name, $value) - { - // e.g. consumerBillingFirstname - $this->_addressData[self::$PREFIX . $this->_addressType . $name] = (string) $value; - } - - /** - * returns the given addressfields as an array - * - * @return string[] - */ - public function getData() - { - return $this->_addressData; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Error.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Error.php deleted file mode 100644 index 3d3fefa..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Error.php +++ /dev/null @@ -1,104 +0,0 @@ -_message; - } - - /** - * Error Message setter - * - * @param string $message - * - * @return QentaCEE_Stdlib_Error - */ - public function setMessage($message) - { - $this->_message = (string) $message; - - return $this; - } - - /** - * Consumer message setter - * - * @param string $consumerMessage - * - * @return QentaCEE_Stdlib_Error - */ - public function setConsumerMessage($consumerMessage) - { - $this->_consumerMessage = (string) $consumerMessage; - - return $this; - } - - /** - * Consumer message getter - * - * @return string - */ - public function getConsumerMessage() - { - return (string) $this->_consumerMessage; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/ExceptionInterface.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/ExceptionInterface.php deleted file mode 100644 index b1d6d1d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Exception/ExceptionInterface.php +++ /dev/null @@ -1,42 +0,0 @@ -add('index') is same as $obj[] = 'index'; - * - * 2. we can iterate it via foreach ie. - * foreach($obj as $key => $value) {} - * - * 3. and we can use count() on the whole object ie count($obj) - * which will return the number of items in fingeprintOrder array - * - * @name QentaCEE_Stdlib_FingerprintOrder - * @category QentaCEE - * @package QentaCEE_Stdlib - */ - -class QentaCEE_Stdlib_FingerprintOrder implements ArrayAccess, IteratorAggregate, Countable -{ - /** - * - * Internal data holder - * - * @var Array - */ - protected $_fingeprintOrder; - - /** - * Constructor which accepts array(key=>pair) or string ("first, second, thrid, fourth" format) - * - * @param string|array $mItems - * - * @throws QentaCEE_Stdlib_Exception_InvalidArgumentException - */ - public function __construct($mItems = null) - { - $this->_fingeprintOrder = Array(); - - if (!is_null($mItems) && !$this->setOrder($mItems)) { - throw new QentaCEE_Stdlib_Exception_InvalidArgumentException(sprintf("Unknown fingerprint format in %s on line %s", - __METHOD__, __LINE__)); - } - } - - /** - * Sets the fingerprint order from string ("first, second, third, fourth" format) - * or from an existing array (normal "key=>pair" format). - * - * @param string|array $mItems - * - * @return boolean - */ - public function setOrder($mItems) - { - if (is_array($mItems) && count($mItems)) { - $this->_fingeprintOrder = Array(); - foreach ($mItems as $sItem) { - $this->_fingeprintOrder[] = trim($sItem); - } - - return true; - } elseif (is_string($mItems)) { - return $this->setOrder(explode(",", $mItems)); - } else { - return false; - } - } - - /** - * Internal __toArray implementation - * At the time of writing this (07.03.2013) PHP doesn't support - * array casting of objects by calling __toArray function (like string casting nad calling __toString()) - * - * @return array - */ - public function __toArray() - { - return (array) $this->_fingeprintOrder; - } - - /** - * Returns the fingerprint order as string (csv) - * - * @return string - */ - public function __toString() - { - return (string) implode(",", $this->_fingeprintOrder); - } - - /** - * @see ArrayAccess::offsetSet($mOffset, $mValue) - * - * @param int|string $mOffset - * @param int|string $mValue - */ - public function offsetSet($mOffset, $mValue) - { - if (!$mOffset) { - $this->_fingeprintOrder[] = trim($mValue); - } else { - $this->_fingeprintOrder[$mOffset] = trim($mValue); - } - } - - /** - * @see ArrayAccess::offsetGet($mOffset) - * - * @param int|string $mOffset - * - * @return Mixed - */ - public function offsetGet($mOffset) - { - return isset( $this->_fingeprintOrder[$mOffset] ) ? $this->_fingeprintOrder[$mOffset] : null; - } - - /** - * @see ArrayAccess::offsetExists($mOffset) - * - * @param int|string $mOffset - * - * @return boolean - */ - public function offsetExists($mOffset) - { - return (bool) isset( $this->_fingeprintOrder[$mOffset] ); - } - - /** - * @see ArrayAccess::offsetUnset($mOffset) - * - * @param int|string $mOffset - */ - public function offsetUnset($mOffset) - { - unset( $this->_fingeprintOrder[$mOffset] ); - } - - /** - * IteratorAggregate abstract function implementation - * Due to this we can iterate thru object just using the foreach - * - * @see IteratorAggregate::getIterator() - * @return ArrayIterator - */ - public function getIterator() - { - return new ArrayIterator($this->_fingeprintOrder); - } - - /** - * Impltemented count function from Countable interface - * - * @see Countable::count(); - * @return number - */ - public function count() - { - return (int) count($this->_fingeprintOrder); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Module.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Module.php deleted file mode 100644 index 67e120f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Module.php +++ /dev/null @@ -1,52 +0,0 @@ - 'Apothekerbank', - 'ARZ|AAB' => 'Austrian Anadi Bank AG', - 'ARZ|BAF' => 'Ärztebank', - 'BA-CA' => 'Bank Austria', - 'ARZ|BCS' => 'Bankhaus Carl Spängler & Co. AG', - 'ARZ|BSS' => 'Bankhaus Schelhammer & Schattera AG', - 'Bawag|BG' => 'BAWAG P.S.K. AG', - 'ARZ|BKS' => 'BKS Bank AG', - 'ARZ|BKB' => 'Brüll Kallmus Bank AG', - 'ARZ|BTV' => 'BTV VIER LÄNDER BANK', - 'ARZ|CBGG' => 'Capital Bank Grawe Gruppe AG', - 'ARZ|VB' => 'Volksbank Gruppe', - 'ARZ|DB' => 'Dolomitenbank', - 'Bawag|EB' => 'Easybank AG', - 'Spardat|EBS' => 'Erste Bank und Sparkassen', - 'ARZ|HAA' => 'Hypo Alpe-Adria-Bank International AG', - 'ARZ|VLH' => 'Hypo Landesbank Vorarlberg', - 'ARZ|HI' => 'HYPO NOE Gruppe Bank AG', - 'ARZ|NLH' => 'HYPO NOE Landesbank AG', - 'Hypo-Racon|O' => 'Hypo Oberösterreich', - 'Hypo-Racon|S' => 'Hypo Salzburg', - 'Hypo-Racon|St' => 'Hypo Steiermark', - 'ARZ|HTB' => 'Hypo Tirol Bank AG', - 'BB-Racon' => 'HYPO-BANK BURGENLAND Aktiengesellschaft', - 'ARZ|IB' => 'Immo-Bank', - 'ARZ|OB' => 'Oberbank AG', - 'Racon' => 'Raiffeisen Bankengruppe Österreich', - 'ARZ|SB' => 'Schoellerbank AG', - 'Bawag|SBW' => 'Sparda Bank Wien', - 'ARZ|SBA' => 'SPARDA-BANK AUSTRIA', - 'ARZ|VKB' => 'Volkskreditbank AG', - 'ARZ|VRB' => 'VR-Bank Braunau' - ); - - /** - * array of iDEAL financial institutions - * - * @var string[] - * - * @todo would be nice to get this values directly from the server so the data is in sync - */ - protected static $_idl_financial_institutions = Array( - 'ABNAMROBANK' =>'ABN AMRO Bank', - 'ASNBANK' =>'ASN Bank', - 'BUNQ' =>'Bunq Bank', - 'INGBANK' =>'ING', - 'KNAB' =>'knab', - 'RABOBANK' =>'Rabobank', - 'SNSBANK' =>'SNS Bank', - 'REGIOBANK' =>'RegioBank', - 'TRIODOSBANK' =>'Triodos Bank', - 'VANLANSCHOT' =>'Van Lanschot Bankiers' - ); - - - /** - * check if the given paymenttype has financial institions - * - * @param string $paymentType - * - * @return bool - */ - public static function hasFinancialInstitutions($paymentType) - { - return ($paymentType == self::EPS || $paymentType == self::IDL); - } - - /** - * the an array of financial institutions for the given paymenttype. - * - * @param string $paymentType - * - * @return string[] - */ - public static function getFinancialInstitutions($paymentType) - { - switch ($paymentType) { - case self::EPS: - return self::$_eps_financial_institutions; - break; - case self::IDL: - return self::$_idl_financial_institutions; - break; - default: - return Array(); - break; - } - } - - /** - * Returns full name of the financial institution - * Used in dd_wirecard_order.php (function: getPayment()) - * - * @param string $sFinancialInstitutionShortCode - * - * @return string - */ - public static function getFinancialInstitutionFullName($sFinancialInstitutionShortCode) - { - if (array_key_exists($sFinancialInstitutionShortCode, self::$_eps_financial_institutions)) { - return self::$_eps_financial_institutions[$sFinancialInstitutionShortCode]; - } - - if (array_key_exists($sFinancialInstitutionShortCode, self::$_idl_financial_institutions)) { - return self::$_idl_financial_institutions[$sFinancialInstitutionShortCode]; - } - - return ""; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Response/ResponseAbstract.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Response/ResponseAbstract.php deleted file mode 100644 index c11d999..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Response/ResponseAbstract.php +++ /dev/null @@ -1,157 +0,0 @@ -_response = QentaCEE_Stdlib_SerialApi::decode($response->getBody()); - } elseif (is_array($response)) { - $this->_response = $response; - } else { - throw new QentaCEE_Stdlib_Exception_InvalidResponseException(sprintf('Invalid response from QentaCEE thrown in %s.', - __METHOD__)); - } - } - - /** - * Cheks to see if the object request failed or not - * - * @return boolean - */ - public function hasFailed() - { - return ($this->getStatus() >= self::STATE_FAILURE); - } - - /** - * getter for given field - * - * @param string $name - * - * @return string|array|null - */ - protected function _getField($name) - { - return isset( $this->_response[$name] ) ? $this->_response[$name] : null; - } - - - /** - * getter for the returned redirect url - * - * @return string - */ - public function getRedirectUrl() - { - return (string) $this->_getField(self::REDIRECT_URL); - } - - /** - * getter for the response data - * - * @return array - */ - public function getResponse() - { - return $this->_response; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Cancel.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Cancel.php deleted file mode 100644 index 244f34a..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Cancel.php +++ /dev/null @@ -1,49 +0,0 @@ - $secret, - self::$FINGERPRINT_ORDER_FIELD => 'responseFingerprintOrder', - )); - - $oFingerprintValidator->setHashAlgorithm($hashAlgo); - $oFingerprintValidator->setOrderType(QentaCEE_Stdlib_Validate_Fingerprint::TYPE_DYNAMIC); - - $this->addValidator($oFingerprintValidator, 'responseFingerprint'); - } - - /** - * getter for the return parameter orderNumber - * - * @return string - */ - public function getOrderNumber() - { - return $this->orderNumber; - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/ReturnAbstract.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/ReturnAbstract.php deleted file mode 100644 index 4151909..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/ReturnAbstract.php +++ /dev/null @@ -1,172 +0,0 @@ -_returnData = $returnData; - } - - /** - * Validate function - * - * @return bool - * @throws Exception - */ - public function validate() - { - // If there are no validators in the array then the validation is "successfull" - if (!count($this->_validators)) { - return true; - } - - $_bValid = true; - - // Iterate thru all the validators and validate every one of them - foreach ($this->_validators as $param => $aValidator) { - foreach ($aValidator as $oValidator) { - /** @var QentaCEE_Stdlib_Validate_ValidateAbstract $oValidator */ - $param = (string) $param; - - if (!isset( $this->_returnData[$param] )) { - throw new Exception(sprintf("No key '{$param}' found in \$this->_returnData array. Thrown in %s on line %s.", - __METHOD__, __LINE__)); - } - - $bValidatorResult = $oValidator->isValid($this->_returnData[$param], $this->_returnData); - - $_bValid = $_bValid && $bValidatorResult; - } - } - - return $_bValid; - } - - /** - * Adds the validator - * - * @param QentaCEE_Stdlib_Validate_ValidateAbstract $oValidator - * @param string $param - * - * @return QentaCEE_Stdlib_Return_ReturnAbstract - */ - public function addValidator(QentaCEE_Stdlib_Validate_ValidateAbstract $oValidator, $param) - { - $this->_validators[(string) $param][] = $oValidator; - - return $this; - } - - /** - * getter for paymentState - * - * @return string - */ - public function getPaymentState() - { - return (string) $this->_state; - } - - /** - * magic getter method - * - * @param string $name - * - * @return string - */ - public function __get($name) - { - $name = (string) $name; - - return (string) array_key_exists($name, $this->_returnData) ? $this->_returnData[$name] : ''; - } - - /** - * getter for filtered return data. - * - * @return string[] - */ - public function getReturned() - { - $ret = $this->_returnData; - - // noone needs the responseFingerprintOrder and responseFingerprint in the shop. - if (array_key_exists('responseFingerprintOrder', $ret)) { - unset( $ret['responseFingerprintOrder'] ); - } - - if (array_key_exists('responseFingerprint', $ret)) { - unset( $ret['responseFingerprint'] ); - } - - return $ret; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success.php deleted file mode 100644 index 60bde32..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success.php +++ /dev/null @@ -1,195 +0,0 @@ -_secret = (string) $secret; - parent::__construct($returnData); - - $oFingerprintValidator = new QentaCEE_Stdlib_Validate_Fingerprint(Array( - self::$SECRET => $secret, - self::$FINGERPRINT_ORDER_FIELD => 'responseFingerprintOrder', - )); - - $oFingerprintValidator->setHashAlgorithm($hashAlgo); - $oFingerprintValidator->setOrderType(QentaCEE_Stdlib_Validate_Fingerprint::TYPE_DYNAMIC); - - $this->addValidator($oFingerprintValidator, 'responseFingerprint'); - } - - /** - * getter for the return parameter amount - * - * @return string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * getter for the return parameter currency - * - * @return string - */ - public function getCurrency() - { - return (string) $this->currency; - } - - /** - * getter for the return parameter paymentType - * - * @return string - */ - public function getPaymentType() - { - return (string) $this->paymentType; - } - - /** - * getter for the return parameter financialInstitution - * - * @return string - */ - public function getFinancialInstitution() - { - return (string) $this->financialInstitution; - } - - /** - * getter for the return parameter Language - * - * @return string - */ - public function getLanguage() - { - return (string) $this->language; - } - - /** - * getter for the return parameter orderNumber - * - * @return string - */ - public function getOrderNumber() - { - return $this->orderNumber; - } - - /** - * getter for the return parameter gatewayReferenceNumber - * - * @return string - */ - public function getGatewayReferenceNumber() - { - return $this->gatewayReferenceNumber; - } - - /** - * getter for the return parameter gatewayContractNumber - * - * @return string - */ - public function getGatewayContractNumber() - { - return $this->gatewayContractNumber; - } - - /** - * getter for the return parameter avsResponseCode - * - * @return string - */ - public function getAvsResponseCode() - { - return $this->avsResponseCode; - } - - /** - * getter for the return parameter avsResponseMessage - * - * @return string - */ - public function getAvsResponseMessage() - { - return (string) $this->avsResponseMessage; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/CreditCard.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/CreditCard.php deleted file mode 100644 index 1a4d0cc..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/CreditCard.php +++ /dev/null @@ -1,93 +0,0 @@ -anonymousPan; - } - - /** - * getter for the return parameter authenticated - * - * @return string - */ - public function getAuthenticated() - { - return (string) $this->authenticated; - } - - /** - * getter for the return parameter expiry - * - * @return string - */ - public function getExpiry() - { - return (string) $this->expiry; - } - - /** - * getter for the return parameter cardholder - * - * @return string - */ - public function getCardholder() - { - return (string) $this->cardholder; - } - - /** - * getter for the return parameter maskedPan - * - * @return string - */ - public function getMaskedPan() - { - return (string) $this->maskedPan; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Ideal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Ideal.php deleted file mode 100644 index 4d92a77..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Ideal.php +++ /dev/null @@ -1,72 +0,0 @@ -idealConsumerName; - } - - /** - * getter for the return parameter idealConsumerCity - * - * @return string - */ - public function getConsumerCity() - { - return (string) $this->idealConsumerCity; - } - - /** - * getter for the return parameter idealConsunerAccountNumber - * - * @return string - */ - public function getConsumerAccountNumber() - { - return (string) $this->idealConsumerAccountNumber; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/PayPal.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/PayPal.php deleted file mode 100644 index ef0915b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/PayPal.php +++ /dev/null @@ -1,153 +0,0 @@ -paypalPayerID; - } - - /** - * getter for the return parameter paypalPayerEmail - * - * @return string - */ - public function getPayerEmail() - { - return $this->paypalPayerEmail; - } - - /** - * getter for the return parameter paypalPayerLastName - * - * @return string - */ - public function getPayerLastName() - { - return $this->paypalPayerLastName; - } - - /** - * getter for the return parameter paypalPayerFirstName - * - * @return string - */ - public function getPayerFirstName() - { - return $this->paypalPayerFirstName; - } - - /** - * getter for the return parameter paypalPayerAddressName - * - * @return string - */ - public function getPayerAddressName() - { - return $this->paypalPayerAddressName; - } - - /** - * getter for the return parameter paypalPayerAddressCountry - * - * @return string - */ - public function getPayerAddressCountry() - { - return $this->paypalPayerAddressCountry; - } - - /** - * getter for the return parameter paypalPayerAddressCity - * - * @return string - */ - public function getPayerAddressCity() - { - return $this->paypalPayerAddressCity; - } - - /** - * getter for the return parameter paypalPayerAddressState - * - * @return string - */ - public function getPayerAddressState() - { - return $this->paypalPayerAddressState; - } - - /** - * getter for the return parameter paypalPayerAddressStreet1 - * - * @return string - */ - public function getPayerAddressStreet1() - { - return $this->paypalPayerAddressStreet1; - } - - /** - * getter for the return parameter paypalPayerAddressStreet2 - * - * @return string - */ - public function getPayerAddressStreet2() - { - return $this->paypalPayerAddressStreet2; - } - - /** - * getter for the return parameter paypalPayerAddressZIP - * - * @return string - */ - public function getPayerAddressZip() - { - return $this->paypalPayerAddressZIP; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/SepaDD.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/SepaDD.php deleted file mode 100644 index ee7c80e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/SepaDD.php +++ /dev/null @@ -1,83 +0,0 @@ -creditorId; - } - - /** - * getter for the return parameter dueDate - * - * @return string - */ - public function getDueDate() - { - return $this->dueDate; - } - - /** - * getter for the return parameter mandateId - * - * @return string - */ - public function getMandateId() - { - return $this->mandateId; - } - - /** - * getter for the return parameter mandateSignatureDate - * - * @return string - */ - public function getMandateSignatureDate() - { - return $this->mandateSignatureDate; - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Sofortueberweisung.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Sofortueberweisung.php deleted file mode 100644 index 2887cdc..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Return/Success/Sofortueberweisung.php +++ /dev/null @@ -1,123 +0,0 @@ -senderAccountOwner; - } - - /** - * getter for the return parameter senderAccountNumber - * - * @return string - */ - public function getSenderAccountNumber() - { - return $this->senderAccountNumber; - } - - /** - * getter for the return parameter senderBankNumber - * - * @return string - */ - public function getSenderBankNumber() - { - return $this->senderBankNumber; - } - - /** - * getter for the return parameter senderBankName - * - * @return string - */ - public function getSenderBankName() - { - return $this->senderBankName; - } - - /** - * getter for the return parameter senderBIC - * - * @return string - */ - public function getSenderBic() - { - return $this->senderBIC; - } - - /** - * getter for the return parameter senderIBAN - * - * @return string - */ - public function getSenderIban() - { - return $this->senderIBAN; - } - - /** - * getter for the return parameter senderCountry - * - * @return string - */ - public function getSenderCountry() - { - return $this->senderCountry; - } - - /** - * getter for the return parameter securityCriteria - * - * @return string - */ - public function getSecurityCriteria() - { - return $this->securityCriteria; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ReturnFactoryAbstract.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ReturnFactoryAbstract.php deleted file mode 100644 index fb1f82e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/ReturnFactoryAbstract.php +++ /dev/null @@ -1,99 +0,0 @@ -'; - if (empty( $messages )) { - $returnValue = str_replace('%status%', 'OK', $template); - $returnValue = str_replace('%message%', '', $returnValue); - } else { - $returnValue = str_replace('%status%', 'NOK', $template); - $returnValue = str_replace('%message%', 'message="' . strval($messages) . '" ', $returnValue); - } - if ($inCommentTag) { - $returnValue = ''; - } - - return $returnValue; - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/SerialApi.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/SerialApi.php deleted file mode 100644 index be7bd58..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/SerialApi.php +++ /dev/null @@ -1,235 +0,0 @@ - $value) { - $serializedString = self::_addEntryEncode($key, $value, $serializedString); - } - - return $serializedString; - } else { - throw new QentaCEE_Stdlib_Exception_InvalidTypeException(sprintf('Invalid type for %s. Array must be given.', - __METHOD__)); - } - } - - /** - * Adds an key/value pair to the serializedString - * - * @param string key representing the entry - * @param mixed[] value for key entry - * @param string serialized String - */ - protected static function _addEntryEncode($key, $value, $serializedString = '') - { - if (is_array($value)) { - $entryValue = Array(); - $entryKey = ''; - $nextEntryKey = ''; - $nextEntryValue = ''; - foreach ($value as $subKey => $subValue) { - if (is_int($subKey)) { - $subKey ++; - if (!is_array($subValue)) { - if ($entryKey == '') { - - if (is_numeric(substr(strrchr($key, '.'), 1))) { - $entryKey = $key . '.' . $subKey; - } else { - $entryKey = $key; - } - } - $entryValue[] = $subValue; - // next loop - continue; - } else { - if (!empty( $entryValue )) { - $serializedString = self::_addLastEntryArrayEncode($entryKey, $entryValue, - $serializedString); - $entryValue = ''; - $entryKey = ''; - } - } - } - if (empty( $entryValue )) { - $serializedString = self::_addEntryEncode($key . '.' . $subKey, $subValue, $serializedString); - } else { - $nextEntryKey = $key . '.' . $subKey; - $nextEntryValue = $subValue; - } - } - if (!empty( $entryValue )) { - $serializedString = self::_addLastEntryArrayEncode($entryKey, $entryValue, $serializedString); - $entryValue = ''; - $entryKey = ''; - if ($nextEntryKey != '' && $nextEntryValue != '') { - $serializedString = self::_addEntryEncode($nextEntryKey, $nextEntryValue, $serializedString); - $nextEntryKey = ''; - $nextEntryValue = ''; - } - } - } else { - if ($serializedString != '') { - $serializedString .= '&'; - } - if (is_int($key)) { - $key ++; - } - $serializedString .= urlencode((string) $key) . '=' . urlencode((string) $value); - } - - return $serializedString; - } - - /** - * - * @param string $sKey - * @param array $aValues - * @param string $serializedString - * - * @return string - */ - protected static function _addLastEntryArrayEncode($sKey, Array $aValues, $serializedString) - { - $valueString = ''; - foreach ($aValues as $value) { - if ($valueString == '') { - $valueString = urlencode((string) $value); - } else { - $valueString .= ',' . urlencode((string) $value); - } - } - if ($serializedString == '') { - $serializedString = urlencode((string) $sKey) . '=' . $valueString; - } else { - $serializedString .= '&' . urlencode((string) $sKey) . '=' . $valueString; - } - - return $serializedString; - } - - public static function decode($encodedValue) - { - $decodedValue = Array(); - $keyValueStrings = explode('&', $encodedValue); - foreach ($keyValueStrings as $entry) { - $decodedValue = self::_addEntryDecode($entry, $decodedValue); - } - - return $decodedValue; - } - - /** - * - * @param string $sEntry - * @param array $aDecodedValue - * - * @throws QentaCEE_Stdlib_Exception_InvalidFormatException - * @return Array - */ - protected static function _addEntryDecode($sEntry, $aDecodedValue) - { - $aEntry = explode('=', $sEntry); - if (!is_array($aEntry) || count($aEntry) < 2) { - // ignore keys only - return $aDecodedValue; - } else if (count($aEntry) == 2) { - $keyArray = explode('.', $aEntry[0]); - if (is_array($keyArray) && count($keyArray) > 1) { - $position = &$aDecodedValue; - foreach ($keyArray as $keyName) { - if ($keyName == intval($keyName)) { - $keyName --; - } - if (!isset( $position[$keyName] )) { - $position[$keyName] = Array(); - } - $position = &$position[$keyName]; - } - $position = self::_decodeValueArray($aEntry[1]); - } else { - if ($aEntry[0] == intval($aEntry[0])) { - $aEntry[0] --; - } - $aDecodedValue[urldecode($aEntry[0])] = self::_decodeValueArray($aEntry[1]); - } - - return $aDecodedValue; - } else { - throw new QentaCEE_Stdlib_Exception_InvalidFormatException('Invalid format for QentaCEE_Stdlib_SerialApi::decode. Expecting key=value pairs'); - } - } - - /** - * - * @param string $sValue - * - * @return multitype: string | string - */ - protected static function _decodeValueArray($sValue) - { - $aValues = explode(',', $sValue); - if (is_array($aValues) && count($aValues) > 1) { - $aEntries = Array(); - foreach ($aValues as $sEntry) { - $aEntries[] = urldecode($sEntry); - } - - return $aEntries; - } else { - return urldecode($sValue); - } - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Exception.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Exception.php deleted file mode 100644 index f7ce728..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Exception.php +++ /dev/null @@ -1,36 +0,0 @@ - "Given fingerprint does not match calculated one.", - self::INVALID_LENGTH => "'%value%' has invalid length for hash algorithm %hash%.", - self::FINGERPRINTORDER_MISSING => 'Parameter fingerprintOrder is missing' - ); - - /** - * Message variables - * - * @var array - * @internal - */ - protected $_messageVariables = array( - 'hash' => 'hashAlgorithm' - ); - - /** - * Constructor - * - * @param array $options - optional - */ - public function __construct($options = array()) - { - $this->fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(); - - if ($options instanceof QentaCEE_Stdlib_Config) { - $options = $options->toArray(); - } - - if (!empty( $options['fingerprintOrder'] )) { - $this->setOrder($options['fingerprintOrder']); - } - - if (!empty( $options['fingerprintOrderField'] )) { - $this->setFingerprintOrderField($options['fingerprintOrderField']); - } - if (!empty( $options['hashAlgorithm'] )) { - $this->setHashAlgorithm($options['hashAlgorithm']); - } - if (!empty( $options['orderType'] )) { - $this->setOrderType($options['orderType']); - } - if (!empty( $options['secret'] )) { - $this->setSecret($options['secret']); - } - } - - /** - * Sets the fingerprint order field - * - * @param string $sFingerprintOrderField - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function setFingerprintOrderField($sFingerprintOrderField) - { - $this->fingerprintOrderField = strtolower($sFingerprintOrderField); - - return $this; - } - - /** - * Sets the ordere type - * - * @param string $orderType - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function setOrderType($orderType) - { - $this->fingerprintOrderType = (string) $orderType; - - return $this; - } - - /** - * Sets the fingeprint order - * - * @param string|array $order - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function setOrder($order) - { - $this->fingerprintOrder->setOrder($order); - - return $this; - } - - /** - * Hash algorithm setter - * - * @param string $hashAlgorithm - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function setHashAlgorithm($hashAlgorithm) - { - $this->hashAlgorithm = (string) $hashAlgorithm; - QentaCEE_Stdlib_Fingerprint::setHashAlgorithm($hashAlgorithm); - - return $this; - } - - /** - * Secret setter - * - * @param string $secret - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function setSecret($secret) - { - $this->secret = (string) $secret; - - return $this; - } - - /** - * Add madatory field - * - * @param string $mandatoryField - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function addMandatoryField($mandatoryField) - { - if (!in_array((string) $mandatoryField, $this->_mandatoryFields, false)) { - $this->_mandatoryFields[] = (string) $mandatoryField; - } - - return $this; - } - - /** - * Sets mandatory fields - * - * @param array $mandatoryFields - * - * @return QentaCEE_Stdlib_Validate_Fingerprint - */ - public function setMandatoryFields(Array $mandatoryFields) - { - $this->_mandatoryFields = $mandatoryFields; - - return $this; - } - - /** - * Is validator check valid? - * - * @see QentaCEE_Stdlib_Validate_Interface::isValid() - */ - public function isValid($value, $context = null) - { - $context = array_change_key_case($context, CASE_LOWER); - - switch ($this->hashAlgorithm) { - case QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_HMAC_SHA512: - case QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_SHA512: - $stringLength = 128; - break; - case QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5: - $stringLength = 32; - break; - default: - throw new QentaCEE_Stdlib_Exception_UnexpectedValueException(sprintf("Used hash algorithm '%s' is not supported. MD5, SHA512, or HMAC_SHA512 are currently supported.", - $this->hashAlgorithm)); - break; - } - - if (strlen($value) != $stringLength) { - return false; - } - - if ($this->fingerprintOrderType == self::TYPE_FIXED) { - $fingerprintOrder = $this->fingerprintOrder; - } else { - if (array_key_exists($this->fingerprintOrderField, $context)) { - $fingerprintOrder = new QentaCEE_Stdlib_FingerprintOrder(strtolower($context[$this->fingerprintOrderField])); - } else { - $this->_error(self::FINGERPRINTORDER_MISSING); - - return false; - } - } - - $fingerprintOrder->setOrder(array_map('strtolower', $this->fingerprintOrder->__toArray())); - if (!in_array('secret', $fingerprintOrder->__toArray())) { - throw new QentaCEE_Stdlib_Exception_UnexpectedValueException(); - } - - $fingerprintFields = Array(); - foreach ($fingerprintOrder as $fingerprintFieldKey) { - if ($fingerprintFieldKey == 'secret') { - $fingerprintFields[$fingerprintFieldKey] = $this->secret; - } else { - $fingerprintFields[$fingerprintFieldKey] = isset( $context[$fingerprintFieldKey] ) ? $context[$fingerprintFieldKey] : ''; - } - } - - if (!QentaCEE_Stdlib_Fingerprint::compare($fingerprintFields, $fingerprintOrder, $value)) { - $this->_error(self::INVALID); - - return false; - } - - return true; - } -} - -?> \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Interface.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Interface.php deleted file mode 100644 index 0ad2ffa..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/library/QentaCEE/Stdlib/Validate/Interface.php +++ /dev/null @@ -1,61 +0,0 @@ -_messages; - } - - /** - * Returns an array of the names of variables that are used in constructing validation failure messages - * - * @return array - */ - public function getMessageVariables() - { - return array_keys($this->_messageVariables); - } - - /** - * Returns the message templates from the validator - * - * @return array - */ - public function getMessageTemplates() - { - return $this->_messageTemplates; - } - - /** - * Sets the validation failure message template for a particular key - * - * @param string $messageString - * @param string $messageKey OPTIONAL - * - * @return QentaCEE_Stdlib_Validate_ValidateAbstract Provides a fluent interface - * @throws QentaCEE_Stdlib_Validate_Exception - */ - public function setMessage($messageString, $messageKey = null) - { - if ($messageKey === null) { - $keys = array_keys($this->_messageTemplates); - foreach ($keys as $key) { - $this->setMessage($messageString, $key); - } - - return $this; - } - - if (!isset( $this->_messageTemplates[$messageKey] )) { - throw new QentaCEE_Stdlib_Validate_Exception("No message template exists for key '$messageKey'"); - } - - $this->_messageTemplates[$messageKey] = $messageString; - - return $this; - } - - /** - * Sets validation failure message templates given as an array, where the array keys are the message keys, - * and the array values are the message template strings. - * - * @param array $messages - * - * @return QentaCEE_Stdlib_Validate_ValidateAbstract - */ - public function setMessages(array $messages) - { - foreach ($messages as $key => $message) { - $this->setMessage($message, $key); - } - - return $this; - } - - /** - * Magic function returns the value of the requested property, if and only if it is the value or a - * message variable. - * - * @param string $property - * - * @return mixed - * @throws QentaCEE_Stdlib_Validate_Exception - */ - public function __get($property) - { - if ($property == 'value') { - return $this->_value; - } - if (array_key_exists($property, $this->_messageVariables)) { - return $this->{$this->_messageVariables[$property]}; - } - - throw new QentaCEE_Stdlib_Validate_Exception("No property exists by the name '$property'"); - } - - /** - * Constructs and returns a validation failure message with the given message key and value. - * - * Returns null if and only if $messageKey does not correspond to an existing template. - * - * If a translator is available and a translation exists for $messageKey, - * the translation will be used. - * - * @param string $messageKey - * @param string $value - * - * @return string - */ - protected function _createMessage($messageKey, $value) - { - if (!isset( $this->_messageTemplates[$messageKey] )) { - return null; - } - - $message = $this->_messageTemplates[$messageKey]; - - if (is_object($value)) { - if (!in_array('__toString', get_class_methods($value), false)) { - $value = get_class($value) . ' object'; - } else { - $value = $value->__toString(); - } - } else { - $value = implode((array) $value); - } - - if ($this->getObscureValue()) { - $value = str_repeat('*', strlen($value)); - } - - $message = str_replace('%value%', $value, $message); - foreach ($this->_messageVariables as $ident => $property) { - $message = str_replace( - "%$ident%", - implode(' ', (array) $this->$property), - $message - ); - } - - $length = self::getMessageLength(); - if (( $length > - 1 ) && ( strlen($message) > $length )) { - $message = substr($message, 0, ( self::getMessageLength() - 3 )) . '...'; - } - - return $message; - } - - /** - * @param string $messageKey - * @param string $value OPTIONAL - * - * @return void - */ - protected function _error($messageKey, $value = null) - { - if ($messageKey === null) { - $keys = array_keys($this->_messageTemplates); - $messageKey = current($keys); - } - if ($value === null) { - $value = $this->_value; - } - $this->_messages[$messageKey] = $this->_createMessage($messageKey, $value); - } - - /** - * Sets the value to be validated and clears the messages and errors arrays - * - * @param mixed $value - * - * @return void - */ - protected function _setValue($value) - { - $this->_value = $value; - $this->_messages = array(); - } - - /** - * Set flag indicating whether or not value should be obfuscated in messages - * - * @param bool $flag - * - * @return QentaCEE_Stdlib_Validate_ValidateAbstract - */ - public function setObscureValue($flag) - { - $this->_obscureValue = $flag; - - return $this; - } - - /** - * Retrieve flag indicating whether or not value should be obfuscated in - * messages - * - * @return bool - */ - public function getObscureValue() - { - return $this->_obscureValue; - } - - /** - * Returns the maximum allowed message length - * - * @return integer - */ - public static function getMessageLength() - { - return self::$_messageLength; - } - - /** - * Sets the maximum allowed message length - * - * @param integer $length - */ - public static function setMessageLength($length = - 1) - { - self::$_messageLength = $length; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/BackendClientTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/BackendClientTest.php deleted file mode 100644 index e18fe04..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/BackendClientTest.php +++ /dev/null @@ -1,255 +0,0 @@ -object = new QentaCEE_QMore_BackendClient(); - $this->aUserConfig = QentaCEE_QMore_Module::getConfig(); - $this->aClientConfig = QentaCEE_QMore_Module::getClientConfig(); - } - - /** - * @dataProvider _provider - */ - public function testConstructorArrayParam($aConfig) - { - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['CUSTOMER_ID'], - $this->object->getUserConfig()->CUSTOMER_ID); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['SHOP_ID'], - $this->object->getUserConfig()->SHOP_ID); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['LANGUAGE'], - $this->object->getUserConfig()->LANGUAGE); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['SECRET'], - $this->object->getUserConfig()->SECRET); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['PASSWORD'], - $this->object->getUserConfig()->PASSWORD); - } - - - public function testConstructorWithInvalidParam() - { - $this -> expectException(Exception::class); - $this->object = null; - - try { - $this->object = new QentaCEE_QMore_BackendClient(array()); - } catch (Exception $e) { - $this->assertStringStartsWith('CUSTOMER_ID passed', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider _provider - */ - public function testConstructorWhenLanguageParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['LANGUAGE'] = null; - - try { - $this->object = new QentaCEE_QMore_BackendClient($aConfig); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('LANGUAGE passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider _provider - */ - public function testConstructorWhenCustomerIdParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['CUSTOMER_ID'] = null; - - try { - $this->object = new QentaCEE_QMore_BackendClient($aConfig); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('CUSTOMER_ID passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider _provider - */ - public function testConstructorWhenSecretParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['SECRET'] = null; - - try { - $this->object = new QentaCEE_QMore_BackendClient($aConfig); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('SECRET passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider _provider - */ - public function testConstructorWhenPasswordParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['PASSWORD'] = null; - - try { - $this->object = new QentaCEE_QMore_BackendClient($aConfig); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('PASSWORD passed to', $e->getMessage()); - throw $e; - } - } - - public function testRefund() - { - $oResponse = $this->object->refund(123456, '1.2', 'USD'); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_Refund', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertIsString($oResponse->getCreditNumber()); - $this->assertNotEquals('', $oResponse->getCreditNumber()); - $this->assertFalse($oResponse->hasFailed()); - } - - public function testRefundReversal() - { - $oResponse = $this->object->refundReversal(123456, 321312); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_RefundReversal', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - } - - public function testRecurPayment() - { - $object = new QentaCEE_QMore_BackendClient( - Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => 'seamless', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en', - 'PASSWORD' => 'jcv45z' - ) - )); - $oResponse = $object->recurPayment('23473341', '1,2', 'EUR', __METHOD__, '', false); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_RecurPayment', $oResponse); - $this->assertNotEquals('', $oResponse->getOrderNumber()); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - } - - - public function testGetOrderDetails() - { - $oResponse = $this->object->getOrderDetails(123456); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_GetOrderDetails', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - - $order = $oResponse->getOrder(); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_Order', $order); - } - - public function testApproveReversal() - { - $oResponse = $this->object->approveReversal(123456); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_ApproveReversal', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - } - - public function testDeposit() - { - $oResponse = $this->object->deposit(123456, 100, 'eur'); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_Deposit', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - $this->assertEquals(123456, $oResponse->getPaymentNumber()); - - } - - public function testDepositReversal() - { - $oResponse = $this->object->depositReversal(123456, 123445); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_DepositReversal', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - } - - public function _provider() - { - return Array( - Array( - Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => 'qmore', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en', - 'PASSWORD' => 'jcv45z' - ) - ) - ) - ); - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Exception/InvalidArgumentExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Exception/InvalidArgumentExceptionTest.php deleted file mode 100644 index 0da37fc..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Exception/InvalidArgumentExceptionTest.php +++ /dev/null @@ -1,100 +0,0 @@ -object = new QentaCEE_QMore_Exception_InvalidArgumentException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_QMore_Exception_InvalidArgumentException(); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_QMore_Exception_InvalidArgumentException('message', 1234); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_QMore_Exception_InvalidArgumentException('message', 111, $this->object); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Request/ReadTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Request/ReadTest.php deleted file mode 100644 index ed18e1b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Request/ReadTest.php +++ /dev/null @@ -1,130 +0,0 @@ -object = new QentaCEE_QMore_DataStorage_Request_Read(); - - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } - - public function testRead() - { - $oClient = new QentaCEE_QMore_DataStorageClient(); - $oQMoreDataStorageResponse = $oClient->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - $sStorageId = $oQMoreDataStorageResponse->getStorageId(); - $oQMoreDataStorageRead = $this->object->read($sStorageId); - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Read', $oQMoreDataStorageRead); - $this->assertEquals($oQMoreDataStorageRead->getStatus(), 0); - $this->assertEquals($oQMoreDataStorageRead->getStorageId(), $sStorageId); - $this->assertEmpty($oQMoreDataStorageRead->getErrors()); - } - - public function testWithNoCustomerId() - { - $this -> expectException(QentaCEE_QMore_DataStorage_Exception_InvalidArgumentException::class); - $this->object = new QentaCEE_QMore_DataStorage_Request_Read(Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => '', - 'SHOP_ID' => '', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en' - ) - )); - } - - public function testWithNoSecret() - { - $this -> expectException(QentaCEE_QMore_DataStorage_Exception_InvalidArgumentException::class); - $this->object = new QentaCEE_QMore_DataStorage_Request_Read(Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => '', - 'SECRET' => '', - 'LANGUAGE' => 'en' - ) - )); - } - - public function testWithNoLanguage() - { - $this -> expectException(QentaCEE_QMore_DataStorage_Exception_InvalidArgumentException::class); - $this->object = new QentaCEE_QMore_DataStorage_Request_Read(Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => '', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => '' - ) - )); - } - -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/InitiationTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/InitiationTest.php deleted file mode 100644 index 001fcea..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/InitiationTest.php +++ /dev/null @@ -1,113 +0,0 @@ -object = new QentaCEE_QMore_DataStorage_Response_Initiation($httpResponse); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetStatus() - { - $this->assertEquals(QentaCEE_QMore_DataStorage_Response_Initiation::STATE_SUCCESS, - $this->object->getStatus()); - } - - public function testGetErrors() - { - $this->assertEquals(Array(), $this->object->getErrors()); - } - - public function testGetStorageId() - { - $this->assertEquals('testStorageId', $this->object->getStorageId()); - } - - public function testJavascriptUrl() - { - $this->assertEquals('http://www.example.com', $this->object->getJavascriptUrl()); - } - - public function testFailureGetStatus() - { - $this->_200ErrorResponse(); - $this->assertEquals(QentaCEE_QMore_DataStorage_Response_Initiation::STATE_FAILURE, - $this->object->getStatus()); - } - - public function testFailureGetErrors() - { - $this->_200ErrorResponse(); - $this->assertIsArray($this->object->getErrors()); - foreach ($this->object->getErrors() as $error) { - $this->assertInstanceOf('QentaCEE_Stdlib_Error', $error); - } - $this->assertEquals($this->object->getNumberOfErrors(), count($this->object->getErrors())); - } - - protected function _200ErrorResponse() - { - $httpResponse = new \GuzzleHttp\Psr7\Response(200, Array(), - 'pre=bla&error.1.errorCode=12345&error.1.message=testMessage&error.2.errorCode=54321&error.2.message=testMessage2&errors=2&su=blub'); - $this->object = new QentaCEE_QMore_DataStorage_Response_Initiation($httpResponse); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/ReadTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/ReadTest.php deleted file mode 100644 index c82da09..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorage/Response/ReadTest.php +++ /dev/null @@ -1,79 +0,0 @@ -object = new QentaCEE_QMore_DataStorage_Response_Read($zendHttpResponse); - } - - public function testGetStatus() - { - $this->assertEquals(QentaCEE_QMore_DataStorage_Response_Read::STATE_NOT_EMPTY, $this->object->getStatus()); - } - - public function testJavascriptUrl() - { - $this->assertEquals('https://secure.wirecard-cee.com/qmore/dataStorage/js/D200001/F6G7G6F7G6F7F9G8H7JGT78OKH89K67R/dataStorage.js', - $this->object->getJavascriptUrl()); - } - - public function tetGetStorageId() - { - $this->assertEquals('F6G7G6F7G6F7F9G8H7JGT78OKH89K67R', $this->object->getStorageId()); - } - - public function testNumberOfPaymentInformation() - { - $this->assertEquals(1, count($this->object->getPaymentInformation())); - $this->assertIsArray($this->object->getPaymentInformation()); - $this->assertEquals(1, $this->object->getNumberOfPaymentInformation()); - $this->assertTrue($this->object->hasPaymentInformation('PBX')); - } - - public function testErrors() - { - $response = new \GuzzleHttp\Psr7\Response(200, Array(), - 'error.1.errorCode=11500&error.1.message=CUSTOMERID+is+missing&error.2.errorCode=11506&error.2.message=REQUESTFINGERPRINT+is+missing.&errors=2'); - $object = new QentaCEE_QMore_DataStorage_Response_Read($response); - - $this->assertEquals(2, $object->getNumberOfErrors()); - $this->assertEquals(QentaCEE_QMore_DataStorage_Response_Read::STATE_FAILURE, $object->getStatus()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorageClientTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorageClientTest.php deleted file mode 100644 index bc2fb8d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/DataStorageClientTest.php +++ /dev/null @@ -1,263 +0,0 @@ -_setField(QentaCEE_Stdlib_Client_ClientAbstract::CUSTOMER_ID, null); - } - - public function unsetStorageId() - { - $this->oInitResponse = null; - $this->_setField(QentaCEE_QMore_DataStorageClient::STORAGE_ID, null); - } -} - -/** - * QentaCEE_QMore_FrontendClient test case. - */ -use PHPUnit\Framework\TestCase; -class QentaCEE_QMore_DataStorageClientTest extends TestCase -{ - /** - * - * @var string - */ - private $sReturnUrl = 'http://foo.bar.com/library/storageReturn.php'; - - /** - * - * @var string - */ - private $sOrderIdent = 'phpunit test'; - - /** - * - * @var QentaCEE_QMore_DataStorageClient - */ - private $object; - - /** - * Prepares the environment before running a test. - */ - protected function setUp(): void - { - parent::setUp(); - $this->object = new QentaCEE_QMore_DataStorageClient(); - $this->aUserConfig = QentaCEE_QMore_Module::getConfig(); - $this->aClientConfig = QentaCEE_QMore_Module::getClientConfig(); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - $this->aUserConfig = null; - $this->aClientConfig = null; - parent::tearDown(); - } - - public function testInitiate() - { - $oQMoreDataStorageResponse = $this->object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Initiation', $oQMoreDataStorageResponse); - $this->assertEquals($oQMoreDataStorageResponse->getStatus(), 0); - $this->assertEmpty($oQMoreDataStorageResponse->getErrors()); - } - - public function testInitiateForException() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $oQMoreDataStorageResponse = $this->object->setOrderIdent(null)->setReturnUrl($this->sReturnUrl)->initiate(); - } - - public function testReadForInvalidArgumentException() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $object = new MockClient(); - $oQMoreDataStorageResponse = $object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - $object->unsetCustomerId(); - $oQMoreDataStorageRead = $object->read(); - } - - public function testReadForBadMethodCallException() - { - $this -> expectException(QentaCEE_QMore_Exception_BadMethodCallException::class); - $object = new MockClient(); - $oQMoreDataStorageResponse = $object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - $object->unsetStorageId(); - $oQMoreDataStorageRead = $object->read(); - } - - public function testRead() - { - $oQMoreDataStorageResponse = $this->object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - - $oQMoreDataStorageRead = $this->object->read(); - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Read', $oQMoreDataStorageRead); - $this->assertEquals($oQMoreDataStorageRead->getStatus(), 0); - $this->assertEmpty($oQMoreDataStorageRead->getErrors()); - } - - public function testGetPaymentInformationWithRead() - { - $oQMoreDataStorageResponse = $this->object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - $sStorageId = $oQMoreDataStorageResponse->getStorageId(); - - $oQMoreDataStorageRead = $this->object->read(); - - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Read', $oQMoreDataStorageRead); - $this->assertEquals($oQMoreDataStorageRead->getStatus(), 0); - $this->assertEmpty($oQMoreDataStorageRead->getErrors()); - $this->assertEquals($oQMoreDataStorageRead->getStorageId(), $sStorageId); - } - - public function testReaderResponseInitiation() - { - $oQMoreDataStorageResponse = $this->object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Initiation', $oQMoreDataStorageResponse); - $this->assertEquals($oQMoreDataStorageResponse->getStatus(), 0); - } - - public function testSetStorageId() - { - $sStorageId = '10763469b2b8049f6619c914e57faa19'; - - $oQMoreDataStorageResponse = $this->object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->setStorageId($sStorageId)->initiate(); - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Initiation', $oQMoreDataStorageResponse); - $this->assertEquals($oQMoreDataStorageResponse->getStatus(), 0); - $this->assertEmpty($oQMoreDataStorageResponse->getErrors()); - } - - public function testDataStorageReader() - { - $oQMoreDataStorageResponse = $this->object->setOrderIdent($this->sOrderIdent)->setReturnUrl($this->sReturnUrl)->initiate(); - $oQMoreDataStorageRead = $this->object->read(); - - $this->assertInstanceOf('QentaCEE_QMore_DataStorage_Response_Read', $oQMoreDataStorageRead); - $this->assertEquals($oQMoreDataStorageRead->getStatus(), 0); - $this->assertEmpty($oQMoreDataStorageRead->getErrors()); - $this->assertNotEmpty($oQMoreDataStorageRead->getStorageId()); - $this->assertEquals(Array(), $oQMoreDataStorageRead->getPaymentInformation()); - } - - public function testConstructorWithInvalidParam() - { - $this -> expectException(Exception::class); - $this->object = null; - - try { - $this->object = new QentaCEE_QMore_DataStorageClient(array()); - } catch (Exception $e) { - $this->assertStringStartsWith('CUSTOMER_ID passed', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenLanguageParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['LANGUAGE'] = null; - - try { - $this->object = new QentaCEE_QMore_DataStorageClient($aConfig); - } catch (Exception $e) { - $this->assertStringStartsWith('LANGUAGE passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenSecretParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['SECRET'] = null; - - try { - $this->object = new QentaCEE_QMore_DataStorageClient($aConfig); - } catch (Exception $e) { - $this->assertStringStartsWith('SECRET passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenCustomerIdParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['CUSTOMER_ID'] = null; - - try { - $this->object = new QentaCEE_QMore_DataStorageClient($aConfig); - } catch (Exception $e) { - $this->assertStringStartsWith('CUSTOMER_ID passed to', $e->getMessage()); - throw $e; - } - } - - /** - * Provider function (dummy data) - * - * @return array - */ - public function provider() - { - return Array( - Array( - Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => 'qmore', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en' - ) - ) - ) - ); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/FrontendClientTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/FrontendClientTest.php deleted file mode 100644 index b96d859..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/FrontendClientTest.php +++ /dev/null @@ -1,445 +0,0 @@ -object = new QentaCEE_QMore_FrontendClient(); - $this->aUserConfig = QentaCEE_QMore_Module::getConfig(); - $this->aClientConfig = QentaCEE_QMore_Module::getClientConfig(); - $this->aExpectedRequestData = array( - QentaCEE_QMore_FrontendClient::CUSTOMER_ID => $this->aUserConfig['QentaCEEQMoreConfig']['CUSTOMER_ID'], - QentaCEE_QMore_FrontendClient::SHOP_ID => $this->aUserConfig['QentaCEEQMoreConfig']['SHOP_ID'], - QentaCEE_QMore_FrontendClient::LANGUAGE => $this->aUserConfig['QentaCEEQMoreConfig']['LANGUAGE'], - ); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - $this->aUserConfig = null; - $this->aClientConfig = null; - parent::tearDown(); - } - - /** - * @dataProvider provider - */ - public function testConstructorArrayParam($aConfig) - { - $this->object = new QentaCEE_QMore_FrontendClient($aConfig); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['CUSTOMER_ID'], - $this->object->getUserConfig()->CUSTOMER_ID); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['SHOP_ID'], - $this->object->getUserConfig()->SHOP_ID); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['LANGUAGE'], - $this->object->getUserConfig()->LANGUAGE); - $this->assertEquals($this->aUserConfig['QentaCEEQMoreConfig']['SECRET'], - $this->object->getUserConfig()->SECRET); - } - - - /** - * Tests QentaCEE_QMore_FrontendClient->setConfirmUrl() - */ - public function testSetConfirmUrl() - { - $confirmUrl = 'http://foo.bar.com/tests/confirm.php'; - $this->object->setConfirmUrl($confirmUrl); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::CONFIRM_URL => $confirmUrl)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setPendingUrl() - */ - public function testSetPendingUrl() - { - $pendingUrl = 'http://foo.bar.com/tests/pending.php'; - $this->object->setPendingUrl($pendingUrl); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::PENDING_URL => $pendingUrl)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - - /** - * Tests QentaCEE_QMore_FrontendClient->setWindowName() - */ - public function testSetWindowName() - { - $windowName = 'window'; - $this->object->setWindowName($windowName); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::WINDOW_NAME => $windowName)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setDuplicateRequestCheck() - */ - public function testSetDuplicateRequestCheck() - { - $duplicateRequestCheck = 'yes'; - $this->object->setDuplicateRequestCheck($duplicateRequestCheck); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::DUPLICATE_REQUEST_CHECK => $duplicateRequestCheck)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setCustomerStatement() - */ - public function testSetCustomerStatement() - { - $customerStatement = 'cStatement'; - $this->object->setCustomerStatement($customerStatement); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::CUSTOMER_STATEMENT => $customerStatement)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->createConsumerMerchantCrmId() - */ - public function testCreateConsumerMerchantCrmId() - { - $email = 'email@address.com'; - $this->object->createConsumerMerchantCrmId($email); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::CONSUMER_MERCHANT_CRM_ID => md5($email))); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setOrderReference() - */ - public function testSetOrderReference() - { - $orderReference = '123333'; - $this->object->setOrderReference($orderReference); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::ORDER_REFERENCE => $orderReference)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setAutoDeposit() - */ - public function testSetAutoDeposit() - { - $autoDeposit = 'yes'; - $this->object->setAutoDeposit($autoDeposit); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::AUTO_DEPOSIT => $autoDeposit)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setMaxRetries() - */ - public function testSetOrderNumber() - { - $orderNumber = '123321'; - $this->object->setOrderNumber($orderNumber); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::ORDER_NUMBER => $orderNumber)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setConfirmMail() - */ - public function testSetConfirmMail() - { - $confirmMail = 'test@example.com'; - $this->object->setConfirmMail($confirmMail); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::CONFIRM_MAIL => $confirmMail)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setBasket() - */ - public function testSetBasket() - { - $mock = $this->getMockBuilder('QentaCEE_Stdlib_Basket') - ->getMock(); - - $mock->expects($this->once()) - ->method('getData') - ->will($this->returnValue(array())); - - $this->object->setBasket($mock); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->initiate() - */ - public function testInitiate() - { - $consumerData = new QentaCEE_Stdlib_ConsumerData(); - $consumerData->setIpAddress('10.1.0.11'); - $consumerData->setUserAgent('phpUnit'); - - $oResponse = $this->object->setAmount(100) - ->setCurrency('eur') - ->setPaymentType(QentaCEE_QMore_PaymentType::PAYPAL) - ->setOrderDescription(__METHOD__) - ->setSuccessUrl('http://foo.bar.com/tests/confirm.php') - ->setCancelUrl('http://foo.bar.com/tests/confirm.php') - ->setFailureUrl('http://foo.bar.com/tests/confirm.php') - ->setServiceUrl('http://foo.bar.com/tests/confirm.php') - ->setConfirmUrl('http://foo.bar.com/tests/confirm.php') - ->setConsumerData($consumerData) - ->initiate(); - - $this->assertInstanceOf('QentaCEE_QMore_Response_Initiation', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertFalse($oResponse->hasFailed()); - $this->assertEquals($oResponse->getNumberOfErrors(), 0); - $this->assertStringStartsWith('https://', $oResponse->getRedirectUrl()); - } - - public function testClientFailedResponse() - { - $this -> expectException(QentaCEE_Stdlib_Exception_InvalidResponseException::class); - try { - new QentaCEE_QMore_Response_Initiation(new stdClass()); - } catch (QentaCEE_Stdlib_Exception_InvalidResponseException $e) { - throw $e; - } - } - - /** - * Tests QentaCEE_QMore_FrontendClient->setStorageReference($sOrderIdent, $sStorageId) - */ - public function testSetStorageReference() - { - $sStorageId = '10763469b2b8049f6619c914e57faa19'; - $this->object->setStorageId($sStorageId); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::STORAGE_ID => $sStorageId)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->__construct() - * - * @dataProvider provider - * - * @param string $aConfig - */ - public function testMissingConfigValueInConfigArray($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['CUSTOMER_ID'] = null; - $this->object = new QentaCEE_QMore_FrontendClient($aConfig); - } - - public function testFailedInitiate() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $oResponse = $this->object->initiate(); - } - - public function testGetReponseBeforeInitialize() - { - $this -> expectException(Exception::class); - $oResponse = $this->object->getResponse(); - } - - /** - * Tests QentaCEE_QMore_FrontendClient->getResponse() - */ - public function testGetResponse() - { - $consumerData = new QentaCEE_Stdlib_ConsumerData(); - $consumerData->setIpAddress('10.1.0.11'); - $consumerData->setUserAgent('phpUnit'); - - $this->object->setAmount(100) - ->setCurrency('eur') - ->setPaymentType(QentaCEE_QMore_PaymentType::PAYPAL) - ->setOrderDescription(__METHOD__) - ->setSuccessUrl('http://foo.bar.com/tests/confirm.php') - ->setCancelUrl('http://foo.bar.com/tests/confirm.php') - ->setFailureUrl('http://foo.bar.com/tests/confirm.php') - ->setServiceUrl('http://foo.bar.com/tests/confirm.php') - ->setConfirmUrl('http://foo.bar.com/tests/confirm.php') - ->setConsumerData($consumerData) - ->initiate(); - - $oResponse = $this->object->getResponse(); - - $this->assertInstanceOf('QentaCEE_QMore_Response_Initiation', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertEmpty($oResponse->getErrors()); - $this->assertStringStartsWith('https://', $oResponse->getRedirectUrl()); - } - - public function testConstructorWithInvalidParam() - { - $this -> expectException(Exception::class); - $this->object = null; - try { - $this->object = new QentaCEE_QMore_FrontendClient(array()); - } catch (Exception $e) { - $this->assertStringStartsWith('CUSTOMER_ID passed', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenLanguageParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['LANGUAGE'] = null; - - try { - $this->object = new QentaCEE_QMore_FrontendClient($aConfig); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('LANGUAGE passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenSecretParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQMoreConfig']['SECRET'] = null; - - try { - $this->object = new QentaCEE_QMore_FrontendClient($aConfig); - } catch (QentaCEE_QMore_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('SECRET passed to', $e->getMessage()); - throw $e; - } - } - - /** - * Tests QentaCEE_QMore_FrontendClient->getResponse() - */ - public function testSetPluginVersion() - { - $sPluginVersion = $this->object->generatePluginVersion('phpunit', '1.0.0', 'phpunit', '1.0.0', - Array('phpunit' => '3.5.15')); - $this->object->setPluginVersion($sPluginVersion); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::PLUGIN_VERSION => $sPluginVersion)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - public function testSetFinancialInstitution() - { - $sFinancialInstitution = 'BA-CA'; - $this->object->setFinancialInstitution($sFinancialInstitution); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QMore_FrontendClient::FINANCIAL_INSTITUTION => $sFinancialInstitution)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - public function provider() - { - return Array( - Array( - Array( - 'QentaCEEQMoreConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => 'qmore', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en' - ) - ) - ) - ); - } - -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ModuleTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ModuleTest.php deleted file mode 100644 index 26f1115..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ModuleTest.php +++ /dev/null @@ -1,57 +0,0 @@ -assertIsArray($aConfig); - $this->assertArrayHasKey('MODULE_NAME', $aConfig); - $this->assertArrayHasKey('DATA_STORAGE_URL', $aConfig); - $this->assertArrayHasKey('FRONTEND_URL', $aConfig); - $this->assertEquals('QentaCEE_QMore', $aConfig['MODULE_NAME']); - } - - public function testUserConfig() - { - $aConfig = QentaCEE_QMore_Module::getConfig(); - $this->assertIsArray($aConfig); - $this->assertArrayHasKey('QentaCEEQMoreConfig', $aConfig); - $this->assertArrayHasKey('CUSTOMER_ID', $aConfig['QentaCEEQMoreConfig']); - $this->assertArrayHasKey('SHOP_ID', $aConfig['QentaCEEQMoreConfig']); - $this->assertArrayHasKey('LANGUAGE', $aConfig['QentaCEEQMoreConfig']); - $this->assertArrayHasKey('SECRET', $aConfig['QentaCEEQMoreConfig']); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/PaymentTypeTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/PaymentTypeTest.php deleted file mode 100644 index 5cce7d6..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/PaymentTypeTest.php +++ /dev/null @@ -1,98 +0,0 @@ -assertTrue(QentaCEE_QMore_PaymentType::hasFinancialInstitutions($paymentType)); - } - - public function testHasNoFinancialInstitutions() - { - $paymentType = QentaCEE_QMore_PaymentType::CCARD; - $this->assertFalse(QentaCEE_QMore_PaymentType::hasFinancialInstitutions($paymentType)); - } - - public function testGetIdealFinancialInstitutions() - { - $paymentType = QentaCEE_QMore_PaymentType::IDL; - $this->assertContains('ABN AMRO Bank', QentaCEE_QMore_PaymentType::getFinancialInstitutions($paymentType)); - $this->assertArrayHasKey('ABNAMROBANK', QentaCEE_QMore_PaymentType::getFinancialInstitutions($paymentType)); - } - - public function testGetEpsFinancialInstitutions() - { - $paymentType = QentaCEE_QMore_PaymentType::EPS; - $this->assertContains('BAWAG P.S.K. AG', QentaCEE_QMore_PaymentType::getFinancialInstitutions($paymentType)); - $this->assertArrayHasKey('ARZ|VB', QentaCEE_QMore_PaymentType::getFinancialInstitutions($paymentType)); - } - - public function testGetEmptyFinancialInstitutions() - { - $paymentType = QentaCEE_QMore_PaymentType::CCARD; - $this->assertEmpty(QentaCEE_QMore_PaymentType::getFinancialInstitutions($paymentType)); - } - -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/ApproveReversalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/ApproveReversalTest.php deleted file mode 100644 index 918492b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/ApproveReversalTest.php +++ /dev/null @@ -1,113 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->approveReversal($this->_orderNumber); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getErrors()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // QentaCEE_QMore_Response_Backend_ApproveReversalTest::tearDown() - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositReversalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositReversalTest.php deleted file mode 100644 index 41ca4c7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositReversalTest.php +++ /dev/null @@ -1,112 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->depositReversal($this->_orderNumber, $this->_paymentNumber); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getErrors()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositTest.php deleted file mode 100644 index 5093661..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/DepositTest.php +++ /dev/null @@ -1,145 +0,0 @@ -object = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'PASSWORD' => $this->_toolkitPassword - )); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertEquals($response->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertEmpty($response->getErrors()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertFalse($response->hasFailed()); - } - - public function testGetPaymentNumber() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertEquals($this->_orderNumber, $response->getPaymentNumber()); - } - - /** - * Test basket data - */ - public function testWithBasketData() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur', $this->getValidBasket()); - $this->assertEquals($this->_orderNumber, $response->getPaymentNumber()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // QentaCEE_QMore_Response_Backend_DepositTest::tearDown() - $this->object = null; - - parent::tearDown(); - } - - /** - * Creates a valid shopping basket. - * - * @return QentaCEE_Stdlib_Basket - */ - private function getValidBasket() - { - $basketItem = new QentaCEE_Stdlib_Basket_Item('QentaCEETestItem'); - $basketItem->setUnitGrossAmount(10) - ->setUnitNetAmount(8) - ->setUnitTaxAmount(2) - ->setUnitTaxRate(20.0) - ->setDescription('unittest description') - ->setName('unittest name') - ->setImageUrl('http://example.com/picture.png'); - - $basket = new QentaCEE_Stdlib_Basket(); - $basket->addItem($basketItem); - - return $basket; - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/GetOrderDetailsTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/GetOrderDetailsTest.php deleted file mode 100644 index bd8ba7d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/GetOrderDetailsTest.php +++ /dev/null @@ -1,109 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber); - } - - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - public function testGetErrors() - { - $this->assertEmpty($this->object->getErrors()); - } - - public function testGetOrder() - { - $order = $this->object->getOrder(); - $this->assertInstanceOf('QentaCEE_QMore_Response_Backend_Order', $order); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/CreditTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/CreditTest.php deleted file mode 100644 index a123e65..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/CreditTest.php +++ /dev/null @@ -1,143 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getCredits()->current(); - } - - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetCreditNumber() - { - $this->assertEquals(6000004, $this->object->getCreditNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals(5000004, $this->object->getOrderNumber()); - } - - public function testGetBatchNumber() - { - $this->assertEquals(411, $this->object->getBatchNumber()); - } - - public function testGetAmount() - { - $this->assertEquals('1.00', $this->object->getAmount()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('credit_closed', $this->object->getState()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(Array(''), $this->object->getOperationsAllowed()); - } - - public function testGetGatewayReferenceNumber() - { - $this->assertEquals('', $this->object->getGatewayReferenceNumber()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/IteratorTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/IteratorTest.php deleted file mode 100644 index b0fb6ec..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/IteratorTest.php +++ /dev/null @@ -1,103 +0,0 @@ -object = new QentaCEE_QMore_Response_Backend_Order_IteratorTestObject($data); - } - - public function testCurrent() - { - $this->assertEquals('a', $this->object->current()); - } - - public function testNext() - { - $this->object->next(); - $this->assertEquals('b', $this->object->current()); - } - - public function testRewind() - { - $this->object->next(); - $this->object->next(); - $this->object->rewind(); - $this->assertEquals('a', $this->object->current()); - } - - public function testValid() - { - $this->assertTrue($this->object->valid()); - $this->object->next(); - $this->assertTrue($this->object->valid()); - $this->object->next(); - $this->assertTrue($this->object->valid()); - $this->object->next(); - $this->assertTrue($this->object->valid()); - } - - public function testNotValid() - { - $this->object->next(); - $this->object->next(); - $this->object->next(); - $this->object->next(); - $this->object->next(); - $this->assertFalse($this->object->valid()); - } - - public function testKey() - { - $this->object->next(); - $this->assertEquals('1', $this->object->key()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/IdealTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/IdealTest.php deleted file mode 100644 index 370d7bf..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/IdealTest.php +++ /dev/null @@ -1,94 +0,0 @@ - $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetConsumerName() - { - $this->assertEquals('Test Consumer', $this->object->getConsumerName()); - } - - public function testGetConsumerCity() - { - $this->assertEquals('Den Haag', $this->object->getConsumerCity()); - } - - public function testGetConsumerAccountNumber() - { - $this->assertEquals('P001234567', $this->object->getConsumerAccountNumber()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/PaypalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/PaypalTest.php deleted file mode 100644 index 019bd84..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/PaypalTest.php +++ /dev/null @@ -1,151 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetPayerId() - { - $this->assertEquals('PAYER123456ID', $this->object->getPayerId()); - } - - public function testGetPayerEmail() - { - $this->assertEquals('buyer@paypal.com', $this->object->getPayerEmail()); - } - - public function testGetPayerFirstName() - { - $this->assertEquals('Test', $this->object->getPayerFirstName()); - } - - public function testGetPayerLastName() - { - $this->assertEquals('Consumer', $this->object->getPayerLastName()); - } - - public function testGetPayerAddressCountry() - { - $this->assertEquals('AT', $this->object->getPayerAddressCountry()); - } - - public function testGetPayerAddressCity() - { - $this->assertEquals('Musterstadt', $this->object->getPayerAddressCity()); - } - - public function testGetPayerAddressState() - { - $this->assertEquals('Musterland', $this->object->getPayerAddressState()); - } - - public function testGetPayerAddressName() - { - $this->assertEquals('', $this->object->getPayerAddressName()); - } - - public function testGetPayerAddressStreet1() - { - $this->assertEquals('', $this->object->getPayerAddressStreet1()); - } - - public function testGetPayerAddressStreet2() - { - $this->assertEquals('', $this->object->getPayerAddressStreet2()); - } - - public function testGetPayerAddressZip() - { - $this->assertEquals('1234', $this->object->getPayerAddressZip()); - } - - public function testGetPayerAddressStatus() - { - $this->assertEquals('unverified', $this->object->getPayerAddressStatus()); - } - - public function testGetProtectionEligibility() - { - $this->assertEquals('ExtendedCustomerProtection', $this->object->getProtectionEligibility()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/SofortueberweisungTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/SofortueberweisungTest.php deleted file mode 100644 index 8cfc984..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/Payment/SofortueberweisungTest.php +++ /dev/null @@ -1,126 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetSenderAccountOwner() - { - $this->assertEquals('Test Consumer', $this->object->getSenderAccountOwner()); - } - - public function testGetSenderAccountNumber() - { - $this->assertEquals('1234567890', $this->object->getSenderAccountNumber()); - } - - public function testGetSenderBankNumber() - { - $this->assertEquals('1234578', $this->object->getSenderBankNumber()); - } - - public function testGetSenderBankName() - { - $this->assertEquals('Test Bank', $this->object->getSenderBankName()); - } - - public function testGetSenderBic() - { - $this->assertEquals('PNAGDE00000', $this->object->getSenderBic()); - } - - public function testGetSenderIban() - { - $this->assertEquals('DE0000000000000000', $this->object->getSenderIban()); - } - - public function testGetSenderCountry() - { - $this->assertEquals('DE', $this->object->getSenderCountry()); - } - - public function testGetSecurityCriteria() - { - $this->assertEquals('1', $this->object->getSecurityCriteria()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/PaymentTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/PaymentTest.php deleted file mode 100644 index 745b34b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/Order/PaymentTest.php +++ /dev/null @@ -1,154 +0,0 @@ - $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetPaymentNumber() - { - $this->assertEquals('5472113', $this->object->getPaymentNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals($this->_orderNumber, $this->object->getOrderNumber()); - } - - public function testGetApproveAmount() - { - $this->assertEquals('1.00', $this->object->getApproveAmount()); - } - - public function testGetDepositAmount() - { - $this->assertEquals('1.00', $this->object->getDepositAmount()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('payment_deposited', $this->object->getState()); - } - - public function testGetPaymentType() - { - $this->assertEquals('PSC', $this->object->getPaymentType()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(array(''), $this->object->getOperationsAllowed()); - } - - public function testGetGatewayReferencenumber() - { - $this->assertEquals('', $this->object->getGatewayReferencenumber()); - } - - public function testGetAvsResultCode() - { - $this->assertEquals('', $this->object->getAvsResultCode()); - } - - public function testGetAvsResultMessage() - { - $this->assertEquals('', $this->object->getAvsResultMessage()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest.php deleted file mode 100644 index 9656d9f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest.php +++ /dev/null @@ -1,186 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals($this->_orderNumber, $this->object->getOrderNumber()); - } - - public function testGetPaymentType() - { - $this->assertEquals('PSC', $this->object->getPaymentType()); - } - - public function testGetAmount() - { - $this->assertEquals('1.00', $this->object->getAmount()); - } - - public function testGetBrand() - { - $this->assertEquals('paysafecard', $this->object->getBrand()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetOrderDescription() - { - $this->assertEquals('Margit Hinterknofler, K-Nr: 86941', $this->object->getOrderDescription()); - } - - public function testGetAcquirer() - { - $this->assertEquals('', $this->object->getAcquirer()); - } - - public function testGetContractNumber() - { - $this->assertEquals('', $this->object->getContractNumber()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(Array(), $this->object->getOperationsAllowed()); - } - - public function testGetOrderReference() - { - $this->assertEquals('OR-5472113', $this->object->getOrderReference()); - } - - public function testGetCustomerStatement() - { - $this->assertEquals('Danke für den Einkauf!', $this->object->getCustomerStatement()); - } - - public function testGetOrderText() - { - $this->assertEquals('', $this->object->getOrderText()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('ORDERED', $this->object->getState()); - } - - public function testGetSourceOrderNumber() - { - $this->assertEquals('', $this->object->getSourceOrderNumber()); - } - - public function testGetPayments() - { - $payments = $this->object->getPayments(); - $this->assertTrue($payments->valid()); - $payments->next(); - $this->assertFalse($payments->valid()); - } - - public function testGetCredits() - { - $credits = $this->object->getCredits(); - $this->assertFalse($credits->valid()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest1.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest1.php deleted file mode 100644 index 4c201c7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/OrderTest1.php +++ /dev/null @@ -1,186 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $toolkitPassword - )); - - $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals($this->_orderNumber, $this->object->getOrderNumber()); - } - - public function testGetPaymentType() - { - $this->assertEquals('SCM', $this->object->getPaymentType()); - } - - public function testGetAmount() - { - $this->assertEquals('1.00', $this->object->getAmount()); - } - - public function testGetBrand() - { - $this->assertEquals('Maestro', $this->object->getBrand()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetOrderDescription() - { - $this->assertEquals('Banko Maestro, K-Nr: 453213', $this->object->getOrderDescription()); - } - - public function testGetAcquirer() - { - $this->assertEquals('PayLife', $this->object->getAcquirer()); - } - - public function testGetContractNumber() - { - $this->assertEquals('0815DemoContract', $this->object->getContractNumber()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(Array('REFUND'), $this->object->getOperationsAllowed()); - } - - public function testGetOrderReference() - { - $this->assertEquals('OR-1453243', $this->object->getOrderReference()); - } - - public function testGetCustomerStatement() - { - $this->assertEquals('Danke für den Einkauf!', $this->object->getCustomerStatement()); - } - - public function testGetOrderText() - { - $this->assertEquals('', $this->object->getOrderText()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('REFUNDABLE', $this->object->getState()); - } - - public function testGetSourceOrderNumber() - { - $this->assertEquals('', $this->object->getSourceOrderNumber()); - } - - public function testGetPayments() - { - $payments = $this->object->getPayments(); - $this->assertTrue($payments->valid()); - $payments->next(); - $this->assertFalse($payments->valid()); - } - - public function testGetCredits() - { - $credits = $this->object->getCredits(); - $this->assertFalse($credits->valid()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RecurPaymentTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RecurPaymentTest.php deleted file mode 100644 index 3575440..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RecurPaymentTest.php +++ /dev/null @@ -1,124 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $toolkitPassword - )); - - $this->object = $oBackClient->recurPayment($this->_sourceOrderNumber, $this->_amount, $this->_currency, - $this->_orderDescription, $this->_orderNumber, $this->_depositFlag); - } - - public function testGetOrderNumber() - { - $this->assertNotEquals('', $this->object->getOrderNumber()); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getErrors()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // QentaCEE_QMore_Response_Backend_RecurPaymentTest::tearDown() - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundReversalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundReversalTest.php deleted file mode 100644 index 1cf97af..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundReversalTest.php +++ /dev/null @@ -1,114 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oBackClient = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'PASSWORD' => $toolkitPassword - )); - - $this->object = $oBackClient->refundReversal($this->_orderNumber, $this->_creditNumber); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getErrors()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // QentaCEE_QMore_Response_Backend_RefundReversalTest::tearDown() - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundTest.php deleted file mode 100644 index 3ad77c0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/Backend/RefundTest.php +++ /dev/null @@ -1,152 +0,0 @@ -object = new QentaCEE_QMore_BackendClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'PASSWORD' => $this->_toolkitPassword - )); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertEquals($response->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertEmpty($response->getErrors()); - } - - /** - * Test getCreditNumber() - */ - public function testGetCreditNumber() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertIsString($response->getCreditNumber()); - $this->assertNotEquals('', $response->getCreditNumber()); - } - - /** - * Test basket data - */ - public function testWithBasketData() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency, $this->getValidBasket()); - $this->assertIsString($response->getCreditNumber()); - $this->assertNotEquals('', $response->getCreditNumber()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertFalse($response->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // QentaCEE_QMore_Response_Backend_RefundTest::tearDown() - $this->object = null; - - parent::tearDown(); - } - - /** - * Creates a valid shopping basket. - * - * @return QentaCEE_Stdlib_Basket - */ - private function getValidBasket() - { - $basketItem = new QentaCEE_Stdlib_Basket_Item('QentaCEETestItem'); - $basketItem->setUnitGrossAmount(10) - ->setUnitNetAmount(8) - ->setUnitTaxAmount(2) - ->setUnitTaxRate(20.0) - ->setDescription('unittest description') - ->setName('unittest name') - ->setImageUrl('http://example.com/picture.png'); - - $basket = new QentaCEE_Stdlib_Basket(); - $basket->addItem($basketItem); - - return $basket; - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/InitiationTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/InitiationTest.php deleted file mode 100644 index 175155b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Response/InitiationTest.php +++ /dev/null @@ -1,93 +0,0 @@ -object = new QentaCEE_QMore_Response_Initiation($zendHttpResponse); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } - - public function testGetStatus() - { - $this->assertEquals(QentaCEE_QMore_Response_Initiation::STATE_SUCCESS, $this->object->getStatus()); - } - - public function testGetRedirectUrl() - { - $this->assertEquals('http://www.example.com', $this->object->getRedirectUrl()); - } - - public function testGetStatusFailed() - { - $this->object = $this->_fail200Response(); - $this->assertEquals(QentaCEE_QMore_Response_Initiation::STATE_FAILURE, $this->object->getStatus()); - } - - protected function _fail200Response() - { - $zendHttpResponse = new \GuzzleHttp\Psr7\Response(200, Array(), 'pre=bla&su=blub'); - - return new QentaCEE_QMore_Response_Initiation($zendHttpResponse); - } -} - - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/CancelTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/CancelTest.php deleted file mode 100644 index db25309..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/CancelTest.php +++ /dev/null @@ -1,82 +0,0 @@ - 'CANCEL'); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QMore_Return_Cancel($this->_returnData); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testPaymentState() - { - $this->assertEquals('CANCEL', $this->object->getPaymentState()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetReturned() - { - $this->assertEquals($this->_returnData, $this->object->getReturned()); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/FailureTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/FailureTest.php deleted file mode 100644 index 71a62ca..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/FailureTest.php +++ /dev/null @@ -1,83 +0,0 @@ - '1', - 'error' => Array( - Array( - 'message' => 'Language is missing.', - 'errorCode' => '11009', - 'consumerMessage' => 'Language is missing.', - 'paySysMessage' => 'QMORE paysysmessage' - ) - ), - 'paymentState' => 'FAILURE' - ); - - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QMore_Return_Failure($this->_returnData); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetErrors() - { - foreach ($this->object->getErrors() as $error) { - $this->assertEquals('Language is missing.', $error->getMessage()); - $this->assertEquals('Language is missing.', $error->getConsumerMessage()); - $this->assertEquals('11009', $error->getErrorCode()); - $this->assertEquals('QMORE paysysmessage', $error->getPaySysMessage()); - } - } - - public function testGetNumberOfErrors() - { - $this->assertEquals(1, $this->object->getNumberOfErrors()); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/ReturnAbstractTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/ReturnAbstractTest.php deleted file mode 100644 index e859370..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/ReturnAbstractTest.php +++ /dev/null @@ -1,112 +0,0 @@ - 'CANCEL' - ); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QMore_Return_ReturnAbstractTestObject($this->_returnData); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void { } - - public function testMagicGetPaymentState() - { - $this->assertEquals('CANCEL', $this->object->paymentState); - } - - public function testPaymentState() - { - $this->assertEquals('', $this->object->getPaymentState()); - } - - public function testMagicGetNotSet() - { - $this->assertEquals(null, $this->object->invalid); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetReturned() - { - $this->assertEquals($this->_returnData, $this->object->getReturned()); - } - - public function testGetReturnedButUnsetArrayFields() - { - $returnData = Array(); - $returnData['paymentState'] = 'CANCEL'; - $returnData['responseFingerprintOrder'] = 'TEST'; - $returnData['responseFingerprint'] = 'TEST'; - - $object = new QentaCEE_QMore_Return_ReturnAbstractTestObject($returnData); - $object->getReturned(); - - $this->assertFalse(isset( $this->_returnData['responseFingerprintOrder'] )); - $this->assertFalse(isset( $this->_returnData['responseFingerprint'] )); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/CreditCardTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/CreditCardTest.php deleted file mode 100644 index 54e8b1b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/CreditCardTest.php +++ /dev/null @@ -1,118 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'CCARD', - 'financialInstitution' => 'MC', - 'language' => 'de', - 'orderNumber' => '16375141', - 'paymentState' => 'SUCCESS', - 'authenticated' => 'Yes', - 'anonymousPan' => '0001', - 'expiry' => '10/2012', - 'cardholder' => 'keiner', - 'maskedPan' => '950000******0001', - 'gatewayReferenceNumber' => 'DGW_16375141_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,authenticated,anonymousPan,expiry,cardholder,maskedPan,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => 'e077f1e8488f06a444899b43c94a0c814c69efea4870b4afc931cacc99ee1516db3f5909f7079d657d73fe0ef92c4cc48515cd4026168d228962ba7d05cc503f' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QMore_Return_Success_CreditCard($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetAnonymousPan() - { - $this->assertEquals('0001', $this->object->getAnonymousPan()); - } - - public function testGetAuthenticated() - { - $this->assertEquals('Yes', $this->object->getAuthenticated()); - } - - public function testGetExpiry() - { - $this->assertEquals('10/2012', $this->object->getExpiry()); - } - - public function testGetCardholder() - { - $this->assertEquals('keiner', $this->object->getCardholder()); - } - - public function testGetMaskedPan() - { - $this->assertEquals('950000******0001', $this->object->getMaskedPan()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/IdealTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/IdealTest.php deleted file mode 100644 index 38ab8ed..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/IdealTest.php +++ /dev/null @@ -1,106 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'IDL', - 'financialInstitution' => 'INGBANK', - 'language' => 'de', - 'orderNumber' => '7885625', - 'paymentState' => 'SUCCESS', - 'idealConsumerName' => 'Test Cönsümer Utløpsdato', - 'idealConsumerCity' => 'Den Haag', - 'idealConsumerAccountNumber' => 'P001234567', - 'gatewayReferenceNumber' => 'DGW_7885625_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,idealConsumerName,idealConsumerCity,idealConsumerAccountNumber,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => 'fc5386502aef8e6b23efaa204e0d84929f818f6ba9914ae6421ac175be3d1efeb2a6687a5e0546c906037837e41d06badb58e1bea9b1d1f72e85db4c581621c1' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QMore_Return_Success_Ideal($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetConsumerName() - { - $this->assertEquals('Test Cönsümer Utløpsdato', $this->object->getConsumerName()); - } - - public function testGetConsumerCity() - { - $this->assertEquals('Den Haag', $this->object->getConsumerCity()); - } - - public function testGetConsumerAccountNumber() - { - $this->assertEquals('P001234567', $this->object->getConsumerAccountNumber()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/PaypalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/PaypalTest.php deleted file mode 100644 index 7867535..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/PaypalTest.php +++ /dev/null @@ -1,155 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'PAYPAL', - 'financialInstitution' => 'PayPal', - 'language' => 'de', - 'orderNumber' => '16727331', - 'paymentState' => 'SUCCESS', - 'paypalPayerID' => 'PAYER123456ID', - 'paypalPayerEmail' => 'buyer@paypal.com', - 'paypalPayerFirstName' => 'Test', - 'paypalPayerLastName' => 'Consumer', - 'paypalPayerAddressName' => 'Consumer Test', - 'paypalPayerAddressCountry' => 'US', - 'paypalPayerAddressCity' => 'New York', - 'paypalPayerAddressState' => 'NY', - 'paypalPayerAddressStreet1' => 'Park Row', - 'paypalPayerAddressStreet2' => '2', - 'paypalPayerAddressZIP' => '10038', - 'gatewayReferenceNumber' => 'DGW_16727331_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,paypalPayerID,paypalPayerEmail,paypalPayerLastName,paypalPayerFirstName,paypalPayerAddressName,paypalPayerAddressCountry,paypalPayerAddressCity,paypalPayerAddressState,paypalPayerAddressStreet1,paypalPayerAddressStreet2,paypalPayerAddressZIP,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '0f1782894fdcd747255aa6fa2f47189913d2fa727e5d515f84b63dff01b1dc532545378e3a7a87fc93c81813b5f90380ddca4160af853f2ff2076df091543f72' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - - $this->object = new QentaCEE_QMore_Return_Success_PayPal($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetPayerID() - { - $this->assertEquals('PAYER123456ID', $this->object->getPayerID()); - } - - public function testGetPayerEmail() - { - $this->assertEquals('buyer@paypal.com', $this->object->getPayerEmail()); - } - - public function testGetPayerLastName() - { - $this->assertEquals('Consumer', $this->object->getPayerLastName()); - } - - public function testGetPayerFirstName() - { - $this->assertEquals('Test', $this->object->getPayerFirstName()); - } - - public function testGetPayerAddressName() - { - $this->assertEquals('Consumer Test', $this->object->getPayerAddressName()); - } - - public function testGetPayerAddressCountry() - { - $this->assertEquals('US', $this->object->getPayerAddressCountry()); - } - - public function testGetPayerAddressCity() - { - $this->assertEquals('New York', $this->object->getPayerAddressCity()); - } - - public function testGetPayerAddressState() - { - $this->assertEquals('NY', $this->object->getPayerAddressState()); - } - - public function testGetPayerAddressStreet1() - { - $this->assertEquals('Park Row', $this->object->getPayerAddressStreet1()); - } - - public function testGetPayerAddressStreet2() - { - $this->assertEquals('2', $this->object->getPayerAddressStreet2()); - } - - public function testGetPayerAddressZip() - { - $this->assertEquals('10038', $this->object->getPayerAddressZip()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/SofortueberweisungTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/SofortueberweisungTest.php deleted file mode 100644 index 9f5c93f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/Success/SofortueberweisungTest.php +++ /dev/null @@ -1,136 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'SOFORTUEBERWEISUNG', - 'financialInstitution' => 'sofortueberweisung', - 'language' => 'de', - 'orderNumber' => '5717698', - 'paymentState' => 'SUCCESS', - 'senderAccountOwner' => 'Jürgen Mustermann', - 'senderAccountNumber' => '112233', - 'senderBankNumber' => '88888888', - 'senderBankName' => 'Testbank', - 'senderBIC' => 'PNAGDE00000', - 'senderIBAN' => 'DE35888888880000112233', - 'senderCountry' => 'DE', - 'securityCriteria' => '1', - 'gatewayReferenceNumber' => 'DGW_5717698_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,senderAccountOwner,senderAccountNumber,senderBankNumber,senderBankName,senderBIC,senderIBAN,senderCountry,securityCriteria,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '36e4a163e1e94017cbffa7ea48614bb3c21426e8e18fecba93aa4411eb409b1dc79bb65f59d448cb488a230741bd1cb8bf2155965e61225578f5c0a56c75bb8f' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QMore_Return_Success_Sofortueberweisung($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetSenderAccountOwner() - { - $this->assertEquals('Jürgen Mustermann', $this->object->getSenderAccountOwner()); - } - - public function testGetSenderAccountNumber() - { - $this->assertEquals('112233', $this->object->getSenderAccountNumber()); - } - - public function testGetSenderBankNumber() - { - $this->assertEquals('88888888', $this->object->getSenderBankNumber()); - } - - public function testGetSenderBankName() - { - $this->assertEquals('Testbank', $this->object->getSenderBankName()); - } - - public function testGetSenderBic() - { - $this->assertEquals('PNAGDE00000', $this->object->getSenderBic()); - } - - public function testGetSenderIban() - { - $this->assertEquals('DE35888888880000112233', $this->object->getSenderIban()); - } - - public function testGetSenderCountry() - { - $this->assertEquals('DE', $this->object->getSenderCountry()); - } - - public function testGetSecurityCriteria() - { - $this->assertEquals('1', $this->object->getSecurityCriteria()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/SuccessTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/SuccessTest.php deleted file mode 100644 index 47444c2..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/Return/SuccessTest.php +++ /dev/null @@ -1,191 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'QUICK', - 'financialInstitution' => 'QUICK', - 'language' => 'en', - 'orderNumber' => '16280512', - 'paymentState' => 'SUCCESS', - 'gatewayReferenceNumber' => 'DGW_16280512_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => 'aef780d2d0af569e3ed0da3195827981e607c693fb9f4294e6b03dd32938a477615c0edbfe43b3cea2e27f5d81434fcf9c54571fda13ee16e70d3a2864b10e43' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - QentaCEE_Stdlib_Fingerprint::setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5); - $this->object = new QentaCEE_QMore_Return_Success($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetAmount() - { - $this->assertEquals('1', $this->object->getAmount()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetPaymentType() - { - $this->assertEquals('QUICK', $this->object->getPaymentType()); - } - - public function testGetFinancialInstitution() - { - $this->assertEquals('QUICK', $this->object->getFinancialInstitution()); - } - - public function testGetLanguage() - { - $this->assertEquals('en', $this->object->getLanguage()); - } - - public function testGetOrderNumber() - { - $this->assertEquals('16280512', $this->object->getOrderNumber()); - } - - public function testGetGatewayReferenceNumber() - { - $this->assertEquals('DGW_16280512_RN', $this->object->getGatewayReferenceNumber()); - } - - public function testGetGatewayContractNumber() - { - $this->assertEquals('DemoContractNumber123', $this->object->getGatewayContractNumber()); - } - - public function testGetAvsResponseCode() - { - $this->assertEquals('X', $this->object->getAvsResponseCode()); - } - - public function testGetAvsResponseMessage() - { - $this->assertEquals('Demo AVS ResultMessage', $this->object->getAVSResponseMessage()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testValidateFalse() - { - $this -> expectException(QentaCEE_Stdlib_Exception_UnexpectedValueException::class); - $object = new QentaCEE_QMore_Return_Success($this->_returnData, ''); - try { - $object->validate(); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertContains('Secret is empty', $e->getMessage()); - } - } - - public function testValidateNoFingerprintOrder() - { - $returnData = $this->_returnData; - unset( $returnData['responseFingerprintOrder'] ); - $object = new QentaCEE_QMore_Return_Success($returnData, $this->_secret); - try { - $returned = $object->validate(); - $this->assertFalse($returned); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertContains('Parameter responseFingerprintOrder has not been returned', $e->getMessage()); - } - } - - public function testGetPaymentState() - { - $this->assertEquals('SUCCESS', $this->object->getPaymentState()); - } - - public function testGetReturned() - { - $returned = $this->object->getReturned(); - $this->assertArrayHasKey('amount', $returned); - $this->assertArrayHasKey('currency', $returned); - $this->assertArrayHasKey('paymentType', $returned); - $this->assertArrayHasKey('financialInstitution', $returned); - $this->assertArrayHasKey('language', $returned); - $this->assertArrayHasKey('orderNumber', $returned); - $this->assertArrayHasKey('paymentState', $returned); - $this->assertArrayHasKey('gatewayReferenceNumber', $returned); - $this->assertArrayHasKey('gatewayContractNumber', $returned); - $this->assertArrayHasKey('avsResponseCode', $returned); - $this->assertArrayHasKey('avsResponseMessage', $returned); - $this->assertArrayNotHasKey('responseFingerprintOrder', $returned); - $this->assertArrayNotHasKey('responseFingerprint', $returned); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ReturnFactoryTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ReturnFactoryTest.php deleted file mode 100644 index b705a36..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QMore/ReturnFactoryTest.php +++ /dev/null @@ -1,213 +0,0 @@ -object = null; - parent::tearDown(); - } - - /** - * Tests QentaCEE_QMore_ReturnFactory::getInstance() - */ - public function testGetInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'CCARD' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertTrue(is_object($oInstance)); - } - - public function testSuccessInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'CCARD' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Success_CreditCard', $oInstance); - } - - public function testSuccessPaypalInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'Paypal' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Success_PayPal', $oInstance); - } - - public function testSuccessSofortueberweisungInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'SOFORTUEBERWEISUNG' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Success_Sofortueberweisung', $oInstance); - } - - public function testSuccessIdealInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'IDL' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Success_Ideal', $oInstance); - } - - public function testSuccessDefaultInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS, - 'paymentType' => '' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Success', $oInstance); - } - - public function testInstanceWIthNoPaymentType() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidResponseException::class); - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_SUCCESS - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - } - - public function testFailureState() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_FAILURE - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Failure', $oInstance); - } - - public function testCancelState() - { - $return = Array( - 'paymentState' => QentaCEE_QMore_ReturnFactory::STATE_CANCEL, - 'paymentType' => 'CCARD' - ); - - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QMore_Return_Cancel', $oInstance); - } - - public function testNoState() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidResponseException::class); - $return = Array( - 'paymentState' => 999 - ); - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - } - - public function testInstanceWithEmptyPaymentStateInArray() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidResponseException::class); - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance(Array(), $this->_secret); - } - - public function testWhenReturnIsNotArray() - { - $this -> expectException(QentaCEE_QMore_Exception_InvalidResponseException::class); - $return = ""; - $oInstance = QentaCEE_QMore_ReturnFactory::getInstance($return, $this->_secret); - } - - public function testGenerateConfirmResponseNOKString() - { - $response = QentaCEE_QMore_ReturnFactory::generateConfirmResponseString('nok test'); - $this->assertEquals('', - $response); - } - - public function testGenerateConfirmResponseHtmlCommentNOKString() - { - $response = QentaCEE_QMore_ReturnFactory::generateConfirmResponseString('nok test', true); - $this->assertEquals('', - $response); - } - - public function testGenerateConfirmResponseOKString() - { - $response = QentaCEE_QMore_ReturnFactory::generateConfirmResponseString(); - $this->assertEquals('', $response); - } - - public function testGenerateConfirmResponseHtmlCommentOKString() - { - $response = QentaCEE_QMore_ReturnFactory::generateConfirmResponseString('', true); - $this->assertEquals('', $response); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ErrorTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ErrorTest.php deleted file mode 100644 index 5571c00..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ErrorTest.php +++ /dev/null @@ -1,56 +0,0 @@ -object = new QentaCEE_QPay_Error('QentaCEE Error Message'); - } - - public function testGetMessage() - { - $this->assertEquals('QentaCEE Error Message', $this->object->getMessage()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/BadMethodCallExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/BadMethodCallExceptionTest.php deleted file mode 100644 index 7cd3d3c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/BadMethodCallExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_QPay_Exception_BadMethodCallException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_QPay_Exception_BadMethodCallException(); - } catch (QentaCEE_QPay_Exception_BadMethodCallException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_QPay_Exception_BadMethodCallException('message', 1234); - } catch (QentaCEE_QPay_Exception_BadMethodCallException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_QPay_Exception_BadMethodCallException('message', 111, $this->object); - } catch (QentaCEE_QPay_Exception_BadMethodCallException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidArgumentExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidArgumentExceptionTest.php deleted file mode 100644 index 520aade..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidArgumentExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_QPay_Exception_InvalidArgumentException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_QPay_Exception_InvalidArgumentException(); - } catch (QentaCEE_QPay_Exception_InvalidArgumentException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_QPay_Exception_InvalidArgumentException('message', 1234); - } catch (QentaCEE_QPay_Exception_InvalidArgumentException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_QPay_Exception_InvalidArgumentException('message', 111, $this->object); - } catch (QentaCEE_QPay_Exception_InvalidArgumentException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidParamLengthExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidParamLengthExceptionTest.php deleted file mode 100644 index dea9d7f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidParamLengthExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_QPay_Exception_InvalidParamLengthException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_QPay_Exception_InvalidParamLengthException(); - } catch (QentaCEE_QPay_Exception_InvalidParamLengthException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_QPay_Exception_InvalidParamLengthException('message', 1234); - } catch (QentaCEE_QPay_Exception_InvalidParamLengthException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_QPay_Exception_InvalidParamLengthException('message', 111, $this->object); - } catch (QentaCEE_QPay_Exception_InvalidParamLengthException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidResponseExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidResponseExceptionTest.php deleted file mode 100644 index ca13ca6..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Exception/InvalidResponseExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_QPay_Exception_InvalidResponseException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_QPay_Exception_InvalidResponseException(); - } catch (QentaCEE_QPay_Exception_InvalidResponseException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_QPay_Exception_InvalidResponseException('message', 1234); - } catch (QentaCEE_QPay_Exception_InvalidResponseException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_QPay_Exception_InvalidResponseException('message', 111, $this->object); - } catch (QentaCEE_QPay_Exception_InvalidResponseException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/FrontendClientTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/FrontendClientTest.php deleted file mode 100644 index 014af02..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/FrontendClientTest.php +++ /dev/null @@ -1,450 +0,0 @@ -object = new QentaCEE_QPay_FrontendClient(); - $this->aUserConfig = QentaCEE_QPay_Module::getConfig(); - $this->aClientConfig = QentaCEE_QPay_Module::getClientConfig(); - $this->aExpectedRequestData = array( - QentaCEE_QPay_FrontendClient::CUSTOMER_ID => $this->aUserConfig['QentaCEEQPayConfig']['CUSTOMER_ID'], - QentaCEE_QPay_FrontendClient::SHOP_ID => $this->aUserConfig['QentaCEEQPayConfig']['SHOP_ID'], - QentaCEE_QPay_FrontendClient::LANGUAGE => $this->aUserConfig['QentaCEEQPayConfig']['LANGUAGE'], - ); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - $this->aUserConfig = null; - $this->aClientConfig = null; - parent::tearDown(); - } - - /** - * @dataProvider provider - */ - public function testConstructorArrayParam($aConfig) - { - $this->object = new QentaCEE_QPay_FrontendClient($aConfig); - $this->assertEquals($this->aUserConfig['QentaCEEQPayConfig']['CUSTOMER_ID'], - $this->object->getUserConfig()->get('CUSTOMER_ID')); - $this->assertEquals($this->aUserConfig['QentaCEEQPayConfig']['SHOP_ID'], - $this->object->getUserConfig()->get('SHOP_ID')); - $this->assertEquals($this->aUserConfig['QentaCEEQPayConfig']['LANGUAGE'], - $this->object->getUserConfig()->get('LANGUAGE')); - $this->assertEquals($this->aUserConfig['QentaCEEQPayConfig']['SECRET'], - $this->object->getUserConfig()->get('SECRET')); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setConfirmUrl() - */ - public function testSetConfirmUrl() - { - $confirmUrl = 'http://foo.bar.com/tests/confirm.php'; - $this->object->setConfirmUrl($confirmUrl); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::CONFIRM_URL => $confirmUrl)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setWindowName() - */ - public function testSetWindowName() - { - $windowName = 'phpUnitWindow'; - $this->object->setWindowName($windowName); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::WINDOW_NAME => $windowName)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setDuplicateRequestCheck() - */ - public function testSetDuplicateRequestCheck() - { - $duplicateRequestCheck = 'yes'; - $this->object->setDuplicateRequestCheck($duplicateRequestCheck); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::DUPLICATE_REQUEST_CHECK => $duplicateRequestCheck)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setCustomerStatement() - */ - public function testSetCustomerStatement() - { - $customerStatement = 'cStatement'; - $this->object->setCustomerStatement($customerStatement); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::CUSTOMER_STATEMENT => $customerStatement)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setOrderReference() - */ - public function testSetOrderReference() - { - $orderReference = '123333'; - $this->object->setOrderReference($orderReference); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::ORDER_REFERENCE => $orderReference)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setAutoDeposit() - */ - public function testSetAutoDeposit() - { - $autoDeposit = 'yes'; - $this->object->setAutoDeposit($autoDeposit); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::AUTO_DEPOSIT => $autoDeposit)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setMaxRetries() - */ - public function testSetMaxRetries() - { - $maxRetries = '12'; - $this->object->setMaxRetries($maxRetries); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::MAX_RETRIES => $maxRetries)); - $this->assertEquals($expected, $this->object->getRequestData()); - - } - - /** - * Tests QentaCEE_QPay_FrontendClient->createConsumerMerchantCrmId() - */ - public function testCreateConsumerMerchantCrmId() - { - $email = 'email@address.com'; - $this->object->createConsumerMerchantCrmId($email); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::CONSUMER_MERCHANT_CRM_ID => md5($email))); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->createConsumerMerchantCrmId() - */ - public function testSetShippingProfile() - { - $shippingProfile = 'SP_00001'; - $this->object->setShippingProfile($shippingProfile); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::SHIPPING_PROFILE => 'SP_00001' - )); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setMaxRetries() - */ - public function testSetOrderNumber() - { - $orderNumber = '123321'; - $this->object->setOrderNumber($orderNumber); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::ORDER_NUMBER => $orderNumber)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setConfirmMail() - */ - public function testSetConfirmMail() - { - $confirmMail = 'test@example.com'; - $this->object->setConfirmMail($confirmMail); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::CONFIRM_MAIL => $confirmMail)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->setBasket() - */ - public function testSetBasket() - { - $mock = $this->getMockBuilder('QentaCEE_Stdlib_Basket') - ->getMock(); - - $mock->expects($this->once()) - ->method('getData') - ->will($this->returnValue(array())); - - $this->object->setBasket($mock); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->initiate() - */ - public function testInitiate() - { - $consumerData = new QentaCEE_Stdlib_ConsumerData(); - $consumerData->setIpAddress('10.1.0.11'); - $consumerData->setUserAgent('phpUnit'); - - $oResponse = $this->object->setAmount(100) - ->setCurrency('eur') - ->setPaymentType(QentaCEE_QPay_PaymentType::PAYPAL) - ->setOrderDescription(__METHOD__) - ->setSuccessUrl('http://foo.bar.com/tests/confirm.php') - ->setCancelUrl('http://foo.bar.com/tests/confirm.php') - ->setFailureUrl('http://foo.bar.com/tests/confirm.php') - ->setServiceUrl('http://foo.bar.com/tests/confirm.php') - ->setConfirmUrl('http://foo.bar.com/tests/confirm.php') - ->setConsumerData($consumerData) - ->initiate(); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Initiation', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertFalse($oResponse->getError()); - $this->assertFalse($oResponse->hasFailed()); - $this->assertStringStartsWith('https://', $oResponse->getRedirectUrl()); - } - - public function testClientFailedResponse() - { - $this -> expectException(QentaCEE_Stdlib_Exception_InvalidResponseException::class); - $oResponse = new QentaCEE_QPay_Response_Initiation(new stdClass()); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->__construct() - * - * @dataProvider provider - * - * @param string $aConfig - */ - public function testMissingConfigValueInConfigArray($aConfig) - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQPayConfig']['CUSTOMER_ID'] = null; - $this->object = new QentaCEE_QPay_FrontendClient($aConfig); - - } - - public function testFailedInitiate() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $oResponse = $this->object->initiate(); - } - - public function testGetReponseBeforeInitialize() - { - $this -> expectException(Exception::class); - $oResponse = $this->object->getResponse(); - } - - /** - * Tests QentaCEE_QPay_FrontendClient->getResponse() - */ - public function testGetResponse() - { - $consumerData = new QentaCEE_Stdlib_ConsumerData(); - $consumerData->setIpAddress('10.1.0.11'); - $consumerData->setUserAgent('phpUnit'); - - $oResponse = $this->object->setAmount(100) - ->setCurrency('eur') - ->setPaymentType(QentaCEE_QPay_PaymentType::PAYPAL) - ->setOrderDescription(__METHOD__) - ->setSuccessUrl('http://foo.bar.com/tests/confirm.php') - ->setCancelUrl('http://foo.bar.com/tests/confirm.php') - ->setFailureUrl('http://foo.bar.com/tests/confirm.php') - ->setServiceUrl('http://foo.bar.com/tests/confirm.php') - ->setConfirmUrl('http://foo.bar.com/tests/confirm.php') - ->setConsumerData($consumerData) - ->initiate(); - - $oResponse = $this->object->getResponse(); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Initiation', $oResponse); - $this->assertEquals($oResponse->getStatus(), 0); - $this->assertFalse($oResponse->getError()); - $this->assertFalse($oResponse->hasFailed()); - $this->assertStringStartsWith('https://', $oResponse->getRedirectUrl()); - } - - public function testConstructorWithInvalidParam() - { - $this -> expectException(Exception::class); - $this->object = null; - - try { - $this->object = new QentaCEE_QPay_FrontendClient(array()); - } catch (Exception $e) { - $this->assertStringStartsWith('CUSTOMER_ID passed', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenLanguageParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQPayConfig']['LANGUAGE'] = null; - - try { - $this->object = new QentaCEE_QPay_FrontendClient($aConfig); - } catch (QentaCEE_QPay_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('LANGUAGE passed to', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider provider - */ - public function testConstructorWhenSecretParamIsEmpty($aConfig) - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $aConfig['QentaCEEQPayConfig']['SECRET'] = null; - - try { - $this->object = new QentaCEE_QPay_FrontendClient($aConfig); - } catch (QentaCEE_QPay_Exception_InvalidArgumentException $e) { - $this->assertStringStartsWith('SECRET passed to', $e->getMessage()); - throw $e; - } - } - - /** - * Tests QentaCEE_QPay_FrontendClient->getResponse() - */ - public function testSetPluginVersion() - { - $sPluginVersion = $this->object->generatePluginVersion('phpunit', '1.0.0', 'phpunit', '1.0.0', - Array('phpunit' => '3.5.15')); - $this->object->setPluginVersion($sPluginVersion); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::PLUGIN_VERSION => $sPluginVersion)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - public function testSetFinancialInstitution() - { - $sFinancialInstitution = 'BA-CA'; - $this->object->setFinancialInstitution($sFinancialInstitution); - - $expected = array_merge($this->aExpectedRequestData, array( - QentaCEE_QPay_FrontendClient::FINANCIAL_INSTITUTION => $sFinancialInstitution)); - $this->assertEquals($expected, $this->object->getRequestData()); - } - - public function testDisplayTextAndImageUrl() - { - $this->object->setDisplayText('display text')->setImageUrl('https://www.google.com/intl/en_ALL/images/logos/images_logo_lg.gif'); - $this->addToAssertionCount(1); - } - - - public function provider() - { - return Array( - Array( - Array( - 'QentaCEEQPayConfig' => Array( - 'CUSTOMER_ID' => 'D200001', - 'SHOP_ID' => '', - 'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2', - 'LANGUAGE' => 'en' - ) - ) - ) - ); - } - -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/MobileDetectTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/MobileDetectTest.php deleted file mode 100644 index 4683033..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/MobileDetectTest.php +++ /dev/null @@ -1,48 +0,0 @@ -assertFalse($detect->isMobile('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; Touch; MDDCJS; WebView/1.0)')); - $this->assertFalse($detect->isTablet('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; Touch; MDDCJS; WebView/1.0)')); - - $this->assertTrue($detect->isTablet('Mozilla/5.0 (Linux; Android 4.4.2; SM-T700 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.517 Safari/537.36')); - $this->assertTrue($detect->isMobile('Mozilla/5.0 (Linux; Android 4.4.2; SM-T700 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.517 Safari/537.36')); - - $this->assertFalse($detect->isTablet('Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SHV-E160K/VI10.1802 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30')); - $this->assertTrue($detect->isMobile('Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SHV-E160K/VI10.1802 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30')); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ModuleTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ModuleTest.php deleted file mode 100644 index 8940d75..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ModuleTest.php +++ /dev/null @@ -1,58 +0,0 @@ -assertIsArray($aConfig); - $this->assertArrayHasKey('MODULE_NAME', $aConfig); - $this->assertArrayHasKey('FRONTEND_URL', $aConfig); - $this->assertArrayHasKey('TOOLKIT_URL', $aConfig); - $this->assertArrayHasKey('DEPENDENCIES', $aConfig); - $this->assertEquals('QentaCEE_QPay', $aConfig['MODULE_NAME']); - } - - public function testUserConfig() - { - $aConfig = QentaCEE_QPay_Module::getConfig(); - $this->assertIsArray($aConfig); - $this->assertArrayHasKey('QentaCEEQPayConfig', $aConfig); - $this->assertArrayHasKey('CUSTOMER_ID', $aConfig['QentaCEEQPayConfig']); - $this->assertArrayHasKey('SHOP_ID', $aConfig['QentaCEEQPayConfig']); - $this->assertArrayHasKey('LANGUAGE', $aConfig['QentaCEEQPayConfig']); - $this->assertArrayHasKey('SECRET', $aConfig['QentaCEEQPayConfig']); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/PaymentTypeTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/PaymentTypeTest.php deleted file mode 100644 index 7104820..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/PaymentTypeTest.php +++ /dev/null @@ -1,98 +0,0 @@ -assertTrue(QentaCEE_QPay_PaymentType::hasFinancialInstitutions($paymentType)); - } - - public function testHasNoFinancialInstitutions() - { - $paymentType = QentaCEE_QPay_PaymentType::CCARD; - $this->assertFalse(QentaCEE_QPay_PaymentType::hasFinancialInstitutions($paymentType)); - } - - public function testGetIdealFinancialInstitutions() - { - $paymentType = QentaCEE_QPay_PaymentType::IDL; - $this->assertContains('ABN AMRO Bank', QentaCEE_QPay_PaymentType::getFinancialInstitutions($paymentType)); - $this->assertArrayHasKey('REGIOBANK', QentaCEE_QPay_PaymentType::getFinancialInstitutions($paymentType)); - } - - public function testGetEpsFinancialInstitutions() - { - $paymentType = QentaCEE_QPay_PaymentType::EPS; - $this->assertContains('BAWAG P.S.K. AG', QentaCEE_QPay_PaymentType::getFinancialInstitutions($paymentType)); - $this->assertArrayHasKey('ARZ|VB', QentaCEE_QPay_PaymentType::getFinancialInstitutions($paymentType)); - } - - public function testGetEmptyFinancialInstitutions() - { - $paymentType = QentaCEE_QPay_PaymentType::CCARD; - $this->assertEmpty(QentaCEE_QPay_PaymentType::getFinancialInstitutions($paymentType)); - } - -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/InitiationTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/InitiationTest.php deleted file mode 100644 index 3764da7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/InitiationTest.php +++ /dev/null @@ -1,92 +0,0 @@ -object = new QentaCEE_QPay_Response_Initiation($zendHttpResponse); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetStatus() - { - $this->assertEquals(QentaCEE_QPay_Response_Initiation::STATE_SUCCESS, $this->object->getStatus()); - } - - public function testGetRedirectUrl() - { - $this->assertEquals('http://www.example.com', $this->object->getRedirectUrl()); - } - - public function testGetStatusFailed() - { - $this->object = $this->_fail200Response(); - $this->assertEquals(QentaCEE_QPay_Response_Initiation::STATE_FAILURE, $this->object->getStatus()); - } - - protected function _fail200Response() - { - $zendHttpResponse = new \GuzzleHttp\Psr7\Response(200, Array(), 'pre=bla&su=blub'); - - return new QentaCEE_QPay_Response_Initiation($zendHttpResponse); - } - -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/ResponseAbstractTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/ResponseAbstractTest.php deleted file mode 100644 index ca63293..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/ResponseAbstractTest.php +++ /dev/null @@ -1,59 +0,0 @@ -object = new FakeResponse($response); - } - - public function testError() - { - $error = $this->object->getError(); - $this->assertInstanceOf('QentaCEE_QPay_Error', $error); - $this->assertEquals("Amount is missing.", $error->getConsumerMessage()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/ApproveReversalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/ApproveReversalTest.php deleted file mode 100644 index fc4d2a8..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/ApproveReversalTest.php +++ /dev/null @@ -1,113 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->approveReversal($this->_orderNumber); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getError()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositReversalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositReversalTest.php deleted file mode 100644 index e45aa73..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositReversalTest.php +++ /dev/null @@ -1,115 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->depositReversal($this->_orderNumber, $this->_paymentNumber); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getError()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositTest.php deleted file mode 100644 index f93de2b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/DepositTest.php +++ /dev/null @@ -1,147 +0,0 @@ -object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertEquals($response->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertEmpty($response->getError()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertFalse($response->hasFailed()); - } - - public function testGetPaymentNumber() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur'); - $this->assertEquals($this->_orderNumber, $response->getPaymentNumber()); - } - - /** - * Test basket data - */ - public function testWithBasketData() - { - $response = $this->object->deposit($this->_orderNumber, 100, 'eur', $this->getValidBasket()); - $this->assertEquals($this->_orderNumber, $response->getPaymentNumber()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } - - /** - * Creates a valid shopping basket. - * - * @return QentaCEE_Stdlib_Basket - */ - private function getValidBasket() - { - $basketItem = new QentaCEE_Stdlib_Basket_Item('QentaCEETestItem'); - $basketItem->setUnitGrossAmount(10) - ->setUnitNetAmount(8) - ->setUnitTaxAmount(2) - ->setUnitTaxRate(20.0) - ->setDescription('unittest description') - ->setName('unittest name') - ->setImageUrl('http://example.com/picture.png'); - - $basket = new QentaCEE_Stdlib_Basket(); - $basket->addItem($basketItem); - - return $basket; - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/GetOrderDetailsTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/GetOrderDetailsTest.php deleted file mode 100644 index ccb4f00..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/GetOrderDetailsTest.php +++ /dev/null @@ -1,104 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber); - } - - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - public function testGetErrors() - { - $this->assertEmpty($this->object->getError()); - } - - public function testGetOrder() - { - $order = $this->object->getOrder(); - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_Order', $order); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/CreditTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/CreditTest.php deleted file mode 100644 index bce4e51..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/CreditTest.php +++ /dev/null @@ -1,140 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder()->getCredits()->current(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetCreditNumber() - { - $this->assertEquals(6000004, $this->object->getCreditNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals(5000004, $this->object->getOrderNumber()); - } - - public function testGetBatchNumber() - { - $this->assertEquals(411, $this->object->getBatchNumber()); - } - - public function testGetAmount() - { - $this->assertEquals('1.00', $this->object->getAmount()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('credit_closed', $this->object->getState()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(Array(''), $this->object->getOperationsAllowed()); - } - - public function testGetGatewayReferenceNumber() - { - $this->assertEquals('', $this->object->getGatewayReferenceNumber()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/IteratorTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/IteratorTest.php deleted file mode 100644 index d3628a4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/IteratorTest.php +++ /dev/null @@ -1,103 +0,0 @@ -object = new QentaCEE_QPay_Response_Toolkit_Order_OrderIteratorTestObject($data); - } - - public function testCurrent() - { - $this->assertEquals('a', $this->object->current()); - } - - public function testNext() - { - $this->object->next(); - $this->assertEquals('b', $this->object->current()); - } - - public function testRewind() - { - $this->object->next(); - $this->object->next(); - $this->object->rewind(); - $this->assertEquals('a', $this->object->current()); - } - - public function testValid() - { - $this->assertTrue($this->object->valid()); - $this->object->next(); - $this->assertTrue($this->object->valid()); - $this->object->next(); - $this->assertTrue($this->object->valid()); - $this->object->next(); - $this->assertTrue($this->object->valid()); - } - - public function testNotValid() - { - $this->object->next(); - $this->object->next(); - $this->object->next(); - $this->object->next(); - $this->object->next(); - $this->assertFalse($this->object->valid()); - } - - public function testKey() - { - $this->object->next(); - $this->assertEquals('1', $this->object->key()); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/IdealTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/IdealTest.php deleted file mode 100644 index f1681a4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/IdealTest.php +++ /dev/null @@ -1,101 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetConsumerName() - { - $this->assertEquals('Test Consumer', $this->object->getConsumerName()); - } - - public function testGetConsumerCity() - { - $this->assertEquals('Den Haag', $this->object->getConsumerCity()); - } - - public function testGetConsumerAccountNumber() - { - $this->assertEquals('P001234567', $this->object->getConsumerAccountNumber()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/PaypalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/PaypalTest.php deleted file mode 100644 index 323dc2d..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/PaypalTest.php +++ /dev/null @@ -1,151 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetPayerId() - { - $this->assertEquals('PAYER123456ID', $this->object->getPayerId()); - } - - public function testGetPayerEmail() - { - $this->assertEquals('buyer@paypal.com', $this->object->getPayerEmail()); - } - - public function testGetPayerFirstName() - { - $this->assertEquals('Test', $this->object->getPayerFirstName()); - } - - public function testGetPayerLastName() - { - $this->assertEquals('Consumer', $this->object->getPayerLastName()); - } - - public function testGetPayerAddressCountry() - { - $this->assertEquals('AT', $this->object->getPayerAddressCountry()); - } - - public function testGetPayerAddressCity() - { - $this->assertEquals('Musterstadt', $this->object->getPayerAddressCity()); - } - - public function testGetPayerAddressState() - { - $this->assertEquals('Musterland', $this->object->getPayerAddressState()); - } - - public function testGetPayerAddressName() - { - $this->assertEquals('', $this->object->getPayerAddressName()); - } - - public function testGetPayerAddressStreet1() - { - $this->assertEquals('', $this->object->getPayerAddressStreet1()); - } - - public function testGetPayerAddressStreet2() - { - $this->assertEquals('', $this->object->getPayerAddressStreet2()); - } - - public function testGetPayerAddressZip() - { - $this->assertEquals('1234', $this->object->getPayerAddressZip()); - } - - public function testGetPayerAddressStatus() - { - $this->assertEquals('unverified', $this->object->getPayerAddressStatus()); - } - - public function testGetProtectionEligibility() - { - $this->assertEquals('ExtendedCustomerProtection', $this->object->getProtectionEligibility()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/SofortueberweisungTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/SofortueberweisungTest.php deleted file mode 100644 index e2992e9..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/Payment/SofortueberweisungTest.php +++ /dev/null @@ -1,126 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetSenderAccountOwner() - { - $this->assertEquals('Test Consumer', $this->object->getSenderAccountOwner()); - } - - public function testGetSenderAccountNumber() - { - $this->assertEquals('1234567890', $this->object->getSenderAccountNumber()); - } - - public function testGetSenderBankNumber() - { - $this->assertEquals('1234578', $this->object->getSenderBankNumber()); - } - - public function testGetSenderBankName() - { - $this->assertEquals('Test Bank', $this->object->getSenderBankName()); - } - - public function testGetSenderBic() - { - $this->assertEquals('PNAGDE00000', $this->object->getSenderBic()); - } - - public function testGetSenderIban() - { - $this->assertEquals('DE0000000000000000', $this->object->getSenderIban()); - } - - public function testGetSenderCountry() - { - $this->assertEquals('DE', $this->object->getSenderCountry()); - } - - public function testGetSecurityCriteria() - { - $this->assertEquals('1', $this->object->getSecurityCriteria()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/PaymentTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/PaymentTest.php deleted file mode 100644 index 700f79b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/Order/PaymentTest.php +++ /dev/null @@ -1,155 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetPaymentNumber() - { - $this->assertEquals('5472113', $this->object->getPaymentNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals($this->_orderNumber, $this->object->getOrderNumber()); - } - - public function testGetApproveAmount() - { - $this->assertEquals('1.00', $this->object->getApproveAmount()); - } - - public function testGetDepositAmount() - { - $this->assertEquals('1.00', $this->object->getDepositAmount()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('payment_deposited', $this->object->getState()); - } - - public function testGetPaymentType() - { - $this->assertEquals('PSC', $this->object->getPaymentType()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(array(''), $this->object->getOperationsAllowed()); - } - - public function testGetGatewayReferencenumber() - { - $this->assertEquals('', $this->object->getGatewayReferencenumber()); - } - - public function testGetAvsResultCode() - { - $this->assertEquals('', $this->object->getAvsResultCode()); - } - - public function testGetAvsResultMessage() - { - $this->assertEquals('', $this->object->getAvsResultMessage()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - $this->object = null; - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest.php deleted file mode 100644 index 0f0e46e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest.php +++ /dev/null @@ -1,186 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals($this->_orderNumber, $this->object->getOrderNumber()); - } - - public function testGetPaymentType() - { - $this->assertEquals('PSC', $this->object->getPaymentType()); - } - - public function testGetAmount() - { - $this->assertEquals('1.00', $this->object->getAmount()); - } - - public function testGetBrand() - { - $this->assertEquals('paysafecard', $this->object->getBrand()); - } - - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - - public function testGetOrderDescription() - { - $this->assertEquals('Margit Hinterknofler, K-Nr: 86941', $this->object->getOrderDescription()); - } - - public function testGetAcquirer() - { - $this->assertEquals('', $this->object->getAcquirer()); - } - - public function testGetContractNumber() - { - $this->assertEquals('', $this->object->getContractNumber()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(Array(), $this->object->getOperationsAllowed()); - } - - public function testGetOrderReference() - { - $this->assertEquals('OR-5472113', $this->object->getOrderReference()); - } - - public function testGetCustomerStatement() - { - $this->assertEquals('Danke für den Einkauf!', $this->object->getCustomerStatement()); - } - - public function testGetOrderText() - { - $this->assertEquals('', $this->object->getOrderText()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('ORDERED', $this->object->getState()); - } - - public function testGetSourceOrderNumber() - { - $this->assertEquals('', $this->object->getSourceOrderNumber()); - } - - public function testGetPayments() - { - $payments = $this->object->getPayments(); - $this->assertTrue($payments->valid()); - $payments->next(); - $this->assertFalse($payments->valid()); - } - - public function testGetCredits() - { - $credits = $this->object->getCredits(); - $this->assertFalse($credits->valid()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest1.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest1.php deleted file mode 100644 index 97f46d4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/OrderTest1.php +++ /dev/null @@ -1,186 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber)->getOrder(); - } - - public function testGetMerchantNumber() - { - $this->assertEquals(1, $this->object->getMerchantNumber()); - } - - public function testGetOrderNumber() - { - $this->assertEquals($this->_orderNumber, $this->object->getOrderNumber()); - } - - public function testGetPaymentType() - { - $this->assertEquals('SCM', $this->object->getPaymentType()); - } - - public function testGetAmount() - { - $this->assertEquals('1.00', $this->object->getAmount()); - } - - public function testGetBrand() - { - $this->assertEquals('Maestro', $this->object->getBrand()); - } - - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - - public function testGetOrderDescription() - { - $this->assertEquals('Banko Maestro, K-Nr: 453213', $this->object->getOrderDescription()); - } - - public function testGetAcquirer() - { - $this->assertEquals('PayLife', $this->object->getAcquirer()); - } - - public function testGetContractNumber() - { - $this->assertEquals('0815DemoContract', $this->object->getContractNumber()); - } - - public function testGetOperationsAllowed() - { - $this->assertEquals(Array('REFUND'), $this->object->getOperationsAllowed()); - } - - public function testGetOrderReference() - { - $this->assertEquals('OR-1453243', $this->object->getOrderReference()); - } - - public function testGetCustomerStatement() - { - $this->assertEquals('Danke für den Einkauf!', $this->object->getCustomerStatement()); - } - - public function testGetOrderText() - { - $this->assertEquals('', $this->object->getOrderText()); - } - - public function testGetTimeCreated() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeCreated()); - } - - public function testGetTimeModified() - { - $this->assertInstanceOf('DateTime', $this->object->getTimeModified()); - } - - public function testGetState() - { - $this->assertEquals('REFUNDABLE', $this->object->getState()); - } - - public function testGetSourceOrderNumber() - { - $this->assertEquals('', $this->object->getSourceOrderNumber()); - } - - public function testGetPayments() - { - $payments = $this->object->getPayments(); - $this->assertTrue($payments->valid()); - $payments->next(); - $this->assertFalse($payments->valid()); - } - - public function testGetCredits() - { - $credits = $this->object->getCredits(); - $this->assertFalse($credits->valid()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RecurPaymentTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RecurPaymentTest.php deleted file mode 100644 index df704b3..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RecurPaymentTest.php +++ /dev/null @@ -1,120 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - $this->object = $oToolkitClient->recurPayment($this->_sourceOrderNumber, $this->_amount, $this->_currency, - $this->_orderDescription, $this->_orderNumber, $this->_depositFlag); - } - - public function testGetOrderNumber() - { - $this->assertNotEquals('', $this->object->getOrderNumber()); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getError()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // objectTest::tearDown() - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundReversalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundReversalTest.php deleted file mode 100644 index cab7142..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundReversalTest.php +++ /dev/null @@ -1,112 +0,0 @@ -_customerId; - $shopId = $this->_shopId; - $secret = $this->_secret; - $language = $this->_language; - $toolkitPassword = $this->_toolkitPassword; - - $oToolkitClient = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $customerId, - 'SHOP_ID' => $shopId, - 'SECRET' => $secret, - 'LANGUAGE' => $language, - 'TOOLKIT_PASSWORD' => $toolkitPassword - )); - - $this->object = $oToolkitClient->refundReversal($this->_orderNumber, $this->_creditNumber); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $this->assertEquals($this->object->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $this->assertEmpty($this->object->getError()); - } - - /** - * Test hasFailed() - */ - public function testHasFailed() - { - $this->assertFalse($this->object->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - // TODO Auto-generated - // objectTest::tearDown() - $this->object = null; - - parent::tearDown(); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundTest.php deleted file mode 100644 index 9331846..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Response/Toolkit/RefundTest.php +++ /dev/null @@ -1,148 +0,0 @@ -object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - } - - /** - * Test getStatus() - */ - public function testGetStatus() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertEquals($response->getStatus(), 0); - } - - /** - * Test getErrors() - */ - public function testGetErrors() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertEmpty($response->getError()); - } - - /** - * Test getCreditNumber() - */ - public function testGetCreditNumber() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertIsString($response->getCreditNumber()); - $this->assertNotEquals('', $response->getCreditNumber()); - } - - /** - * Test basket data - */ - public function testWithBasketData() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency, $this->getValidBasket()); - $this->assertIsString($response->getCreditNumber()); - $this->assertNotEquals('', $response->getCreditNumber()); - } - - /** - * Test hasFailed() - */ - public function testHasNotFailed() - { - $response = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - $this->assertFalse($response->hasFailed()); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } - - /** - * Creates a valid shopping basket. - * - * @return QentaCEE_Stdlib_Basket - */ - private function getValidBasket() - { - $basketItem = new QentaCEE_Stdlib_Basket_Item('QentaCEETestItem'); - $basketItem->setUnitGrossAmount(10) - ->setUnitNetAmount(8) - ->setUnitTaxAmount(2) - ->setUnitTaxRate(20.0) - ->setDescription('unittest description') - ->setName('unittest name') - ->setImageUrl('http://example.com/picture.png'); - - $basket = new QentaCEE_Stdlib_Basket(); - $basket->addItem($basketItem); - - return $basket; - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/CancelTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/CancelTest.php deleted file mode 100644 index 956fbcf..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/CancelTest.php +++ /dev/null @@ -1,81 +0,0 @@ - 'CANCEL'); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_Cancel($this->_returnData); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testPaymentState() - { - $this->assertEquals('CANCEL', $this->object->getPaymentState()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetReturned() - { - $this->assertEquals($this->_returnData, $this->object->getReturned()); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/FailureTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/FailureTest.php deleted file mode 100644 index 7af77b6..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/FailureTest.php +++ /dev/null @@ -1,73 +0,0 @@ - 'FAILURE', - 'message' => 'Language is missing.', - 'consumerMessage' => 'Language is missing.' - ); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_Failure($this->_returnData); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetErrors() - { - foreach ($this->object->getErrors() as $error) { - $this->assertEquals('Language is missing.', $error->getMessage()); - $this->assertEquals('Language is missing.', $error->getConsumerMessage()); - } - $this->addToAssertionCount(1); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/PendingTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/PendingTest.php deleted file mode 100644 index 6688376..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/PendingTest.php +++ /dev/null @@ -1,95 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'QUICK', - 'financialInstitution' => 'QUICK', - 'language' => 'de', - 'orderNumber' => '16280512', - 'paymentState' => 'PENDING', - 'gatewayReferenceNumber' => 'DGW_16280512_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '3671cd41c4f11430713fb1b1de397ef8536364a458a76f92ae7e7554f6a61d4a5e077b0f8e34704592e95305a1eee162fbaaa2dd31f37df15d3d82d23a0fa0a5' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_Pending($this->_returnData, $this->_secret); - } - - public function testPaymentState() - { - $this->assertEquals('PENDING', $this->object->getPaymentState()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetReturned() - { - if (array_key_exists('responseFingerprintOrder', $this->_returnData) && array_key_exists('responseFingerprint', - $this->_returnData) - ) { - unset( $this->_returnData['responseFingerprintOrder'] ); - unset( $this->_returnData['responseFingerprint'] ); - } - - $this->assertEquals($this->_returnData, $this->object->getReturned()); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/ReturnAbstractTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/ReturnAbstractTest.php deleted file mode 100644 index cffb5cc..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/ReturnAbstractTest.php +++ /dev/null @@ -1,115 +0,0 @@ - 'CANCEL' - ); - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_ReturnAbstractTestObject($this->_returnData); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() : void - { - $this->object = null; - parent::tearDown(); - } - - public function testMagicGetPaymentState() - { - $this->assertEquals('CANCEL', $this->object->paymentState); - } - - public function testPaymentState() - { - $this->assertEquals('', $this->object->getPaymentState()); - } - - public function testMagicGetNotSet() - { - $this->assertEquals(null, $this->object->invalid); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetReturned() - { - $this->assertEquals($this->_returnData, $this->object->getReturned()); - } - - public function testGetReturnedButUnsetArrayFields() - { - $returnData = Array(); - $returnData['paymentState'] = 'CANCEL'; - $returnData['responseFingerprintOrder'] = 'TEST'; - $returnData['responseFingerprint'] = 'TEST'; - - $object = new QentaCEE_QPay_Return_ReturnAbstractTestObject($returnData); - $object->getReturned(); - - $this->assertFalse(isset( $this->_returnData['responseFingerprintOrder'] )); - $this->assertFalse(isset( $this->_returnData['responseFingerprint'] )); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/CreditCardTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/CreditCardTest.php deleted file mode 100644 index 1a0c19b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/CreditCardTest.php +++ /dev/null @@ -1,118 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'CCARD', - 'financialInstitution' => 'MC', - 'language' => 'de', - 'orderNumber' => '16375141', - 'paymentState' => 'SUCCESS', - 'authenticated' => 'Yes', - 'anonymousPan' => '0001', - 'expiry' => '10/2012', - 'cardholder' => 'keiner', - 'maskedPan' => '950000******0001', - 'gatewayReferenceNumber' => 'DGW_16375141_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,authenticated,anonymousPan,expiry,cardholder,maskedPan,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => 'e077f1e8488f06a444899b43c94a0c814c69efea4870b4afc931cacc99ee1516db3f5909f7079d657d73fe0ef92c4cc48515cd4026168d228962ba7d05cc503f' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_Success_CreditCard($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetAnonymousPan() - { - $this->assertEquals('0001', $this->object->getAnonymousPan()); - } - - public function testGetAuthenticated() - { - $this->assertEquals('Yes', $this->object->getAuthenticated()); - } - - public function testGetExpiry() - { - $this->assertEquals('10/2012', $this->object->getExpiry()); - } - - public function testGetCardholder() - { - $this->assertEquals('keiner', $this->object->getCardholder()); - } - - public function testGetMaskedPan() - { - $this->assertEquals('950000******0001', $this->object->getMaskedPan()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/IdealTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/IdealTest.php deleted file mode 100644 index b99bafa..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/IdealTest.php +++ /dev/null @@ -1,106 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'IDL', - 'financialInstitution' => 'INGBANK', - 'language' => 'de', - 'orderNumber' => '7885625', - 'paymentState' => 'SUCCESS', - 'idealConsumerName' => 'Test Cönsümer Utløpsdato', - 'idealConsumerCity' => 'Den Haag', - 'idealConsumerAccountNumber' => 'P001234567', - 'gatewayReferenceNumber' => 'DGW_7885625_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,idealConsumerName,idealConsumerCity,idealConsumerAccountNumber,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => 'fc5386502aef8e6b23efaa204e0d84929f818f6ba9914ae6421ac175be3d1efeb2a6687a5e0546c906037837e41d06badb58e1bea9b1d1f72e85db4c581621c1' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_Success_Ideal($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetConsumerName() - { - $this->assertEquals('Test Cönsümer Utløpsdato', $this->object->getConsumerName()); - } - - public function testGetConsumerCity() - { - $this->assertEquals('Den Haag', $this->object->getConsumerCity()); - } - - public function testGetConsumerAccountNumber() - { - $this->assertEquals('P001234567', $this->object->getConsumerAccountNumber()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/PaypalTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/PaypalTest.php deleted file mode 100644 index 8e3edf5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/PaypalTest.php +++ /dev/null @@ -1,155 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'PAYPAL', - 'financialInstitution' => 'PayPal', - 'language' => 'de', - 'orderNumber' => '16727331', - 'paymentState' => 'SUCCESS', - 'paypalPayerID' => 'PAYER123456ID', - 'paypalPayerEmail' => 'buyer@paypal.com', - 'paypalPayerFirstName' => 'Test', - 'paypalPayerLastName' => 'Consumer', - 'paypalPayerAddressName' => 'Consumer Test', - 'paypalPayerAddressCountry' => 'US', - 'paypalPayerAddressCity' => 'New York', - 'paypalPayerAddressState' => 'NY', - 'paypalPayerAddressStreet1' => 'Park Row', - 'paypalPayerAddressStreet2' => '2', - 'paypalPayerAddressZIP' => '10038', - 'gatewayReferenceNumber' => 'DGW_16727331_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,paypalPayerID,paypalPayerEmail,paypalPayerLastName,paypalPayerFirstName,paypalPayerAddressName,paypalPayerAddressCountry,paypalPayerAddressCity,paypalPayerAddressState,paypalPayerAddressStreet1,paypalPayerAddressStreet2,paypalPayerAddressZIP,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '0f1782894fdcd747255aa6fa2f47189913d2fa727e5d515f84b63dff01b1dc532545378e3a7a87fc93c81813b5f90380ddca4160af853f2ff2076df091543f72' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - - $this->object = new QentaCEE_QPay_Return_Success_PayPal($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetPayerID() - { - $this->assertEquals('PAYER123456ID', $this->object->getPayerID()); - } - - public function testGetPayerEmail() - { - $this->assertEquals('buyer@paypal.com', $this->object->getPayerEmail()); - } - - public function testGetPayerLastName() - { - $this->assertEquals('Consumer', $this->object->getPayerLastName()); - } - - public function testGetPayerFirstName() - { - $this->assertEquals('Test', $this->object->getPayerFirstName()); - } - - public function testGetPayerAddressName() - { - $this->assertEquals('Consumer Test', $this->object->getPayerAddressName()); - } - - public function testGetPayerAddressCountry() - { - $this->assertEquals('US', $this->object->getPayerAddressCountry()); - } - - public function testGetPayerAddressCity() - { - $this->assertEquals('New York', $this->object->getPayerAddressCity()); - } - - public function testGetPayerAddressState() - { - $this->assertEquals('NY', $this->object->getPayerAddressState()); - } - - public function testGetPayerAddressStreet1() - { - $this->assertEquals('Park Row', $this->object->getPayerAddressStreet1()); - } - - public function testGetPayerAddressStreet2() - { - $this->assertEquals('2', $this->object->getPayerAddressStreet2()); - } - - public function testGetPayerAddressZip() - { - $this->assertEquals('10038', $this->object->getPayerAddressZip()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/SofortueberweisungTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/SofortueberweisungTest.php deleted file mode 100644 index 550c602..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/Success/SofortueberweisungTest.php +++ /dev/null @@ -1,136 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'SOFORTUEBERWEISUNG', - 'financialInstitution' => 'sofortueberweisung', - 'language' => 'de', - 'orderNumber' => '5717698', - 'paymentState' => 'SUCCESS', - 'senderAccountOwner' => 'Jürgen Mustermann', - 'senderAccountNumber' => '112233', - 'senderBankNumber' => '88888888', - 'senderBankName' => 'Testbank', - 'senderBIC' => 'PNAGDE00000', - 'senderIBAN' => 'DE35888888880000112233', - 'senderCountry' => 'DE', - 'securityCriteria' => '1', - 'gatewayReferenceNumber' => 'DGW_5717698_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,senderAccountOwner,senderAccountNumber,senderBankNumber,senderBankName,senderBIC,senderIBAN,senderCountry,securityCriteria,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '36e4a163e1e94017cbffa7ea48614bb3c21426e8e18fecba93aa4411eb409b1dc79bb65f59d448cb488a230741bd1cb8bf2155965e61225578f5c0a56c75bb8f' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - $this->object = new QentaCEE_QPay_Return_Success_Sofortueberweisung($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetSenderAccountOwner() - { - $this->assertEquals('Jürgen Mustermann', $this->object->getSenderAccountOwner()); - } - - public function testGetSenderAccountNumber() - { - $this->assertEquals('112233', $this->object->getSenderAccountNumber()); - } - - public function testGetSenderBankNumber() - { - $this->assertEquals('88888888', $this->object->getSenderBankNumber()); - } - - public function testGetSenderBankName() - { - $this->assertEquals('Testbank', $this->object->getSenderBankName()); - } - - public function testGetSenderBic() - { - $this->assertEquals('PNAGDE00000', $this->object->getSenderBic()); - } - - public function testGetSenderIban() - { - $this->assertEquals('DE35888888880000112233', $this->object->getSenderIban()); - } - - public function testGetSenderCountry() - { - $this->assertEquals('DE', $this->object->getSenderCountry()); - } - - public function testGetSecurityCriteria() - { - $this->assertEquals('1', $this->object->getSecurityCriteria()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/SuccessTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/SuccessTest.php deleted file mode 100644 index 3a57899..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/Return/SuccessTest.php +++ /dev/null @@ -1,190 +0,0 @@ - '1', - 'currency' => 'EUR', - 'paymentType' => 'QUICK', - 'financialInstitution' => 'QUICK', - 'language' => 'de', - 'orderNumber' => '16280512', - 'paymentState' => 'SUCCESS', - 'gatewayReferenceNumber' => 'DGW_16280512_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '0ec59bd2d811d5018f2df9865fc2fb6cd46c45ee9abc2026b78ccbf70f4d3be626722f797127c34db7fa8147acdc218d7042915fc0b8ee3c3de9d236318a36f5' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp(): void - { - QentaCEE_Stdlib_Fingerprint::setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5); - $this->object = new QentaCEE_QPay_Return_Success($this->_returnData, $this->_secret); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetAmount() - { - $this->assertEquals('1', $this->object->getAmount()); - } - - public function testGetCurrency() - { - $this->assertEquals('EUR', $this->object->getCurrency()); - } - - public function testGetPaymentType() - { - $this->assertEquals('QUICK', $this->object->getPaymentType()); - } - - public function testGetFinancialInstitution() - { - $this->assertEquals('QUICK', $this->object->getFinancialInstitution()); - } - - public function testGetLanguage() - { - $this->assertEquals('de', $this->object->getLanguage()); - } - - public function testGetOrderNumber() - { - $this->assertEquals('16280512', $this->object->getOrderNumber()); - } - - public function testGetGatewayReferenceNumber() - { - $this->assertEquals('DGW_16280512_RN', $this->object->getGatewayReferenceNumber()); - } - - public function testGetGatewayContractNumber() - { - $this->assertEquals('DemoContractNumber123', $this->object->getGatewayContractNumber()); - } - - public function testGetAvsResponseCode() - { - $this->assertEquals('X', $this->object->getAvsResponseCode()); - } - - public function testGetAvsResponseMessage() - { - $this->assertEquals('Demo AVS ResultMessage', $this->object->getAVSResponseMessage()); - } - - public function testValidate() - { - $this->assertTrue($this->object->validate()); - } - - public function testValidateFalse() - { - $this -> expectException(QentaCEE_Stdlib_Exception_UnexpectedValueException::class); - $object = new QentaCEE_QPay_Return_Success($this->_returnData, ''); - try { - $returned = $object->validate(); - $this->assertFalse($returned); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertContains('Secret is empty', $e->getMessage()); - } - } - - public function testValidateNoFingerprintOrder() - { - $returnData = $this->_returnData; - unset( $returnData['responseFingerprintOrder'] ); - $object = new QentaCEE_QPay_Return_Success($returnData, $this->_secret); - try { - $returned = $object->validate(); - $this->assertFalse($returned); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertContains('Parameter responseFingerprintOrder has not been returned', $e->getMessage()); - } - } - - public function testValidateMagicQuotes() - { - $this->assertTrue($this->object->validate()); - } - - public function testGetPaymentState() - { - $this->assertEquals('SUCCESS', $this->object->getPaymentState()); - } - - public function testGetReturned() - { - $returned = $this->object->getReturned(); - $this->assertArrayHasKey('amount', $returned); - $this->assertArrayHasKey('currency', $returned); - $this->assertArrayHasKey('paymentType', $returned); - $this->assertArrayHasKey('financialInstitution', $returned); - $this->assertArrayHasKey('language', $returned); - $this->assertArrayHasKey('orderNumber', $returned); - $this->assertArrayHasKey('paymentState', $returned); - $this->assertArrayHasKey('gatewayReferenceNumber', $returned); - $this->assertArrayHasKey('gatewayContractNumber', $returned); - $this->assertArrayHasKey('avsResponseCode', $returned); - $this->assertArrayHasKey('avsResponseMessage', $returned); - $this->assertArrayNotHasKey('responseFingerprintOrder', $returned); - $this->assertArrayNotHasKey('responseFingerprint', $returned); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ReturnFactoryTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ReturnFactoryTest.php deleted file mode 100644 index b376f6b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ReturnFactoryTest.php +++ /dev/null @@ -1,213 +0,0 @@ -object = null; - parent::tearDown(); - } - - /** - * Tests QentaCEE_QPay_ReturnFactory::getInstance() - */ - public function testGetInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'CCARD' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertTrue(is_object($oInstance)); - } - - public function testSuccessInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'CCARD' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Success_CreditCard', $oInstance); - } - - public function testSuccessPaypalInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'Paypal' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Success_PayPal', $oInstance); - } - - public function testSuccessSofortueberweisungInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'SOFORTUEBERWEISUNG' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Success_Sofortueberweisung', $oInstance); - } - - public function testSuccessIdealInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS, - 'paymentType' => 'IDL' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Success_Ideal', $oInstance); - } - - public function testSuccessDefaultInstance() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS, - 'paymentType' => '' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Success', $oInstance); - } - - public function testInstanceWIthNoPaymentType() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidResponseException::class); - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_SUCCESS - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - } - - public function testFailureState() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_FAILURE - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Failure', $oInstance); - } - - public function testCancelState() - { - $return = Array( - 'paymentState' => QentaCEE_QPay_ReturnFactory::STATE_CANCEL, - 'paymentType' => 'CCARD' - ); - - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - $this->assertInstanceOf('QentaCEE_QPay_Return_Cancel', $oInstance); - } - - public function testNoState() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidResponseException::class); - $return = Array( - 'paymentState' => 999 - ); - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - } - - public function testInstanceWithEmptyPaymentStateInArray() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidResponseException::class); - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance(Array(), $this->_secret); - } - - public function testWhenReturnIsNotArray() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidResponseException::class); - $return = ""; - $oInstance = QentaCEE_QPay_ReturnFactory::getInstance($return, $this->_secret); - } - - public function testGenerateConfirmResponseNOKString() - { - $response = QentaCEE_QPay_ReturnFactory::generateConfirmResponseString('nok test'); - $this->assertEquals('', - $response); - } - - public function testGenerateConfirmResponseHtmlCommentNOKString() - { - $response = QentaCEE_QPay_ReturnFactory::generateConfirmResponseString('nok test', true); - $this->assertEquals('', - $response); - } - - public function testGenerateConfirmResponseOKString() - { - $response = QentaCEE_QPay_ReturnFactory::generateConfirmResponseString(); - $this->assertEquals('', $response); - } - - public function testGenerateConfirmResponseHtmlCommentOKString() - { - $response = QentaCEE_QPay_ReturnFactory::generateConfirmResponseString('', true); - $this->assertEquals('', $response); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ToolkitClientTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ToolkitClientTest.php deleted file mode 100644 index fefc2f7..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/QPay/ToolkitClientTest.php +++ /dev/null @@ -1,248 +0,0 @@ -object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->refund() - */ - public function testRefund() - { - $oResult = $this->object->refund($this->_orderNumber, $this->_amount, $this->_currency); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_Refund', $oResult); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - $this->assertIsString($oResult->getCreditNumber()); - $this->assertNotEquals('', $oResult->getCreditNumber()); - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->refundReversal() - */ - public function testRefundReversal() - { - $iCreditNumber = 321312; - - $oResult = $this->object->refundReversal($this->_orderNumber, $iCreditNumber); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_RefundReversal', $oResult); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->recurPayment() - */ - public function testRecurPayment() - { - $object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - - $oResult = $object->recurPayment($this->_sourceOrderNumber, $this->_amount, $this->_currency, - $this->_orderDescription, $this->_orderNumber, $this->_depositFlag); - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_RecurPayment', $oResult); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->getOrderDetails() - */ - public function testGetOrderDetails() - { - $iOrderNumber = 23473341; - $oResult = $this->object->getOrderDetails($iOrderNumber); - $order = $oResult->getOrder(); - $sPaymentType = $order->getPaymentType(); - - $this->assertEquals('VPG', $sPaymentType); - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_Order', $order); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->approveReversal() - */ - public function testApproveReversal() - { - $oResult = $this->object->approveReversal($this->_orderNumber); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_ApproveReversal', $oResult); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->deposit() - */ - public function testDeposit() - { - $oResult = $this->object->deposit($this->_orderNumber, $this->_amount, $this->_currency); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_Deposit', $oResult); - $this->assertEquals($this->_orderNumber, $oResult->getPaymentNumber()); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - } - - /** - * Tests QentaCEE_QPay_ToolkitClient->depositReversal() - */ - public function testDepositReversal() - { - $_paymentNumber = 123445; - $oResult = $this->object->depositReversal($this->_orderNumber, $_paymentNumber); - - $this->assertInstanceOf('QentaCEE_QPay_Response_Toolkit_DepositReversal', $oResult); - $this->assertEquals($oResult->getStatus(), 0); - $this->assertFalse($oResult->hasFailed()); - $this->assertFalse($oResult->getError()); - } - - public function testCustomerIdIsEmpty() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => '', - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - } - - public function testLanguageIsEmpty() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => '', - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - } - - public function testSecretIsEmpty() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => '', - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => $this->_toolkitPassword - )); - } - - public function testToolkitPasswordIsEmpty() - { - $this -> expectException(QentaCEE_QPay_Exception_InvalidArgumentException::class); - $object = new QentaCEE_QPay_ToolkitClient(Array( - 'CUSTOMER_ID' => $this->_customerId, - 'SHOP_ID' => $this->_shopId, - 'SECRET' => $this->_secret, - 'LANGUAGE' => $this->_language, - 'TOOLKIT_PASSWORD' => '' - )); - } - - public function testConfigFallback() - { - $object = new QentaCEE_QPay_ToolkitClient(); - $oUserConfig = $object->getUserConfig(); - $this->assertInstanceOf('QentaCEE_Stdlib_Config', $oUserConfig); - $this->assertEquals($oUserConfig->CUSTOMER_ID, 'D200001'); - } - -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Basket/ItemTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Basket/ItemTest.php deleted file mode 100644 index f875fb0..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Basket/ItemTest.php +++ /dev/null @@ -1,71 +0,0 @@ -object = new QentaCEE_Stdlib_Basket_Item('QentaCEETestItem'); - } - - public function testAllFunctions() - { - $this->object->setUnitGrossAmount(10) - ->setUnitNetAmount(8) - ->setUnitTaxAmount(2) - ->setUnitTaxRate(20.0) - ->setDescription('unittest description') - ->setName('unittest name') - ->setImageUrl('http://example.com/picture.png'); - $this->assertEquals(10, $this->object->getUnitGrossAmount()); - $this->assertEquals(8, $this->object->getUnitNetAmount()); - $this->assertEquals(2, $this->object->getUnitTaxAmount()); - $this->assertEquals(20.0, $this->object->getUnitTaxRate()); - $this->assertEquals('unittest description', $this->object->getDescription()); - $this->assertEquals('unittest name', $this->object->getName()); - $this->assertEquals('QentaCEETestItem', $this->object->getArticleNumber()); - $this->assertEquals('http://example.com/picture.png', $this->object->getImageUrl()); - } - - public function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } - - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/BasketTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/BasketTest.php deleted file mode 100644 index c473827..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/BasketTest.php +++ /dev/null @@ -1,118 +0,0 @@ -_currency; - } - - public function getItems() - { - return $this->_items; - } - - public function getItem($mArticleNumber) - { - return isset( $this->_items[md5($mArticleNumber)] ) ? $this->_items[md5($mArticleNumber)] : false; - } - - public function getItemQuantity($mArticleNumber) - { - return $this->_getItemQuantity($mArticleNumber); - } - - public function increaseQuantity($mArticleNumber, $iQuantity) - { - return $this->_increaseQuantity($mArticleNumber, $iQuantity); - } -} - -class QentaCEE_Stdlib_BasketTest extends TestCase -{ - - protected $object; - - public function setUp(): void - { - $this->object = new QentaBasket(); - - for ($i = 0; $i < 10; $i ++) { - $_item = new QentaCEE_Stdlib_Basket_Item("QentaCEE_{$i}"); - $_item->setUnitGrossAmount(( $i + 1 ) * 10) - ->setUnitNetAmount(( $i + 1 ) * 8) - ->setUnitTaxAmount(( $i + 1 ) * 2) - ->setUnitTaxRate(20.0) - ->setDescription("UnitTesting Description {$i}") - ->setName("UnitTesting Name {$i}") - ->setImageUrl("http://example.com/picture.png"); - $this->object->addItem($_item); - } - } - - public function testAddNewItem() - { - $this->assertIsArray($this->object->getItems()); - $this->assertEquals(10, count($this->object->getItems())); - } - - - public function testIncreaseQuantity() - { - $oItem = $this->object->getItem('QentaCEE_0'); - $this->object->addItem($oItem['instance']); - $this->assertEquals(2, $this->object->getItemQuantity('QentaCEE_0')); - } - - public function testGetData() - { - $array = $this->object->getData(); - $this->assertIsArray($array); - $this->assertEquals(count($this->object->getItems()), $array[QentaCEE_Stdlib_Basket::BASKET_ITEMS]); - } - - public function testIncreaseQuantityForException() - { - $this -> expectException(Exception::class); - $this->object->increaseQuantity('not_existing', 1); - } - - public function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/ClientAbstractTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/ClientAbstractTest.php deleted file mode 100644 index 19ec29f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/ClientAbstractTest.php +++ /dev/null @@ -1,109 +0,0 @@ -oClientConfig = $aConfig; - } - - public function setField($name, $value) - { - parent::_setField($name, $value); - } - - public function _getUserAgent() - { - return __CLASS__; - } - - public function _getRequestUrl() - { - return "http://www.google.at"; - } - - public function getHttpClient() - { - return $this->_getHttpClient(); - } -} - -class QentaCEE_Stdlib_Client_ClientAbstractTest extends TestCase -{ - - protected $object; - - public function setUp(): void - { - $this->object = new TestClient(QentaCEE_Stdlib_Module::getClientConfig()); - } - - public function testSetZendHttpClient() - { - $this->object->setHttpClient(new GuzzleHttp\Client()); - $this->assertInstanceOf('GuzzleHttp\Client', $this->object->getHttpClient()); - } - - public function testClientConfig() - { - $_oClientConfig = $this->object->getClientConfig(); - $this->assertArrayHasKey('MODULE_NAME', $_oClientConfig); - $this->assertArrayHasKey('MODULE_VERSION', $_oClientConfig); - $this->assertArrayHasKey('DEPENDENCIES', $_oClientConfig); - } - - public function testUserAgentString() - { - $sUserAgent = $this->object->getUserAgentString(); - $this->assertStringContainsString(get_class($this->object), $sUserAgent); - $this->assertStringContainsString('QentaCEE_Stdlib', $sUserAgent); - } - - public function testGetRequestData() - { - $this->object->setField('field1', 'value1'); - $this->object->setField('field2', 'value2'); - $this->object->setField('field3', 'value3'); - - $this->assertIsArray($this->object->getRequestData()); - $this->assertEquals(3, count($this->object->getRequestData())); - } - - public function tearDown(): void - { - unset( $this->object ); - } - -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/Exception/InvalidResponseExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/Exception/InvalidResponseExceptionTest.php deleted file mode 100644 index fb4b143..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Client/Exception/InvalidResponseExceptionTest.php +++ /dev/null @@ -1,100 +0,0 @@ -object = new QentaCEE_Stdlib_Client_Exception_InvalidResponseException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_Stdlib_Client_Exception_InvalidResponseException(); - } catch (QentaCEE_Stdlib_Client_Exception_InvalidResponseException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_Stdlib_Client_Exception_InvalidResponseException('message', 1234); - } catch (QentaCEE_Stdlib_Client_Exception_InvalidResponseException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_Stdlib_Client_Exception_InvalidResponseException('message', 111, $this->object); - } catch (QentaCEE_Stdlib_Client_Exception_InvalidResponseException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerData/AddressTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerData/AddressTest.php deleted file mode 100644 index 18f7026..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerData/AddressTest.php +++ /dev/null @@ -1,163 +0,0 @@ -object = new QentaCEE_Stdlib_ConsumerData_Address(QentaCEE_Stdlib_ConsumerData_Address::TYPE_SHIPPING); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testSetFirstname() - { - $firstname = 'Unit'; - $this->object->setFirstname($firstname); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingFirstname', $data); - $this->assertEquals($firstname, $data['consumerShippingFirstname']); - } - - public function testSetLastname() - { - $lastname = 'Test'; - $this->object->setLastname($lastname); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingLastname', $data); - $this->assertEquals($lastname, $data['consumerShippingLastname']); - } - - public function testSetAddress1() - { - $address1 = 'Teststreet 1'; - $this->object->setAddress1($address1); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingAddress1', $data); - $this->assertEquals($address1, $data['consumerShippingAddress1']); - } - - public function testSetAddress2() - { - $address2 = 'Teststreet 2'; - $this->object->setAddress2($address2); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingAddress2', $data); - $this->assertEquals($address2, $data['consumerShippingAddress2']); - } - - public function testSetCity() - { - $city = 'TestCity'; - $this->object->setCity($city); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingCity', $data); - $this->assertEquals($city, $data['consumerShippingCity']); - } - - public function testSetCountry() - { - $country = 'TestCountry'; - $this->object->setCountry($country); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingCountry', $data); - $this->assertEquals($country, $data['consumerShippingCountry']); - } - - public function testSetState() - { - $state = 'State'; - $this->object->setState($state); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingState', $data); - $this->assertEquals($state, $data['consumerShippingState']); - } - - public function testSetZipCode() - { - $zipCode = '1234'; - $this->object->setZipCode($zipCode); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingZipCode', $data); - $this->assertEquals($zipCode, $data['consumerShippingZipCode']); - } - - public function testSetPhone() - { - $phone = '0123456789'; - $this->object->setPhone($phone); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingPhone', $data); - $this->assertEquals($phone, $data['consumerShippingPhone']); - } - - public function testSetFax() - { - $fax = '0123456789'; - $this->object->setFax($fax); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerShippingFax', $data); - $this->assertEquals($fax, $data['consumerShippingFax']); - } - - public function testGetData() - { - $data = $this->object->getData(); - $this->assertIsArray($data); - } - -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerDataTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerDataTest.php deleted file mode 100644 index 4c0bc7b..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ConsumerDataTest.php +++ /dev/null @@ -1,162 +0,0 @@ -object = new QentaCEE_Stdlib_ConsumerData(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testSetEmail() - { - $mail = 'test@mail.com'; - $this->object->setEmail($mail); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerEmail', $data); - $this->assertEquals($mail, $data['consumerEmail']); - } - - public function testSetBirthDate() - { - $birthDate = new DateTime(); - $this->object->setBirthDate($birthDate); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerBirthDate', $data); - $this->assertEquals($birthDate->format('Y-m-d'), $data['consumerBirthDate']); - } - - public function testSetTaxIdentificationNumber() - { - $taxIdentificationNumber = '1234'; - $this->object->setTaxIdentificationNumber($taxIdentificationNumber); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerTaxIdentificationNumber', $data); - $this->assertEquals($taxIdentificationNumber, $data['consumerTaxIdentificationNumber']); - } - - public function testSetDriversLicenseNumber() - { - $driversLicenseNumber = '1234'; - $this->object->setDriversLicenseNumber($driversLicenseNumber); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerDriversLicenseNumber', $data); - $this->assertEquals($driversLicenseNumber, $data['consumerDriversLicenseNumber']); - } - - public function testSetDriversLicenseCountry() - { - $driversLicenseCountry = 'at'; - $this->object->setDriversLicenseCountry($driversLicenseCountry); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerDriversLicenseCountry', $data); - $this->assertEquals($driversLicenseCountry, $data['consumerDriversLicenseCountry']); - } - - public function testSetDriversLicenseState() - { - $driversLicenseState = 'none'; - $this->object->setDriversLicenseState($driversLicenseState); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerDriversLicenseState', $data); - $this->assertEquals($driversLicenseState, $data['consumerDriversLicenseState']); - } - - public function testAddAddressInformation() - { - $firstname = 'Kein'; - $lastname = 'Name'; - $billingAddress = new QentaCEE_Stdlib_ConsumerData_Address(QentaCEE_Stdlib_ConsumerData_Address::TYPE_BILLING); - $billingAddress->setFirstname($firstname); - $billingAddress->setLastname($lastname); - $this->object->addAddressInformation($billingAddress); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerBillingFirstname', $data); - $this->assertArrayHasKey('consumerBillingLastname', $data); - $this->assertEquals($firstname, $data['consumerBillingFirstname']); - $this->assertEquals($lastname, $data['consumerBillingLastname']); - - } - - public function testSetIpAddress() - { - $consumerIpAddress = '10.1.0.11'; - $this->object->setIpAddress($consumerIpAddress); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerIpAddress', $data); - $this->assertEquals($consumerIpAddress, $data['consumerIpAddress']); - } - - public function testSetUserAgent() - { - $consumerUserAgent = 'testing'; - $this->object->setUserAgent($consumerUserAgent); - $data = $this->object->getData(); - $this->assertArrayHasKey('consumerUserAgent', $data); - $this->assertEquals($consumerUserAgent, $data['consumerUserAgent']); - } - - public function testGetData() - { - $data = $this->object->getData(); - $this->assertIsArray($data); - } - -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ErrorTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ErrorTest.php deleted file mode 100644 index 50eb773..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ErrorTest.php +++ /dev/null @@ -1,78 +0,0 @@ -object = new QentaCEE_Stdlib_ErrorTest_Mock(); - $this->object->setMessage('testMessage'); - $this->object->setConsumerMessage('testConsumerMessage'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testGetMessage() - { - $this->assertEquals('testMessage', $this->object->getMessage()); - } - - public function testGetConsumerMessage() - { - $this->assertEquals('testConsumerMessage', $this->object->getConsumerMessage()); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidArgumentExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidArgumentExceptionTest.php deleted file mode 100644 index b1eeae5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidArgumentExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_Stdlib_Exception_InvalidArgumentException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_Stdlib_Exception_InvalidArgumentException(); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_Stdlib_Exception_InvalidArgumentException('message', 1234); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_Stdlib_Exception_InvalidArgumentException('message', 111, $this->object); - } catch (QentaCEE_Stdlib_Exception_InvalidArgumentException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidFormatExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidFormatExceptionTest.php deleted file mode 100644 index ac9e060..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/InvalidFormatExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_Stdlib_Exception_InvalidFormatException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_Stdlib_Exception_InvalidFormatException(); - } catch (QentaCEE_Stdlib_Exception_InvalidFormatException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_Stdlib_Exception_InvalidFormatException('message', 1234); - } catch (QentaCEE_Stdlib_Exception_InvalidFormatException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_Stdlib_Exception_InvalidFormatException('message', 111, $this->object); - } catch (QentaCEE_Stdlib_Exception_InvalidFormatException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/UnexpectedValueExceptionTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/UnexpectedValueExceptionTest.php deleted file mode 100644 index c3066fd..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Exception/UnexpectedValueExceptionTest.php +++ /dev/null @@ -1,99 +0,0 @@ -object = new QentaCEE_Stdlib_Exception_UnexpectedValueException('objectMessage', 666); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown(): void - { - - } - - public function testThrowExceptionWithoutData() - { - try { - throw new QentaCEE_Stdlib_Exception_UnexpectedValueException(); - } catch (QentaCEE_Stdlib_Exception_UnexpectedValueException $e) { - $this->assertEquals('', $e->getMessage()); - $this->assertEquals(0, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function testThrowExceptionWithData() - { - try { - throw new QentaCEE_Stdlib_Exception_UnexpectedValueException('message', 1234); - } catch (QentaCEE_Stdlib_Exception_UnexpectedValueException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals('', $e->getPrevious()); - } - } - - public function getThrowExceptionWithPrevious() - { - try { - throw new QentaCEE_Stdlib_Exception_UnexpectedValueException('message', 111, $this->object); - } catch (QentaCEE_Stdlib_Exception_UnexpectedValueException $e) { - $this->assertEquals('message', $e->getMessage()); - $this->assertEquals(1234, $e->getCode()); - $this->assertEquals($this->object, $e->getPrevious()); - } - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintOrderTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintOrderTest.php deleted file mode 100644 index 9974a29..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintOrderTest.php +++ /dev/null @@ -1,106 +0,0 @@ -object = new QentaCEE_Stdlib_FingerprintOrder(); - parent::setUp(); - } - - public function testContructorForException() - { - $this -> expectException(QentaCEE_Stdlib_Exception_InvalidArgumentException::class); - $object = new QentaCEE_Stdlib_FingerprintOrder(new stdClass()); - } - - public function testSetOrderWithString() - { - $sData = "first,second,third"; - $this->assertTrue($this->object->setOrder($sData)); - $this->assertEquals(3, count($this->object)); - } - - public function testSetOrderWithArray() - { - $sData = Array("first", "second", "third"); - $this->assertTrue($this->object->setOrder($sData)); - $this->assertEquals(3, count($this->object)); - } - - public function testToString() - { - $sData = "first,second,third"; - $this->object = new QentaCEE_Stdlib_FingerprintOrder($sData); - $this->assertEquals($sData, (string) $this->object); - } - - public function testOffsetSet() - { - $this->object['foo'] = 'bar'; - $this->assertEquals('bar', $this->object->offsetGet('foo')); - } - - public function testOffsetSetWithoutOffset() - { - $this->object[] = 'bar'; - $this->assertEquals('bar', $this->object->offsetGet(0)); - } - - public function testOffsetExists() - { - $this->object['foo'] = 'bar'; - $this->assertTrue($this->object->offsetExists('foo')); - } - - public function testOffsetUnset() - { - $this->object['foo'] = 'bar'; - $this->object->offsetUnset('foo'); - $this->assertArrayNotHasKey('foo', (Array) $this->object); - } - -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintTest.php deleted file mode 100644 index 1a76d0f..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/FingerprintTest.php +++ /dev/null @@ -1,154 +0,0 @@ -addToAssertionCount(1); - } - - /** - * @dataProvider fingerprintProvider - */ - public function testGenerate($values, $fingerprintOrder, $hash) - { - QentaCEE_Stdlib_Fingerprint::setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_HMAC_SHA512); - $this->assertEquals($hash, QentaCEE_Stdlib_Fingerprint::generate($values, - new QentaCEE_Stdlib_FingerprintOrder($fingerprintOrder))); - } - - /** - * @dataProvider fingerprintProvider - */ - public function testGenerateStripSlashes($values, $fingerprintOrder, $hash) - { - QentaCEE_Stdlib_Fingerprint::stripSlashes(true); - $this->assertEquals($hash, QentaCEE_Stdlib_Fingerprint::generate($values, - new QentaCEE_Stdlib_FingerprintOrder($fingerprintOrder))); - } - - /** - * @dataProvider fingerprintProvider - */ - public function testGenerateException($values, $fingerprintOrder, $hash) - { - $this -> expectException(QentaCEE_Stdlib_Exception_InvalidValueException::class); - $fingerprintOrder[] = 'FailKey'; - try { - QentaCEE_Stdlib_Fingerprint::generate($values, - new QentaCEE_Stdlib_FingerprintOrder($fingerprintOrder)); - } catch (QentaCEE_Stdlib_Exception_InvalidValueException $e) { - $this->assertEquals('Value for key FAILKEY not found in values array.', $e->getMessage()); - throw $e; - } - } - - /** - * @dataProvider fingerprintProvider - */ - public function testCompare($values, $fingerprintOrder, $hash) - { - $this->assertTrue(QentaCEE_Stdlib_Fingerprint::compare($values, - new QentaCEE_Stdlib_FingerprintOrder($fingerprintOrder), $hash)); - } - - /** - * @dataProvider fingerprintProvider - */ - public function testCompareStripSlashes($values, $fingerprintOrder, $hash) - { - QentaCEE_Stdlib_Fingerprint::stripSlashes(true); - $this->assertTrue(QentaCEE_Stdlib_Fingerprint::compare($values, - new QentaCEE_Stdlib_FingerprintOrder($fingerprintOrder), $hash)); - } - - /** - * @dataProvider fingerprintProvider - */ - public function testFalseCompare($values, $fingerprintOrder, $hash) - { - $hash = md5($hash); - $this->assertFalse(QentaCEE_Stdlib_Fingerprint::compare($values, - new QentaCEE_Stdlib_FingerprintOrder($fingerprintOrder), $hash)); - } - - public static function fingerprintProvider() - { - return Array( - Array( - 'values' => Array( - 'key1' => 'value1', - 'key2' => 'value2', - 'key3' => 'value3', - 'key4' => 'value4', - 'secret' => QentaCEE_QPay_Module::getConfig()['QentaCEEQPayConfig']['SECRET'] - ), - 'fingerprintOrder' => Array( - 'key1', - 'key2', - 'key3', - 'key4', - 'secret' - ), - 'hash' => '6c8bc309cbdf78770fd4820c12a6573c1fb6371ba86a4a34e5226dc529d70cb61cbec1af21faaf0567aeabad868acf9bf08030caec008ff2c8856bae676801e8' - ), - Array( - 'values' => Array( - 'key1' => 'äöü', - 'key2' => '#+ü', - 'key3' => '///', - 'key4' => 'bla', - 'secret' => QentaCEE_QPay_Module::getConfig()['QentaCEEQPayConfig']['SECRET'] - ), - 'fingerprintOrder' => Array( - 'key1', - 'key2', - 'key3', - 'key4', - 'secret' - ), - 'hash' => '3af32ea6d1bc69284625b6d245d84aadc6b8df0df131090e7265c5919bb76eadd0d72a63646da0d8019036c409f91b6ab9a7e6cae661ad4528d15db50b4c4678' - ) - ); - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Module/ModuleAbstractTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Module/ModuleAbstractTest.php deleted file mode 100644 index af3d2f5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Module/ModuleAbstractTest.php +++ /dev/null @@ -1,65 +0,0 @@ -assertIsArray($aUserConfig); - $this->assertIsArray($aClientConfig); - - $this->assertEquals('userConfig', $aUserConfig[0]); - $this->assertEquals('clientConfig', $aClientConfig[0]); - - QentaCEE_Stdlib_Module_ModuleAbstract::getConfig(); - QentaCEE_Stdlib_Module_ModuleAbstract::getClientConfig(); - - } -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ModuleTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ModuleTest.php deleted file mode 100644 index 304ca1e..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/ModuleTest.php +++ /dev/null @@ -1,44 +0,0 @@ -assertIsArray($aConfig); - $this->assertArrayHasKey('MODULE_NAME', $aConfig); - $this->assertEquals('QentaCEE_Stdlib', $aConfig['MODULE_NAME']); - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/PaymentTypeAbstractTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/PaymentTypeAbstractTest.php deleted file mode 100644 index f6381b4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/PaymentTypeAbstractTest.php +++ /dev/null @@ -1,110 +0,0 @@ -assertTrue(QentaCEE_Stdlib_PaymentTypeAbstract::hasFinancialInstitutions($paymentType)); - } - - public function testHasNoFinancialInstitutions() - { - $paymentType = QentaCEE_Stdlib_PaymentTypeAbstract::CCARD; - $this->assertFalse(QentaCEE_Stdlib_PaymentTypeAbstract::hasFinancialInstitutions($paymentType)); - } - - public function testGetIdealFinancialInstitutions() - { - $paymentType = QentaCEE_Stdlib_PaymentTypeAbstract::IDL; - $this->assertContains('ABN AMRO Bank', - QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutions($paymentType)); - $this->assertArrayHasKey('REGIOBANK', - QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutions($paymentType)); - } - - public function testGetEpsFinancialInstitutions() - { - $paymentType = QentaCEE_Stdlib_PaymentTypeAbstract::EPS; - $this->assertContains('BAWAG P.S.K. AG', QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutions($paymentType)); - $this->assertArrayHasKey('ARZ|VB', - QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutions($paymentType)); - } - - public function testGetEmptyFinancialInstitutions() - { - $paymentType = QentaCEE_Stdlib_PaymentTypeAbstract::CCARD; - $this->assertEmpty(QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutions($paymentType)); - } - - public function testgetFinancialInstitutionFullName() - { - $this->assertEquals('Bank Austria', - QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutionFullName('BA-CA')); - $this->assertEquals('ABN AMRO Bank', - QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutionFullName('ABNAMROBANK')); - $this->assertEquals('', QentaCEE_Stdlib_PaymentTypeAbstract::getFinancialInstitutionFullName('')); - } -} - -?> diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/SerialApiTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/SerialApiTest.php deleted file mode 100644 index 3ef7490..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/SerialApiTest.php +++ /dev/null @@ -1,329 +0,0 @@ -assertEquals($expected, $serializedString, - 'SerialApi encode failed. Result: ' . $serializedString . ' Expected Value: ' . $expected); - } - - /** - * @dataProvider oneLevelProvider - */ - public function testDecodeOneLevel($expected, $data) - { - foreach ($expected as $key => $value) { - $expected[(string) $key] = (string) $value; - } - - $unserialized = QentaCEE_Stdlib_SerialApi::decode($data); - $this->assertEquals($expected, $unserialized, 'SerialApi decode failed. Data: ' . $data); - } - - /** - * @dataProvider multiLevelProvider - */ - public function testEncodeMultiLevel($data, $expected) - { - - $serializedString = QentaCEE_Stdlib_SerialApi::encode($data); - $this->assertEquals($expected, $serializedString, - 'SerialApi encode failed. Result: ' . $serializedString . ' Expected Value: ' . $expected); - } - - /** - * @dataProvider multiLevelProvider - */ - public function testDecodeMultiLevel($expected, $data) - { - $unserialized = QentaCEE_Stdlib_SerialApi::decode($data); - $this->assertEquals($expected, $unserialized, 'SerialApi decode failed.'); - } - - public function testInvalidEncodeValue() - { - $this -> expectException(QentaCEE_Stdlib_Exception_InvalidTypeException::class); - try { - QentaCEE_Stdlib_SerialApi::encode('stringValue'); - } catch (QentaCEE_Stdlib_Exception_InvalidTypeException $e) { - $this->assertEquals('Invalid type for QentaCEE_Stdlib_SerialApi::encode. Array must be given.', - $e->getMessage()); - throw $e; - } - } - - public function testinvalidDecodeFormat() - { - $this -> expectException(QentaCEE_Stdlib_Exception_InvalidFormatException::class); - try { - QentaCEE_Stdlib_SerialApi::decode('test=test=test'); - } catch (QentaCEE_Stdlib_Exception_InvalidFormatException $e) { - $this->assertEquals('Invalid format for QentaCEE_Stdlib_SerialApi::decode. Expecting key=value pairs', - $e->getMessage()); - throw $e; - } - } - - public function oneLevelProvider() - { - $testObj = new SerialApiTestClass(); - - return Array( - Array( - 'decoded' => Array( - 'testKey' => 'testValue' - ), - 'encoded' => 'testKey=testValue' - ), - Array( - 'decoded' => Array( - 'testKey1' => 'testValue1', - 'testKey2' => 'testValue2' - ), - 'encoded' => 'testKey1=testValue1&testKey2=testValue2' - ), - Array( - 'decoded' => Array( - 'testKey1' => $testObj, - 'testing' => 1 - ), - 'encoded' => 'testKey1=' . (string) $testObj . '&testing=1' - ), - Array( - 'decoded' => Array( - 'a', - 'b', - 'c' - ), - 'encoded' => '1=a&2=b&3=c' - ), - Array( - 'decoded' => Array( - 'testKeyÄncode' => 'äö +ü#' - ), - 'encoded' => urlencode('testKeyÄncode') . '=' . urlencode('äö +ü#') - ), - Array( - 'decoded' => Array(), - 'encoded' => '' - ) - ); - } - - public function multiLevelProvider() - { - $testObj = new SerialApiTestClass(); - - return Array( - Array( - 'decoded' => Array( - 'testArr' => Array( - 'testKey1' => 'testValue1' - ) - ), - 'encoded' => 'testArr.testKey1=testValue1' - ), - Array( - 'decoded' => Array( - 'orders' => Array( - 'orderNumber' => 1234, - 'paymentType' => 'CCARD' - ), - 'payments' => Array( - Array( - 'paymentNumber' => 1234, - 'orderNumber' => 1234, - 'paymentType' => 'CCARD', - 'operationsAllowed' => Array( - 'none', - 'none1', - 'none2' - ) - ), - Array( - 'paymentNumber' => 4321, - 'orderNumber' => 1234, - 'paymentType' => 'CCARD' - ) - ) - ), - 'encoded' => 'orders.orderNumber=1234&orders.paymentType=CCARD&payments.1.paymentNumber=1234&payments.1.orderNumber=1234&payments.1.paymentType=CCARD&payments.1.operationsAllowed=none,none1,none2&payments.2.paymentNumber=4321&payments.2.orderNumber=1234&payments.2.paymentType=CCARD' - ), - Array( - 'decoded' => Array( - 'testArr' => Array( - Array( - Array( - Array( - 'entry', - 'entry2' => 'value' - ) - ) - ) - ) - ), - 'encoded' => 'testArr.1.1.1.1=entry&testArr.1.1.1.entry2=value' - ), - Array( - 'decoded' => Array( - 'test' - ), - 'encoded' => '1=test' - ), - Array( - 'decoded' => Array( - 'test' => 'test' - ), - 'encoded' => 'test=test' - ), - Array( - 'decoded' => Array( - 'testKey' => Array( - 'a', - 'b', - 'c' - ) - ), - 'encoded' => 'testKey=a,b,c' - ), - Array( - 'decoded' => Array( - 'testKey' => Array( - 'a', - 'b', - 'c' - ), - 'testKey1' => Array( - 'b', - 'c', - 'd' - ), - 'testKey2' => 'testValue' - ), - 'encoded' => 'testKey=a,b,c&testKey1=b,c,d&testKey2=testValue' - ), - Array( - 'decoded' => Array( - 'testKey' => Array( - 'a', - 'b', - 'c' - ), - 'testKey1' => Array( - 'b', - 'c', - 'd' - ), - 'testKey2' => Array( - 'key1' => 'value1', - 'key2' => 'value2' - ) - ), - 'encoded' => 'testKey=a,b,c&testKey1=b,c,d&testKey2.key1=value1&testKey2.key2=value2' - ), - Array( - 'decoded' => Array( - 'testKey' => Array( - 'a', - 'b', - 'c' => 'c' - ), - 'testKey1' => Array( - 'b', - 'c', - 'd' - ), - 'testKey2' => Array( - 'key1' => 'value1', - 'key2' => 'value2' - ) - ), - 'encoded' => 'testKey=a,b&testKey.c=c&testKey1=b,c,d&testKey2.key1=value1&testKey2.key2=value2' - ), - Array( - 'decoded' => Array( - 'testKey' => Array( - 'a', - 'b', - 'c' => Array( - 'z', - 'y', - 'x' - ) - ), - 'testKey1' => Array( - 'b', - 'c', - 'd' - ), - 'testKey2' => Array( - 'key1' => 'value1', - 'key2' => 'value2' - ) - ), - 'encoded' => 'testKey=a,b&testKey.c=z,y,x&testKey1=b,c,d&testKey2.key1=value1&testKey2.key2=value2' - ), - Array( - 'decoded' => Array( - 'testKey' => Array( - Array( - Array( - 'bla' => 'blub', - 'bla1' => 'blub1', - 'bla2' - ) - ) - ) - ), - 'encoded' => 'testKey.1.1.bla=blub&testKey.1.1.bla1=blub1&testKey.1.1.1=bla2' - ) - ); - } -} - -class SerialApiTestClass -{ - - public function __toString() - { - return 'testString'; - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Validate/FingerprintTest.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Validate/FingerprintTest.php deleted file mode 100644 index 010a836..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/QentaCEE/Stdlib/Validate/FingerprintTest.php +++ /dev/null @@ -1,215 +0,0 @@ -fingerprintOrderField; - } - - public function getOrderType() - { - return $this->fingerprintOrderType; - } - - public function getFingerprintOrder() - { - return $this->fingerprintOrder; - } - - public function getHashAlgorithm() - { - return (string) $this->hashAlgorithm; - } - - public function getMandatoryFieldsArray() - { - return $this->_mandatoryFields; - } -} - -/** - * QentaCEE_Stdlib_Validate_Fingerprint test case. - */ -class QentaCEE_Stdlib_Validate_FingerprintTest extends TestCase -{ - - /** - * - * @var FingeprintTest - */ - private $object; - - protected $_returnData = Array( - 'amount' => '1', - 'currency' => 'EUR', - 'paymentType' => 'QUICK', - 'financialInstitution' => 'QUICK', - 'language' => 'de', - 'orderNumber' => '16280512', - 'paymentState' => 'SUCCESS', - 'gatewayReferenceNumber' => 'DGW_16280512_RN', - 'gatewayContractNumber' => 'DemoContractNumber123', - 'avsResponseCode' => 'X', - 'avsResponseMessage' => 'Demo AVS ResultMessage', - 'responseFingerprintOrder' => 'amount,currency,paymentType,financialInstitution,language,orderNumber,paymentState,gatewayReferenceNumber,gatewayContractNumber,avsResponseCode,avsResponseMessage,secret,responseFingerprintOrder', - 'responseFingerprint' => '04fa5c500a19c9a71e50f258fdb62509' - ); - - protected $_secret = 'B8AKTPWBRMNBV455FG6M2DANE99WU2'; - - /** - * Prepares the environment before running a test. - */ - protected function setUp(): void - { - $this->object = new FingeprintTest(); - } - - /** - * Cleans up the environment after running a test. - */ - protected function tearDown(): void - { - $this->object = null; - parent::tearDown(); - } - - /** - * Tests QentaCEE_Stdlib_Validate_Fingerprint->setFingerprintOrderField() - */ - public function testSetFingerprintOrderField() - { - $this->object->setFingerprintOrderField('responseFingeprint'); - $this->assertEquals('responsefingeprint', $this->object->getFingerprintOrderField()); - } - - /** - * Tests QentaCEE_Stdlib_Validate_Fingerprint->setOrderType() - */ - public function testSetOrderType() - { - $this->object->setOrderType('fixed'); - $this->assertEquals('fixed', $this->object->getOrderType()); - } - - /** - * Tests QentaCEE_Stdlib_Validate_Fingerprint->setOrder() - */ - public function testSetOrder() - { - $order = 'test1,test2,test3,test4,test5'; - $this->object->setOrder($order); - $oFingerprintOrder = $this->object->getFingerprintOrder(); - $this->assertInstanceOf('QentaCEE_Stdlib_FingerprintOrder', $oFingerprintOrder); - $this->assertIsArray($oFingerprintOrder->__toArray()); - $this->assertIsString((string) $oFingerprintOrder); - $this->assertEquals(5, count($oFingerprintOrder)); - - } - - /** - * Tests QentaCEE_Stdlib_Validate_Fingerprint->setHashAlgorithm() - */ - public function testSetHashAlgorithm() - { - $this->object->setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5); - $this->assertEquals(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5, $this->object->getHashAlgorithm()); - - } - - /** - * Tests QentaCEE_Stdlib_Validate_Fingerprint->isValid() - */ - public function testIsValid() - { - $this->object->setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5); - $this->object->setSecret($this->_secret); - $this->object->setOrderType(QentaCEE_Stdlib_Validate_Fingerprint::TYPE_DYNAMIC); - $this->object->setFingerprintOrderField('responseFingerprintOrder'); - $this->assertTrue($this->object->isValid($this->_returnData['responseFingerprint'], $this->_returnData)); - } - - public function testAddMandatoryField() - { - $this->object->addMandatoryField('testField'); - $this->assertTrue(in_array('testField', $this->object->getMandatoryFieldsArray())); - } - - public function testSetMandatoryFields() - { - $aFields = Array('testField1', 'testField2', 'testField3', 'testField4', 'testField5'); - $this->object->setMandatoryFields($aFields); - $this->assertTrue(in_array('testField1', $this->object->getMandatoryFieldsArray())); - } - - public function testConstructWithZendConfigObject() - { - $aConfig = Array( - 'fingerprintOrder' => 'testField1,testField2,testField3', - 'fingerprintOrderField' => 'fingerprintOrder', - 'hashAlgorithm' => QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5, - 'orderType' => 'dynamic', - 'secret' => $this->_secret, - ); - - $oConfig = new QentaCEE_Stdlib_Config($aConfig); - $this->object = new FingeprintTest($oConfig); - $oFingerprintOrder = $this->object->getFingerprintOrder(); - $this->assertInstanceOf('QentaCEE_Stdlib_FingerprintOrder', $oFingerprintOrder); - $this->assertEquals(3, count($oFingerprintOrder)); - $this->assertEquals($this->object->getHashAlgorithm(), QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_MD5); - } - - public function testIsValidWithWrongHashAlgorithm() - { - $this -> expectException(QentaCEE_Stdlib_Exception_UnexpectedValueException::class); - $this->object->setHashAlgorithm('notExisting'); - $this->object->setSecret($this->_secret); - $this->object->setOrderType(QentaCEE_Stdlib_Validate_Fingerprint::TYPE_DYNAMIC); - $this->object->setFingerprintOrderField('responseFingerprintOrder'); - $this->object->isValid($this->_returnData['responseFingerprint'], $this->_returnData); - } - - public function testIsValidWithWrongStrLen() - { - $this->object->setHashAlgorithm(QentaCEE_Stdlib_Fingerprint::HASH_ALGORITHM_SHA512); - $this->object->setSecret($this->_secret); - $this->object->setOrderType(QentaCEE_Stdlib_Validate_Fingerprint::TYPE_DYNAMIC); - $this->object->setFingerprintOrderField('responseFingerprintOrder'); - $this->assertFalse($this->object->isValid($this->_returnData['responseFingerprint'], $this->_returnData)); - } -} - diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/bootstrap.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/bootstrap.php deleted file mode 100644 index bd83ee4..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/bootstrap.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - ./QentaCEE/QMore/ - - - ./QentaCEE/QPay/ - - - ./QentaCEE/Stdlib/ - - - - - ../library/QentaCEE - - ../QentaCEE/QMore/Examples - ../QentaCEE/QMore/Documentation - ../QentaCEE/QPay/Examples - ../QentaCEE/QPay/Documentation - ../QentaCEE/Stdlib/Documentation - - - - - - - \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/confirm.php b/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/confirm.php deleted file mode 100644 index c309b00..0000000 --- a/woocommerce-qenta-checkout-page/vendor/qenta/checkout-client-library/tests/confirm.php +++ /dev/null @@ -1,43 +0,0 @@ - $value) { - file_put_contents('confirm.txt', date("d.m.Y H:i:s") . " - Key: {$key} => Value: {$value}". PHP_EOL, FILE_APPEND | LOCK_EX); -} \ No newline at end of file diff --git a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/LICENSE b/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/LICENSE deleted file mode 100644 index be5540c..0000000 --- a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ralph Khattar - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/README.md b/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/README.md deleted file mode 100644 index 9430d76..0000000 --- a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/README.md +++ /dev/null @@ -1,27 +0,0 @@ -getallheaders -============= - -PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3. - -[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) -[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) -[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) -[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) -[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) - - -This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). - -## Install - -For PHP version **`>= 5.6`**: - -``` -composer require ralouphie/getallheaders -``` - -For PHP version **`< 5.6`**: - -``` -composer require ralouphie/getallheaders "^2" -``` diff --git a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/composer.json b/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/composer.json deleted file mode 100644 index de8ce62..0000000 --- a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "ralouphie/getallheaders", - "description": "A polyfill for getallheaders.", - "license": "MIT", - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "^5 || ^6.5", - "php-coveralls/php-coveralls": "^2.1" - }, - "autoload": { - "files": ["src/getallheaders.php"] - }, - "autoload-dev": { - "psr-4": { - "getallheaders\\Tests\\": "tests/" - } - } -} diff --git a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/src/getallheaders.php b/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/src/getallheaders.php deleted file mode 100644 index c7285a5..0000000 --- a/woocommerce-qenta-checkout-page/vendor/ralouphie/getallheaders/src/getallheaders.php +++ /dev/null @@ -1,46 +0,0 @@ - 'Content-Type', - 'CONTENT_LENGTH' => 'Content-Length', - 'CONTENT_MD5' => 'Content-Md5', - ); - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) === 'HTTP_') { - $key = substr($key, 5); - if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { - $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); - $headers[$key] = $value; - } - } elseif (isset($copy_server[$key])) { - $headers[$copy_server[$key]] = $value; - } - } - - if (!isset($headers['Authorization'])) { - if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { - $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; - } elseif (isset($_SERVER['PHP_AUTH_USER'])) { - $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; - $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); - } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { - $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; - } - } - - return $headers; - } - -}