Version Description
04-12-2019 =
Fix - Apple Pay Gateway is removed from available gateways during WooCommerce Api calls
Fix - Giftcard Gateway does not show the right payment icon in checkout page
Add - Support for Mollie Components
Download this release
Release Info
Developer | wido |
Plugin | Mollie Payments for WooCommerce |
Version | 5.4.0 |
Comparing to | |
See all releases |
Code changes from version 5.3.2 to 5.4.0
- assets/css/mollie-components.css +61 -0
- assets/images/lock-icon.svg +11 -0
- assets/images/mollie-logo.svg +9 -0
- assets/js/applepay.js +0 -27
- assets/js/applepay.min.js +1 -0
- assets/js/babel-polyfill.min.js +1 -0
- assets/js/mollie-components.min.js +1 -0
- assets/js/settings.js +0 -12
- assets/js/settings.min.js +1 -0
- inc/functions.php +4 -0
- inc/settings/mollie_components.php +168 -0
- inc/settings/mollie_components_enabler.php +13 -0
- inc/utils.php +83 -0
- includes/woocommerce_functions.php → inc/woocommerce.php +5 -3
- includes/mollie-api-php/scoper.inc.php +0 -13
- includes/mollie-api-php/vendor/composer/autoload_classmap.php +0 -9
- includes/mollie-api-php/vendor/composer/autoload_static.php +0 -72
- includes/mollie-api-php/vendor/composer/ca-bundle/composer.json +0 -54
- includes/mollie-api-php/vendor/guzzlehttp/guzzle/.php_cs +0 -21
- includes/mollie-api-php/vendor/guzzlehttp/guzzle/Dockerfile +0 -18
- includes/mollie-api-php/vendor/guzzlehttp/guzzle/composer.json +0 -58
- includes/mollie-api-php/vendor/guzzlehttp/guzzle/phpstan.neon.dist +0 -9
- includes/mollie-api-php/vendor/guzzlehttp/promises/Makefile +0 -13
- includes/mollie-api-php/vendor/guzzlehttp/promises/README.md +0 -504
- includes/mollie-api-php/vendor/guzzlehttp/promises/composer.json +0 -34
- includes/mollie-api-php/vendor/guzzlehttp/psr7/README.md +0 -745
- includes/mollie-api-php/vendor/guzzlehttp/psr7/composer.json +0 -49
- includes/mollie-api-php/vendor/psr/http-message/composer.json +0 -26
- includes/mollie-api-php/vendor/ralouphie/getallheaders/composer.json +0 -26
- includes/mollie/wc/autoload.php +0 -62
- includes/mollie/wc/gateway/creditcard.php +0 -74
- includes/mollie/wc/helper/status.php +0 -187
- includes/mollie/wc/payment/PartialRefundException.php +0 -5
- license.txt +2 -2
- mollie-payments-for-woocommerce.php +163 -147
- readme.txt +8 -2
- src/Mollie/WC/Components/Styles.php +133 -0
- src/Mollie/WC/Components/StylesPropertiesDictionary.php +39 -0
- includes/mollie/wc/exception.php → src/Mollie/WC/Exception.php +0 -0
- includes/mollie/wc/exception/couldnotconnecttomollie.php → src/Mollie/WC/Exception/CouldNotConnectToMollie.php +0 -0
- includes/mollie/wc/exception/incompatibleplatform.php → src/Mollie/WC/Exception/IncompatiblePlatform.php +0 -0
- includes/mollie/wc/exception/invalidapikey.php → src/Mollie/WC/Exception/InvalidApiKey.php +0 -0
- includes/mollie/wc/gateway/abstract.php → src/Mollie/WC/Gateway/Abstract.php +85 -24
- includes/mollie/wc/gateway/abstractseparecurring.php → src/Mollie/WC/Gateway/AbstractSepaRecurring.php +3 -2
- includes/mollie/wc/gateway/abstractsubscription.php → src/Mollie/WC/Gateway/AbstractSubscription.php +0 -0
- includes/mollie/wc/gateway/applepay.php → src/Mollie/WC/Gateway/Applepay.php +0 -0
- includes/mollie/wc/gateway/bancontact.php → src/Mollie/WC/Gateway/Bancontact.php +0 -0
- includes/mollie/wc/gateway/banktransfer.php → src/Mollie/WC/Gateway/BankTransfer.php +0 -0
- includes/mollie/wc/gateway/belfius.php → src/Mollie/WC/Gateway/Belfius.php +0 -0
- src/Mollie/WC/Gateway/Creditcard.php +93 -0
- includes/mollie/wc/gateway/directdebit.php → src/Mollie/WC/Gateway/DirectDebit.php +0 -0
- includes/mollie/wc/gateway/eps.php → src/Mollie/WC/Gateway/EPS.php +0 -0
- includes/mollie/wc/gateway/giftcard.php → src/Mollie/WC/Gateway/Giftcard.php +18 -1
- includes/mollie/wc/gateway/giropay.php → src/Mollie/WC/Gateway/Giropay.php +0 -0
- includes/mollie/wc/gateway/ideal.php → src/Mollie/WC/Gateway/Ideal.php +0 -0
- includes/mollie/wc/gateway/inghomepay.php → src/Mollie/WC/Gateway/IngHomePay.php +0 -0
- includes/mollie/wc/gateway/kbc.php → src/Mollie/WC/Gateway/Kbc.php +0 -0
- includes/mollie/wc/gateway/klarnapaylater.php → src/Mollie/WC/Gateway/KlarnaPayLater.php +0 -0
- includes/mollie/wc/gateway/klarnasliceit.php → src/Mollie/WC/Gateway/KlarnaSliceIt.php +0 -0
- includes/mollie/wc/gateway/mistercash.php → src/Mollie/WC/Gateway/MisterCash.php +0 -0
- includes/mollie/wc/gateway/mybank.php → src/Mollie/WC/Gateway/MyBank.php +0 -0
- includes/mollie/wc/gateway/paypal.php → src/Mollie/WC/Gateway/PayPal.php +0 -0
- includes/mollie/wc/gateway/paysafecard.php → src/Mollie/WC/Gateway/Paysafecard.php +0 -0
- includes/mollie/wc/gateway/przelewy24.php → src/Mollie/WC/Gateway/Przelewy24.php +0 -0
- includes/mollie/wc/gateway/sofort.php → src/Mollie/WC/Gateway/Sofort.php +0 -0
- includes/mollie/wc/helper/api.php → src/Mollie/WC/Helper/Api.php +0 -0
- includes/mollie/wc/helper/data.php → src/Mollie/WC/Helper/Data.php +0 -0
- includes/mollie/wc/helper/orderlines.php → src/Mollie/WC/Helper/OrderLines.php +0 -0
- includes/mollie/wc/helper/paymentfactory.php → src/Mollie/WC/Helper/PaymentFactory.php +2 -2
- includes/mollie/wc/helper/settings.php → src/Mollie/WC/Helper/Settings.php +1 -1
- src/Mollie/WC/Helper/Status.php +204 -0
- {includes/mollie → src/Mollie/WC}/OrderLineStatus.php +2 -2
- includes/mollie/wc/payment/object.php → src/Mollie/WC/Payment/Object.php +3 -2
- includes/mollie/wc/payment/order.php → src/Mollie/WC/Payment/Order.php +12 -7
- {includes/mollie/wc/payment → src/Mollie/WC/Payment}/OrderItemsRefunder.php +5 -4
- src/Mollie/WC/Payment/PartialRefundException.php +5 -0
- includes/mollie/wc/payment/payment.php → src/Mollie/WC/Payment/Payment.php +6 -1
- {includes/mollie/wc/payment → src/Mollie/WC/Payment}/RefundLineItemsBuilder.php +6 -6
- includes/mollie/wc/plugin.php → src/Mollie/WC/Plugin.php +153 -53
- src/Mollie/WC/Settings/Components.php +62 -0
- src/Mollie/WC/Settings/Page/Components.php +58 -0
- {includes → src}/subscriptions_status_check_functions.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/autoload.php +1 -1
- {includes/mollie-api-php/vendor → vendor}/composer/ClassLoader.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/composer/LICENSE +0 -0
- vendor/composer/autoload_classmap.php +218 -0
- {includes/mollie-api-php/vendor → vendor}/composer/autoload_files.php +1 -1
- {includes/mollie-api-php/vendor → vendor}/composer/autoload_namespaces.php +1 -0
- {includes/mollie-api-php/vendor → vendor}/composer/autoload_psr4.php +1 -1
- {includes/mollie-api-php/vendor → vendor}/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +296 -0
- {includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/LICENSE +0 -0
- {includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/README.md +0 -0
- {includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/res/cacert.pem +0 -0
- {includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/src/CaBundle.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/composer/installed.json +127 -39
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/CHANGELOG.md +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/LICENSE +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/README.md +1 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/UPGRADING.md +0 -0
- vendor/guzzlehttp/guzzle/build/Burgomaster.php +385 -0
- vendor/guzzlehttp/guzzle/build/packager.php +27 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Client.php +77 -4
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/ClientInterface.php +4 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/CookieJar.php +4 -2
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +3 -3
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/SetCookie.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/BadResponseException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/ClientException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/ConnectException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/GuzzleException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/RequestException.php +4 -29
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/SeekException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/ServerException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/TransferException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlFactory.php +10 -5
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlHandler.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +16 -2
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/EasyHandle.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/MockHandler.php +6 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/Proxy.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/StreamHandler.php +1 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/HandlerStack.php +5 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/MessageFormatter.php +5 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Middleware.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Pool.php +10 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +5 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/RedirectMiddleware.php +14 -2
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/RequestOptions.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/RetryMiddleware.php +13 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/TransferStats.php +6 -6
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/UriTemplate.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/functions.php +1 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/functions_include.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/CHANGELOG.md +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/LICENSE +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/AggregateException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/CancellationException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/Coroutine.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/EachPromise.php +14 -11
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/FulfilledPromise.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/Promise.php +1 -1
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/PromiseInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/PromisorInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/RejectedPromise.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/RejectionException.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/TaskQueue.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/TaskQueueInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/functions.php +19 -5
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/functions_include.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/CHANGELOG.md +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/LICENSE +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/AppendStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/BufferStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/CachingStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/DroppingStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/FnStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/InflateStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/LazyOpenStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/LimitStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/MessageTrait.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/MultipartStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/NoSeekStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/PumpStream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Request.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Response.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Rfc7230.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/ServerRequest.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Stream.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/StreamDecoratorTrait.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/StreamWrapper.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/UploadedFile.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Uri.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/UriNormalizer.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/UriResolver.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/functions.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/functions_include.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/LICENSE +0 -0
- {includes → vendor/mollie}/mollie-api-php/README.md +0 -0
- vendor/mollie/mollie-api-php/composer.json +80 -0
- vendor/mollie/mollie-api-php/examples/captures/get-capture.php +27 -0
- vendor/mollie/mollie-api-php/examples/captures/list-captures.php +27 -0
- vendor/mollie/mollie-api-php/examples/customers/create-customer-first-payment.php +67 -0
- vendor/mollie/mollie-api-php/examples/customers/create-customer-payment.php +61 -0
- vendor/mollie/mollie-api-php/examples/customers/create-customer-recurring-payment.php +63 -0
- vendor/mollie/mollie-api-php/examples/customers/create-customer.php +27 -0
- vendor/mollie/mollie-api-php/examples/customers/delete-customer.php +17 -0
- vendor/mollie/mollie-api-php/examples/customers/list-customer-payments.php +58 -0
- vendor/mollie/mollie-api-php/examples/customers/update-customer.php +31 -0
- vendor/mollie/mollie-api-php/examples/database/.gitignore +1 -0
- vendor/mollie/mollie-api-php/examples/functions.php +23 -0
- vendor/mollie/mollie-api-php/examples/initialize.php +18 -0
- vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php +19 -0
- vendor/mollie/mollie-api-php/examples/invoices/list-invoices.php +37 -0
- vendor/mollie/mollie-api-php/examples/mandates/create-mandate.php +30 -0
- vendor/mollie/mollie-api-php/examples/mandates/list-mandates.php +28 -0
- vendor/mollie/mollie-api-php/examples/mandates/revoke-mandate.php +31 -0
- vendor/mollie/mollie-api-php/examples/orders/cancel-order-lines.php +44 -0
- vendor/mollie/mollie-api-php/examples/orders/cancel-order.php +26 -0
- vendor/mollie/mollie-api-php/examples/orders/create-order.php +118 -0
- vendor/mollie/mollie-api-php/examples/orders/list-methods.php +28 -0
- vendor/mollie/mollie-api-php/examples/orders/list-orders.php +49 -0
- vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php +25 -0
- vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php +33 -0
- vendor/mollie/mollie-api-php/examples/orders/webhook.php +50 -0
- vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php +81 -0
- vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php +67 -0
- vendor/mollie/mollie-api-php/examples/payments/create-payment.php +60 -0
- vendor/mollie/mollie-api-php/examples/payments/list-methods.php +27 -0
- vendor/mollie/mollie-api-php/examples/payments/list-payments.php +85 -0
- vendor/mollie/mollie-api-php/examples/payments/refund-payment.php +71 -0
- vendor/mollie/mollie-api-php/examples/payments/return.php +29 -0
- vendor/mollie/mollie-api-php/examples/payments/webhook.php +65 -0
- vendor/mollie/mollie-api-php/examples/profiles/create-profile.php +30 -0
- vendor/mollie/mollie-api-php/examples/profiles/delete-profile.php +23 -0
- vendor/mollie/mollie-api-php/examples/profiles/list-profiles.php +28 -0
- vendor/mollie/mollie-api-php/examples/profiles/update-profile.php +33 -0
- vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php +53 -0
- vendor/mollie/mollie-api-php/examples/shipments/create-shipment-all.php +27 -0
- vendor/mollie/mollie-api-php/examples/shipments/create-shipment-partial.php +42 -0
- vendor/mollie/mollie-api-php/examples/shipments/get-shipment.php +27 -0
- vendor/mollie/mollie-api-php/examples/shipments/list-shipments.php +30 -0
- vendor/mollie/mollie-api-php/examples/shipments/update-shipment.php +40 -0
- vendor/mollie/mollie-api-php/examples/subscriptions/cancel-subscription.php +36 -0
- vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php +61 -0
- vendor/mollie/mollie-api-php/examples/subscriptions/update-subscription.php +31 -0
- {includes → vendor/mollie}/mollie-api-php/src/CompatibilityChecker.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/ChargebackEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/CollectionEndpointAbstract.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/CustomerEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/CustomerPaymentsEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/EndpointAbstract.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/InvoiceEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/MandateEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/MethodEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/OnboardingEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderLineEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderPaymentEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrganizationEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentCaptureEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentChargebackEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentRefundEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/PermissionEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/ProfileEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/ProfileMethodEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/RefundEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/SettlementsEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/ShipmentEndpoint.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Endpoints/SubscriptionEndpoint.php +29 -2
- vendor/mollie/mollie-api-php/src/Endpoints/WalletEndpoint.php +34 -0
- {includes → vendor/mollie}/mollie-api-php/src/Exceptions/ApiException.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Exceptions/IncompatiblePlatform.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/MollieApiClient.php +10 -1
- {includes → vendor/mollie}/mollie-api-php/src/Resources/BaseCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/BaseResource.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Capture.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/CaptureCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Chargeback.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/ChargebackCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/CurrentProfile.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/CursorCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Customer.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/CustomerCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Invoice.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/InvoiceCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Issuer.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/IssuerCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Mandate.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/MandateCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Method.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/MethodCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/MethodPrice.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/MethodPriceCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Onboarding.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Order.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/OrderCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/OrderLine.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/OrderLineCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Organization.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/OrganizationCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Payment.php +22 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/PaymentCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Permission.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/PermissionCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Profile.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/ProfileCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Refund.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/RefundCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/ResourceFactory.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Settlement.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/SettlementCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Shipment.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/ShipmentCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/Subscription.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Resources/SubscriptionCollection.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/InvoiceStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/MandateMethod.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/MandateStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/OnboardingStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/OrderLineStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/OrderLineType.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/OrderStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/PaymentMethod.php +5 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/PaymentStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/ProfileStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/RefundStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/SequenceType.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/SettlementStatus.php +0 -0
- {includes → vendor/mollie}/mollie-api-php/src/Types/SubscriptionStatus.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/CHANGELOG.md +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/LICENSE +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/README.md +4 -1
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/MessageInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/RequestInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/ResponseInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/ServerRequestInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/StreamInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/UploadedFileInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/psr/http-message/src/UriInterface.php +0 -0
- {includes/mollie-api-php/vendor → vendor}/ralouphie/getallheaders/LICENSE +0 -0
- {includes/mollie-api-php/vendor → vendor}/ralouphie/getallheaders/README.md +0 -0
- {includes/mollie-api-php/vendor → vendor}/ralouphie/getallheaders/src/getallheaders.php +0 -0
assets/css/mollie-components.css
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.mollie-components {
|
2 |
+
display: flex;
|
3 |
+
flex-wrap: wrap;
|
4 |
+
}
|
5 |
+
|
6 |
+
.mollie-components .mollie-component-label {
|
7 |
+
font-weight: 400;
|
8 |
+
}
|
9 |
+
|
10 |
+
.mollie-components .mollie-component {
|
11 |
+
width: 100%;
|
12 |
+
min-height: 34px;
|
13 |
+
background-color: #FFF;
|
14 |
+
border-radius: 6px;
|
15 |
+
color: #222;
|
16 |
+
transition: all .05s ease;
|
17 |
+
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1),
|
18 |
+
0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
19 |
+
0px 0px 0px 1px rgba(0, 0, 0, 0.05);
|
20 |
+
border: 2px solid transparent;
|
21 |
+
}
|
22 |
+
|
23 |
+
.mollie-components .mollie-component iframe {
|
24 |
+
border-radius: 6px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.mollie-components div {
|
28 |
+
flex-grow: 1;
|
29 |
+
width: 100%;
|
30 |
+
}
|
31 |
+
|
32 |
+
.mollie-components div + div {
|
33 |
+
display: block;
|
34 |
+
margin-top: .63em;
|
35 |
+
}
|
36 |
+
|
37 |
+
.mollie-components #expiryDate,
|
38 |
+
.mollie-components #verificationCode {
|
39 |
+
max-width: 50%;
|
40 |
+
}
|
41 |
+
|
42 |
+
.mollie-components #expiryDate {
|
43 |
+
padding-right: 5%;
|
44 |
+
}
|
45 |
+
|
46 |
+
.mollie-components #verificationCode {
|
47 |
+
padding-left: 5%;
|
48 |
+
}
|
49 |
+
|
50 |
+
.mollie-components .mollie-component.is-invalid {
|
51 |
+
box-shadow: 0px 1px 1px 0px rgba(255, 51, 68, 0.1),
|
52 |
+
0px 1px 3px 0px rgba(255, 51, 68, 0.1);
|
53 |
+
border-color: #fff0f0;
|
54 |
+
}
|
55 |
+
|
56 |
+
.mollie-components .mollie-component.has-focus {
|
57 |
+
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1),
|
58 |
+
0px 2px 6px 0px rgba(0, 0, 0, 0.1),
|
59 |
+
0px 0px 0px 1px rgba(0, 0, 0, 0.05);
|
60 |
+
border-color: #07f;
|
61 |
+
}
|
assets/images/lock-icon.svg
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="12" height="12" viewBox="0 0 9 12" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<path d="m0 6c0-0.552 0.448-1 1-1h7c0.552 0 1 0.448 1 1v5c0 0.552-0.448 1-1 1h-7c-0.552 0-1-0.448-1-1z" fill="#888"/>
|
4 |
+
<defs>
|
5 |
+
<path id="a" d="m1 3.5c0-1.933 1.567-3.5 3.5-3.5s3.5 1.567 3.5 3.5v2c0 1.933-1.567 3.5-3.5 3.5s-3.5-1.567-3.5-3.5z"/>
|
6 |
+
<clipPath id="b">
|
7 |
+
<use xlink:href="#a"/>
|
8 |
+
</clipPath>
|
9 |
+
</defs>
|
10 |
+
<use clip-path="url(#b)" fill="transparent" stroke="#888" stroke-width="2" xlink:href="#a"/>
|
11 |
+
</svg>
|
assets/images/mollie-logo.svg
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="41" height="12">
|
2 |
+
<g>
|
3 |
+
<path d="M 17.341 3.919 C 15.09 3.919 13.262 5.733 13.262 7.959 C 13.262 10.185 15.094 12 17.341 12 C 19.588 12 21.42 10.185 21.42 7.959 C 21.42 5.733 19.593 3.919 17.341 3.919 Z M 17.341 10.089 C 16.158 10.089 15.196 9.135 15.196 7.964 C 15.196 6.792 16.158 5.838 17.341 5.838 C 18.524 5.838 19.487 6.792 19.487 7.964 C 19.487 9.135 18.524 10.089 17.341 10.089 Z" fill="rgb(0,0,0)"></path>
|
4 |
+
<path d="M 30.909 2.52 C 31.611 2.52 32.181 1.956 32.181 1.26 C 32.181 0.564 31.611 0 30.909 0 C 30.207 0 29.637 0.564 29.637 1.26 C 29.637 1.956 30.207 2.52 30.909 2.52 Z" fill="rgb(0,0,0)"></path>
|
5 |
+
<path d="M 9.014 3.923 C 8.908 3.915 8.806 3.91 8.7 3.91 C 7.717 3.91 6.784 4.309 6.114 5.015 C 5.444 4.314 4.516 3.91 3.54 3.91 C 1.59 3.91 0 5.481 0 7.413 L 0 11.836 L 1.908 11.836 L 1.908 7.468 C 1.908 6.666 2.574 5.926 3.358 5.847 C 3.413 5.842 3.468 5.838 3.519 5.838 C 4.401 5.838 5.122 6.552 5.126 7.426 L 5.126 11.836 L 7.076 11.836 L 7.076 7.46 C 7.076 6.662 7.738 5.922 8.526 5.842 C 8.582 5.838 8.637 5.834 8.688 5.834 C 9.569 5.834 10.295 6.544 10.299 7.413 L 10.299 11.836 L 12.249 11.836 L 12.249 7.468 C 12.249 6.582 11.918 5.728 11.321 5.07 C 10.723 4.406 9.904 3.999 9.014 3.923 Z" fill="rgb(0,0,0)"></path>
|
6 |
+
<path d="M 24.422 0.189 L 22.472 0.189 L 22.472 11.845 L 24.422 11.845 Z M 28.153 0.189 L 26.203 0.189 L 26.203 11.845 L 28.153 11.845 Z M 31.884 4.112 L 29.934 4.112 L 29.934 11.84 L 31.884 11.84 Z" fill="rgb(0,0,0)"></path>
|
7 |
+
<path d="M 41 7.779 C 41 6.754 40.597 5.788 39.868 5.053 C 39.134 4.318 38.168 3.91 37.137 3.91 L 37.087 3.91 C 36.018 3.923 35.009 4.343 34.254 5.095 C 33.5 5.847 33.076 6.842 33.063 7.905 C 33.05 8.988 33.47 10.013 34.246 10.79 C 35.022 11.567 36.048 11.996 37.142 11.996 L 37.146 11.996 C 38.579 11.996 39.923 11.236 40.657 10.013 L 40.75 9.858 L 39.139 9.072 L 39.058 9.203 C 38.655 9.862 37.956 10.253 37.18 10.253 C 36.188 10.253 35.331 9.597 35.068 8.665 L 41 8.665 Z M 37.061 5.666 C 37.952 5.666 38.749 6.246 39.028 7.069 L 35.098 7.069 C 35.374 6.246 36.171 5.666 37.061 5.666 Z" fill="rgb(0,0,0)"></path>
|
8 |
+
</g>
|
9 |
+
</svg>
|
assets/js/applepay.js
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
(function (ApplePaySession) {
|
2 |
-
|
3 |
-
document.addEventListener('DOMContentLoaded', function () {
|
4 |
-
var applePayMethodElement = document.querySelector(
|
5 |
-
'.payment_method_mollie_wc_gateway_applepay',
|
6 |
-
)
|
7 |
-
|
8 |
-
var woocommerceCheckoutForm = document.querySelector(
|
9 |
-
'form.woocommerce-checkout',
|
10 |
-
)
|
11 |
-
|
12 |
-
if (!woocommerceCheckoutForm) {
|
13 |
-
return
|
14 |
-
}
|
15 |
-
|
16 |
-
if (!ApplePaySession || !ApplePaySession.canMakePayments()) {
|
17 |
-
applePayMethodElement &&
|
18 |
-
applePayMethodElement.parentNode.removeChild(applePayMethodElement)
|
19 |
-
return
|
20 |
-
}
|
21 |
-
|
22 |
-
woocommerceCheckoutForm.insertAdjacentHTML(
|
23 |
-
'beforeend',
|
24 |
-
'<input type="hidden" name="mollie_apple_pay_method_allowed" value="1" />',
|
25 |
-
)
|
26 |
-
})
|
27 |
-
})(window.ApplePaySession)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/applepay.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){var n;n=window.ApplePaySession,document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector(".payment_method_mollie_wc_gateway_applepay"),t=document.querySelector("form.woocommerce-checkout");t&&(n&&n.canMakePayments()?t.insertAdjacentHTML("beforeend",'<input type="hidden" name="mollie_apple_pay_method_allowed" value="1" />'):e&&e.parentNode.removeChild(e))}))}]);
|
assets/js/babel-polyfill.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){var n={};function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)r.d(e,i,function(n){return t[n]}.bind(null,i));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=121)}([function(t,n,r){var e=r(1),i=r(7),o=r(14),u=r(11),c=r(17),f=function(t,n,r){var a,s,l,h,p=t&f.F,v=t&f.G,g=t&f.S,y=t&f.P,d=t&f.B,x=v?e:g?e[n]||(e[n]={}):(e[n]||{}).prototype,m=v?i:i[n]||(i[n]={}),b=m.prototype||(m.prototype={});for(a in v&&(r=n),r)l=((s=!p&&x&&void 0!==x[a])?x:r)[a],h=d&&s?c(l,e):y&&"function"==typeof l?c(Function.call,l):l,x&&u(x,a,l,t&f.U),m[a]!=l&&o(m,a,h),y&&b[a]!=l&&(b[a]=l)};e.core=i,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(48)("wks"),i=r(29),o=r(1).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(19),i=Math.min;t.exports=function(t){return t>0?i(e(t),9007199254740991):0}},function(t,n){var r=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(2)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(3),i=r(88),o=r(26),u=Object.defineProperty;n.f=r(8)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(24);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(1),i=r(14),o=r(13),u=r(29)("src"),c=r(125),f=(""+c).split("toString");r(7).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,c){var a="function"==typeof r;a&&(o(r,"name")||i(r,"name",n)),t[n]!==r&&(a&&(o(r,u)||i(r,u,t[n]?""+t[n]:f.join(String(n)))),t===e?t[n]=r:c?t[n]?t[n]=r:i(t,n,r):(delete t[n],i(t,n,r)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||c.call(this)}))},function(t,n,r){var e=r(0),i=r(2),o=r(24),u=/"/g,c=function(t,n,r,e){var i=String(o(t)),c="<"+n;return""!==r&&(c+=" "+r+'="'+String(e).replace(u,""")+'"'),c+">"+i+"</"+n+">"};t.exports=function(t,n){var r={};r[t]=n(c),e(e.P+e.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",r)}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(9),i=r(28);t.exports=r(8)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(44),i=r(24);t.exports=function(t){return e(i(t))}},function(t,n,r){"use strict";var e=r(2);t.exports=function(t,n){return!!t&&e((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,r){var e=r(18);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(45),i=r(28),o=r(15),u=r(26),c=r(13),f=r(88),a=Object.getOwnPropertyDescriptor;n.f=r(8)?a:function(t,n){if(t=o(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return i(!e.f.call(t,n),t[n])}},function(t,n,r){var e=r(0),i=r(7),o=r(2);t.exports=function(t,n){var r=(i.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*o((function(){r(1)})),"Object",u)}},function(t,n,r){var e=r(17),i=r(44),o=r(10),u=r(6),c=r(104);t.exports=function(t,n){var r=1==t,f=2==t,a=3==t,s=4==t,l=6==t,h=5==t||l,p=n||c;return function(n,c,v){for(var g,y,d=o(n),x=i(d),m=e(c,v,3),b=u(x.length),S=0,w=r?p(n,b):f?p(n,0):void 0;b>S;S++)if((h||S in x)&&(y=m(g=x[S],S,d),t))if(r)w[S]=y;else if(y)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:w.push(g)}else if(s)return!1;return l?-1:a||s?s:w}}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){"use strict";if(r(8)){var e=r(30),i=r(1),o=r(2),u=r(0),c=r(59),f=r(84),a=r(17),s=r(42),l=r(28),h=r(14),p=r(43),v=r(19),g=r(6),y=r(115),d=r(32),x=r(26),m=r(13),b=r(46),S=r(4),w=r(10),_=r(76),E=r(33),O=r(35),P=r(34).f,F=r(78),M=r(29),A=r(5),j=r(22),I=r(49),N=r(47),T=r(80),L=r(40),R=r(52),k=r(41),C=r(79),D=r(106),W=r(9),G=r(20),U=W.f,B=G.f,V=i.RangeError,z=i.TypeError,Y=i.Uint8Array,q=Array.prototype,$=f.ArrayBuffer,K=f.DataView,J=j(0),X=j(2),H=j(3),Z=j(4),Q=j(5),tt=j(6),nt=I(!0),rt=I(!1),et=T.values,it=T.keys,ot=T.entries,ut=q.lastIndexOf,ct=q.reduce,ft=q.reduceRight,at=q.join,st=q.sort,lt=q.slice,ht=q.toString,pt=q.toLocaleString,vt=A("iterator"),gt=A("toStringTag"),yt=M("typed_constructor"),dt=M("def_constructor"),xt=c.CONSTR,mt=c.TYPED,bt=c.VIEW,St=j(1,(function(t,n){return Pt(N(t,t[dt]),n)})),wt=o((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),_t=!!Y&&!!Y.prototype.set&&o((function(){new Y(1).set({})})),Et=function(t,n){var r=v(t);if(r<0||r%n)throw V("Wrong offset!");return r},Ot=function(t){if(S(t)&&mt in t)return t;throw z(t+" is not a typed array!")},Pt=function(t,n){if(!(S(t)&&yt in t))throw z("It is not a typed array constructor!");return new t(n)},Ft=function(t,n){return Mt(N(t,t[dt]),n)},Mt=function(t,n){for(var r=0,e=n.length,i=Pt(t,e);e>r;)i[r]=n[r++];return i},At=function(t,n,r){U(t,n,{get:function(){return this._d[r]}})},jt=function(t){var n,r,e,i,o,u,c=w(t),f=arguments.length,s=f>1?arguments[1]:void 0,l=void 0!==s,h=F(c);if(null!=h&&!_(h)){for(u=h.call(c),e=[],n=0;!(o=u.next()).done;n++)e.push(o.value);c=e}for(l&&f>2&&(s=a(s,arguments[2],2)),n=0,r=g(c.length),i=Pt(this,r);r>n;n++)i[n]=l?s(c[n],n):c[n];return i},It=function(){for(var t=0,n=arguments.length,r=Pt(this,n);n>t;)r[t]=arguments[t++];return r},Nt=!!Y&&o((function(){pt.call(new Y(1))})),Tt=function(){return pt.apply(Nt?lt.call(Ot(this)):Ot(this),arguments)},Lt={copyWithin:function(t,n){return D.call(Ot(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Ot(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Ot(this),arguments)},filter:function(t){return Ft(this,X(Ot(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Ot(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(Ot(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return rt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return at.apply(Ot(this),arguments)},lastIndexOf:function(t){return ut.apply(Ot(this),arguments)},map:function(t){return St(Ot(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(Ot(this),arguments)},reduceRight:function(t){return ft.apply(Ot(this),arguments)},reverse:function(){for(var t,n=Ot(this).length,r=Math.floor(n/2),e=0;e<r;)t=this[e],this[e++]=this[--n],this[n]=t;return this},some:function(t){return H(Ot(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return st.call(Ot(this),t)},subarray:function(t,n){var r=Ot(this),e=r.length,i=d(t,e);return new(N(r,r[dt]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,g((void 0===n?e:d(n,e))-i))}},Rt=function(t,n){return Ft(this,lt.call(Ot(this),t,n))},kt=function(t){Ot(this);var n=Et(arguments[1],1),r=this.length,e=w(t),i=g(e.length),o=0;if(i+n>r)throw V("Wrong length!");for(;o<i;)this[n+o]=e[o++]},Ct={entries:function(){return ot.call(Ot(this))},keys:function(){return it.call(Ot(this))},values:function(){return et.call(Ot(this))}},Dt=function(t,n){return S(t)&&t[mt]&&"symbol"!=typeof n&&n in t&&String(+n)==String(n)},Wt=function(t,n){return Dt(t,n=x(n,!0))?l(2,t[n]):B(t,n)},Gt=function(t,n,r){return!(Dt(t,n=x(n,!0))&&S(r)&&m(r,"value"))||m(r,"get")||m(r,"set")||r.configurable||m(r,"writable")&&!r.writable||m(r,"enumerable")&&!r.enumerable?U(t,n,r):(t[n]=r.value,t)};xt||(G.f=Wt,W.f=Gt),u(u.S+u.F*!xt,"Object",{getOwnPropertyDescriptor:Wt,defineProperty:Gt}),o((function(){ht.call({})}))&&(ht=pt=function(){return at.call(this)});var Ut=p({},Lt);p(Ut,Ct),h(Ut,vt,Ct.values),p(Ut,{slice:Rt,set:kt,constructor:function(){},toString:ht,toLocaleString:Tt}),At(Ut,"buffer","b"),At(Ut,"byteOffset","o"),At(Ut,"byteLength","l"),At(Ut,"length","e"),U(Ut,gt,{get:function(){return this[mt]}}),t.exports=function(t,n,r,f){var a=t+((f=!!f)?"Clamped":"")+"Array",l="get"+t,p="set"+t,v=i[a],d=v||{},x=v&&O(v),m=!v||!c.ABV,w={},_=v&&v.prototype,F=function(t,r){U(t,r,{get:function(){return function(t,r){var e=t._d;return e.v[l](r*n+e.o,wt)}(this,r)},set:function(t){return function(t,r,e){var i=t._d;f&&(e=(e=Math.round(e))<0?0:e>255?255:255&e),i.v[p](r*n+i.o,e,wt)}(this,r,t)},enumerable:!0})};m?(v=r((function(t,r,e,i){s(t,v,a,"_d");var o,u,c,f,l=0,p=0;if(S(r)){if(!(r instanceof $||"ArrayBuffer"==(f=b(r))||"SharedArrayBuffer"==f))return mt in r?Mt(v,r):jt.call(v,r);o=r,p=Et(e,n);var d=r.byteLength;if(void 0===i){if(d%n)throw V("Wrong length!");if((u=d-p)<0)throw V("Wrong length!")}else if((u=g(i)*n)+p>d)throw V("Wrong length!");c=u/n}else c=y(r),o=new $(u=c*n);for(h(t,"_d",{b:o,o:p,l:u,e:c,v:new K(o)});l<c;)F(t,l++)})),_=v.prototype=E(Ut),h(_,"constructor",v)):o((function(){v(1)}))&&o((function(){new v(-1)}))&&R((function(t){new v,new v(null),new v(1.5),new v(t)}),!0)||(v=r((function(t,r,e,i){var o;return s(t,v,a),S(r)?r instanceof $||"ArrayBuffer"==(o=b(r))||"SharedArrayBuffer"==o?void 0!==i?new d(r,Et(e,n),i):void 0!==e?new d(r,Et(e,n)):new d(r):mt in r?Mt(v,r):jt.call(v,r):new d(y(r))})),J(x!==Function.prototype?P(d).concat(P(x)):P(d),(function(t){t in v||h(v,t,d[t])})),v.prototype=_,e||(_.constructor=v));var M=_[vt],A=!!M&&("values"==M.name||null==M.name),j=Ct.values;h(v,yt,!0),h(_,mt,a),h(_,bt,!0),h(_,dt,v),(f?new v(1)[gt]==a:gt in _)||U(_,gt,{get:function(){return a}}),w[a]=v,u(u.G+u.W+u.F*(v!=d),w),u(u.S,a,{BYTES_PER_ELEMENT:n}),u(u.S+u.F*o((function(){d.of.call(v,1)})),a,{from:jt,of:It}),"BYTES_PER_ELEMENT"in _||h(_,"BYTES_PER_ELEMENT",n),u(u.P,a,Lt),k(a),u(u.P+u.F*_t,a,{set:kt}),u(u.P+u.F*!A,a,Ct),e||_.toString==ht||(_.toString=ht),u(u.P+u.F*o((function(){new v(1).slice()})),a,{slice:Rt}),u(u.P+u.F*(o((function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()}))||!o((function(){_.toLocaleString.call([1,2])}))),a,{toLocaleString:Tt}),L[a]=A?M:j,e||A||h(_,vt,j)}}else t.exports=function(){}},function(t,n,r){var e=r(4);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n,r){var e=r(29)("meta"),i=r(4),o=r(13),u=r(9).f,c=0,f=Object.isExtensible||function(){return!0},a=!r(2)((function(){return f(Object.preventExtensions({}))})),s=function(t){u(t,e,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,e)){if(!f(t))return"F";if(!n)return"E";s(t)}return t[e].i},getWeak:function(t,n){if(!o(t,e)){if(!f(t))return!0;if(!n)return!1;s(t)}return t[e].w},onFreeze:function(t){return a&&l.NEED&&f(t)&&!o(t,e)&&s(t),t}}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n){t.exports=!1},function(t,n,r){var e=r(90),i=r(63);t.exports=Object.keys||function(t){return e(t,i)}},function(t,n,r){var e=r(19),i=Math.max,o=Math.min;t.exports=function(t,n){return(t=e(t))<0?i(t+n,0):o(t,n)}},function(t,n,r){var e=r(3),i=r(91),o=r(63),u=r(62)("IE_PROTO"),c=function(){},f=function(){var t,n=r(60)("iframe"),e=o.length;for(n.style.display="none",r(64).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;e--;)delete f.prototype[o[e]];return f()};t.exports=Object.create||function(t,n){var r;return null!==t?(c.prototype=e(t),r=new c,c.prototype=null,r[u]=t):r=f(),void 0===n?r:i(r,n)}},function(t,n,r){var e=r(90),i=r(63).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,i)}},function(t,n,r){var e=r(13),i=r(10),o=r(62)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),e(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,r){var e=r(5)("unscopables"),i=Array.prototype;null==i[e]&&r(14)(i,e,{}),t.exports=function(t){i[e][t]=!0}},function(t,n,r){var e=r(4);t.exports=function(t,n){if(!e(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},function(t,n,r){var e=r(9).f,i=r(13),o=r(5)("toStringTag");t.exports=function(t,n,r){t&&!i(t=r?t:t.prototype,o)&&e(t,o,{configurable:!0,value:n})}},function(t,n,r){var e=r(0),i=r(24),o=r(2),u=r(66),c="["+u+"]",f=RegExp("^"+c+c+"*"),a=RegExp(c+c+"*$"),s=function(t,n,r){var i={},c=o((function(){return!!u[t]()||"
"!="
"[t]()})),f=i[t]=c?n(l):u[t];r&&(i[r]=f),e(e.P+e.F*c,"String",i)},l=s.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(f,"")),2&n&&(t=t.replace(a,"")),t};t.exports=s},function(t,n){t.exports={}},function(t,n,r){"use strict";var e=r(1),i=r(9),o=r(8),u=r(5)("species");t.exports=function(t){var n=e[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,r,e){if(!(t instanceof n)||void 0!==e&&e in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,n,r){var e=r(11);t.exports=function(t,n,r){for(var i in n)e(t,i,n[i],r);return t}},function(t,n,r){var e=r(23);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(23),i=r(5)("toStringTag"),o="Arguments"==e(function(){return arguments}());t.exports=function(t){var n,r,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?r:o?e(n):"Object"==(u=e(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,r){var e=r(3),i=r(18),o=r(5)("species");t.exports=function(t,n){var r,u=e(t).constructor;return void 0===u||null==(r=e(u)[o])?n:i(r)}},function(t,n,r){var e=r(7),i=r(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:e.version,mode:r(30)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n,r){var e=r(15),i=r(6),o=r(32);t.exports=function(t){return function(n,r,u){var c,f=e(n),a=i(f.length),s=o(u,a);if(t&&r!=r){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===r)return t||s||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,r){var e=r(23);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){var e=r(5)("iterator"),i=!1;try{var o=[7][e]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var r=!1;try{var o=[7],u=o[e]();u.next=function(){return{done:r=!0}},o[e]=function(){return u},t(o)}catch(t){}return r}},function(t,n,r){"use strict";var e=r(3);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,r){"use strict";var e=r(46),i=RegExp.prototype.exec;t.exports=function(t,n){var r=t.exec;if("function"==typeof r){var o=r.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==e(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,r){"use strict";r(108);var e=r(11),i=r(14),o=r(2),u=r(24),c=r(5),f=r(81),a=c("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(t,n,r){var h=c(t),p=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),v=p?!o((function(){var n=!1,r=/a/;return r.exec=function(){return n=!0,null},"split"===t&&(r.constructor={},r.constructor[a]=function(){return r}),r[h](""),!n})):void 0;if(!p||!v||"replace"===t&&!s||"split"===t&&!l){var g=/./[h],y=r(u,h,""[t],(function(t,n,r,e,i){return n.exec===f?p&&!i?{done:!0,value:g.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}})),d=y[0],x=y[1];e(String.prototype,t,d),i(RegExp.prototype,h,2==n?function(t,n){return x.call(t,this,n)}:function(t){return x.call(t,this)})}}},function(t,n,r){var e=r(17),i=r(103),o=r(76),u=r(3),c=r(6),f=r(78),a={},s={};(n=t.exports=function(t,n,r,l,h){var p,v,g,y,d=h?function(){return t}:f(t),x=e(r,l,n?2:1),m=0;if("function"!=typeof d)throw TypeError(t+" is not iterable!");if(o(d)){for(p=c(t.length);p>m;m++)if((y=n?x(u(v=t[m])[0],v[1]):x(t[m]))===a||y===s)return y}else for(g=d.call(t);!(v=g.next()).done;)if((y=i(g,x,v.value,n))===a||y===s)return y}).BREAK=a,n.RETURN=s},function(t,n,r){var e=r(1).navigator;t.exports=e&&e.userAgent||""},function(t,n,r){"use strict";var e=r(1),i=r(0),o=r(11),u=r(43),c=r(27),f=r(56),a=r(42),s=r(4),l=r(2),h=r(52),p=r(38),v=r(67);t.exports=function(t,n,r,g,y,d){var x=e[t],m=x,b=y?"set":"add",S=m&&m.prototype,w={},_=function(t){var n=S[t];o(S,t,"delete"==t?function(t){return!(d&&!s(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(d&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return d&&!s(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,r){return n.call(this,0===t?0:t,r),this})};if("function"==typeof m&&(d||S.forEach&&!l((function(){(new m).entries().next()})))){var E=new m,O=E[b](d?{}:-0,1)!=E,P=l((function(){E.has(1)})),F=h((function(t){new m(t)})),M=!d&&l((function(){for(var t=new m,n=5;n--;)t[b](n,n);return!t.has(-0)}));F||((m=n((function(n,r){a(n,m,t);var e=v(new x,n,m);return null!=r&&f(r,y,e[b],e),e}))).prototype=S,S.constructor=m),(P||M)&&(_("delete"),_("has"),y&&_("get")),(M||O)&&_(b),d&&S.clear&&delete S.clear}else m=g.getConstructor(n,t,y,b),u(m.prototype,r),c.NEED=!0;return p(m,t),w[t]=m,i(i.G+i.W+i.F*(m!=x),w),d||g.setStrong(m,t,y),m}},function(t,n,r){for(var e,i=r(1),o=r(14),u=r(29),c=u("typed_array"),f=u("view"),a=!(!i.ArrayBuffer||!i.DataView),s=a,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,f,!0)):s=!1;t.exports={ABV:a,CONSTR:s,TYPED:c,VIEW:f}},function(t,n,r){var e=r(4),i=r(1).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){n.f=r(5)},function(t,n,r){var e=r(48)("keys"),i=r(29);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(1).document;t.exports=e&&e.documentElement},function(t,n,r){var e=r(4),i=r(3),o=function(t,n){if(i(t),!e(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,e){try{(e=r(17)(Function.call,r(20).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,r){return o(t,r),n?t.__proto__=r:e(t,r),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,n,r){var e=r(4),i=r(65).set;t.exports=function(t,n,r){var o,u=n.constructor;return u!==r&&"function"==typeof u&&(o=u.prototype)!==r.prototype&&e(o)&&i&&i(t,o),t}},function(t,n,r){"use strict";var e=r(19),i=r(24);t.exports=function(t){var n=String(i(this)),r="",o=e(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(r+=n);return r}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,n,r){var e=r(19),i=r(24);t.exports=function(t){return function(n,r){var o,u,c=String(i(n)),f=e(r),a=c.length;return f<0||f>=a?t?"":void 0:(o=c.charCodeAt(f))<55296||o>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):o:t?c.slice(f,f+2):u-56320+(o-55296<<10)+65536}}},function(t,n,r){"use strict";var e=r(30),i=r(0),o=r(11),u=r(14),c=r(40),f=r(102),a=r(38),s=r(35),l=r(5)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,n,r,v,g,y,d){f(r,n,v);var x,m,b,S=function(t){if(!h&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},w=n+" Iterator",_="values"==g,E=!1,O=t.prototype,P=O[l]||O["@@iterator"]||g&&O[g],F=P||S(g),M=g?_?S("entries"):F:void 0,A="Array"==n&&O.entries||P;if(A&&(b=s(A.call(new t)))!==Object.prototype&&b.next&&(a(b,w,!0),e||"function"==typeof b[l]||u(b,l,p)),_&&P&&"values"!==P.name&&(E=!0,F=function(){return P.call(this)}),e&&!d||!h&&!E&&O[l]||u(O,l,F),c[n]=F,c[w]=p,g)if(x={values:_?F:S("values"),keys:y?F:S("keys"),entries:M},d)for(m in x)m in O||o(O,m,x[m]);else i(i.P+i.F*(h||E),n,x);return x}},function(t,n,r){var e=r(74),i=r(24);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(t))}},function(t,n,r){var e=r(4),i=r(23),o=r(5)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,r){var e=r(5)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,r){var e=r(40),i=r(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(e.Array===t||o[i]===t)}},function(t,n,r){"use strict";var e=r(9),i=r(28);t.exports=function(t,n,r){n in t?e.f(t,n,i(0,r)):t[n]=r}},function(t,n,r){var e=r(46),i=r(5)("iterator"),o=r(40);t.exports=r(7).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[e(t)]}},function(t,n,r){"use strict";var e=r(10),i=r(32),o=r(6);t.exports=function(t){for(var n=e(this),r=o(n.length),u=arguments.length,c=i(u>1?arguments[1]:void 0,r),f=u>2?arguments[2]:void 0,a=void 0===f?r:i(f,r);a>c;)n[c++]=t;return n}},function(t,n,r){"use strict";var e=r(36),i=r(107),o=r(40),u=r(15);t.exports=r(72)(Array,"Array",(function(t,n){this._t=u(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?r:"values"==n?t[r]:[r,t[r]])}),"values"),o.Arguments=o.Array,e("keys"),e("values"),e("entries")},function(t,n,r){"use strict";var e,i,o=r(53),u=RegExp.prototype.exec,c=String.prototype.replace,f=u,a=(e=/a/,i=/b*/g,u.call(e,"a"),u.call(i,"a"),0!==e.lastIndex||0!==i.lastIndex),s=void 0!==/()??/.exec("")[1];(a||s)&&(f=function(t){var n,r,e,i,f=this;return s&&(r=new RegExp("^"+f.source+"$(?!\\s)",o.call(f))),a&&(n=f.lastIndex),e=u.call(f,t),a&&e&&(f.lastIndex=f.global?e.index+e[0].length:n),s&&e&&e.length>1&&c.call(e[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(e[i]=void 0)})),e}),t.exports=f},function(t,n,r){"use strict";var e=r(71)(!0);t.exports=function(t,n,r){return n+(r?e(t,n).length:1)}},function(t,n,r){var e,i,o,u=r(17),c=r(96),f=r(64),a=r(60),s=r(1),l=s.process,h=s.setImmediate,p=s.clearImmediate,v=s.MessageChannel,g=s.Dispatch,y=0,d={},x=function(){var t=+this;if(d.hasOwnProperty(t)){var n=d[t];delete d[t],n()}},m=function(t){x.call(t.data)};h&&p||(h=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return d[++y]=function(){c("function"==typeof t?t:Function(t),n)},e(y),y},p=function(t){delete d[t]},"process"==r(23)(l)?e=function(t){l.nextTick(u(x,t,1))}:g&&g.now?e=function(t){g.now(u(x,t,1))}:v?(o=(i=new v).port2,i.port1.onmessage=m,e=u(o.postMessage,o,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(e=function(t){s.postMessage(t+"","*")},s.addEventListener("message",m,!1)):e="onreadystatechange"in a("script")?function(t){f.appendChild(a("script")).onreadystatechange=function(){f.removeChild(this),x.call(t)}}:function(t){setTimeout(u(x,t,1),0)}),t.exports={set:h,clear:p}},function(t,n,r){"use strict";var e=r(1),i=r(8),o=r(30),u=r(59),c=r(14),f=r(43),a=r(2),s=r(42),l=r(19),h=r(6),p=r(115),v=r(34).f,g=r(9).f,y=r(79),d=r(38),x="prototype",m="Wrong index!",b=e.ArrayBuffer,S=e.DataView,w=e.Math,_=e.RangeError,E=e.Infinity,O=b,P=w.abs,F=w.pow,M=w.floor,A=w.log,j=w.LN2,I=i?"_b":"buffer",N=i?"_l":"byteLength",T=i?"_o":"byteOffset";function L(t,n,r){var e,i,o,u=new Array(r),c=8*r-n-1,f=(1<<c)-1,a=f>>1,s=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=P(t))!=t||t===E?(i=t!=t?1:0,e=f):(e=M(A(t)/j),t*(o=F(2,-e))<1&&(e--,o*=2),(t+=e+a>=1?s/o:s*F(2,1-a))*o>=2&&(e++,o/=2),e+a>=f?(i=0,e=f):e+a>=1?(i=(t*o-1)*F(2,n),e+=a):(i=t*F(2,a-1)*F(2,n),e=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(e=e<<n|i,c+=n;c>0;u[l++]=255&e,e/=256,c-=8);return u[--l]|=128*h,u}function R(t,n,r){var e,i=8*r-n-1,o=(1<<i)-1,u=o>>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;c>0;s=256*s+t[f],f--,c-=8);for(e=s&(1<<-c)-1,s>>=-c,c+=n;c>0;e=256*e+t[f],f--,c-=8);if(0===s)s=1-u;else{if(s===o)return e?NaN:a?-E:E;e+=F(2,n),s-=u}return(a?-1:1)*e*F(2,s-n)}function k(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function C(t){return[255&t]}function D(t){return[255&t,t>>8&255]}function W(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function G(t){return L(t,52,8)}function U(t){return L(t,23,4)}function B(t,n,r){g(t[x],n,{get:function(){return this[r]}})}function V(t,n,r,e){var i=p(+r);if(i+n>t[N])throw _(m);var o=t[I]._b,u=i+t[T],c=o.slice(u,u+n);return e?c:c.reverse()}function z(t,n,r,e,i,o){var u=p(+r);if(u+n>t[N])throw _(m);for(var c=t[I]._b,f=u+t[T],a=e(+i),s=0;s<n;s++)c[f+s]=a[o?s:n-s-1]}if(u.ABV){if(!a((function(){b(1)}))||!a((function(){new b(-1)}))||a((function(){return new b,new b(1.5),new b(NaN),"ArrayBuffer"!=b.name}))){for(var Y,q=(b=function(t){return s(this,b),new O(p(t))})[x]=O[x],$=v(O),K=0;$.length>K;)(Y=$[K++])in b||c(b,Y,O[Y]);o||(q.constructor=b)}var J=new S(new b(2)),X=S[x].setInt8;J.setInt8(0,2147483648),J.setInt8(1,2147483649),!J.getInt8(0)&&J.getInt8(1)||f(S[x],{setInt8:function(t,n){X.call(this,t,n<<24>>24)},setUint8:function(t,n){X.call(this,t,n<<24>>24)}},!0)}else b=function(t){s(this,b,"ArrayBuffer");var n=p(t);this._b=y.call(new Array(n),0),this[N]=n},S=function(t,n,r){s(this,S,"DataView"),s(t,b,"DataView");var e=t[N],i=l(n);if(i<0||i>e)throw _("Wrong offset!");if(i+(r=void 0===r?e-i:h(r))>e)throw _("Wrong length!");this[I]=t,this[T]=i,this[N]=r},i&&(B(b,"byteLength","_l"),B(S,"buffer","_b"),B(S,"byteLength","_l"),B(S,"byteOffset","_o")),f(S[x],{getInt8:function(t){return V(this,1,t)[0]<<24>>24},getUint8:function(t){return V(this,1,t)[0]},getInt16:function(t){var n=V(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=V(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return k(V(this,4,t,arguments[1]))},getUint32:function(t){return k(V(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return R(V(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return R(V(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){z(this,1,t,C,n)},setUint8:function(t,n){z(this,1,t,C,n)},setInt16:function(t,n){z(this,2,t,D,n,arguments[2])},setUint16:function(t,n){z(this,2,t,D,n,arguments[2])},setInt32:function(t,n){z(this,4,t,W,n,arguments[2])},setUint32:function(t,n){z(this,4,t,W,n,arguments[2])},setFloat32:function(t,n){z(this,4,t,U,n,arguments[2])},setFloat64:function(t,n){z(this,8,t,G,n,arguments[2])}});d(b,"ArrayBuffer"),d(S,"DataView"),c(S[x],u.VIEW,!0),n.ArrayBuffer=b,n.DataView=S},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){t.exports=!r(120)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,r){t.exports=!r(8)&&!r(2)((function(){return 7!=Object.defineProperty(r(60)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(1),i=r(7),o=r(30),u=r(61),c=r(9).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(13),i=r(15),o=r(49)(!1),u=r(62)("IE_PROTO");t.exports=function(t,n){var r,c=i(t),f=0,a=[];for(r in c)r!=u&&e(c,r)&&a.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~o(a,r)||a.push(r));return a}},function(t,n,r){var e=r(9),i=r(3),o=r(31);t.exports=r(8)?Object.defineProperties:function(t,n){i(t);for(var r,u=o(n),c=u.length,f=0;c>f;)e.f(t,r=u[f++],n[r]);return t}},function(t,n,r){var e=r(15),i=r(34).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(e(t))}},function(t,n,r){"use strict";var e=r(8),i=r(31),o=r(50),u=r(45),c=r(10),f=r(44),a=Object.assign;t.exports=!a||r(2)((function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach((function(t){n[t]=t})),7!=a({},t)[r]||Object.keys(a({},n)).join("")!=e}))?function(t,n){for(var r=c(t),a=arguments.length,s=1,l=o.f,h=u.f;a>s;)for(var p,v=f(arguments[s++]),g=l?i(v).concat(l(v)):i(v),y=g.length,d=0;y>d;)p=g[d++],e&&!h.call(v,p)||(r[p]=v[p]);return r}:a},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,r){"use strict";var e=r(18),i=r(4),o=r(96),u=[].slice,c={},f=function(t,n,r){if(!(n in c)){for(var e=[],i=0;i<n;i++)e[i]="a["+i+"]";c[n]=Function("F,a","return new F("+e.join(",")+")")}return c[n](t,r)};t.exports=Function.bind||function(t){var n=e(this),r=u.call(arguments,1),c=function(){var e=r.concat(u.call(arguments));return this instanceof c?f(n,e.length,e):o(n,e,t)};return i(n.prototype)&&(c.prototype=n.prototype),c}},function(t,n){t.exports=function(t,n,r){var e=void 0===r;switch(n.length){case 0:return e?t():t.call(r);case 1:return e?t(n[0]):t.call(r,n[0]);case 2:return e?t(n[0],n[1]):t.call(r,n[0],n[1]);case 3:return e?t(n[0],n[1],n[2]):t.call(r,n[0],n[1],n[2]);case 4:return e?t(n[0],n[1],n[2],n[3]):t.call(r,n[0],n[1],n[2],n[3])}return t.apply(r,n)}},function(t,n,r){var e=r(1).parseInt,i=r(39).trim,o=r(66),u=/^[-+]?0[xX]/;t.exports=8!==e(o+"08")||22!==e(o+"0x16")?function(t,n){var r=i(String(t),3);return e(r,n>>>0||(u.test(r)?16:10))}:e},function(t,n,r){var e=r(1).parseFloat,i=r(39).trim;t.exports=1/e(r(66)+"-0")!=-1/0?function(t){var n=i(String(t),3),r=e(n);return 0===r&&"-"==n.charAt(0)?-0:r}:e},function(t,n,r){var e=r(23);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=e(t))throw TypeError(n);return+t}},function(t,n,r){var e=r(4),i=Math.floor;t.exports=function(t){return!e(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){"use strict";var e=r(33),i=r(28),o=r(38),u={};r(14)(u,r(5)("iterator"),(function(){return this})),t.exports=function(t,n,r){t.prototype=e(u,{next:i(1,r)}),o(t,n+" Iterator")}},function(t,n,r){var e=r(3);t.exports=function(t,n,r,i){try{return i?n(e(r)[0],r[1]):n(r)}catch(n){var o=t.return;throw void 0!==o&&e(o.call(t)),n}}},function(t,n,r){var e=r(215);t.exports=function(t,n){return new(e(t))(n)}},function(t,n,r){var e=r(18),i=r(10),o=r(44),u=r(6);t.exports=function(t,n,r,c,f){e(n);var a=i(t),s=o(a),l=u(a.length),h=f?l-1:0,p=f?-1:1;if(r<2)for(;;){if(h in s){c=s[h],h+=p;break}if(h+=p,f?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;f?h>=0:l>h;h+=p)h in s&&(c=n(c,s[h],h,a));return c}},function(t,n,r){"use strict";var e=r(10),i=r(32),o=r(6);t.exports=[].copyWithin||function(t,n){var r=e(this),u=o(r.length),c=i(t,u),f=i(n,u),a=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===a?u:i(a,u))-f,u-c),l=1;for(f<c&&c<f+s&&(l=-1,f+=s-1,c+=s-1);s-- >0;)f in r?r[c]=r[f]:delete r[c],c+=l,f+=l;return r}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){"use strict";var e=r(81);r(0)({target:"RegExp",proto:!0,forced:e!==/./.exec},{exec:e})},function(t,n,r){r(8)&&"g"!=/./g.flags&&r(9).f(RegExp.prototype,"flags",{configurable:!0,get:r(53)})},function(t,n,r){"use strict";var e,i,o,u,c=r(30),f=r(1),a=r(17),s=r(46),l=r(0),h=r(4),p=r(18),v=r(42),g=r(56),y=r(47),d=r(83).set,x=r(235)(),m=r(111),b=r(236),S=r(57),w=r(112),_=f.TypeError,E=f.process,O=E&&E.versions,P=O&&O.v8||"",F=f.Promise,M="process"==s(E),A=function(){},j=i=m.f,I=!!function(){try{var t=F.resolve(1),n=(t.constructor={})[r(5)("species")]=function(t){t(A,A)};return(M||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof n&&0!==P.indexOf("6.6")&&-1===S.indexOf("Chrome/66")}catch(t){}}(),N=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},T=function(t,n){if(!t._n){t._n=!0;var r=t._c;x((function(){for(var e=t._v,i=1==t._s,o=0,u=function(n){var r,o,u,c=i?n.ok:n.fail,f=n.resolve,a=n.reject,s=n.domain;try{c?(i||(2==t._h&&k(t),t._h=1),!0===c?r=e:(s&&s.enter(),r=c(e),s&&(s.exit(),u=!0)),r===n.promise?a(_("Promise-chain cycle")):(o=N(r))?o.call(r,f,a):f(r)):a(e)}catch(t){s&&!u&&s.exit(),a(t)}};r.length>o;)u(r[o++]);t._c=[],t._n=!1,n&&!t._h&&L(t)}))}},L=function(t){d.call(f,(function(){var n,r,e,i=t._v,o=R(t);if(o&&(n=b((function(){M?E.emit("unhandledRejection",i,t):(r=f.onunhandledrejection)?r({promise:t,reason:i}):(e=f.console)&&e.error&&e.error("Unhandled promise rejection",i)})),t._h=M||R(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},k=function(t){d.call(f,(function(){var n;M?E.emit("rejectionHandled",t):(n=f.onrejectionhandled)&&n({promise:t,reason:t._v})}))},C=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),T(n,!0))},D=function(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw _("Promise can't be resolved itself");(n=N(t))?x((function(){var e={_w:r,_d:!1};try{n.call(t,a(D,e,1),a(C,e,1))}catch(t){C.call(e,t)}})):(r._v=t,r._s=1,T(r,!1))}catch(t){C.call({_w:r,_d:!1},t)}}};I||(F=function(t){v(this,F,"Promise","_h"),p(t),e.call(this);try{t(a(D,this,1),a(C,this,1))}catch(t){C.call(this,t)}},(e=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(43)(F.prototype,{then:function(t,n){var r=j(y(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=M?E.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&T(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new e;this.promise=t,this.resolve=a(D,t,1),this.reject=a(C,t,1)},m.f=j=function(t){return t===F||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!I,{Promise:F}),r(38)(F,"Promise"),r(41)("Promise"),u=r(7).Promise,l(l.S+l.F*!I,"Promise",{reject:function(t){var n=j(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(c||!I),"Promise",{resolve:function(t){return w(c&&this===u?F:this,t)}}),l(l.S+l.F*!(I&&r(52)((function(t){F.all(t).catch(A)}))),"Promise",{all:function(t){var n=this,r=j(n),e=r.resolve,i=r.reject,o=b((function(){var r=[],o=0,u=1;g(t,!1,(function(t){var c=o++,f=!1;r.push(void 0),u++,n.resolve(t).then((function(t){f||(f=!0,r[c]=t,--u||e(r))}),i)})),--u||e(r)}));return o.e&&i(o.v),r.promise},race:function(t){var n=this,r=j(n),e=r.reject,i=b((function(){g(t,!1,(function(t){n.resolve(t).then(r.resolve,e)}))}));return i.e&&e(i.v),r.promise}})},function(t,n,r){"use strict";var e=r(18);function i(t){var n,r;this.promise=new t((function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e})),this.resolve=e(n),this.reject=e(r)}t.exports.f=function(t){return new i(t)}},function(t,n,r){var e=r(3),i=r(4),o=r(111);t.exports=function(t,n){if(e(t),i(n)&&n.constructor===t)return n;var r=o.f(t);return(0,r.resolve)(n),r.promise}},function(t,n,r){"use strict";var e=r(9).f,i=r(33),o=r(43),u=r(17),c=r(42),f=r(56),a=r(72),s=r(107),l=r(41),h=r(8),p=r(27).fastKey,v=r(37),g=h?"_s":"size",y=function(t,n){var r,e=p(n);if("F"!==e)return t._i[e];for(r=t._f;r;r=r.n)if(r.k==n)return r};t.exports={getConstructor:function(t,n,r,a){var s=t((function(t,e){c(t,s,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[g]=0,null!=e&&f(e,r,t[a],t)}));return o(s.prototype,{clear:function(){for(var t=v(this,n),r=t._i,e=t._f;e;e=e.n)e.r=!0,e.p&&(e.p=e.p.n=void 0),delete r[e.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var r=v(this,n),e=y(r,t);if(e){var i=e.n,o=e.p;delete r._i[e.i],e.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==e&&(r._f=i),r._l==e&&(r._l=o),r[g]--}return!!e},forEach:function(t){v(this,n);for(var r,e=u(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(e(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!y(v(this,n),t)}}),h&&e(s.prototype,"size",{get:function(){return v(this,n)[g]}}),s},def:function(t,n,r){var e,i,o=y(t,n);return o?o.v=r:(t._l=o={i:i=p(n,!0),k:n,v:r,p:e=t._l,n:void 0,r:!1},t._f||(t._f=o),e&&(e.n=o),t[g]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,n,r){a(t,n,(function(t,r){this._t=v(t,n),this._k=r,this._l=void 0}),(function(){for(var t=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?s(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(this._t=void 0,s(1))}),r?"entries":"values",!r,!0),l(n)}}},function(t,n,r){"use strict";var e=r(43),i=r(27).getWeak,o=r(3),u=r(4),c=r(42),f=r(56),a=r(22),s=r(13),l=r(37),h=a(5),p=a(6),v=0,g=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},d=function(t,n){return h(t.a,(function(t){return t[0]===n}))};y.prototype={get:function(t){var n=d(this,t);if(n)return n[1]},has:function(t){return!!d(this,t)},set:function(t,n){var r=d(this,t);r?r[1]=n:this.a.push([t,n])},delete:function(t){var n=p(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,r,o){var a=t((function(t,e){c(t,a,n,"_i"),t._t=n,t._i=v++,t._l=void 0,null!=e&&f(e,r,t[o],t)}));return e(a.prototype,{delete:function(t){if(!u(t))return!1;var r=i(t);return!0===r?g(l(this,n)).delete(t):r&&s(r,this._i)&&delete r[this._i]},has:function(t){if(!u(t))return!1;var r=i(t);return!0===r?g(l(this,n)).has(t):r&&s(r,this._i)}}),a},def:function(t,n,r){var e=i(o(n),!0);return!0===e?g(t).set(n,r):e[t._i]=r,t},ufstore:g}},function(t,n,r){var e=r(19),i=r(6);t.exports=function(t){if(void 0===t)return 0;var n=e(t),r=i(n);if(n!==r)throw RangeError("Wrong length!");return r}},function(t,n,r){var e=r(34),i=r(50),o=r(3),u=r(1).Reflect;t.exports=u&&u.ownKeys||function(t){var n=e.f(o(t)),r=i.f;return r?n.concat(r(t)):n}},function(t,n,r){var e=r(6),i=r(68),o=r(24);t.exports=function(t,n,r,u){var c=String(o(t)),f=c.length,a=void 0===r?" ":String(r),s=e(n);if(s<=f||""==a)return c;var l=s-f,h=i.call(a,Math.ceil(l/a.length));return h.length>l&&(h=h.slice(0,l)),u?h+c:c+h}},function(t,n,r){var e=r(8),i=r(31),o=r(15),u=r(45).f;t.exports=function(t){return function(n){for(var r,c=o(n),f=i(c),a=f.length,s=0,l=[];a>s;)r=f[s++],e&&!u.call(c,r)||l.push(t?[r,c[r]]:c[r]);return l}}},function(t,n){var r=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,r){"use strict";r(122);var e,i=(e=r(294))&&e.__esModule?e:{default:e};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,r){"use strict";r(123),r(266),r(268),r(271),r(273),r(275),r(277),r(279),r(281),r(283),r(285),r(287),r(289),r(293)},function(t,n,r){r(124),r(127),r(128),r(129),r(130),r(131),r(132),r(133),r(134),r(135),r(136),r(137),r(138),r(139),r(140),r(141),r(142),r(143),r(144),r(145),r(146),r(147),r(148),r(149),r(150),r(151),r(152),r(153),r(154),r(155),r(156),r(157),r(158),r(159),r(160),r(161),r(162),r(163),r(164),r(165),r(166),r(167),r(168),r(170),r(171),r(172),r(173),r(174),r(175),r(176),r(177),r(178),r(179),r(180),r(181),r(182),r(183),r(184),r(185),r(186),r(187),r(188),r(189),r(190),r(191),r(192),r(193),r(194),r(195),r(196),r(197),r(198),r(199),r(200),r(201),r(202),r(203),r(205),r(206),r(208),r(209),r(210),r(211),r(212),r(213),r(214),r(216),r(217),r(218),r(219),r(220),r(221),r(222),r(223),r(224),r(225),r(226),r(227),r(228),r(80),r(229),r(108),r(230),r(109),r(231),r(232),r(233),r(234),r(110),r(237),r(238),r(239),r(240),r(241),r(242),r(243),r(244),r(245),r(246),r(247),r(248),r(249),r(250),r(251),r(252),r(253),r(254),r(255),r(256),r(257),r(258),r(259),r(260),r(261),r(262),r(263),r(264),r(265),t.exports=r(7)},function(t,n,r){"use strict";var e=r(1),i=r(13),o=r(8),u=r(0),c=r(11),f=r(27).KEY,a=r(2),s=r(48),l=r(38),h=r(29),p=r(5),v=r(61),g=r(89),y=r(126),d=r(51),x=r(3),m=r(4),b=r(10),S=r(15),w=r(26),_=r(28),E=r(33),O=r(92),P=r(20),F=r(50),M=r(9),A=r(31),j=P.f,I=M.f,N=O.f,T=e.Symbol,L=e.JSON,R=L&&L.stringify,k=p("_hidden"),C=p("toPrimitive"),D={}.propertyIsEnumerable,W=s("symbol-registry"),G=s("symbols"),U=s("op-symbols"),B=Object.prototype,V="function"==typeof T&&!!F.f,z=e.QObject,Y=!z||!z.prototype||!z.prototype.findChild,q=o&&a((function(){return 7!=E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,n,r){var e=j(B,n);e&&delete B[n],I(t,n,r),e&&t!==B&&I(B,n,e)}:I,$=function(t){var n=G[t]=E(T.prototype);return n._k=t,n},K=V&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},J=function(t,n,r){return t===B&&J(U,n,r),x(t),n=w(n,!0),x(r),i(G,n)?(r.enumerable?(i(t,k)&&t[k][n]&&(t[k][n]=!1),r=E(r,{enumerable:_(0,!1)})):(i(t,k)||I(t,k,_(1,{})),t[k][n]=!0),q(t,n,r)):I(t,n,r)},X=function(t,n){x(t);for(var r,e=y(n=S(n)),i=0,o=e.length;o>i;)J(t,r=e[i++],n[r]);return t},H=function(t){var n=D.call(this,t=w(t,!0));return!(this===B&&i(G,t)&&!i(U,t))&&(!(n||!i(this,t)||!i(G,t)||i(this,k)&&this[k][t])||n)},Z=function(t,n){if(t=S(t),n=w(n,!0),t!==B||!i(G,n)||i(U,n)){var r=j(t,n);return!r||!i(G,n)||i(t,k)&&t[k][n]||(r.enumerable=!0),r}},Q=function(t){for(var n,r=N(S(t)),e=[],o=0;r.length>o;)i(G,n=r[o++])||n==k||n==f||e.push(n);return e},tt=function(t){for(var n,r=t===B,e=N(r?U:S(t)),o=[],u=0;e.length>u;)!i(G,n=e[u++])||r&&!i(B,n)||o.push(G[n]);return o};V||(c((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(r){this===B&&n.call(U,r),i(this,k)&&i(this[k],t)&&(this[k][t]=!1),q(this,t,_(1,r))};return o&&Y&&q(B,t,{configurable:!0,set:n}),$(t)}).prototype,"toString",(function(){return this._k})),P.f=Z,M.f=J,r(34).f=O.f=Q,r(45).f=H,F.f=tt,o&&!r(30)&&c(B,"propertyIsEnumerable",H,!0),v.f=function(t){return $(p(t))}),u(u.G+u.W+u.F*!V,{Symbol:T});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)p(nt[rt++]);for(var et=A(p.store),it=0;et.length>it;)g(et[it++]);u(u.S+u.F*!V,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=T(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),u(u.S+u.F*!V,"Object",{create:function(t,n){return void 0===n?E(t):X(E(t),n)},defineProperty:J,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=a((function(){F.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return F.f(b(t))}}),L&&u(u.S+u.F*(!V||a((function(){var t=T();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var n,r,e=[t],i=1;arguments.length>i;)e.push(arguments[i++]);if(r=n=e[1],(m(n)||void 0!==t)&&!K(t))return d(n)||(n=function(t,n){if("function"==typeof r&&(n=r.call(this,t,n)),!K(n))return n}),e[1]=n,R.apply(L,e)}}),T.prototype[C]||r(14)(T.prototype,C,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(t,n,r){t.exports=r(48)("native-function-to-string",Function.toString)},function(t,n,r){var e=r(31),i=r(50),o=r(45);t.exports=function(t){var n=e(t),r=i.f;if(r)for(var u,c=r(t),f=o.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,r){var e=r(0);e(e.S,"Object",{create:r(33)})},function(t,n,r){var e=r(0);e(e.S+e.F*!r(8),"Object",{defineProperty:r(9).f})},function(t,n,r){var e=r(0);e(e.S+e.F*!r(8),"Object",{defineProperties:r(91)})},function(t,n,r){var e=r(15),i=r(20).f;r(21)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(e(t),n)}}))},function(t,n,r){var e=r(10),i=r(35);r(21)("getPrototypeOf",(function(){return function(t){return i(e(t))}}))},function(t,n,r){var e=r(10),i=r(31);r(21)("keys",(function(){return function(t){return i(e(t))}}))},function(t,n,r){r(21)("getOwnPropertyNames",(function(){return r(92).f}))},function(t,n,r){var e=r(4),i=r(27).onFreeze;r(21)("freeze",(function(t){return function(n){return t&&e(n)?t(i(n)):n}}))},function(t,n,r){var e=r(4),i=r(27).onFreeze;r(21)("seal",(function(t){return function(n){return t&&e(n)?t(i(n)):n}}))},function(t,n,r){var e=r(4),i=r(27).onFreeze;r(21)("preventExtensions",(function(t){return function(n){return t&&e(n)?t(i(n)):n}}))},function(t,n,r){var e=r(4);r(21)("isFrozen",(function(t){return function(n){return!e(n)||!!t&&t(n)}}))},function(t,n,r){var e=r(4);r(21)("isSealed",(function(t){return function(n){return!e(n)||!!t&&t(n)}}))},function(t,n,r){var e=r(4);r(21)("isExtensible",(function(t){return function(n){return!!e(n)&&(!t||t(n))}}))},function(t,n,r){var e=r(0);e(e.S+e.F,"Object",{assign:r(93)})},function(t,n,r){var e=r(0);e(e.S,"Object",{is:r(94)})},function(t,n,r){var e=r(0);e(e.S,"Object",{setPrototypeOf:r(65).set})},function(t,n,r){"use strict";var e=r(46),i={};i[r(5)("toStringTag")]="z",i+""!="[object z]"&&r(11)(Object.prototype,"toString",(function(){return"[object "+e(this)+"]"}),!0)},function(t,n,r){var e=r(0);e(e.P,"Function",{bind:r(95)})},function(t,n,r){var e=r(9).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||r(8)&&e(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,r){"use strict";var e=r(4),i=r(35),o=r(5)("hasInstance"),u=Function.prototype;o in u||r(9).f(u,o,{value:function(t){if("function"!=typeof this||!e(t))return!1;if(!e(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,r){var e=r(0),i=r(97);e(e.G+e.F*(parseInt!=i),{parseInt:i})},function(t,n,r){var e=r(0),i=r(98);e(e.G+e.F*(parseFloat!=i),{parseFloat:i})},function(t,n,r){"use strict";var e=r(1),i=r(13),o=r(23),u=r(67),c=r(26),f=r(2),a=r(34).f,s=r(20).f,l=r(9).f,h=r(39).trim,p=e.Number,v=p,g=p.prototype,y="Number"==o(r(33)(g)),d="trim"in String.prototype,x=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){var r,e,i,o=(n=d?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(r=n.charCodeAt(2))||120===r)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:e=2,i=49;break;case 79:case 111:e=8,i=55;break;default:return+n}for(var u,f=n.slice(2),a=0,s=f.length;a<s;a++)if((u=f.charCodeAt(a))<48||u>i)return NaN;return parseInt(f,e)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,r=this;return r instanceof p&&(y?f((function(){g.valueOf.call(r)})):"Number"!=o(r))?u(new v(x(n)),r,p):x(n)};for(var m,b=r(8)?a(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;b.length>S;S++)i(v,m=b[S])&&!i(p,m)&&l(p,m,s(v,m));p.prototype=g,g.constructor=p,r(11)(e,"Number",p)}},function(t,n,r){"use strict";var e=r(0),i=r(19),o=r(99),u=r(68),c=1..toFixed,f=Math.floor,a=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",l=function(t,n){for(var r=-1,e=n;++r<6;)e+=t*a[r],a[r]=e%1e7,e=f(e/1e7)},h=function(t){for(var n=6,r=0;--n>=0;)r+=a[n],a[n]=f(r/t),r=r%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==a[t]){var r=String(a[t]);n=""===n?r:n+u.call("0",7-r.length)+r}return n},v=function(t,n,r){return 0===n?r:n%2==1?v(t,n-1,r*t):v(t*t,n/2,r)};e(e.P+e.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(2)((function(){c.call({})}))),"Number",{toFixed:function(t){var n,r,e,c,f=o(this,s),a=i(t),g="",y="0";if(a<0||a>20)throw RangeError(s);if(f!=f)return"NaN";if(f<=-1e21||f>=1e21)return String(f);if(f<0&&(g="-",f=-f),f>1e-21)if(r=(n=function(t){for(var n=0,r=t;r>=4096;)n+=12,r/=4096;for(;r>=2;)n+=1,r/=2;return n}(f*v(2,69,1))-69)<0?f*v(2,-n,1):f/v(2,n,1),r*=4503599627370496,(n=52-n)>0){for(l(0,r),e=a;e>=7;)l(1e7,0),e-=7;for(l(v(10,e,1),0),e=n-1;e>=23;)h(1<<23),e-=23;h(1<<e),l(1,1),h(2),y=p()}else l(0,r),l(1<<-n,0),y=p()+u.call("0",a);return y=a>0?g+((c=y.length)<=a?"0."+u.call("0",a-c)+y:y.slice(0,c-a)+"."+y.slice(c-a)):g+y}})},function(t,n,r){"use strict";var e=r(0),i=r(2),o=r(99),u=1..toPrecision;e(e.P+e.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,r){var e=r(0);e(e.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,r){var e=r(0),i=r(1).isFinite;e(e.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,r){var e=r(0);e(e.S,"Number",{isInteger:r(100)})},function(t,n,r){var e=r(0);e(e.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,r){var e=r(0),i=r(100),o=Math.abs;e(e.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,r){var e=r(0);e(e.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,r){var e=r(0);e(e.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,r){var e=r(0),i=r(98);e(e.S+e.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,r){var e=r(0),i=r(97);e(e.S+e.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,r){var e=r(0),i=r(101),o=Math.sqrt,u=Math.acosh;e(e.S+e.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,r){var e=r(0),i=Math.asinh;e(e.S+e.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,r){var e=r(0),i=Math.atanh;e(e.S+e.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,r){var e=r(0),i=r(69);e(e.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(70);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(169)})},function(t,n,r){var e=r(69),i=Math.pow,o=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),f=i(2,-126);t.exports=Math.fround||function(t){var n,r,i=Math.abs(t),a=e(t);return i<f?a*(i/f/u+1/o-1/o)*f*u:(r=(n=(1+u/o)*i)-(n-i))>c||r!=r?a*(1/0):a*r}},function(t,n,r){var e=r(0),i=Math.abs;e(e.S,"Math",{hypot:function(t,n){for(var r,e,o=0,u=0,c=arguments.length,f=0;u<c;)f<(r=i(arguments[u++]))?(o=o*(e=f/r)*e+1,f=r):o+=r>0?(e=r/f)*e:r;return f===1/0?1/0:f*Math.sqrt(o)}})},function(t,n,r){var e=r(0),i=Math.imul;e(e.S+e.F*r(2)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var r=+t,e=+n,i=65535&r,o=65535&e;return 0|i*o+((65535&r>>>16)*o+i*(65535&e>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(101)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(69)})},function(t,n,r){var e=r(0),i=r(70),o=Math.exp;e(e.S+e.F*r(2)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(70),o=Math.exp;e(e.S,"Math",{tanh:function(t){var n=i(t=+t),r=i(-t);return n==1/0?1:r==1/0?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,r){var e=r(0),i=r(32),o=String.fromCharCode,u=String.fromCodePoint;e(e.S+e.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,r=[],e=arguments.length,u=0;e>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");r.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),i=r(15),o=r(6);e(e.S,"String",{raw:function(t){for(var n=i(t.raw),r=o(n.length),e=arguments.length,u=[],c=0;r>c;)u.push(String(n[c++])),c<e&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,r){"use strict";r(39)("trim",(function(t){return function(){return t(this,3)}}))},function(t,n,r){"use strict";var e=r(71)(!0);r(72)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,r=this._i;return r>=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})}))},function(t,n,r){"use strict";var e=r(0),i=r(71)(!1);e(e.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,r){"use strict";var e=r(0),i=r(6),o=r(73),u="".endsWith;e(e.P+e.F*r(75)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),r=arguments.length>1?arguments[1]:void 0,e=i(n.length),c=void 0===r?e:Math.min(i(r),e),f=String(t);return u?u.call(n,f,c):n.slice(c-f.length,c)===f}})},function(t,n,r){"use strict";var e=r(0),i=r(73);e(e.P+e.F*r(75)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,r){var e=r(0);e(e.P,"String",{repeat:r(68)})},function(t,n,r){"use strict";var e=r(0),i=r(6),o=r(73),u="".startsWith;e(e.P+e.F*r(75)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),r=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),e=String(t);return u?u.call(n,e,r):n.slice(r,r+e.length)===e}})},function(t,n,r){"use strict";r(12)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,r){"use strict";r(12)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,r){"use strict";r(12)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,r){"use strict";r(12)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,r){"use strict";r(12)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,r){"use strict";r(12)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,r){"use strict";r(12)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,r){"use strict";r(12)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,r){"use strict";r(12)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,r){"use strict";r(12)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,r){"use strict";r(12)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,r){"use strict";r(12)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,r){"use strict";r(12)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,r){var e=r(0);e(e.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,r){"use strict";var e=r(0),i=r(10),o=r(26);e(e.P+e.F*r(2)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),r=o(n);return"number"!=typeof r||isFinite(r)?n.toISOString():null}})},function(t,n,r){var e=r(0),i=r(204);e(e.P+e.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,r){"use strict";var e=r(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=e((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!e((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),r=t.getUTCMilliseconds(),e=n<0?"-":n>9999?"+":"";return e+("00000"+Math.abs(n)).slice(e?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(r>99?r:"0"+u(r))+"Z"}:o},function(t,n,r){var e=Date.prototype,i=e.toString,o=e.getTime;new Date(NaN)+""!="Invalid Date"&&r(11)(e,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,r){var e=r(5)("toPrimitive"),i=Date.prototype;e in i||r(14)(i,e,r(207))},function(t,n,r){"use strict";var e=r(3),i=r(26);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(e(this),"number"!=t)}},function(t,n,r){var e=r(0);e(e.S,"Array",{isArray:r(51)})},function(t,n,r){"use strict";var e=r(17),i=r(0),o=r(10),u=r(103),c=r(76),f=r(6),a=r(77),s=r(78);i(i.S+i.F*!r(52)((function(t){Array.from(t)})),"Array",{from:function(t){var n,r,i,l,h=o(t),p="function"==typeof this?this:Array,v=arguments.length,g=v>1?arguments[1]:void 0,y=void 0!==g,d=0,x=s(h);if(y&&(g=e(g,v>2?arguments[2]:void 0,2)),null==x||p==Array&&c(x))for(r=new p(n=f(h.length));n>d;d++)a(r,d,y?g(h[d],d):h[d]);else for(l=x.call(h),r=new p;!(i=l.next()).done;d++)a(r,d,y?u(l,g,[i.value,d],!0):i.value);return r.length=d,r}})},function(t,n,r){"use strict";var e=r(0),i=r(77);e(e.S+e.F*r(2)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,r=new("function"==typeof this?this:Array)(n);n>t;)i(r,t,arguments[t++]);return r.length=n,r}})},function(t,n,r){"use strict";var e=r(0),i=r(15),o=[].join;e(e.P+e.F*(r(44)!=Object||!r(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,r){"use strict";var e=r(0),i=r(64),o=r(23),u=r(32),c=r(6),f=[].slice;e(e.P+e.F*r(2)((function(){i&&f.call(i)})),"Array",{slice:function(t,n){var r=c(this.length),e=o(this);if(n=void 0===n?r:n,"Array"==e)return f.call(this,t,n);for(var i=u(t,r),a=u(n,r),s=c(a-i),l=new Array(s),h=0;h<s;h++)l[h]="String"==e?this.charAt(i+h):this[i+h];return l}})},function(t,n,r){"use strict";var e=r(0),i=r(18),o=r(10),u=r(2),c=[].sort,f=[1,2,3];e(e.P+e.F*(u((function(){f.sort(void 0)}))||!u((function(){f.sort(null)}))||!r(16)(c)),"Array",{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,n,r){"use strict";var e=r(0),i=r(22)(0),o=r(16)([].forEach,!0);e(e.P+e.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,n,r){var e=r(4),i=r(51),o=r(5)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),e(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,r){"use strict";var e=r(0),i=r(22)(1);e(e.P+e.F*!r(16)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(0),i=r(22)(2);e(e.P+e.F*!r(16)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(0),i=r(22)(3);e(e.P+e.F*!r(16)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(0),i=r(22)(4);e(e.P+e.F*!r(16)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(0),i=r(105);e(e.P+e.F*!r(16)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,n,r){"use strict";var e=r(0),i=r(105);e(e.P+e.F*!r(16)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,n,r){"use strict";var e=r(0),i=r(49)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;e(e.P+e.F*(u||!r(16)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(0),i=r(15),o=r(19),u=r(6),c=[].lastIndexOf,f=!!c&&1/[1].lastIndexOf(1,-0)<0;e(e.P+e.F*(f||!r(16)(c)),"Array",{lastIndexOf:function(t){if(f)return c.apply(this,arguments)||0;var n=i(this),r=u(n.length),e=r-1;for(arguments.length>1&&(e=Math.min(e,o(arguments[1]))),e<0&&(e=r+e);e>=0;e--)if(e in n&&n[e]===t)return e||0;return-1}})},function(t,n,r){var e=r(0);e(e.P,"Array",{copyWithin:r(106)}),r(36)("copyWithin")},function(t,n,r){var e=r(0);e(e.P,"Array",{fill:r(79)}),r(36)("fill")},function(t,n,r){"use strict";var e=r(0),i=r(22)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),e(e.P+e.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(36)("find")},function(t,n,r){"use strict";var e=r(0),i=r(22)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),e(e.P+e.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(36)(o)},function(t,n,r){r(41)("Array")},function(t,n,r){var e=r(1),i=r(67),o=r(9).f,u=r(34).f,c=r(74),f=r(53),a=e.RegExp,s=a,l=a.prototype,h=/a/g,p=/a/g,v=new a(h)!==h;if(r(8)&&(!v||r(2)((function(){return p[r(5)("match")]=!1,a(h)!=h||a(p)==p||"/a/i"!=a(h,"i")})))){a=function(t,n){var r=this instanceof a,e=c(t),o=void 0===n;return!r&&e&&t.constructor===a&&o?t:i(v?new s(e&&!o?t.source:t,n):s((e=t instanceof a)?t.source:t,e&&o?f.call(t):n),r?this:l,a)};for(var g=function(t){t in a||o(a,t,{configurable:!0,get:function(){return s[t]},set:function(n){s[t]=n}})},y=u(s),d=0;y.length>d;)g(y[d++]);l.constructor=a,a.prototype=l,r(11)(e,"RegExp",a)}r(41)("RegExp")},function(t,n,r){"use strict";r(109);var e=r(3),i=r(53),o=r(8),u=/./.toString,c=function(t){r(11)(RegExp.prototype,"toString",t,!0)};r(2)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?c((function(){var t=e(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&c((function(){return u.call(this)}))},function(t,n,r){"use strict";var e=r(3),i=r(6),o=r(82),u=r(54);r(55)("match",1,(function(t,n,r,c){return[function(r){var e=t(this),i=null==r?void 0:r[n];return void 0!==i?i.call(r,e):new RegExp(r)[n](String(e))},function(t){var n=c(r,t,this);if(n.done)return n.value;var f=e(t),a=String(this);if(!f.global)return u(f,a);var s=f.unicode;f.lastIndex=0;for(var l,h=[],p=0;null!==(l=u(f,a));){var v=String(l[0]);h[p]=v,""===v&&(f.lastIndex=o(a,i(f.lastIndex),s)),p++}return 0===p?null:h}]}))},function(t,n,r){"use strict";var e=r(3),i=r(10),o=r(6),u=r(19),c=r(82),f=r(54),a=Math.max,s=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;r(55)("replace",2,(function(t,n,r,v){return[function(e,i){var o=t(this),u=null==e?void 0:e[n];return void 0!==u?u.call(e,o,i):r.call(String(o),e,i)},function(t,n){var i=v(r,t,this,n);if(i.done)return i.value;var l=e(t),h=String(this),p="function"==typeof n;p||(n=String(n));var y=l.global;if(y){var d=l.unicode;l.lastIndex=0}for(var x=[];;){var m=f(l,h);if(null===m)break;if(x.push(m),!y)break;""===String(m[0])&&(l.lastIndex=c(h,o(l.lastIndex),d))}for(var b,S="",w=0,_=0;_<x.length;_++){m=x[_];for(var E=String(m[0]),O=a(s(u(m.index),h.length),0),P=[],F=1;F<m.length;F++)P.push(void 0===(b=m[F])?b:String(b));var M=m.groups;if(p){var A=[E].concat(P,O,h);void 0!==M&&A.push(M);var j=String(n.apply(void 0,A))}else j=g(E,h,O,P,M,n);O>=w&&(S+=h.slice(w,O)+j,w=O+E.length)}return S+h.slice(w)}];function g(t,n,e,o,u,c){var f=e+t.length,a=o.length,s=p;return void 0!==u&&(u=i(u),s=h),r.call(c,s,(function(r,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,e);case"'":return n.slice(f);case"<":c=u[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>a){var h=l(s/10);return 0===h?r:h<=a?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):r}c=o[s-1]}return void 0===c?"":c}))}}))},function(t,n,r){"use strict";var e=r(3),i=r(94),o=r(54);r(55)("search",1,(function(t,n,r,u){return[function(r){var e=t(this),i=null==r?void 0:r[n];return void 0!==i?i.call(r,e):new RegExp(r)[n](String(e))},function(t){var n=u(r,t,this);if(n.done)return n.value;var c=e(t),f=String(this),a=c.lastIndex;i(a,0)||(c.lastIndex=0);var s=o(c,f);return i(c.lastIndex,a)||(c.lastIndex=a),null===s?-1:s.index}]}))},function(t,n,r){"use strict";var e=r(74),i=r(3),o=r(47),u=r(82),c=r(6),f=r(54),a=r(81),s=r(2),l=Math.min,h=[].push,p=!s((function(){RegExp(4294967295,"y")}));r(55)("split",2,(function(t,n,r,s){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!e(t))return r.call(i,t,n);for(var o,u,c,f=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,p=void 0===n?4294967295:n>>>0,v=new RegExp(t.source,s+"g");(o=a.call(v,i))&&!((u=v.lastIndex)>l&&(f.push(i.slice(l,o.index)),o.length>1&&o.index<i.length&&h.apply(f,o.slice(1)),c=o[0].length,l=u,f.length>=p));)v.lastIndex===o.index&&v.lastIndex++;return l===i.length?!c&&v.test("")||f.push(""):f.push(i.slice(l)),f.length>p?f.slice(0,p):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:r.call(this,t,n)}:r,[function(r,e){var i=t(this),o=null==r?void 0:r[n];return void 0!==o?o.call(r,i,e):v.call(String(i),r,e)},function(t,n){var e=s(v,t,this,n,v!==r);if(e.done)return e.value;var a=i(t),h=String(this),g=o(a,RegExp),y=a.unicode,d=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(p?"y":"g"),x=new g(p?a:"^(?:"+a.source+")",d),m=void 0===n?4294967295:n>>>0;if(0===m)return[];if(0===h.length)return null===f(x,h)?[h]:[];for(var b=0,S=0,w=[];S<h.length;){x.lastIndex=p?S:0;var _,E=f(x,p?h:h.slice(S));if(null===E||(_=l(c(x.lastIndex+(p?0:S)),h.length))===b)S=u(h,S,y);else{if(w.push(h.slice(b,S)),w.length===m)return w;for(var O=1;O<=E.length-1;O++)if(w.push(E[O]),w.length===m)return w;S=b=_}}return w.push(h.slice(b)),w}]}))},function(t,n,r){var e=r(1),i=r(83).set,o=e.MutationObserver||e.WebKitMutationObserver,u=e.process,c=e.Promise,f="process"==r(23)(u);t.exports=function(){var t,n,r,a=function(){var e,i;for(f&&(e=u.domain)&&e.exit();t;){i=t.fn,t=t.next;try{i()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(f)r=function(){u.nextTick(a)};else if(!o||e.navigator&&e.navigator.standalone)if(c&&c.resolve){var s=c.resolve(void 0);r=function(){s.then(a)}}else r=function(){i.call(e,a)};else{var l=!0,h=document.createTextNode("");new o(a).observe(h,{characterData:!0}),r=function(){h.data=l=!l}}return function(e){var i={fn:e,next:void 0};n&&(n.next=i),t||(t=i,r()),n=i}}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,r){"use strict";var e=r(113),i=r(37);t.exports=r(58)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var n=e.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return e.def(i(this,"Map"),0===t?0:t,n)}},e,!0)},function(t,n,r){"use strict";var e=r(113),i=r(37);t.exports=r(58)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return e.def(i(this,"Set"),t=0===t?0:t,t)}},e)},function(t,n,r){"use strict";var e,i=r(1),o=r(22)(0),u=r(11),c=r(27),f=r(93),a=r(114),s=r(4),l=r(37),h=r(37),p=!i.ActiveXObject&&"ActiveXObject"in i,v=c.getWeak,g=Object.isExtensible,y=a.ufstore,d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},x={get:function(t){if(s(t)){var n=v(t);return!0===n?y(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return a.def(l(this,"WeakMap"),t,n)}},m=t.exports=r(58)("WeakMap",d,x,a,!0,!0);h&&p&&(f((e=a.getConstructor(d,"WeakMap")).prototype,x),c.NEED=!0,o(["delete","has","get","set"],(function(t){var n=m.prototype,r=n[t];u(n,t,(function(n,i){if(s(n)&&!g(n)){this._f||(this._f=new e);var o=this._f[t](n,i);return"set"==t?this:o}return r.call(this,n,i)}))})))},function(t,n,r){"use strict";var e=r(114),i=r(37);r(58)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return e.def(i(this,"WeakSet"),t,!0)}},e,!1,!0)},function(t,n,r){"use strict";var e=r(0),i=r(59),o=r(84),u=r(3),c=r(32),f=r(6),a=r(4),s=r(1).ArrayBuffer,l=r(47),h=o.ArrayBuffer,p=o.DataView,v=i.ABV&&s.isView,g=h.prototype.slice,y=i.VIEW;e(e.G+e.W+e.F*(s!==h),{ArrayBuffer:h}),e(e.S+e.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||a(t)&&y in t}}),e(e.P+e.U+e.F*r(2)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==g&&void 0===n)return g.call(u(this),t);for(var r=u(this).byteLength,e=c(t,r),i=c(void 0===n?r:n,r),o=new(l(this,h))(f(i-e)),a=new p(this),s=new p(o),v=0;e<i;)s.setUint8(v++,a.getUint8(e++));return o}}),r(41)("ArrayBuffer")},function(t,n,r){var e=r(0);e(e.G+e.W+e.F*!r(59).ABV,{DataView:r(84).DataView})},function(t,n,r){r(25)("Int8",1,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Uint8",1,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Uint8",1,(function(t){return function(n,r,e){return t(this,n,r,e)}}),!0)},function(t,n,r){r(25)("Int16",2,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Uint16",2,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Int32",4,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Uint32",4,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Float32",4,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){r(25)("Float64",8,(function(t){return function(n,r,e){return t(this,n,r,e)}}))},function(t,n,r){var e=r(0),i=r(18),o=r(3),u=(r(1).Reflect||{}).apply,c=Function.apply;e(e.S+e.F*!r(2)((function(){u((function(){}))})),"Reflect",{apply:function(t,n,r){var e=i(t),f=o(r);return u?u(e,n,f):c.call(e,n,f)}})},function(t,n,r){var e=r(0),i=r(33),o=r(18),u=r(3),c=r(4),f=r(2),a=r(95),s=(r(1).Reflect||{}).construct,l=f((function(){function t(){}return!(s((function(){}),[],t)instanceof t)})),h=!f((function(){s((function(){}))}));e(e.S+e.F*(l||h),"Reflect",{construct:function(t,n){o(t),u(n);var r=arguments.length<3?t:o(arguments[2]);if(h&&!l)return s(t,n,r);if(t==r){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var e=[null];return e.push.apply(e,n),new(a.apply(t,e))}var f=r.prototype,p=i(c(f)?f:Object.prototype),v=Function.apply.call(t,p,n);return c(v)?v:p}})},function(t,n,r){var e=r(9),i=r(0),o=r(3),u=r(26);i(i.S+i.F*r(2)((function(){Reflect.defineProperty(e.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,n,r){o(t),n=u(n,!0),o(r);try{return e.f(t,n,r),!0}catch(t){return!1}}})},function(t,n,r){var e=r(0),i=r(20).f,o=r(3);e(e.S,"Reflect",{deleteProperty:function(t,n){var r=i(o(t),n);return!(r&&!r.configurable)&&delete t[n]}})},function(t,n,r){"use strict";var e=r(0),i=r(3),o=function(t){this._t=i(t),this._i=0;var n,r=this._k=[];for(n in t)r.push(n)};r(102)(o,"Object",(function(){var t,n=this._k;do{if(this._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),e(e.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,r){var e=r(20),i=r(35),o=r(13),u=r(0),c=r(4),f=r(3);u(u.S,"Reflect",{get:function t(n,r){var u,a,s=arguments.length<3?n:arguments[2];return f(n)===s?n[r]:(u=e.f(n,r))?o(u,"value")?u.value:void 0!==u.get?u.get.call(s):void 0:c(a=i(n))?t(a,r,s):void 0}})},function(t,n,r){var e=r(20),i=r(0),o=r(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return e.f(o(t),n)}})},function(t,n,r){var e=r(0),i=r(35),o=r(3);e(e.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,r){var e=r(0);e(e.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,r){var e=r(0),i=r(3),o=Object.isExtensible;e(e.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,r){var e=r(0);e(e.S,"Reflect",{ownKeys:r(116)})},function(t,n,r){var e=r(0),i=r(3),o=Object.preventExtensions;e(e.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,r){var e=r(9),i=r(20),o=r(35),u=r(13),c=r(0),f=r(28),a=r(3),s=r(4);c(c.S,"Reflect",{set:function t(n,r,c){var l,h,p=arguments.length<4?n:arguments[3],v=i.f(a(n),r);if(!v){if(s(h=o(n)))return t(h,r,c,p);v=f(0)}if(u(v,"value")){if(!1===v.writable||!s(p))return!1;if(l=i.f(p,r)){if(l.get||l.set||!1===l.writable)return!1;l.value=c,e.f(p,r,l)}else e.f(p,r,f(0,c));return!0}return void 0!==v.set&&(v.set.call(p,c),!0)}})},function(t,n,r){var e=r(0),i=r(65);i&&e(e.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,r){r(267),t.exports=r(7).Array.includes},function(t,n,r){"use strict";var e=r(0),i=r(49)(!0);e(e.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(36)("includes")},function(t,n,r){r(269),t.exports=r(7).Array.flatMap},function(t,n,r){"use strict";var e=r(0),i=r(270),o=r(10),u=r(6),c=r(18),f=r(104);e(e.P,"Array",{flatMap:function(t){var n,r,e=o(this);return c(t),n=u(e.length),r=f(e,0),i(r,e,e,n,0,1,t,arguments[1]),r}}),r(36)("flatMap")},function(t,n,r){"use strict";var e=r(51),i=r(4),o=r(6),u=r(17),c=r(5)("isConcatSpreadable");t.exports=function t(n,r,f,a,s,l,h,p){for(var v,g,y=s,d=0,x=!!h&&u(h,p,3);d<a;){if(d in f){if(v=x?x(f[d],d,r):f[d],g=!1,i(v)&&(g=void 0!==(g=v[c])?!!g:e(v)),g&&l>0)y=t(n,r,v,o(v.length),y,l-1)-1;else{if(y>=9007199254740991)throw TypeError();n[y]=v}y++}d++}return y}},function(t,n,r){r(272),t.exports=r(7).String.padStart},function(t,n,r){"use strict";var e=r(0),i=r(117),o=r(57),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);e(e.P+e.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,r){r(274),t.exports=r(7).String.padEnd},function(t,n,r){"use strict";var e=r(0),i=r(117),o=r(57),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);e(e.P+e.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,r){r(276),t.exports=r(7).String.trimLeft},function(t,n,r){"use strict";r(39)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,r){r(278),t.exports=r(7).String.trimRight},function(t,n,r){"use strict";r(39)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,r){r(280),t.exports=r(61).f("asyncIterator")},function(t,n,r){r(89)("asyncIterator")},function(t,n,r){r(282),t.exports=r(7).Object.getOwnPropertyDescriptors},function(t,n,r){var e=r(0),i=r(116),o=r(15),u=r(20),c=r(77);e(e.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,r,e=o(t),f=u.f,a=i(e),s={},l=0;a.length>l;)void 0!==(r=f(e,n=a[l++]))&&c(s,n,r);return s}})},function(t,n,r){r(284),t.exports=r(7).Object.values},function(t,n,r){var e=r(0),i=r(118)(!1);e(e.S,"Object",{values:function(t){return i(t)}})},function(t,n,r){r(286),t.exports=r(7).Object.entries},function(t,n,r){var e=r(0),i=r(118)(!0);e(e.S,"Object",{entries:function(t){return i(t)}})},function(t,n,r){"use strict";r(110),r(288),t.exports=r(7).Promise.finally},function(t,n,r){"use strict";var e=r(0),i=r(7),o=r(1),u=r(47),c=r(112);e(e.P+e.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return c(n,t()).then((function(){return r}))}:t,r?function(r){return c(n,t()).then((function(){throw r}))}:t)}})},function(t,n,r){r(290),r(291),r(292),t.exports=r(7)},function(t,n,r){var e=r(1),i=r(0),o=r(57),u=[].slice,c=/MSIE .\./.test(o),f=function(t){return function(n,r){var e=arguments.length>2,i=!!e&&u.call(arguments,2);return t(e?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,r)}};i(i.G+i.B+i.F*c,{setTimeout:f(e.setTimeout),setInterval:f(e.setInterval)})},function(t,n,r){var e=r(0),i=r(83);e(e.G+e.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,r){for(var e=r(80),i=r(31),o=r(11),u=r(1),c=r(14),f=r(40),a=r(5),s=a("iterator"),l=a("toStringTag"),h=f.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=i(p),g=0;g<v.length;g++){var y,d=v[g],x=p[d],m=u[d],b=m&&m.prototype;if(b&&(b[s]||c(b,s,h),b[l]||c(b,l,d),f[d]=h,x))for(y in e)b[y]||o(b,y,e[y],!0)}},function(t,n,r){var e=function(t){"use strict";var n,r=Object.prototype,e=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,n,r,e){var i=n&&n.prototype instanceof g?n:g,o=Object.create(i.prototype),u=new F(e||[]);return o._invoke=function(t,n,r){var e=s;return function(i,o){if(e===h)throw new Error("Generator is already running");if(e===p){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var c=E(u,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(e===s)throw e=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);e=h;var f=a(t,n,r);if("normal"===f.type){if(e=r.done?p:l,f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(e=p,r.method="throw",r.arg=f.arg)}}}(t,r,u),o}function a(t,n,r){try{return{type:"normal",arg:t.call(n,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var s="suspendedStart",l="suspendedYield",h="executing",p="completed",v={};function g(){}function y(){}function d(){}var x={};x[o]=function(){return this};var m=Object.getPrototypeOf,b=m&&m(m(M([])));b&&b!==r&&e.call(b,o)&&(x=b);var S=d.prototype=g.prototype=Object.create(x);function w(t){["next","throw","return"].forEach((function(n){t[n]=function(t){return this._invoke(n,t)}}))}function _(t){var n;this._invoke=function(r,i){function o(){return new Promise((function(n,o){!function n(r,i,o,u){var c=a(t[r],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"==typeof s&&e.call(s,"__await")?Promise.resolve(s.__await).then((function(t){n("next",t,o,u)}),(function(t){n("throw",t,o,u)})):Promise.resolve(s).then((function(t){f.value=t,o(f)}),(function(t){return n("throw",t,o,u)}))}u(c.arg)}(r,i,n,o)}))}return n=n?n.then(o,o):o()}}function E(t,r){var e=t.iterator[r.method];if(e===n){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=n,E(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=a(e,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=n),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function P(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function r(){for(;++i<t.length;)if(e.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=n,r.done=!0,r};return u.next=u}}return{next:A}}function A(){return{value:n,done:!0}}return y.prototype=S.constructor=d,d.constructor=y,d[c]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},w(_.prototype),_.prototype[u]=function(){return this},t.AsyncIterator=_,t.async=function(n,r,e,i){var o=new _(f(n,r,e,i));return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(S),S[c]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var r in t)n.push(r);return n.reverse(),function r(){for(;n.length;){var e=n.pop();if(e in t)return r.value=e,r.done=!1,r}return r.done=!0,r}},t.values=M,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&e.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(e,i){return c.type="throw",c.arg=t,r.next=e,i&&(r.method="next",r.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],c=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var f=e.call(u,"catchLoc"),a=e.call(u,"finallyLoc");if(f&&a){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(f){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,n){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&e.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),v},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var e=r.completion;if("throw"===e.type){var i=e.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:M(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=n),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},function(t,n,r){r(295),t.exports=r(119).global},function(t,n,r){var e=r(296);e(e.G,{global:r(85)})},function(t,n,r){var e=r(85),i=r(119),o=r(297),u=r(299),c=r(306),f=function(t,n,r){var a,s,l,h=t&f.F,p=t&f.G,v=t&f.S,g=t&f.P,y=t&f.B,d=t&f.W,x=p?i:i[n]||(i[n]={}),m=x.prototype,b=p?e:v?e[n]:(e[n]||{}).prototype;for(a in p&&(r=n),r)(s=!h&&b&&void 0!==b[a])&&c(x,a)||(l=s?b[a]:r[a],x[a]=p&&"function"!=typeof b[a]?r[a]:y&&s?o(l,e):d&&b[a]==l?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):g&&"function"==typeof l?o(Function.call,l):l,g&&((x.virtual||(x.virtual={}))[a]=l,t&f.R&&m&&!m[a]&&u(m,a,l)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n,r){var e=r(298);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(300),i=r(305);t.exports=r(87)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(301),i=r(302),o=r(304),u=Object.defineProperty;n.f=r(87)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(86);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){t.exports=!r(87)&&!r(120)((function(){return 7!=Object.defineProperty(r(303)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(86),i=r(85).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(86);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}}]);
|
assets/js/mollie-components.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n){var t=".cardToken",r=".mollie-components",o="form",c=".wc_payment_methods",a="#mollie-notice";function u(){return!1}function i(e){return e?e.querySelector(c):null}function l(e,n){return n?n.querySelector(".payment_method_mollie_wc_gateway_".concat(e)):null}function s(e){return e?e.querySelector(a):null}function f(e){return e?e.querySelector(r):null}function m(e,n){var t,r,o,c=y(i(document)).parentNode||null,a=s(document),u=(r=(t=n).content,o=t.type,'\n <div id="mollie-notice" class="woocommerce-'.concat(o,'">\n ').concat(r,"\n </div>\n "));a&&a.remove(),c?(c.insertAdjacentHTML("beforebegin",u),function(e){var n=s(document);n||(n=i(document));e.scroll_to_notices(e(n))}(e)):alert(n.content)}function d(e){var n,r,o;return regeneratorRuntime.async((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,regeneratorRuntime.awrap(e.createToken(t));case 2:if(n=c.sent,r=n.token,!(o=n.error)){c.next=7;break}throw new Error(o.message||"");case 7:return c.abrupt("return",r);case 8:case"end":return c.stop()}}))}function p(e,n){n&&(n.value=e,n.setAttribute("value",e))}function y(e){return e?e.closest(o):null}function b(e){e.off("checkout_place_order",u),e.off("submit",g)}function v(e){var n=l(e,document),t=n?n.querySelector("#payment_method_mollie_wc_gateway_".concat(e)):null;return t&&t.checked||!1}function g(e){var n,r,o,c,a,u,i,l,s,f,g,_,w;return regeneratorRuntime.async((function(h){for(;;)switch(h.prev=h.next){case 0:if(n="",r=e.data,o=r.jQuery,c=r.mollie,a=r.gateway,u=r.gatewayContainer,i=r.messages,l=y(u),s=o(l),f=o(document.body),v(a)){h.next=8;break}return b(s),h.abrupt("return");case 8:return e.preventDefault(),e.stopImmediatePropagation(),h.prev=10,h.next=13,regeneratorRuntime.awrap(d(c));case 13:n=h.sent,h.next=23;break;case 16:return h.prev=16,h.t0=h.catch(10),g=h.t0,_=g.message,message=void 0===_?i.defaultErrorMessage:_,(w=g)&&m(o,{content:w,type:"error"}),s.removeClass("processing").unblock(),f.trigger("checkout_error"),h.abrupt("return");case 23:b(s),n&&p(n,u.querySelector(t)),s.submit();case 26:case"end":return h.stop()}}),null,null,[[10,16]])}function _(e,n,t,r,o){t.forEach((function(t){return function(e,n,t,r,o){var c=t.name,a=function(e,n,t,r){var o;return r.has(e)&&(o=r.get(e)),o||(o=n.createComponent(e,t)),o}(c,e,n,r);f(o).insertAdjacentHTML("beforeend",'<div id="'.concat(c,'"></div>')),a.mount("#".concat(c));var u,i,l=(u=c,(i=o)?i.querySelector(".mollie-component--".concat(u)):null);l?(!function(e,n){var t=n.label;e.insertAdjacentHTML("beforebegin",'<b class="mollie-component-label">'.concat(t,"</b>"))}(l,t),function(e,n){var t=n.name;e.insertAdjacentHTML("afterend",'<div role="alert" id="'.concat(t,'-errors"></div>'))}(l,t),!r.has(c)&&r.set(c,a)):console.warn("Component ".concat(c," not found in the DOM. Probably had problem during mount."))}(e,n,t,r,o)}))}!function(e){var n=e._,t=e.Mollie,r=e.mollieComponentsSettings,o=e.jQuery;if(!n.isEmpty(r)&&n.isFunction(t)){var c="updated_checkout",a=new Map,i=o(document),s=r.merchantProfileId,m=r.options,d=r.isCheckoutPayPage,p=new t(s,m);d&&(c="payment_method_selected"),i.on(c,(function(){return function(e,n,t,r){t.options,t.merchantProfileId;var o=t.componentsSettings,c=t.componentsAttributes,a=t.enabledGateways,i=t.messages;!function(e){e.forEach((function(e){return e.unmount()}))}(r),a.forEach((function(t){var a,s=l(t,document),m=f(s),d=y(s),p=e(d);s?d?(b(p),(a=m)&&(a.innerText=""),function(e){e.insertAdjacentHTML("beforeend",'<input type="hidden" name="cardToken" class="cardToken" value="" />')}(m),_(n,o[t],c,r,s),p.on("checkout_place_order",u),p.on("submit",null,{jQuery:e,mollie:n,gateway:t,gatewayContainer:s,messages:i},g)):console.warn("Cannot initialize Mollie Components, no form found."):console.warn("Cannot initialize Mollie Components for gateway ".concat(t,"."))}))}(o,p,r,a)}))}}(window)}]);
|
assets/js/settings.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
jQuery(function($) {
|
2 |
-
$('#mollie-payments-for-woocommerce_test_mode_enabled').change(function() {
|
3 |
-
if ($(this).is(':checked'))
|
4 |
-
{
|
5 |
-
$('#mollie-payments-for-woocommerce_test_api_key').attr('required', true).closest('tr').show();
|
6 |
-
}
|
7 |
-
else
|
8 |
-
{
|
9 |
-
$('#mollie-payments-for-woocommerce_test_api_key').removeAttr('required').closest('tr').hide();
|
10 |
-
}
|
11 |
-
}).change();
|
12 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/settings.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t){jQuery((function(e){e("#mollie-payments-for-woocommerce_test_mode_enabled").change((function(){e(this).is(":checked")?e("#mollie-payments-for-woocommerce_test_api_key").attr("required",!0).closest("tr").show():e("#mollie-payments-for-woocommerce_test_api_key").removeAttr("required").closest("tr").hide()})).change()}))}]);
|
inc/functions.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once __DIR__ . '/utils.php';
|
4 |
+
require_once __DIR__ . '/woocommerce.php';
|
inc/settings/mollie_components.php
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return [
|
4 |
+
[
|
5 |
+
'type' => 'title',
|
6 |
+
'id' => 'mollie_components_styles',
|
7 |
+
'title' => _x(
|
8 |
+
'Base Styles',
|
9 |
+
'Mollie Components Settings',
|
10 |
+
'mollie-payments-for-woocommerce'
|
11 |
+
),
|
12 |
+
],
|
13 |
+
Mollie_WC_Components_StylesPropertiesDictionary::BACKGROUND_COLOR => [
|
14 |
+
'type' => 'color',
|
15 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::BACKGROUND_COLOR,
|
16 |
+
'title' => _x('Background Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
17 |
+
'default' => '#ffffff',
|
18 |
+
],
|
19 |
+
Mollie_WC_Components_StylesPropertiesDictionary::TEXT_COLOR => [
|
20 |
+
'type' => 'color',
|
21 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::TEXT_COLOR,
|
22 |
+
'title' => _x('Text Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
23 |
+
'default' => '#000000',
|
24 |
+
],
|
25 |
+
Mollie_WC_Components_StylesPropertiesDictionary::INPUT_PLACEHOLDER => [
|
26 |
+
'type' => 'color',
|
27 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::INPUT_PLACEHOLDER,
|
28 |
+
'title' => _x('Placeholder Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
29 |
+
'default' => '#cccccc',
|
30 |
+
],
|
31 |
+
Mollie_WC_Components_StylesPropertiesDictionary::FONT_SIZE => [
|
32 |
+
'type' => 'text',
|
33 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::FONT_SIZE,
|
34 |
+
'title' => _x('Font Size', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
35 |
+
'desc_tip' => _x(
|
36 |
+
'Font size define the size for the font in the components. `em`, `px`, `rem` units are allowed.',
|
37 |
+
'Mollie Components Settings',
|
38 |
+
'mollie-payments-for-woocommerce'
|
39 |
+
),
|
40 |
+
'default' => '16px',
|
41 |
+
],
|
42 |
+
Mollie_WC_Components_StylesPropertiesDictionary::FONT_WEIGHT => [
|
43 |
+
'type' => 'select',
|
44 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::FONT_WEIGHT,
|
45 |
+
'title' => _x('Font Weight', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
46 |
+
'default' => 'normal',
|
47 |
+
'options' => [
|
48 |
+
'lighter' => _x('Lighter', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
49 |
+
'normal' => _x('Normal', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
50 |
+
'bolder' => _x('Bold', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
51 |
+
],
|
52 |
+
],
|
53 |
+
Mollie_WC_Components_StylesPropertiesDictionary::LETTER_SPACING => [
|
54 |
+
'type' => 'number',
|
55 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::LETTER_SPACING,
|
56 |
+
'title' => _x('Letter Spacing', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
57 |
+
'default' => '0',
|
58 |
+
],
|
59 |
+
Mollie_WC_Components_StylesPropertiesDictionary::LINE_HEIGHT => [
|
60 |
+
'type' => 'number',
|
61 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::LINE_HEIGHT,
|
62 |
+
'title' => _x('Line Height', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
63 |
+
'default' => '1.2',
|
64 |
+
'custom_attributes' => [
|
65 |
+
'step' => '.1',
|
66 |
+
],
|
67 |
+
],
|
68 |
+
Mollie_WC_Components_StylesPropertiesDictionary::PADDING => [
|
69 |
+
'type' => 'text',
|
70 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::PADDING,
|
71 |
+
'title' => _x('Padding', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
72 |
+
'desc_tip' => _x(
|
73 |
+
'Add padding to the components. Eg. `16px 16px 16px 16px` and `em`, `px`, `rem` units are allowed.',
|
74 |
+
'Mollie Components Settings',
|
75 |
+
'mollie-payments-for-woocommerce'
|
76 |
+
),
|
77 |
+
'default' => '.63em',
|
78 |
+
],
|
79 |
+
Mollie_WC_Components_StylesPropertiesDictionary::TEXT_ALIGN => [
|
80 |
+
'type' => 'select',
|
81 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::TEXT_ALIGN,
|
82 |
+
'title' => _x('Text Align', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
83 |
+
'default' => 'left',
|
84 |
+
'options' => [
|
85 |
+
'left' => _x('Left', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
86 |
+
'right' => _x('Right', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
87 |
+
'center' => _x('Center', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
88 |
+
'justify' => _x('Justify', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
89 |
+
],
|
90 |
+
],
|
91 |
+
Mollie_WC_Components_StylesPropertiesDictionary::TEXT_TRANSFORM => [
|
92 |
+
'type' => 'select',
|
93 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::TEXT_TRANSFORM,
|
94 |
+
'title' => _x('Text Transform', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
95 |
+
'default' => 'none',
|
96 |
+
'options' => [
|
97 |
+
'none' => _x(
|
98 |
+
'None',
|
99 |
+
'Mollie Components Settings',
|
100 |
+
'mollie-payments-for-woocommerce'
|
101 |
+
),
|
102 |
+
'capitalize' => _x(
|
103 |
+
'Capitalize',
|
104 |
+
'Mollie Components Settings',
|
105 |
+
'mollie-payments-for-woocommerce'
|
106 |
+
),
|
107 |
+
'uppercase' => _x(
|
108 |
+
'Uppercase',
|
109 |
+
'Mollie Components Settings',
|
110 |
+
'mollie-payments-for-woocommerce'
|
111 |
+
),
|
112 |
+
'lowercase' => _x(
|
113 |
+
'Lowercase',
|
114 |
+
'Mollie Components Settings',
|
115 |
+
'mollie-payments-for-woocommerce'
|
116 |
+
),
|
117 |
+
'full-width' => _x(
|
118 |
+
'Full Width',
|
119 |
+
'Mollie Components Settings',
|
120 |
+
'mollie-payments-for-woocommerce'
|
121 |
+
),
|
122 |
+
'full-size-kana' => _x(
|
123 |
+
'Full Size Kana',
|
124 |
+
'Mollie Components Settings',
|
125 |
+
'mollie-payments-for-woocommerce'
|
126 |
+
),
|
127 |
+
],
|
128 |
+
],
|
129 |
+
[
|
130 |
+
'type' => 'sectionend',
|
131 |
+
'id' => 'mollie_components_styles',
|
132 |
+
],
|
133 |
+
[
|
134 |
+
'type' => 'title',
|
135 |
+
'id' => 'mollie_components_invalid_styles',
|
136 |
+
'title' => _x(
|
137 |
+
'Invalid Status Styles',
|
138 |
+
'Mollie Components Settings',
|
139 |
+
'mollie-payments-for-woocommerce'
|
140 |
+
),
|
141 |
+
],
|
142 |
+
Mollie_WC_Components_StylesPropertiesDictionary::INVALID_TEXT_COLOR => [
|
143 |
+
'type' => 'color',
|
144 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::INVALID_TEXT_COLOR,
|
145 |
+
'title' => _x('Text Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
146 |
+
'desc_tip' => _x(
|
147 |
+
'Text Color for invalid input.',
|
148 |
+
'Mollie Components Settings',
|
149 |
+
'mollie-payments-for-woocommerce'
|
150 |
+
),
|
151 |
+
'default' => '#000000',
|
152 |
+
],
|
153 |
+
Mollie_WC_Components_StylesPropertiesDictionary::INVALID_BACKGROUND_COLOR => [
|
154 |
+
'type' => 'color',
|
155 |
+
'id' => 'mollie_components_' . Mollie_WC_Components_StylesPropertiesDictionary::INVALID_BACKGROUND_COLOR,
|
156 |
+
'title' => _x('Background Color', 'Mollie Components Settings', 'mollie-payments-for-woocommerce'),
|
157 |
+
'desc_tip' => _x(
|
158 |
+
'Background Color for invalid input.',
|
159 |
+
'Mollie Components Settings',
|
160 |
+
'mollie-payments-for-woocommerce'
|
161 |
+
),
|
162 |
+
'default' => '#FFF0F0',
|
163 |
+
],
|
164 |
+
[
|
165 |
+
'type' => 'sectionend',
|
166 |
+
'id' => 'mollie_components_invalid_styles',
|
167 |
+
],
|
168 |
+
];
|
inc/settings/mollie_components_enabler.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return [
|
4 |
+
'mollie_components_enabled' => [
|
5 |
+
'type' => 'checkbox',
|
6 |
+
'title' => __('Enable Mollie Components', 'mollie-payments-for-woocommerce'),
|
7 |
+
'description' => __(
|
8 |
+
'Enable the Mollie Components for this Gateway',
|
9 |
+
'mollie-payments-for-woocommerce'
|
10 |
+
),
|
11 |
+
'default' => 'no',
|
12 |
+
],
|
13 |
+
];
|
inc/utils.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Mollie\Api\Exceptions\ApiException;
|
4 |
+
use Mollie\Api\Resources\CurrentProfile;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Check if the current page context is for checkout
|
8 |
+
*
|
9 |
+
* @return bool
|
10 |
+
*/
|
11 |
+
function isCheckoutContext()
|
12 |
+
{
|
13 |
+
return is_checkout() || is_checkout_pay_page();
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Mollie_WC_Components_Styles Factory
|
18 |
+
*
|
19 |
+
* @return array
|
20 |
+
*/
|
21 |
+
function mollieComponentsStylesForAvailableGateways()
|
22 |
+
{
|
23 |
+
$mollieComponentsStyles = new Mollie_WC_Components_Styles(
|
24 |
+
new Mollie_WC_Settings_Components(),
|
25 |
+
WC()->payment_gateways()
|
26 |
+
);
|
27 |
+
|
28 |
+
return $mollieComponentsStyles->forAvailableGateways();
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Is Mollie Test Mode enabled?
|
33 |
+
*
|
34 |
+
* @return bool
|
35 |
+
*/
|
36 |
+
function isTestModeEnabled()
|
37 |
+
{
|
38 |
+
$settingsHelper = Mollie_WC_Plugin::getSettingsHelper();
|
39 |
+
$isTestModeEnabled = $settingsHelper->isTestModeEnabled();
|
40 |
+
|
41 |
+
return $isTestModeEnabled;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @return CurrentProfile
|
46 |
+
* @throws ApiException
|
47 |
+
*/
|
48 |
+
function merchantProfile()
|
49 |
+
{
|
50 |
+
static $profile = null;
|
51 |
+
|
52 |
+
if (null === $profile) {
|
53 |
+
$isTestMode = isTestModeEnabled();
|
54 |
+
|
55 |
+
$apiHelper = Mollie_WC_Plugin::getApiHelper();
|
56 |
+
$profile = $apiHelper->getApiClient($isTestMode)->profiles->getCurrent();
|
57 |
+
}
|
58 |
+
|
59 |
+
return $profile;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Retrieve the merchant profile ID
|
64 |
+
*
|
65 |
+
* @return int|string
|
66 |
+
* @throws ApiException
|
67 |
+
*/
|
68 |
+
function merchantProfileId()
|
69 |
+
{
|
70 |
+
$merchantProfile = merchantProfile();
|
71 |
+
|
72 |
+
return isset($merchantProfile->id) ? $merchantProfile->id : 0;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Retrieve the cardToken value for Mollie Components
|
77 |
+
*
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
function cardToken()
|
81 |
+
{
|
82 |
+
return $cardToken = filter_input(INPUT_POST, 'cardToken', FILTER_SANITIZE_STRING) ?: '';
|
83 |
+
}
|
includes/woocommerce_functions.php → inc/woocommerce.php
RENAMED
@@ -37,7 +37,9 @@ if (!function_exists('untrailingslashit'))
|
|
37 |
}
|
38 |
}
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
43 |
}
|
37 |
}
|
38 |
}
|
39 |
|
40 |
+
if (!function_exists('mollieWooCommerceSession')) {
|
41 |
+
function mollieWooCommerceSession()
|
42 |
+
{
|
43 |
+
return WC()->session;
|
44 |
+
}
|
45 |
}
|
includes/mollie-api-php/scoper.inc.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types=1);
|
2 |
-
|
3 |
-
// scoper.inc.php
|
4 |
-
|
5 |
-
use Isolated\Symfony\Component\Finder\Finder;
|
6 |
-
|
7 |
-
return [
|
8 |
-
'finders' => [], // Finder[]
|
9 |
-
'patchers' => [], // callable[]
|
10 |
-
'whitelist' => [
|
11 |
-
'Mollie\\Api\\*',
|
12 |
-
],
|
13 |
-
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/composer/autoload_classmap.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_classmap.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/composer/autoload_static.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_static.php @generated by Composer
|
4 |
-
|
5 |
-
namespace Composer\Autoload;
|
6 |
-
|
7 |
-
class ComposerStaticInitb9d9e22242fec492b0c00057c2b37715
|
8 |
-
{
|
9 |
-
public static $files = array (
|
10 |
-
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
-
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
12 |
-
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
13 |
-
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
14 |
-
);
|
15 |
-
|
16 |
-
public static $prefixLengthsPsr4 = array (
|
17 |
-
'P' =>
|
18 |
-
array (
|
19 |
-
'Psr\\Http\\Message\\' => 17,
|
20 |
-
),
|
21 |
-
'M' =>
|
22 |
-
array (
|
23 |
-
'Mollie\\Api\\' => 11,
|
24 |
-
),
|
25 |
-
'G' =>
|
26 |
-
array (
|
27 |
-
'GuzzleHttp\\Psr7\\' => 16,
|
28 |
-
'GuzzleHttp\\Promise\\' => 19,
|
29 |
-
'GuzzleHttp\\' => 11,
|
30 |
-
),
|
31 |
-
'C' =>
|
32 |
-
array (
|
33 |
-
'Composer\\CaBundle\\' => 18,
|
34 |
-
),
|
35 |
-
);
|
36 |
-
|
37 |
-
public static $prefixDirsPsr4 = array (
|
38 |
-
'Psr\\Http\\Message\\' =>
|
39 |
-
array (
|
40 |
-
0 => __DIR__ . '/..' . '/psr/http-message/src',
|
41 |
-
),
|
42 |
-
'Mollie\\Api\\' =>
|
43 |
-
array (
|
44 |
-
0 => __DIR__ . '/../..' . '/src',
|
45 |
-
),
|
46 |
-
'GuzzleHttp\\Psr7\\' =>
|
47 |
-
array (
|
48 |
-
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
|
49 |
-
),
|
50 |
-
'GuzzleHttp\\Promise\\' =>
|
51 |
-
array (
|
52 |
-
0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
|
53 |
-
),
|
54 |
-
'GuzzleHttp\\' =>
|
55 |
-
array (
|
56 |
-
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
|
57 |
-
),
|
58 |
-
'Composer\\CaBundle\\' =>
|
59 |
-
array (
|
60 |
-
0 => __DIR__ . '/..' . '/composer/ca-bundle/src',
|
61 |
-
),
|
62 |
-
);
|
63 |
-
|
64 |
-
public static function getInitializer(ClassLoader $loader)
|
65 |
-
{
|
66 |
-
return \Closure::bind(function () use ($loader) {
|
67 |
-
$loader->prefixLengthsPsr4 = ComposerStaticInitb9d9e22242fec492b0c00057c2b37715::$prefixLengthsPsr4;
|
68 |
-
$loader->prefixDirsPsr4 = ComposerStaticInitb9d9e22242fec492b0c00057c2b37715::$prefixDirsPsr4;
|
69 |
-
|
70 |
-
}, null, ClassLoader::class);
|
71 |
-
}
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/composer/ca-bundle/composer.json
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "composer/ca-bundle",
|
3 |
-
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
4 |
-
"type": "library",
|
5 |
-
"license": "MIT",
|
6 |
-
"keywords": [
|
7 |
-
"cabundle",
|
8 |
-
"cacert",
|
9 |
-
"certificate",
|
10 |
-
"ssl",
|
11 |
-
"tls"
|
12 |
-
],
|
13 |
-
"authors": [
|
14 |
-
{
|
15 |
-
"name": "Jordi Boggiano",
|
16 |
-
"email": "j.boggiano@seld.be",
|
17 |
-
"homepage": "http://seld.be"
|
18 |
-
}
|
19 |
-
],
|
20 |
-
"support": {
|
21 |
-
"irc": "irc://irc.freenode.org/composer",
|
22 |
-
"issues": "https://github.com/composer/ca-bundle/issues"
|
23 |
-
},
|
24 |
-
"require": {
|
25 |
-
"ext-openssl": "*",
|
26 |
-
"ext-pcre": "*",
|
27 |
-
"php": "^5.3.2 || ^7.0 || ^8.0"
|
28 |
-
},
|
29 |
-
"require-dev": {
|
30 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
|
31 |
-
"psr/log": "^1.0",
|
32 |
-
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
33 |
-
},
|
34 |
-
"autoload": {
|
35 |
-
"psr-4": {
|
36 |
-
"Composer\\CaBundle\\": "src"
|
37 |
-
}
|
38 |
-
},
|
39 |
-
"autoload-dev": {
|
40 |
-
"psr-4": {
|
41 |
-
"Composer\\CaBundle\\": "tests"
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"extra": {
|
45 |
-
"branch-alias": {
|
46 |
-
"dev-master": "1.x-dev"
|
47 |
-
}
|
48 |
-
},
|
49 |
-
"config": {
|
50 |
-
"platform": {
|
51 |
-
"php": "5.3.9"
|
52 |
-
}
|
53 |
-
}
|
54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/guzzle/.php_cs
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$config = PhpCsFixer\Config::create()
|
4 |
-
->setRiskyAllowed(true)
|
5 |
-
->setRules([
|
6 |
-
'@PSR2' => true,
|
7 |
-
'array_syntax' => ['syntax' => 'short'],
|
8 |
-
'declare_strict_types' => false,
|
9 |
-
'concat_space' => ['spacing'=>'one'],
|
10 |
-
// 'ordered_imports' => true,
|
11 |
-
// 'phpdoc_align' => ['align'=>'vertical'],
|
12 |
-
// 'native_function_invocation' => true,
|
13 |
-
])
|
14 |
-
->setFinder(
|
15 |
-
PhpCsFixer\Finder::create()
|
16 |
-
->in(__DIR__.'/src')
|
17 |
-
->name('*.php')
|
18 |
-
)
|
19 |
-
;
|
20 |
-
|
21 |
-
return $config;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/guzzle/Dockerfile
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
FROM composer:latest as setup
|
2 |
-
|
3 |
-
RUN mkdir /guzzle
|
4 |
-
|
5 |
-
WORKDIR /guzzle
|
6 |
-
|
7 |
-
RUN set -xe \
|
8 |
-
&& composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár <mark.sagikazar@gmail.com>" --no-interaction \
|
9 |
-
&& composer require guzzlehttp/guzzle
|
10 |
-
|
11 |
-
|
12 |
-
FROM php:7.3
|
13 |
-
|
14 |
-
RUN mkdir /guzzle
|
15 |
-
|
16 |
-
WORKDIR /guzzle
|
17 |
-
|
18 |
-
COPY --from=setup /guzzle /guzzle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/guzzle/composer.json
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "guzzlehttp/guzzle",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Guzzle is a PHP HTTP client library",
|
5 |
-
"keywords": [
|
6 |
-
"framework",
|
7 |
-
"http",
|
8 |
-
"rest",
|
9 |
-
"web service",
|
10 |
-
"curl",
|
11 |
-
"client",
|
12 |
-
"HTTP client"
|
13 |
-
],
|
14 |
-
"homepage": "http://guzzlephp.org/",
|
15 |
-
"license": "MIT",
|
16 |
-
"authors": [
|
17 |
-
{
|
18 |
-
"name": "Michael Dowling",
|
19 |
-
"email": "mtdowling@gmail.com",
|
20 |
-
"homepage": "https://github.com/mtdowling"
|
21 |
-
}
|
22 |
-
],
|
23 |
-
"require": {
|
24 |
-
"php": ">=5.5",
|
25 |
-
"ext-json": "*",
|
26 |
-
"guzzlehttp/promises": "^1.0",
|
27 |
-
"guzzlehttp/psr7": "^1.6.1"
|
28 |
-
},
|
29 |
-
"require-dev": {
|
30 |
-
"ext-curl": "*",
|
31 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
32 |
-
"psr/log": "^1.1"
|
33 |
-
},
|
34 |
-
"suggest": {
|
35 |
-
"psr/log": "Required for using the Log middleware"
|
36 |
-
},
|
37 |
-
"config": {
|
38 |
-
"sort-packages": true
|
39 |
-
},
|
40 |
-
"extra": {
|
41 |
-
"branch-alias": {
|
42 |
-
"dev-master": "6.3-dev"
|
43 |
-
}
|
44 |
-
},
|
45 |
-
"autoload": {
|
46 |
-
"psr-4": {
|
47 |
-
"GuzzleHttp\\": "src/"
|
48 |
-
},
|
49 |
-
"files": [
|
50 |
-
"src/functions_include.php"
|
51 |
-
]
|
52 |
-
},
|
53 |
-
"autoload-dev": {
|
54 |
-
"psr-4": {
|
55 |
-
"GuzzleHttp\\Tests\\": "tests/"
|
56 |
-
}
|
57 |
-
}
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/guzzle/phpstan.neon.dist
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
parameters:
|
2 |
-
level: 1
|
3 |
-
paths:
|
4 |
-
- src
|
5 |
-
|
6 |
-
ignoreErrors:
|
7 |
-
-
|
8 |
-
message: '#Function uri_template not found#'
|
9 |
-
path: %currentWorkingDirectory%/src/functions.php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/promises/Makefile
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
all: clean test
|
2 |
-
|
3 |
-
test:
|
4 |
-
vendor/bin/phpunit
|
5 |
-
|
6 |
-
coverage:
|
7 |
-
vendor/bin/phpunit --coverage-html=artifacts/coverage
|
8 |
-
|
9 |
-
view-coverage:
|
10 |
-
open artifacts/coverage/index.html
|
11 |
-
|
12 |
-
clean:
|
13 |
-
rm -rf artifacts/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/promises/README.md
DELETED
@@ -1,504 +0,0 @@
|
|
1 |
-
# Guzzle Promises
|
2 |
-
|
3 |
-
[Promises/A+](https://promisesaplus.com/) implementation that handles promise
|
4 |
-
chaining and resolution iteratively, allowing for "infinite" promise chaining
|
5 |
-
while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/)
|
6 |
-
for a general introduction to promises.
|
7 |
-
|
8 |
-
- [Features](#features)
|
9 |
-
- [Quick start](#quick-start)
|
10 |
-
- [Synchronous wait](#synchronous-wait)
|
11 |
-
- [Cancellation](#cancellation)
|
12 |
-
- [API](#api)
|
13 |
-
- [Promise](#promise)
|
14 |
-
- [FulfilledPromise](#fulfilledpromise)
|
15 |
-
- [RejectedPromise](#rejectedpromise)
|
16 |
-
- [Promise interop](#promise-interop)
|
17 |
-
- [Implementation notes](#implementation-notes)
|
18 |
-
|
19 |
-
|
20 |
-
# Features
|
21 |
-
|
22 |
-
- [Promises/A+](https://promisesaplus.com/) implementation.
|
23 |
-
- Promise resolution and chaining is handled iteratively, allowing for
|
24 |
-
"infinite" promise chaining.
|
25 |
-
- Promises have a synchronous `wait` method.
|
26 |
-
- Promises can be cancelled.
|
27 |
-
- Works with any object that has a `then` function.
|
28 |
-
- C# style async/await coroutine promises using
|
29 |
-
`GuzzleHttp\Promise\coroutine()`.
|
30 |
-
|
31 |
-
|
32 |
-
# Quick start
|
33 |
-
|
34 |
-
A *promise* represents the eventual result of an asynchronous operation. The
|
35 |
-
primary way of interacting with a promise is through its `then` method, which
|
36 |
-
registers callbacks to receive either a promise's eventual value or the reason
|
37 |
-
why the promise cannot be fulfilled.
|
38 |
-
|
39 |
-
|
40 |
-
## Callbacks
|
41 |
-
|
42 |
-
Callbacks are registered with the `then` method by providing an optional
|
43 |
-
`$onFulfilled` followed by an optional `$onRejected` function.
|
44 |
-
|
45 |
-
|
46 |
-
```php
|
47 |
-
use GuzzleHttp\Promise\Promise;
|
48 |
-
|
49 |
-
$promise = new Promise();
|
50 |
-
$promise->then(
|
51 |
-
// $onFulfilled
|
52 |
-
function ($value) {
|
53 |
-
echo 'The promise was fulfilled.';
|
54 |
-
},
|
55 |
-
// $onRejected
|
56 |
-
function ($reason) {
|
57 |
-
echo 'The promise was rejected.';
|
58 |
-
}
|
59 |
-
);
|
60 |
-
```
|
61 |
-
|
62 |
-
*Resolving* a promise means that you either fulfill a promise with a *value* or
|
63 |
-
reject a promise with a *reason*. Resolving a promises triggers callbacks
|
64 |
-
registered with the promises's `then` method. These callbacks are triggered
|
65 |
-
only once and in the order in which they were added.
|
66 |
-
|
67 |
-
|
68 |
-
## Resolving a promise
|
69 |
-
|
70 |
-
Promises are fulfilled using the `resolve($value)` method. Resolving a promise
|
71 |
-
with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger
|
72 |
-
all of the onFulfilled callbacks (resolving a promise with a rejected promise
|
73 |
-
will reject the promise and trigger the `$onRejected` callbacks).
|
74 |
-
|
75 |
-
```php
|
76 |
-
use GuzzleHttp\Promise\Promise;
|
77 |
-
|
78 |
-
$promise = new Promise();
|
79 |
-
$promise
|
80 |
-
->then(function ($value) {
|
81 |
-
// Return a value and don't break the chain
|
82 |
-
return "Hello, " . $value;
|
83 |
-
})
|
84 |
-
// This then is executed after the first then and receives the value
|
85 |
-
// returned from the first then.
|
86 |
-
->then(function ($value) {
|
87 |
-
echo $value;
|
88 |
-
});
|
89 |
-
|
90 |
-
// Resolving the promise triggers the $onFulfilled callbacks and outputs
|
91 |
-
// "Hello, reader".
|
92 |
-
$promise->resolve('reader.');
|
93 |
-
```
|
94 |
-
|
95 |
-
|
96 |
-
## Promise forwarding
|
97 |
-
|
98 |
-
Promises can be chained one after the other. Each then in the chain is a new
|
99 |
-
promise. The return value of a promise is what's forwarded to the next
|
100 |
-
promise in the chain. Returning a promise in a `then` callback will cause the
|
101 |
-
subsequent promises in the chain to only be fulfilled when the returned promise
|
102 |
-
has been fulfilled. The next promise in the chain will be invoked with the
|
103 |
-
resolved value of the promise.
|
104 |
-
|
105 |
-
```php
|
106 |
-
use GuzzleHttp\Promise\Promise;
|
107 |
-
|
108 |
-
$promise = new Promise();
|
109 |
-
$nextPromise = new Promise();
|
110 |
-
|
111 |
-
$promise
|
112 |
-
->then(function ($value) use ($nextPromise) {
|
113 |
-
echo $value;
|
114 |
-
return $nextPromise;
|
115 |
-
})
|
116 |
-
->then(function ($value) {
|
117 |
-
echo $value;
|
118 |
-
});
|
119 |
-
|
120 |
-
// Triggers the first callback and outputs "A"
|
121 |
-
$promise->resolve('A');
|
122 |
-
// Triggers the second callback and outputs "B"
|
123 |
-
$nextPromise->resolve('B');
|
124 |
-
```
|
125 |
-
|
126 |
-
## Promise rejection
|
127 |
-
|
128 |
-
When a promise is rejected, the `$onRejected` callbacks are invoked with the
|
129 |
-
rejection reason.
|
130 |
-
|
131 |
-
```php
|
132 |
-
use GuzzleHttp\Promise\Promise;
|
133 |
-
|
134 |
-
$promise = new Promise();
|
135 |
-
$promise->then(null, function ($reason) {
|
136 |
-
echo $reason;
|
137 |
-
});
|
138 |
-
|
139 |
-
$promise->reject('Error!');
|
140 |
-
// Outputs "Error!"
|
141 |
-
```
|
142 |
-
|
143 |
-
## Rejection forwarding
|
144 |
-
|
145 |
-
If an exception is thrown in an `$onRejected` callback, subsequent
|
146 |
-
`$onRejected` callbacks are invoked with the thrown exception as the reason.
|
147 |
-
|
148 |
-
```php
|
149 |
-
use GuzzleHttp\Promise\Promise;
|
150 |
-
|
151 |
-
$promise = new Promise();
|
152 |
-
$promise->then(null, function ($reason) {
|
153 |
-
throw new \Exception($reason);
|
154 |
-
})->then(null, function ($reason) {
|
155 |
-
assert($reason->getMessage() === 'Error!');
|
156 |
-
});
|
157 |
-
|
158 |
-
$promise->reject('Error!');
|
159 |
-
```
|
160 |
-
|
161 |
-
You can also forward a rejection down the promise chain by returning a
|
162 |
-
`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or
|
163 |
-
`$onRejected` callback.
|
164 |
-
|
165 |
-
```php
|
166 |
-
use GuzzleHttp\Promise\Promise;
|
167 |
-
use GuzzleHttp\Promise\RejectedPromise;
|
168 |
-
|
169 |
-
$promise = new Promise();
|
170 |
-
$promise->then(null, function ($reason) {
|
171 |
-
return new RejectedPromise($reason);
|
172 |
-
})->then(null, function ($reason) {
|
173 |
-
assert($reason === 'Error!');
|
174 |
-
});
|
175 |
-
|
176 |
-
$promise->reject('Error!');
|
177 |
-
```
|
178 |
-
|
179 |
-
If an exception is not thrown in a `$onRejected` callback and the callback
|
180 |
-
does not return a rejected promise, downstream `$onFulfilled` callbacks are
|
181 |
-
invoked using the value returned from the `$onRejected` callback.
|
182 |
-
|
183 |
-
```php
|
184 |
-
use GuzzleHttp\Promise\Promise;
|
185 |
-
use GuzzleHttp\Promise\RejectedPromise;
|
186 |
-
|
187 |
-
$promise = new Promise();
|
188 |
-
$promise
|
189 |
-
->then(null, function ($reason) {
|
190 |
-
return "It's ok";
|
191 |
-
})
|
192 |
-
->then(function ($value) {
|
193 |
-
assert($value === "It's ok");
|
194 |
-
});
|
195 |
-
|
196 |
-
$promise->reject('Error!');
|
197 |
-
```
|
198 |
-
|
199 |
-
# Synchronous wait
|
200 |
-
|
201 |
-
You can synchronously force promises to complete using a promise's `wait`
|
202 |
-
method. When creating a promise, you can provide a wait function that is used
|
203 |
-
to synchronously force a promise to complete. When a wait function is invoked
|
204 |
-
it is expected to deliver a value to the promise or reject the promise. If the
|
205 |
-
wait function does not deliver a value, then an exception is thrown. The wait
|
206 |
-
function provided to a promise constructor is invoked when the `wait` function
|
207 |
-
of the promise is called.
|
208 |
-
|
209 |
-
```php
|
210 |
-
$promise = new Promise(function () use (&$promise) {
|
211 |
-
$promise->resolve('foo');
|
212 |
-
});
|
213 |
-
|
214 |
-
// Calling wait will return the value of the promise.
|
215 |
-
echo $promise->wait(); // outputs "foo"
|
216 |
-
```
|
217 |
-
|
218 |
-
If an exception is encountered while invoking the wait function of a promise,
|
219 |
-
the promise is rejected with the exception and the exception is thrown.
|
220 |
-
|
221 |
-
```php
|
222 |
-
$promise = new Promise(function () use (&$promise) {
|
223 |
-
throw new \Exception('foo');
|
224 |
-
});
|
225 |
-
|
226 |
-
$promise->wait(); // throws the exception.
|
227 |
-
```
|
228 |
-
|
229 |
-
Calling `wait` on a promise that has been fulfilled will not trigger the wait
|
230 |
-
function. It will simply return the previously resolved value.
|
231 |
-
|
232 |
-
```php
|
233 |
-
$promise = new Promise(function () { die('this is not called!'); });
|
234 |
-
$promise->resolve('foo');
|
235 |
-
echo $promise->wait(); // outputs "foo"
|
236 |
-
```
|
237 |
-
|
238 |
-
Calling `wait` on a promise that has been rejected will throw an exception. If
|
239 |
-
the rejection reason is an instance of `\Exception` the reason is thrown.
|
240 |
-
Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason
|
241 |
-
can be obtained by calling the `getReason` method of the exception.
|
242 |
-
|
243 |
-
```php
|
244 |
-
$promise = new Promise();
|
245 |
-
$promise->reject('foo');
|
246 |
-
$promise->wait();
|
247 |
-
```
|
248 |
-
|
249 |
-
> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo'
|
250 |
-
|
251 |
-
|
252 |
-
## Unwrapping a promise
|
253 |
-
|
254 |
-
When synchronously waiting on a promise, you are joining the state of the
|
255 |
-
promise into the current state of execution (i.e., return the value of the
|
256 |
-
promise if it was fulfilled or throw an exception if it was rejected). This is
|
257 |
-
called "unwrapping" the promise. Waiting on a promise will by default unwrap
|
258 |
-
the promise state.
|
259 |
-
|
260 |
-
You can force a promise to resolve and *not* unwrap the state of the promise
|
261 |
-
by passing `false` to the first argument of the `wait` function:
|
262 |
-
|
263 |
-
```php
|
264 |
-
$promise = new Promise();
|
265 |
-
$promise->reject('foo');
|
266 |
-
// This will not throw an exception. It simply ensures the promise has
|
267 |
-
// been resolved.
|
268 |
-
$promise->wait(false);
|
269 |
-
```
|
270 |
-
|
271 |
-
When unwrapping a promise, the resolved value of the promise will be waited
|
272 |
-
upon until the unwrapped value is not a promise. This means that if you resolve
|
273 |
-
promise A with a promise B and unwrap promise A, the value returned by the
|
274 |
-
wait function will be the value delivered to promise B.
|
275 |
-
|
276 |
-
**Note**: when you do not unwrap the promise, no value is returned.
|
277 |
-
|
278 |
-
|
279 |
-
# Cancellation
|
280 |
-
|
281 |
-
You can cancel a promise that has not yet been fulfilled using the `cancel()`
|
282 |
-
method of a promise. When creating a promise you can provide an optional
|
283 |
-
cancel function that when invoked cancels the action of computing a resolution
|
284 |
-
of the promise.
|
285 |
-
|
286 |
-
|
287 |
-
# API
|
288 |
-
|
289 |
-
|
290 |
-
## Promise
|
291 |
-
|
292 |
-
When creating a promise object, you can provide an optional `$waitFn` and
|
293 |
-
`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is
|
294 |
-
expected to resolve the promise. `$cancelFn` is a function with no arguments
|
295 |
-
that is expected to cancel the computation of a promise. It is invoked when the
|
296 |
-
`cancel()` method of a promise is called.
|
297 |
-
|
298 |
-
```php
|
299 |
-
use GuzzleHttp\Promise\Promise;
|
300 |
-
|
301 |
-
$promise = new Promise(
|
302 |
-
function () use (&$promise) {
|
303 |
-
$promise->resolve('waited');
|
304 |
-
},
|
305 |
-
function () {
|
306 |
-
// do something that will cancel the promise computation (e.g., close
|
307 |
-
// a socket, cancel a database query, etc...)
|
308 |
-
}
|
309 |
-
);
|
310 |
-
|
311 |
-
assert('waited' === $promise->wait());
|
312 |
-
```
|
313 |
-
|
314 |
-
A promise has the following methods:
|
315 |
-
|
316 |
-
- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface`
|
317 |
-
|
318 |
-
Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
|
319 |
-
|
320 |
-
- `otherwise(callable $onRejected) : PromiseInterface`
|
321 |
-
|
322 |
-
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.
|
323 |
-
|
324 |
-
- `wait($unwrap = true) : mixed`
|
325 |
-
|
326 |
-
Synchronously waits on the promise to complete.
|
327 |
-
|
328 |
-
`$unwrap` controls whether or not the value of the promise is returned for a
|
329 |
-
fulfilled promise or if an exception is thrown if the promise is rejected.
|
330 |
-
This is set to `true` by default.
|
331 |
-
|
332 |
-
- `cancel()`
|
333 |
-
|
334 |
-
Attempts to cancel the promise if possible. The promise being cancelled and
|
335 |
-
the parent most ancestor that has not yet been resolved will also be
|
336 |
-
cancelled. Any promises waiting on the cancelled promise to resolve will also
|
337 |
-
be cancelled.
|
338 |
-
|
339 |
-
- `getState() : string`
|
340 |
-
|
341 |
-
Returns the state of the promise. One of `pending`, `fulfilled`, or
|
342 |
-
`rejected`.
|
343 |
-
|
344 |
-
- `resolve($value)`
|
345 |
-
|
346 |
-
Fulfills the promise with the given `$value`.
|
347 |
-
|
348 |
-
- `reject($reason)`
|
349 |
-
|
350 |
-
Rejects the promise with the given `$reason`.
|
351 |
-
|
352 |
-
|
353 |
-
## FulfilledPromise
|
354 |
-
|
355 |
-
A fulfilled promise can be created to represent a promise that has been
|
356 |
-
fulfilled.
|
357 |
-
|
358 |
-
```php
|
359 |
-
use GuzzleHttp\Promise\FulfilledPromise;
|
360 |
-
|
361 |
-
$promise = new FulfilledPromise('value');
|
362 |
-
|
363 |
-
// Fulfilled callbacks are immediately invoked.
|
364 |
-
$promise->then(function ($value) {
|
365 |
-
echo $value;
|
366 |
-
});
|
367 |
-
```
|
368 |
-
|
369 |
-
|
370 |
-
## RejectedPromise
|
371 |
-
|
372 |
-
A rejected promise can be created to represent a promise that has been
|
373 |
-
rejected.
|
374 |
-
|
375 |
-
```php
|
376 |
-
use GuzzleHttp\Promise\RejectedPromise;
|
377 |
-
|
378 |
-
$promise = new RejectedPromise('Error');
|
379 |
-
|
380 |
-
// Rejected callbacks are immediately invoked.
|
381 |
-
$promise->then(null, function ($reason) {
|
382 |
-
echo $reason;
|
383 |
-
});
|
384 |
-
```
|
385 |
-
|
386 |
-
|
387 |
-
# Promise interop
|
388 |
-
|
389 |
-
This library works with foreign promises that have a `then` method. This means
|
390 |
-
you can use Guzzle promises with [React promises](https://github.com/reactphp/promise)
|
391 |
-
for example. When a foreign promise is returned inside of a then method
|
392 |
-
callback, promise resolution will occur recursively.
|
393 |
-
|
394 |
-
```php
|
395 |
-
// Create a React promise
|
396 |
-
$deferred = new React\Promise\Deferred();
|
397 |
-
$reactPromise = $deferred->promise();
|
398 |
-
|
399 |
-
// Create a Guzzle promise that is fulfilled with a React promise.
|
400 |
-
$guzzlePromise = new \GuzzleHttp\Promise\Promise();
|
401 |
-
$guzzlePromise->then(function ($value) use ($reactPromise) {
|
402 |
-
// Do something something with the value...
|
403 |
-
// Return the React promise
|
404 |
-
return $reactPromise;
|
405 |
-
});
|
406 |
-
```
|
407 |
-
|
408 |
-
Please note that wait and cancel chaining is no longer possible when forwarding
|
409 |
-
a foreign promise. You will need to wrap a third-party promise with a Guzzle
|
410 |
-
promise in order to utilize wait and cancel functions with foreign promises.
|
411 |
-
|
412 |
-
|
413 |
-
## Event Loop Integration
|
414 |
-
|
415 |
-
In order to keep the stack size constant, Guzzle promises are resolved
|
416 |
-
asynchronously using a task queue. When waiting on promises synchronously, the
|
417 |
-
task queue will be automatically run to ensure that the blocking promise and
|
418 |
-
any forwarded promises are resolved. When using promises asynchronously in an
|
419 |
-
event loop, you will need to run the task queue on each tick of the loop. If
|
420 |
-
you do not run the task queue, then promises will not be resolved.
|
421 |
-
|
422 |
-
You can run the task queue using the `run()` method of the global task queue
|
423 |
-
instance.
|
424 |
-
|
425 |
-
```php
|
426 |
-
// Get the global task queue
|
427 |
-
$queue = \GuzzleHttp\Promise\queue();
|
428 |
-
$queue->run();
|
429 |
-
```
|
430 |
-
|
431 |
-
For example, you could use Guzzle promises with React using a periodic timer:
|
432 |
-
|
433 |
-
```php
|
434 |
-
$loop = React\EventLoop\Factory::create();
|
435 |
-
$loop->addPeriodicTimer(0, [$queue, 'run']);
|
436 |
-
```
|
437 |
-
|
438 |
-
*TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
|
439 |
-
|
440 |
-
|
441 |
-
# Implementation notes
|
442 |
-
|
443 |
-
|
444 |
-
## Promise resolution and chaining is handled iteratively
|
445 |
-
|
446 |
-
By shuffling pending handlers from one owner to another, promises are
|
447 |
-
resolved iteratively, allowing for "infinite" then chaining.
|
448 |
-
|
449 |
-
```php
|
450 |
-
<?php
|
451 |
-
require 'vendor/autoload.php';
|
452 |
-
|
453 |
-
use GuzzleHttp\Promise\Promise;
|
454 |
-
|
455 |
-
$parent = new Promise();
|
456 |
-
$p = $parent;
|
457 |
-
|
458 |
-
for ($i = 0; $i < 1000; $i++) {
|
459 |
-
$p = $p->then(function ($v) {
|
460 |
-
// The stack size remains constant (a good thing)
|
461 |
-
echo xdebug_get_stack_depth() . ', ';
|
462 |
-
return $v + 1;
|
463 |
-
});
|
464 |
-
}
|
465 |
-
|
466 |
-
$parent->resolve(0);
|
467 |
-
var_dump($p->wait()); // int(1000)
|
468 |
-
|
469 |
-
```
|
470 |
-
|
471 |
-
When a promise is fulfilled or rejected with a non-promise value, the promise
|
472 |
-
then takes ownership of the handlers of each child promise and delivers values
|
473 |
-
down the chain without using recursion.
|
474 |
-
|
475 |
-
When a promise is resolved with another promise, the original promise transfers
|
476 |
-
all of its pending handlers to the new promise. When the new promise is
|
477 |
-
eventually resolved, all of the pending handlers are delivered the forwarded
|
478 |
-
value.
|
479 |
-
|
480 |
-
|
481 |
-
## A promise is the deferred.
|
482 |
-
|
483 |
-
Some promise libraries implement promises using a deferred object to represent
|
484 |
-
a computation and a promise object to represent the delivery of the result of
|
485 |
-
the computation. This is a nice separation of computation and delivery because
|
486 |
-
consumers of the promise cannot modify the value that will be eventually
|
487 |
-
delivered.
|
488 |
-
|
489 |
-
One side effect of being able to implement promise resolution and chaining
|
490 |
-
iteratively is that you need to be able for one promise to reach into the state
|
491 |
-
of another promise to shuffle around ownership of handlers. In order to achieve
|
492 |
-
this without making the handlers of a promise publicly mutable, a promise is
|
493 |
-
also the deferred value, allowing promises of the same parent class to reach
|
494 |
-
into and modify the private properties of promises of the same type. While this
|
495 |
-
does allow consumers of the value to modify the resolution or rejection of the
|
496 |
-
deferred, it is a small price to pay for keeping the stack size constant.
|
497 |
-
|
498 |
-
```php
|
499 |
-
$promise = new Promise();
|
500 |
-
$promise->then(function ($value) { echo $value; });
|
501 |
-
// The promise is the deferred value, so you can deliver a value to it.
|
502 |
-
$promise->resolve('foo');
|
503 |
-
// prints "foo"
|
504 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/promises/composer.json
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "guzzlehttp/promises",
|
3 |
-
"description": "Guzzle promises library",
|
4 |
-
"keywords": ["promise"],
|
5 |
-
"license": "MIT",
|
6 |
-
"authors": [
|
7 |
-
{
|
8 |
-
"name": "Michael Dowling",
|
9 |
-
"email": "mtdowling@gmail.com",
|
10 |
-
"homepage": "https://github.com/mtdowling"
|
11 |
-
}
|
12 |
-
],
|
13 |
-
"require": {
|
14 |
-
"php": ">=5.5.0"
|
15 |
-
},
|
16 |
-
"require-dev": {
|
17 |
-
"phpunit/phpunit": "^4.0"
|
18 |
-
},
|
19 |
-
"autoload": {
|
20 |
-
"psr-4": {
|
21 |
-
"GuzzleHttp\\Promise\\": "src/"
|
22 |
-
},
|
23 |
-
"files": ["src/functions_include.php"]
|
24 |
-
},
|
25 |
-
"scripts": {
|
26 |
-
"test": "vendor/bin/phpunit",
|
27 |
-
"test-ci": "vendor/bin/phpunit --coverage-text"
|
28 |
-
},
|
29 |
-
"extra": {
|
30 |
-
"branch-alias": {
|
31 |
-
"dev-master": "1.4-dev"
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/README.md
DELETED
@@ -1,745 +0,0 @@
|
|
1 |
-
# PSR-7 Message Implementation
|
2 |
-
|
3 |
-
This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/)
|
4 |
-
message implementation, several stream decorators, and some helpful
|
5 |
-
functionality like query string parsing.
|
6 |
-
|
7 |
-
|
8 |
-
[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7)
|
9 |
-
|
10 |
-
|
11 |
-
# Stream implementation
|
12 |
-
|
13 |
-
This package comes with a number of stream implementations and stream
|
14 |
-
decorators.
|
15 |
-
|
16 |
-
|
17 |
-
## AppendStream
|
18 |
-
|
19 |
-
`GuzzleHttp\Psr7\AppendStream`
|
20 |
-
|
21 |
-
Reads from multiple streams, one after the other.
|
22 |
-
|
23 |
-
```php
|
24 |
-
use GuzzleHttp\Psr7;
|
25 |
-
|
26 |
-
$a = Psr7\stream_for('abc, ');
|
27 |
-
$b = Psr7\stream_for('123.');
|
28 |
-
$composed = new Psr7\AppendStream([$a, $b]);
|
29 |
-
|
30 |
-
$composed->addStream(Psr7\stream_for(' Above all listen to me'));
|
31 |
-
|
32 |
-
echo $composed; // abc, 123. Above all listen to me.
|
33 |
-
```
|
34 |
-
|
35 |
-
|
36 |
-
## BufferStream
|
37 |
-
|
38 |
-
`GuzzleHttp\Psr7\BufferStream`
|
39 |
-
|
40 |
-
Provides a buffer stream that can be written to fill a buffer, and read
|
41 |
-
from to remove bytes from the buffer.
|
42 |
-
|
43 |
-
This stream returns a "hwm" metadata value that tells upstream consumers
|
44 |
-
what the configured high water mark of the stream is, or the maximum
|
45 |
-
preferred size of the buffer.
|
46 |
-
|
47 |
-
```php
|
48 |
-
use GuzzleHttp\Psr7;
|
49 |
-
|
50 |
-
// When more than 1024 bytes are in the buffer, it will begin returning
|
51 |
-
// false to writes. This is an indication that writers should slow down.
|
52 |
-
$buffer = new Psr7\BufferStream(1024);
|
53 |
-
```
|
54 |
-
|
55 |
-
|
56 |
-
## CachingStream
|
57 |
-
|
58 |
-
The CachingStream is used to allow seeking over previously read bytes on
|
59 |
-
non-seekable streams. This can be useful when transferring a non-seekable
|
60 |
-
entity body fails due to needing to rewind the stream (for example, resulting
|
61 |
-
from a redirect). Data that is read from the remote stream will be buffered in
|
62 |
-
a PHP temp stream so that previously read bytes are cached first in memory,
|
63 |
-
then on disk.
|
64 |
-
|
65 |
-
```php
|
66 |
-
use GuzzleHttp\Psr7;
|
67 |
-
|
68 |
-
$original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
|
69 |
-
$stream = new Psr7\CachingStream($original);
|
70 |
-
|
71 |
-
$stream->read(1024);
|
72 |
-
echo $stream->tell();
|
73 |
-
// 1024
|
74 |
-
|
75 |
-
$stream->seek(0);
|
76 |
-
echo $stream->tell();
|
77 |
-
// 0
|
78 |
-
```
|
79 |
-
|
80 |
-
|
81 |
-
## DroppingStream
|
82 |
-
|
83 |
-
`GuzzleHttp\Psr7\DroppingStream`
|
84 |
-
|
85 |
-
Stream decorator that begins dropping data once the size of the underlying
|
86 |
-
stream becomes too full.
|
87 |
-
|
88 |
-
```php
|
89 |
-
use GuzzleHttp\Psr7;
|
90 |
-
|
91 |
-
// Create an empty stream
|
92 |
-
$stream = Psr7\stream_for();
|
93 |
-
|
94 |
-
// Start dropping data when the stream has more than 10 bytes
|
95 |
-
$dropping = new Psr7\DroppingStream($stream, 10);
|
96 |
-
|
97 |
-
$dropping->write('01234567890123456789');
|
98 |
-
echo $stream; // 0123456789
|
99 |
-
```
|
100 |
-
|
101 |
-
|
102 |
-
## FnStream
|
103 |
-
|
104 |
-
`GuzzleHttp\Psr7\FnStream`
|
105 |
-
|
106 |
-
Compose stream implementations based on a hash of functions.
|
107 |
-
|
108 |
-
Allows for easy testing and extension of a provided stream without needing
|
109 |
-
to create a concrete class for a simple extension point.
|
110 |
-
|
111 |
-
```php
|
112 |
-
|
113 |
-
use GuzzleHttp\Psr7;
|
114 |
-
|
115 |
-
$stream = Psr7\stream_for('hi');
|
116 |
-
$fnStream = Psr7\FnStream::decorate($stream, [
|
117 |
-
'rewind' => function () use ($stream) {
|
118 |
-
echo 'About to rewind - ';
|
119 |
-
$stream->rewind();
|
120 |
-
echo 'rewound!';
|
121 |
-
}
|
122 |
-
]);
|
123 |
-
|
124 |
-
$fnStream->rewind();
|
125 |
-
// Outputs: About to rewind - rewound!
|
126 |
-
```
|
127 |
-
|
128 |
-
|
129 |
-
## InflateStream
|
130 |
-
|
131 |
-
`GuzzleHttp\Psr7\InflateStream`
|
132 |
-
|
133 |
-
Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
|
134 |
-
|
135 |
-
This stream decorator skips the first 10 bytes of the given stream to remove
|
136 |
-
the gzip header, converts the provided stream to a PHP stream resource,
|
137 |
-
then appends the zlib.inflate filter. The stream is then converted back
|
138 |
-
to a Guzzle stream resource to be used as a Guzzle stream.
|
139 |
-
|
140 |
-
|
141 |
-
## LazyOpenStream
|
142 |
-
|
143 |
-
`GuzzleHttp\Psr7\LazyOpenStream`
|
144 |
-
|
145 |
-
Lazily reads or writes to a file that is opened only after an IO operation
|
146 |
-
take place on the stream.
|
147 |
-
|
148 |
-
```php
|
149 |
-
use GuzzleHttp\Psr7;
|
150 |
-
|
151 |
-
$stream = new Psr7\LazyOpenStream('/path/to/file', 'r');
|
152 |
-
// The file has not yet been opened...
|
153 |
-
|
154 |
-
echo $stream->read(10);
|
155 |
-
// The file is opened and read from only when needed.
|
156 |
-
```
|
157 |
-
|
158 |
-
|
159 |
-
## LimitStream
|
160 |
-
|
161 |
-
`GuzzleHttp\Psr7\LimitStream`
|
162 |
-
|
163 |
-
LimitStream can be used to read a subset or slice of an existing stream object.
|
164 |
-
This can be useful for breaking a large file into smaller pieces to be sent in
|
165 |
-
chunks (e.g. Amazon S3's multipart upload API).
|
166 |
-
|
167 |
-
```php
|
168 |
-
use GuzzleHttp\Psr7;
|
169 |
-
|
170 |
-
$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
|
171 |
-
echo $original->getSize();
|
172 |
-
// >>> 1048576
|
173 |
-
|
174 |
-
// Limit the size of the body to 1024 bytes and start reading from byte 2048
|
175 |
-
$stream = new Psr7\LimitStream($original, 1024, 2048);
|
176 |
-
echo $stream->getSize();
|
177 |
-
// >>> 1024
|
178 |
-
echo $stream->tell();
|
179 |
-
// >>> 0
|
180 |
-
```
|
181 |
-
|
182 |
-
|
183 |
-
## MultipartStream
|
184 |
-
|
185 |
-
`GuzzleHttp\Psr7\MultipartStream`
|
186 |
-
|
187 |
-
Stream that when read returns bytes for a streaming multipart or
|
188 |
-
multipart/form-data stream.
|
189 |
-
|
190 |
-
|
191 |
-
## NoSeekStream
|
192 |
-
|
193 |
-
`GuzzleHttp\Psr7\NoSeekStream`
|
194 |
-
|
195 |
-
NoSeekStream wraps a stream and does not allow seeking.
|
196 |
-
|
197 |
-
```php
|
198 |
-
use GuzzleHttp\Psr7;
|
199 |
-
|
200 |
-
$original = Psr7\stream_for('foo');
|
201 |
-
$noSeek = new Psr7\NoSeekStream($original);
|
202 |
-
|
203 |
-
echo $noSeek->read(3);
|
204 |
-
// foo
|
205 |
-
var_export($noSeek->isSeekable());
|
206 |
-
// false
|
207 |
-
$noSeek->seek(0);
|
208 |
-
var_export($noSeek->read(3));
|
209 |
-
// NULL
|
210 |
-
```
|
211 |
-
|
212 |
-
|
213 |
-
## PumpStream
|
214 |
-
|
215 |
-
`GuzzleHttp\Psr7\PumpStream`
|
216 |
-
|
217 |
-
Provides a read only stream that pumps data from a PHP callable.
|
218 |
-
|
219 |
-
When invoking the provided callable, the PumpStream will pass the amount of
|
220 |
-
data requested to read to the callable. The callable can choose to ignore
|
221 |
-
this value and return fewer or more bytes than requested. Any extra data
|
222 |
-
returned by the provided callable is buffered internally until drained using
|
223 |
-
the read() function of the PumpStream. The provided callable MUST return
|
224 |
-
false when there is no more data to read.
|
225 |
-
|
226 |
-
|
227 |
-
## Implementing stream decorators
|
228 |
-
|
229 |
-
Creating a stream decorator is very easy thanks to the
|
230 |
-
`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that
|
231 |
-
implement `Psr\Http\Message\StreamInterface` by proxying to an underlying
|
232 |
-
stream. Just `use` the `StreamDecoratorTrait` and implement your custom
|
233 |
-
methods.
|
234 |
-
|
235 |
-
For example, let's say we wanted to call a specific function each time the last
|
236 |
-
byte is read from a stream. This could be implemented by overriding the
|
237 |
-
`read()` method.
|
238 |
-
|
239 |
-
```php
|
240 |
-
use Psr\Http\Message\StreamInterface;
|
241 |
-
use GuzzleHttp\Psr7\StreamDecoratorTrait;
|
242 |
-
|
243 |
-
class EofCallbackStream implements StreamInterface
|
244 |
-
{
|
245 |
-
use StreamDecoratorTrait;
|
246 |
-
|
247 |
-
private $callback;
|
248 |
-
|
249 |
-
public function __construct(StreamInterface $stream, callable $cb)
|
250 |
-
{
|
251 |
-
$this->stream = $stream;
|
252 |
-
$this->callback = $cb;
|
253 |
-
}
|
254 |
-
|
255 |
-
public function read($length)
|
256 |
-
{
|
257 |
-
$result = $this->stream->read($length);
|
258 |
-
|
259 |
-
// Invoke the callback when EOF is hit.
|
260 |
-
if ($this->eof()) {
|
261 |
-
call_user_func($this->callback);
|
262 |
-
}
|
263 |
-
|
264 |
-
return $result;
|
265 |
-
}
|
266 |
-
}
|
267 |
-
```
|
268 |
-
|
269 |
-
This decorator could be added to any existing stream and used like so:
|
270 |
-
|
271 |
-
```php
|
272 |
-
use GuzzleHttp\Psr7;
|
273 |
-
|
274 |
-
$original = Psr7\stream_for('foo');
|
275 |
-
|
276 |
-
$eofStream = new EofCallbackStream($original, function () {
|
277 |
-
echo 'EOF!';
|
278 |
-
});
|
279 |
-
|
280 |
-
$eofStream->read(2);
|
281 |
-
$eofStream->read(1);
|
282 |
-
// echoes "EOF!"
|
283 |
-
$eofStream->seek(0);
|
284 |
-
$eofStream->read(3);
|
285 |
-
// echoes "EOF!"
|
286 |
-
```
|
287 |
-
|
288 |
-
|
289 |
-
## PHP StreamWrapper
|
290 |
-
|
291 |
-
You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a
|
292 |
-
PSR-7 stream as a PHP stream resource.
|
293 |
-
|
294 |
-
Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP
|
295 |
-
stream from a PSR-7 stream.
|
296 |
-
|
297 |
-
```php
|
298 |
-
use GuzzleHttp\Psr7\StreamWrapper;
|
299 |
-
|
300 |
-
$stream = GuzzleHttp\Psr7\stream_for('hello!');
|
301 |
-
$resource = StreamWrapper::getResource($stream);
|
302 |
-
echo fread($resource, 6); // outputs hello!
|
303 |
-
```
|
304 |
-
|
305 |
-
|
306 |
-
# Function API
|
307 |
-
|
308 |
-
There are various functions available under the `GuzzleHttp\Psr7` namespace.
|
309 |
-
|
310 |
-
|
311 |
-
## `function str`
|
312 |
-
|
313 |
-
`function str(MessageInterface $message)`
|
314 |
-
|
315 |
-
Returns the string representation of an HTTP message.
|
316 |
-
|
317 |
-
```php
|
318 |
-
$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
|
319 |
-
echo GuzzleHttp\Psr7\str($request);
|
320 |
-
```
|
321 |
-
|
322 |
-
|
323 |
-
## `function uri_for`
|
324 |
-
|
325 |
-
`function uri_for($uri)`
|
326 |
-
|
327 |
-
This function accepts a string or `Psr\Http\Message\UriInterface` and returns a
|
328 |
-
UriInterface for the given value. If the value is already a `UriInterface`, it
|
329 |
-
is returned as-is.
|
330 |
-
|
331 |
-
```php
|
332 |
-
$uri = GuzzleHttp\Psr7\uri_for('http://example.com');
|
333 |
-
assert($uri === GuzzleHttp\Psr7\uri_for($uri));
|
334 |
-
```
|
335 |
-
|
336 |
-
|
337 |
-
## `function stream_for`
|
338 |
-
|
339 |
-
`function stream_for($resource = '', array $options = [])`
|
340 |
-
|
341 |
-
Create a new stream based on the input type.
|
342 |
-
|
343 |
-
Options is an associative array that can contain the following keys:
|
344 |
-
|
345 |
-
* - metadata: Array of custom metadata.
|
346 |
-
* - size: Size of the stream.
|
347 |
-
|
348 |
-
This method accepts the following `$resource` types:
|
349 |
-
|
350 |
-
- `Psr\Http\Message\StreamInterface`: Returns the value as-is.
|
351 |
-
- `string`: Creates a stream object that uses the given string as the contents.
|
352 |
-
- `resource`: Creates a stream object that wraps the given PHP stream resource.
|
353 |
-
- `Iterator`: If the provided value implements `Iterator`, then a read-only
|
354 |
-
stream object will be created that wraps the given iterable. Each time the
|
355 |
-
stream is read from, data from the iterator will fill a buffer and will be
|
356 |
-
continuously called until the buffer is equal to the requested read size.
|
357 |
-
Subsequent read calls will first read from the buffer and then call `next`
|
358 |
-
on the underlying iterator until it is exhausted.
|
359 |
-
- `object` with `__toString()`: If the object has the `__toString()` method,
|
360 |
-
the object will be cast to a string and then a stream will be returned that
|
361 |
-
uses the string value.
|
362 |
-
- `NULL`: When `null` is passed, an empty stream object is returned.
|
363 |
-
- `callable` When a callable is passed, a read-only stream object will be
|
364 |
-
created that invokes the given callable. The callable is invoked with the
|
365 |
-
number of suggested bytes to read. The callable can return any number of
|
366 |
-
bytes, but MUST return `false` when there is no more data to return. The
|
367 |
-
stream object that wraps the callable will invoke the callable until the
|
368 |
-
number of requested bytes are available. Any additional bytes will be
|
369 |
-
buffered and used in subsequent reads.
|
370 |
-
|
371 |
-
```php
|
372 |
-
$stream = GuzzleHttp\Psr7\stream_for('foo');
|
373 |
-
$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r'));
|
374 |
-
|
375 |
-
$generator = function ($bytes) {
|
376 |
-
for ($i = 0; $i < $bytes; $i++) {
|
377 |
-
yield ' ';
|
378 |
-
}
|
379 |
-
}
|
380 |
-
|
381 |
-
$stream = GuzzleHttp\Psr7\stream_for($generator(100));
|
382 |
-
```
|
383 |
-
|
384 |
-
|
385 |
-
## `function parse_header`
|
386 |
-
|
387 |
-
`function parse_header($header)`
|
388 |
-
|
389 |
-
Parse an array of header values containing ";" separated data into an array of
|
390 |
-
associative arrays representing the header key value pair data of the header.
|
391 |
-
When a parameter does not contain a value, but just contains a key, this
|
392 |
-
function will inject a key with a '' string value.
|
393 |
-
|
394 |
-
|
395 |
-
## `function normalize_header`
|
396 |
-
|
397 |
-
`function normalize_header($header)`
|
398 |
-
|
399 |
-
Converts an array of header values that may contain comma separated headers
|
400 |
-
into an array of headers with no comma separated values.
|
401 |
-
|
402 |
-
|
403 |
-
## `function modify_request`
|
404 |
-
|
405 |
-
`function modify_request(RequestInterface $request, array $changes)`
|
406 |
-
|
407 |
-
Clone and modify a request with the given changes. This method is useful for
|
408 |
-
reducing the number of clones needed to mutate a message.
|
409 |
-
|
410 |
-
The changes can be one of:
|
411 |
-
|
412 |
-
- method: (string) Changes the HTTP method.
|
413 |
-
- set_headers: (array) Sets the given headers.
|
414 |
-
- remove_headers: (array) Remove the given headers.
|
415 |
-
- body: (mixed) Sets the given body.
|
416 |
-
- uri: (UriInterface) Set the URI.
|
417 |
-
- query: (string) Set the query string value of the URI.
|
418 |
-
- version: (string) Set the protocol version.
|
419 |
-
|
420 |
-
|
421 |
-
## `function rewind_body`
|
422 |
-
|
423 |
-
`function rewind_body(MessageInterface $message)`
|
424 |
-
|
425 |
-
Attempts to rewind a message body and throws an exception on failure. The body
|
426 |
-
of the message will only be rewound if a call to `tell()` returns a value other
|
427 |
-
than `0`.
|
428 |
-
|
429 |
-
|
430 |
-
## `function try_fopen`
|
431 |
-
|
432 |
-
`function try_fopen($filename, $mode)`
|
433 |
-
|
434 |
-
Safely opens a PHP stream resource using a filename.
|
435 |
-
|
436 |
-
When fopen fails, PHP normally raises a warning. This function adds an error
|
437 |
-
handler that checks for errors and throws an exception instead.
|
438 |
-
|
439 |
-
|
440 |
-
## `function copy_to_string`
|
441 |
-
|
442 |
-
`function copy_to_string(StreamInterface $stream, $maxLen = -1)`
|
443 |
-
|
444 |
-
Copy the contents of a stream into a string until the given number of bytes
|
445 |
-
have been read.
|
446 |
-
|
447 |
-
|
448 |
-
## `function copy_to_stream`
|
449 |
-
|
450 |
-
`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)`
|
451 |
-
|
452 |
-
Copy the contents of a stream into another stream until the given number of
|
453 |
-
bytes have been read.
|
454 |
-
|
455 |
-
|
456 |
-
## `function hash`
|
457 |
-
|
458 |
-
`function hash(StreamInterface $stream, $algo, $rawOutput = false)`
|
459 |
-
|
460 |
-
Calculate a hash of a Stream. This method reads the entire stream to calculate
|
461 |
-
a rolling hash (based on PHP's hash_init functions).
|
462 |
-
|
463 |
-
|
464 |
-
## `function readline`
|
465 |
-
|
466 |
-
`function readline(StreamInterface $stream, $maxLength = null)`
|
467 |
-
|
468 |
-
Read a line from the stream up to the maximum allowed buffer length.
|
469 |
-
|
470 |
-
|
471 |
-
## `function parse_request`
|
472 |
-
|
473 |
-
`function parse_request($message)`
|
474 |
-
|
475 |
-
Parses a request message string into a request object.
|
476 |
-
|
477 |
-
|
478 |
-
## `function parse_response`
|
479 |
-
|
480 |
-
`function parse_response($message)`
|
481 |
-
|
482 |
-
Parses a response message string into a response object.
|
483 |
-
|
484 |
-
|
485 |
-
## `function parse_query`
|
486 |
-
|
487 |
-
`function parse_query($str, $urlEncoding = true)`
|
488 |
-
|
489 |
-
Parse a query string into an associative array.
|
490 |
-
|
491 |
-
If multiple values are found for the same key, the value of that key value pair
|
492 |
-
will become an array. This function does not parse nested PHP style arrays into
|
493 |
-
an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into
|
494 |
-
`['foo[a]' => '1', 'foo[b]' => '2']`).
|
495 |
-
|
496 |
-
|
497 |
-
## `function build_query`
|
498 |
-
|
499 |
-
`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)`
|
500 |
-
|
501 |
-
Build a query string from an array of key value pairs.
|
502 |
-
|
503 |
-
This function can use the return value of parse_query() to build a query string.
|
504 |
-
This function does not modify the provided keys when an array is encountered
|
505 |
-
(like http_build_query would).
|
506 |
-
|
507 |
-
|
508 |
-
## `function mimetype_from_filename`
|
509 |
-
|
510 |
-
`function mimetype_from_filename($filename)`
|
511 |
-
|
512 |
-
Determines the mimetype of a file by looking at its extension.
|
513 |
-
|
514 |
-
|
515 |
-
## `function mimetype_from_extension`
|
516 |
-
|
517 |
-
`function mimetype_from_extension($extension)`
|
518 |
-
|
519 |
-
Maps a file extensions to a mimetype.
|
520 |
-
|
521 |
-
|
522 |
-
# Additional URI Methods
|
523 |
-
|
524 |
-
Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
|
525 |
-
this library also provides additional functionality when working with URIs as static methods.
|
526 |
-
|
527 |
-
## URI Types
|
528 |
-
|
529 |
-
An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference.
|
530 |
-
An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI,
|
531 |
-
the base URI. Relative references can be divided into several forms according to
|
532 |
-
[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2):
|
533 |
-
|
534 |
-
- network-path references, e.g. `//example.com/path`
|
535 |
-
- absolute-path references, e.g. `/path`
|
536 |
-
- relative-path references, e.g. `subpath`
|
537 |
-
|
538 |
-
The following methods can be used to identify the type of the URI.
|
539 |
-
|
540 |
-
### `GuzzleHttp\Psr7\Uri::isAbsolute`
|
541 |
-
|
542 |
-
`public static function isAbsolute(UriInterface $uri): bool`
|
543 |
-
|
544 |
-
Whether the URI is absolute, i.e. it has a scheme.
|
545 |
-
|
546 |
-
### `GuzzleHttp\Psr7\Uri::isNetworkPathReference`
|
547 |
-
|
548 |
-
`public static function isNetworkPathReference(UriInterface $uri): bool`
|
549 |
-
|
550 |
-
Whether the URI is a network-path reference. A relative reference that begins with two slash characters is
|
551 |
-
termed an network-path reference.
|
552 |
-
|
553 |
-
### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference`
|
554 |
-
|
555 |
-
`public static function isAbsolutePathReference(UriInterface $uri): bool`
|
556 |
-
|
557 |
-
Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is
|
558 |
-
termed an absolute-path reference.
|
559 |
-
|
560 |
-
### `GuzzleHttp\Psr7\Uri::isRelativePathReference`
|
561 |
-
|
562 |
-
`public static function isRelativePathReference(UriInterface $uri): bool`
|
563 |
-
|
564 |
-
Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is
|
565 |
-
termed a relative-path reference.
|
566 |
-
|
567 |
-
### `GuzzleHttp\Psr7\Uri::isSameDocumentReference`
|
568 |
-
|
569 |
-
`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool`
|
570 |
-
|
571 |
-
Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its
|
572 |
-
fragment component, identical to the base URI. When no base URI is given, only an empty URI reference
|
573 |
-
(apart from its fragment) is considered a same-document reference.
|
574 |
-
|
575 |
-
## URI Components
|
576 |
-
|
577 |
-
Additional methods to work with URI components.
|
578 |
-
|
579 |
-
### `GuzzleHttp\Psr7\Uri::isDefaultPort`
|
580 |
-
|
581 |
-
`public static function isDefaultPort(UriInterface $uri): bool`
|
582 |
-
|
583 |
-
Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null
|
584 |
-
or the standard port. This method can be used independently of the implementation.
|
585 |
-
|
586 |
-
### `GuzzleHttp\Psr7\Uri::composeComponents`
|
587 |
-
|
588 |
-
`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string`
|
589 |
-
|
590 |
-
Composes a URI reference string from its various components according to
|
591 |
-
[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called
|
592 |
-
manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`.
|
593 |
-
|
594 |
-
### `GuzzleHttp\Psr7\Uri::fromParts`
|
595 |
-
|
596 |
-
`public static function fromParts(array $parts): UriInterface`
|
597 |
-
|
598 |
-
Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components.
|
599 |
-
|
600 |
-
|
601 |
-
### `GuzzleHttp\Psr7\Uri::withQueryValue`
|
602 |
-
|
603 |
-
`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface`
|
604 |
-
|
605 |
-
Creates a new URI with a specific query string value. Any existing query string values that exactly match the
|
606 |
-
provided key are removed and replaced with the given key value pair. A value of null will set the query string
|
607 |
-
key without a value, e.g. "key" instead of "key=value".
|
608 |
-
|
609 |
-
### `GuzzleHttp\Psr7\Uri::withQueryValues`
|
610 |
-
|
611 |
-
`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface`
|
612 |
-
|
613 |
-
Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an
|
614 |
-
associative array of key => value.
|
615 |
-
|
616 |
-
### `GuzzleHttp\Psr7\Uri::withoutQueryValue`
|
617 |
-
|
618 |
-
`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface`
|
619 |
-
|
620 |
-
Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the
|
621 |
-
provided key are removed.
|
622 |
-
|
623 |
-
## Reference Resolution
|
624 |
-
|
625 |
-
`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according
|
626 |
-
to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers
|
627 |
-
do when resolving a link in a website based on the current request URI.
|
628 |
-
|
629 |
-
### `GuzzleHttp\Psr7\UriResolver::resolve`
|
630 |
-
|
631 |
-
`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface`
|
632 |
-
|
633 |
-
Converts the relative URI into a new URI that is resolved against the base URI.
|
634 |
-
|
635 |
-
### `GuzzleHttp\Psr7\UriResolver::removeDotSegments`
|
636 |
-
|
637 |
-
`public static function removeDotSegments(string $path): string`
|
638 |
-
|
639 |
-
Removes dot segments from a path and returns the new path according to
|
640 |
-
[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4).
|
641 |
-
|
642 |
-
### `GuzzleHttp\Psr7\UriResolver::relativize`
|
643 |
-
|
644 |
-
`public static function relativize(UriInterface $base, UriInterface $target): UriInterface`
|
645 |
-
|
646 |
-
Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve():
|
647 |
-
|
648 |
-
```php
|
649 |
-
(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target))
|
650 |
-
```
|
651 |
-
|
652 |
-
One use-case is to use the current request URI as base URI and then generate relative links in your documents
|
653 |
-
to reduce the document size or offer self-contained downloadable document archives.
|
654 |
-
|
655 |
-
```php
|
656 |
-
$base = new Uri('http://example.com/a/b/');
|
657 |
-
echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'.
|
658 |
-
echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'.
|
659 |
-
echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'.
|
660 |
-
echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'.
|
661 |
-
```
|
662 |
-
|
663 |
-
## Normalization and Comparison
|
664 |
-
|
665 |
-
`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to
|
666 |
-
[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6).
|
667 |
-
|
668 |
-
### `GuzzleHttp\Psr7\UriNormalizer::normalize`
|
669 |
-
|
670 |
-
`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface`
|
671 |
-
|
672 |
-
Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface.
|
673 |
-
This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask
|
674 |
-
of normalizations to apply. The following normalizations are available:
|
675 |
-
|
676 |
-
- `UriNormalizer::PRESERVING_NORMALIZATIONS`
|
677 |
-
|
678 |
-
Default normalizations which only include the ones that preserve semantics.
|
679 |
-
|
680 |
-
- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING`
|
681 |
-
|
682 |
-
All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized.
|
683 |
-
|
684 |
-
Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b`
|
685 |
-
|
686 |
-
- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS`
|
687 |
-
|
688 |
-
Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of
|
689 |
-
ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should
|
690 |
-
not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved
|
691 |
-
characters by URI normalizers.
|
692 |
-
|
693 |
-
Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/`
|
694 |
-
|
695 |
-
- `UriNormalizer::CONVERT_EMPTY_PATH`
|
696 |
-
|
697 |
-
Converts the empty path to "/" for http and https URIs.
|
698 |
-
|
699 |
-
Example: `http://example.org` → `http://example.org/`
|
700 |
-
|
701 |
-
- `UriNormalizer::REMOVE_DEFAULT_HOST`
|
702 |
-
|
703 |
-
Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host
|
704 |
-
"localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to
|
705 |
-
RFC 3986.
|
706 |
-
|
707 |
-
Example: `file://localhost/myfile` → `file:///myfile`
|
708 |
-
|
709 |
-
- `UriNormalizer::REMOVE_DEFAULT_PORT`
|
710 |
-
|
711 |
-
Removes the default port of the given URI scheme from the URI.
|
712 |
-
|
713 |
-
Example: `http://example.org:80/` → `http://example.org/`
|
714 |
-
|
715 |
-
- `UriNormalizer::REMOVE_DOT_SEGMENTS`
|
716 |
-
|
717 |
-
Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would
|
718 |
-
change the semantics of the URI reference.
|
719 |
-
|
720 |
-
Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html`
|
721 |
-
|
722 |
-
- `UriNormalizer::REMOVE_DUPLICATE_SLASHES`
|
723 |
-
|
724 |
-
Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes
|
725 |
-
and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization
|
726 |
-
may change the semantics. Encoded slashes (%2F) are not removed.
|
727 |
-
|
728 |
-
Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html`
|
729 |
-
|
730 |
-
- `UriNormalizer::SORT_QUERY_PARAMETERS`
|
731 |
-
|
732 |
-
Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be
|
733 |
-
significant (this is not defined by the standard). So this normalization is not safe and may change the semantics
|
734 |
-
of the URI.
|
735 |
-
|
736 |
-
Example: `?lang=en&article=fred` → `?article=fred&lang=en`
|
737 |
-
|
738 |
-
### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent`
|
739 |
-
|
740 |
-
`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool`
|
741 |
-
|
742 |
-
Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given
|
743 |
-
`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent.
|
744 |
-
This of course assumes they will be resolved against the same base URI. If this is not the case, determination of
|
745 |
-
equivalence or difference of relative references does not mean anything.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/composer.json
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "guzzlehttp/psr7",
|
3 |
-
"type": "library",
|
4 |
-
"description": "PSR-7 message implementation that also provides common utility methods",
|
5 |
-
"keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
|
6 |
-
"license": "MIT",
|
7 |
-
"authors": [
|
8 |
-
{
|
9 |
-
"name": "Michael Dowling",
|
10 |
-
"email": "mtdowling@gmail.com",
|
11 |
-
"homepage": "https://github.com/mtdowling"
|
12 |
-
},
|
13 |
-
{
|
14 |
-
"name": "Tobias Schultze",
|
15 |
-
"homepage": "https://github.com/Tobion"
|
16 |
-
}
|
17 |
-
],
|
18 |
-
"require": {
|
19 |
-
"php": ">=5.4.0",
|
20 |
-
"psr/http-message": "~1.0",
|
21 |
-
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
22 |
-
},
|
23 |
-
"require-dev": {
|
24 |
-
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
|
25 |
-
"ext-zlib": "*"
|
26 |
-
},
|
27 |
-
"provide": {
|
28 |
-
"psr/http-message-implementation": "1.0"
|
29 |
-
},
|
30 |
-
"suggest": {
|
31 |
-
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
32 |
-
},
|
33 |
-
"autoload": {
|
34 |
-
"psr-4": {
|
35 |
-
"GuzzleHttp\\Psr7\\": "src/"
|
36 |
-
},
|
37 |
-
"files": ["src/functions_include.php"]
|
38 |
-
},
|
39 |
-
"autoload-dev": {
|
40 |
-
"psr-4": {
|
41 |
-
"GuzzleHttp\\Tests\\Psr7\\": "tests/"
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"extra": {
|
45 |
-
"branch-alias": {
|
46 |
-
"dev-master": "1.6-dev"
|
47 |
-
}
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/psr/http-message/composer.json
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "psr/http-message",
|
3 |
-
"description": "Common interface for HTTP messages",
|
4 |
-
"keywords": ["psr", "psr-7", "http", "http-message", "request", "response"],
|
5 |
-
"homepage": "https://github.com/php-fig/http-message",
|
6 |
-
"license": "MIT",
|
7 |
-
"authors": [
|
8 |
-
{
|
9 |
-
"name": "PHP-FIG",
|
10 |
-
"homepage": "http://www.php-fig.org/"
|
11 |
-
}
|
12 |
-
],
|
13 |
-
"require": {
|
14 |
-
"php": ">=5.3.0"
|
15 |
-
},
|
16 |
-
"autoload": {
|
17 |
-
"psr-4": {
|
18 |
-
"Psr\\Http\\Message\\": "src/"
|
19 |
-
}
|
20 |
-
},
|
21 |
-
"extra": {
|
22 |
-
"branch-alias": {
|
23 |
-
"dev-master": "1.0.x-dev"
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/ralouphie/getallheaders/composer.json
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "ralouphie/getallheaders",
|
3 |
-
"description": "A polyfill for getallheaders.",
|
4 |
-
"license": "MIT",
|
5 |
-
"authors": [
|
6 |
-
{
|
7 |
-
"name": "Ralph Khattar",
|
8 |
-
"email": "ralph.khattar@gmail.com"
|
9 |
-
}
|
10 |
-
],
|
11 |
-
"require": {
|
12 |
-
"php": ">=5.6"
|
13 |
-
},
|
14 |
-
"require-dev": {
|
15 |
-
"phpunit/phpunit": "^5 || ^6.5",
|
16 |
-
"php-coveralls/php-coveralls": "^2.1"
|
17 |
-
},
|
18 |
-
"autoload": {
|
19 |
-
"files": ["src/getallheaders.php"]
|
20 |
-
},
|
21 |
-
"autoload-dev": {
|
22 |
-
"psr-4": {
|
23 |
-
"getallheaders\\Tests\\": "tests/"
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie/wc/autoload.php
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mollie_WC_Autoload
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
* @var bool
|
6 |
-
*/
|
7 |
-
static $registered = false;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* @return bool
|
11 |
-
*/
|
12 |
-
public static function register ()
|
13 |
-
{
|
14 |
-
if (self::$registered === true)
|
15 |
-
{
|
16 |
-
/*
|
17 |
-
* Autoloader already registered
|
18 |
-
*/
|
19 |
-
return false;
|
20 |
-
}
|
21 |
-
|
22 |
-
// Set registered
|
23 |
-
self::$registered = true;
|
24 |
-
|
25 |
-
return spl_autoload_register(array(__CLASS__, "autoload"));
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @return bool
|
30 |
-
*/
|
31 |
-
public static function unregister ()
|
32 |
-
{
|
33 |
-
if (self::$registered === false)
|
34 |
-
{
|
35 |
-
/*
|
36 |
-
* Autoloader not registered
|
37 |
-
*/
|
38 |
-
return false;
|
39 |
-
}
|
40 |
-
|
41 |
-
return spl_autoload_unregister(array(__CLASS__, "autoload"));
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @param string $class_name
|
46 |
-
*/
|
47 |
-
public static function autoload ($class_name)
|
48 |
-
{
|
49 |
-
// Path to includes directory
|
50 |
-
$base_path = dirname(dirname(dirname(__FILE__)));
|
51 |
-
|
52 |
-
if (stripos($class_name, "Mollie_WC_") === 0)
|
53 |
-
{
|
54 |
-
$class_path = $base_path . '/' . str_replace('_', '/', strtolower($class_name)) . '.php';
|
55 |
-
|
56 |
-
if (file_exists($class_path))
|
57 |
-
{
|
58 |
-
require_once $class_path;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie/wc/gateway/creditcard.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use Mollie\Api\Types\PaymentMethod;
|
4 |
-
|
5 |
-
class Mollie_WC_Gateway_Creditcard extends Mollie_WC_Gateway_AbstractSubscription
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
*
|
9 |
-
*/
|
10 |
-
public function __construct ()
|
11 |
-
{
|
12 |
-
$this->supports = array(
|
13 |
-
'products',
|
14 |
-
'refunds'
|
15 |
-
);
|
16 |
-
|
17 |
-
$this->initSubscriptionSupport();
|
18 |
-
|
19 |
-
parent::__construct();
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @return string
|
24 |
-
*/
|
25 |
-
public function getMollieMethodId ()
|
26 |
-
{
|
27 |
-
return PaymentMethod::CREDITCARD;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @return string
|
32 |
-
*/
|
33 |
-
public function getDefaultTitle ()
|
34 |
-
{
|
35 |
-
return __('Credit card', 'mollie-payments-for-woocommerce');
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @return string
|
40 |
-
*/
|
41 |
-
protected function getSettingsDescription() {
|
42 |
-
return '';
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
protected function getDefaultDescription ()
|
49 |
-
{
|
50 |
-
return '';
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @param WC_Order $order
|
55 |
-
* @param Mollie\Api\Resources\Payment $payment
|
56 |
-
* @param bool $admin_instructions
|
57 |
-
* @param bool $plain_text
|
58 |
-
* @return string|null
|
59 |
-
*/
|
60 |
-
protected function getInstructions (WC_Order $order, Mollie\Api\Resources\Payment $payment, $admin_instructions, $plain_text)
|
61 |
-
{
|
62 |
-
if ($payment->isPaid() && $payment->details)
|
63 |
-
{
|
64 |
-
return sprintf(
|
65 |
-
/* translators: Placeholder 1: card holder */
|
66 |
-
__('Payment completed by <strong>%s</strong>', 'mollie-payments-for-woocommerce'),
|
67 |
-
$payment->details->cardHolder
|
68 |
-
);
|
69 |
-
}
|
70 |
-
|
71 |
-
return parent::getInstructions($order, $payment, $admin_instructions, $plain_text);
|
72 |
-
|
73 |
-
}
|
74 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie/wc/helper/status.php
DELETED
@@ -1,187 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mollie_WC_Helper_Status
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
* Minimal required WooCommerce version
|
6 |
-
*
|
7 |
-
* @var string
|
8 |
-
*/
|
9 |
-
const MIN_WOOCOMMERCE_VERSION = '2.1.0';
|
10 |
-
|
11 |
-
/**
|
12 |
-
* @var string[]
|
13 |
-
*/
|
14 |
-
protected $errors = array();
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @return bool
|
18 |
-
*/
|
19 |
-
public function hasErrors ()
|
20 |
-
{
|
21 |
-
return !empty($this->errors);
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @return string[]
|
26 |
-
*/
|
27 |
-
public function getErrors ()
|
28 |
-
{
|
29 |
-
return $this->errors;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Check if this plugin is compatible
|
34 |
-
*
|
35 |
-
* @return bool
|
36 |
-
*/
|
37 |
-
public function isCompatible ()
|
38 |
-
{
|
39 |
-
static $is_compatible = null;
|
40 |
-
|
41 |
-
if ($is_compatible !== null)
|
42 |
-
{
|
43 |
-
return $is_compatible;
|
44 |
-
}
|
45 |
-
|
46 |
-
// Default
|
47 |
-
$is_compatible = true;
|
48 |
-
|
49 |
-
if (!$this->hasCompatibleWooCommerceVersion())
|
50 |
-
{
|
51 |
-
$this->errors[] = sprintf(
|
52 |
-
/* translators: Placeholder 1: Plugin name, placeholder 2: required WooCommerce version, placeholder 3: used WooCommerce version */
|
53 |
-
__('The %s plugin requires at least WooCommerce version %s, you are using version %s. Please update your WooCommerce plugin.', 'mollie-payments-for-woocommerce'),
|
54 |
-
Mollie_WC_Plugin::PLUGIN_TITLE,
|
55 |
-
self::MIN_WOOCOMMERCE_VERSION,
|
56 |
-
$this->getWooCommerceVersion()
|
57 |
-
);
|
58 |
-
|
59 |
-
return $is_compatible = false;
|
60 |
-
}
|
61 |
-
|
62 |
-
if (!$this->isApiClientInstalled())
|
63 |
-
{
|
64 |
-
$this->errors[] = __('Mollie API client not installed. Please make sure the plugin is installed correctly.', 'mollie-payments-for-woocommerce');
|
65 |
-
|
66 |
-
return $is_compatible = false;
|
67 |
-
}
|
68 |
-
|
69 |
-
if ( function_exists( 'extension_loaded' ) && ! extension_loaded( 'json' ) ) {
|
70 |
-
|
71 |
-
$this->errors[] = __('Mollie Payments for WooCommerce requires the JSON extension for PHP. Enable it in your server or ask your webhoster to enable it for you.', 'mollie-payments-for-woocommerce');
|
72 |
-
|
73 |
-
return $is_compatible = false;
|
74 |
-
}
|
75 |
-
|
76 |
-
try
|
77 |
-
{
|
78 |
-
$checker = $this->getApiClientCompatibilityChecker();
|
79 |
-
|
80 |
-
$checker->checkCompatibility();
|
81 |
-
}
|
82 |
-
catch ( \Mollie\Api\Exceptions\IncompatiblePlatform $e)
|
83 |
-
{
|
84 |
-
switch ($e->getCode())
|
85 |
-
{
|
86 |
-
case \Mollie\Api\Exceptions\IncompatiblePlatform::INCOMPATIBLE_PHP_VERSION:
|
87 |
-
$error = sprintf(
|
88 |
-
/* translators: Placeholder 1: Required PHP version, placeholder 2: current PHP version */
|
89 |
-
__('Mollie Payments for WooCommerce requires PHP %s or higher, you have PHP %s. Please upgrade and view %sthis FAQ%s', 'mollie-payments-for-woocommerce'),
|
90 |
-
\Mollie\Api\CompatibilityChecker::MIN_PHP_VERSION,
|
91 |
-
PHP_VERSION,
|
92 |
-
'<a href="https://github.com/mollie/WooCommerce/wiki/PHP-&-Mollie-API-v2" target="_blank">',
|
93 |
-
'</a>'
|
94 |
-
);
|
95 |
-
break;
|
96 |
-
|
97 |
-
case \Mollie\Api\Exceptions\IncompatiblePlatform::INCOMPATIBLE_JSON_EXTENSION:
|
98 |
-
$error = __('Mollie Payments for WooCommerce requires the PHP extension JSON to be enabled. Please enable the \'json\' extension in your PHP configuration.', 'mollie-payments-for-woocommerce');
|
99 |
-
break;
|
100 |
-
|
101 |
-
case \Mollie\Api\Exceptions\IncompatiblePlatform::INCOMPATIBLE_CURL_EXTENSION:
|
102 |
-
$error = __('Mollie Payments for WooCommerce requires the PHP extension cURL to be enabled. Please enable the \'curl\' extension in your PHP configuration.', 'mollie-payments-for-woocommerce');
|
103 |
-
break;
|
104 |
-
|
105 |
-
case \Mollie\Api\Exceptions\IncompatiblePlatform::INCOMPATIBLE_CURL_FUNCTION:
|
106 |
-
$error =
|
107 |
-
__( 'Mollie Payments for WooCommerce requires PHP cURL functions to be available. Please make sure all of these functions are available.', 'mollie-payments-for-woocommerce' );
|
108 |
-
break;
|
109 |
-
|
110 |
-
default:
|
111 |
-
$error = $e->getMessage();
|
112 |
-
break;
|
113 |
-
}
|
114 |
-
|
115 |
-
$this->errors[] = $error;
|
116 |
-
|
117 |
-
return $is_compatible = false;
|
118 |
-
}
|
119 |
-
|
120 |
-
return $is_compatible;
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* @return string
|
125 |
-
*/
|
126 |
-
public function getWooCommerceVersion ()
|
127 |
-
{
|
128 |
-
return WooCommerce::instance()->version;
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* @return bool
|
133 |
-
*/
|
134 |
-
public function hasCompatibleWooCommerceVersion ()
|
135 |
-
{
|
136 |
-
return (bool) version_compare($this->getWooCommerceVersion(), self::MIN_WOOCOMMERCE_VERSION, ">=");
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* @return bool
|
141 |
-
*/
|
142 |
-
protected function isApiClientInstalled ()
|
143 |
-
{
|
144 |
-
$includes_dir = dirname(dirname(dirname(dirname(__FILE__))));
|
145 |
-
|
146 |
-
return file_exists($includes_dir . '/mollie-api-php');
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* @throws \Mollie\Api\Exceptions\ApiException
|
151 |
-
*/
|
152 |
-
public function getMollieApiStatus ()
|
153 |
-
{
|
154 |
-
try
|
155 |
-
{
|
156 |
-
// Is test mode enabled?
|
157 |
-
$test_mode = Mollie_WC_Plugin::getSettingsHelper()->isTestModeEnabled();
|
158 |
-
|
159 |
-
$api_helper = Mollie_WC_Plugin::getApiHelper();
|
160 |
-
$api_client = $api_helper->getApiClient($test_mode);
|
161 |
-
|
162 |
-
// Try to load Mollie issuers
|
163 |
-
$api_client->methods->all();
|
164 |
-
}
|
165 |
-
catch ( \Mollie\Api\Exceptions\ApiException $e )
|
166 |
-
{
|
167 |
-
|
168 |
-
if ( $e->getMessage() == 'Error executing API call (401: Unauthorized Request): Missing authentication, or failed to authenticate. Documentation: https://docs.mollie.com/guides/authentication') {
|
169 |
-
throw new \Mollie\Api\Exceptions\ApiException(
|
170 |
-
'incorrect API key or other authentication issue. Please check your API keys!'
|
171 |
-
);
|
172 |
-
}
|
173 |
-
|
174 |
-
throw new \Mollie\Api\Exceptions\ApiException(
|
175 |
-
$e->getMessage()
|
176 |
-
);
|
177 |
-
}
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* @return Mollie\Api\CompatibilityChecker()
|
182 |
-
*/
|
183 |
-
protected function getApiClientCompatibilityChecker ()
|
184 |
-
{
|
185 |
-
return new Mollie\Api\CompatibilityChecker();
|
186 |
-
}
|
187 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie/wc/payment/PartialRefundException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class PartialRefundException extends UnexpectedValueException
|
4 |
-
{
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
license.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
Mollie Payments for WooCommerce plugin
|
2 |
-
Copyright (C) 2014-
|
3 |
|
4 |
This program is free software; you can redistribute it and/or modify
|
5 |
it under the terms of the GNU General Public License as published by
|
@@ -354,4 +354,4 @@ This General Public License does not permit incorporating your program into
|
|
354 |
proprietary programs. If your program is a subroutine library, you may
|
355 |
consider it more useful to permit linking proprietary applications with the
|
356 |
library. If this is what you want to do, use the GNU Lesser General
|
357 |
-
Public License instead of this License.
|
1 |
Mollie Payments for WooCommerce plugin
|
2 |
+
Copyright (C) 2014-2019, Mollie B.V. <info@mollie.com>
|
3 |
|
4 |
This program is free software; you can redistribute it and/or modify
|
5 |
it under the terms of the GNU General Public License as published by
|
354 |
proprietary programs. If your program is a subroutine library, you may
|
355 |
consider it more useful to permit linking proprietary applications with the
|
356 |
library. If this is what you want to do, use the GNU Lesser General
|
357 |
+
Public License instead of this License.
|
mollie-payments-for-woocommerce.php
CHANGED
@@ -3,198 +3,214 @@
|
|
3 |
* Plugin Name: Mollie Payments for WooCommerce
|
4 |
* Plugin URI: https://www.mollie.com
|
5 |
* Description: Accept payments in WooCommerce with the official Mollie plugin
|
6 |
-
* Version: 5.
|
7 |
* Author: Mollie
|
8 |
* Author URI: https://www.mollie.com
|
9 |
* Requires at least: 3.8
|
10 |
-
* Tested up to: 5.
|
11 |
* Text Domain: mollie-payments-for-woocommerce
|
12 |
* Domain Path: /i18n/languages/
|
13 |
* License: GPLv2 or later
|
14 |
* WC requires at least: 2.2.0
|
15 |
-
* WC tested up to: 3.
|
16 |
*/
|
17 |
|
18 |
-
|
19 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
-
exit;
|
21 |
-
}
|
22 |
-
|
23 |
-
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
24 |
-
require_once 'includes/mollie/wc/autoload.php';
|
25 |
-
require_once 'includes/mollie-api-php/vendor/autoload.php';
|
26 |
-
|
27 |
-
// Plugin folder URL.
|
28 |
-
if ( ! defined( 'M4W_PLUGIN_URL' ) ) {
|
29 |
-
define( 'M4W_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
30 |
-
}
|
31 |
-
|
32 |
-
// Plugin directory
|
33 |
-
if ( ! defined( 'M4W_PLUGIN_DIR' ) ) {
|
34 |
-
define( 'M4W_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Pro-actively check for required PHP JSON extension
|
39 |
-
*/
|
40 |
-
function mollie_wc_check_json_extension() {
|
41 |
-
if ( function_exists( 'extension_loaded' ) && ! extension_loaded( 'json' ) ) {
|
42 |
-
remove_action( 'init', 'mollie_wc_plugin_init' );
|
43 |
-
add_action( 'admin_notices', 'mollie_wc_plugin_inactive_json_extension' );
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
add_action( 'plugins_loaded', 'mollie_wc_check_json_extension' );
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Pro-actively check and communicate PHP version incompatibility for Mollie Payments for WooCommerce 4.0
|
51 |
-
*/
|
52 |
-
function mollie_wc_check_php_version() {
|
53 |
-
if ( ! version_compare( PHP_VERSION, '5.6.0', ">=" ) ) {
|
54 |
-
remove_action( 'init', 'mollie_wc_plugin_init' );
|
55 |
-
add_action( 'admin_notices', 'mollie_wc_plugin_inactive_php' );
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
add_action( 'plugins_loaded', 'mollie_wc_check_php_version' );
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Check if WooCommerce is active and of a supported version
|
63 |
-
*/
|
64 |
-
function mollie_wc_check_woocommerce_status() {
|
65 |
-
if ( ! class_exists( 'WooCommerce' ) || version_compare( get_option( 'woocommerce_version' ), '2.2', '<' ) ) {
|
66 |
-
remove_action('init', 'mollie_wc_plugin_init');
|
67 |
-
add_action( 'admin_notices', 'mollie_wc_plugin_inactive' );
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
add_action( 'plugins_loaded', 'mollie_wc_check_woocommerce_status' );
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Called when plugin is loaded
|
75 |
-
*/
|
76 |
-
function mollie_wc_plugin_init() {
|
77 |
-
|
78 |
-
$pluginDir = untrailingslashit(plugin_dir_path(__FILE__));
|
79 |
|
80 |
-
|
81 |
-
require_once $pluginDir . '/includes/mollie/wc/payment/OrderItemsRefunder.php';
|
82 |
-
require_once $pluginDir . '/includes/mollie/wc/payment/PartialRefundException.php';
|
83 |
-
require_once $pluginDir . '/includes/mollie/wc/payment/RefundLineItemsBuilder.php';
|
84 |
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
|
|
|
90 |
}
|
91 |
|
92 |
/**
|
93 |
* Called when plugin is activated
|
94 |
*/
|
95 |
-
function mollie_wc_plugin_activation_hook
|
96 |
{
|
|
|
|
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
return;
|
102 |
-
}
|
103 |
|
104 |
-
|
105 |
-
|
|
|
|
|
106 |
|
107 |
$status_helper = Mollie_WC_Plugin::getStatusHelper();
|
108 |
|
109 |
-
if (!$status_helper->isCompatible())
|
110 |
-
|
111 |
-
$title = 'Could not activate plugin ' . Mollie_WC_Plugin::PLUGIN_TITLE;
|
112 |
$message = '<h1><strong>Could not activate plugin ' . Mollie_WC_Plugin::PLUGIN_TITLE . '</strong></h1><br/>'
|
113 |
-
|
114 |
|
115 |
wp_die($message, $title, array('back_link' => true));
|
116 |
return;
|
117 |
}
|
118 |
}
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
return false;
|
131 |
-
}
|
132 |
-
|
133 |
-
echo '<div class="error"><p>';
|
134 |
-
echo esc_html__( 'Mollie Payments for WooCommerce requires the JSON extension for PHP. Enable it in your server or ask your webhoster to enable it for you.', 'mollie-payments-for-woocommerce' );
|
135 |
-
echo '</p></div>';
|
136 |
-
|
137 |
-
return false;
|
138 |
-
|
139 |
}
|
140 |
|
141 |
-
function
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
if ( ! is_admin() ) {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
157 |
|
|
|
158 |
}
|
159 |
|
160 |
-
function
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
178 |
|
179 |
-
|
|
|
|
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
*/
|
194 |
-
|
195 |
-
|
196 |
-
load_plugin_textdomain( 'mollie-payments-for-woocommerce', false, M4W_PLUGIN_DIR . 'i18n/languages/' );
|
197 |
|
|
|
198 |
}
|
199 |
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: Mollie Payments for WooCommerce
|
4 |
* Plugin URI: https://www.mollie.com
|
5 |
* Description: Accept payments in WooCommerce with the official Mollie plugin
|
6 |
+
* Version: 5.4.0
|
7 |
* Author: Mollie
|
8 |
* Author URI: https://www.mollie.com
|
9 |
* Requires at least: 3.8
|
10 |
+
* Tested up to: 5.3
|
11 |
* Text Domain: mollie-payments-for-woocommerce
|
12 |
* Domain Path: /i18n/languages/
|
13 |
* License: GPLv2 or later
|
14 |
* WC requires at least: 2.2.0
|
15 |
+
* WC tested up to: 3.8
|
16 |
*/
|
17 |
|
18 |
+
use Mollie\Api\CompatibilityChecker;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
|
|
|
|
|
|
21 |
|
22 |
+
define('M4W_FILE', __FILE__);
|
23 |
+
define('M4W_PLUGIN_DIR', dirname(M4W_FILE));
|
24 |
|
25 |
+
// Plugin folder URL.
|
26 |
+
if (!defined('M4W_PLUGIN_URL')) {
|
27 |
+
define('M4W_PLUGIN_URL', plugin_dir_url(M4W_FILE));
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
* Called when plugin is activated
|
32 |
*/
|
33 |
+
function mollie_wc_plugin_activation_hook()
|
34 |
{
|
35 |
+
require_once __DIR__ . '/inc/functions.php';
|
36 |
+
require_once __DIR__ . '/src/subscriptions_status_check_functions.php';
|
37 |
|
38 |
+
if (!autoload()) {
|
39 |
+
return;
|
40 |
+
}
|
|
|
|
|
41 |
|
42 |
+
if (!isWooCommerceCompatible()) {
|
43 |
+
add_action('admin_notices', 'mollie_wc_plugin_inactive');
|
44 |
+
return;
|
45 |
+
}
|
46 |
|
47 |
$status_helper = Mollie_WC_Plugin::getStatusHelper();
|
48 |
|
49 |
+
if (!$status_helper->isCompatible()) {
|
50 |
+
$title = 'Could not activate plugin ' . Mollie_WC_Plugin::PLUGIN_TITLE;
|
|
|
51 |
$message = '<h1><strong>Could not activate plugin ' . Mollie_WC_Plugin::PLUGIN_TITLE . '</strong></h1><br/>'
|
52 |
+
. implode('<br/>', $status_helper->getErrors());
|
53 |
|
54 |
wp_die($message, $title, array('back_link' => true));
|
55 |
return;
|
56 |
}
|
57 |
}
|
58 |
|
59 |
+
function isWooCommerceCompatible()
|
60 |
+
{
|
61 |
+
$wooCommerceVersion = get_option('woocommerce_version');
|
62 |
+
$isWooCommerceVersionCompatible = version_compare(
|
63 |
+
$wooCommerceVersion,
|
64 |
+
Mollie_WC_Helper_Status::MIN_WOOCOMMERCE_VERSION,
|
65 |
+
'>='
|
66 |
+
);
|
67 |
+
|
68 |
+
return class_exists('WooCommerce') && $isWooCommerceVersionCompatible;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
+
function mollie_wc_plugin_inactive_json_extension()
|
72 |
+
{
|
73 |
+
$nextScheduledTime = wp_next_scheduled('pending_payment_confirmation_check');
|
74 |
+
if ($nextScheduledTime) {
|
75 |
+
wp_unschedule_event($nextScheduledTime, 'pending_payment_confirmation_check');
|
76 |
+
}
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
if (!is_admin()) {
|
79 |
+
return false;
|
80 |
+
}
|
81 |
|
82 |
+
echo '<div class="error"><p>';
|
83 |
+
echo esc_html__(
|
84 |
+
'Mollie Payments for WooCommerce requires the JSON extension for PHP. Enable it in your server or ask your webhoster to enable it for you.',
|
85 |
+
'mollie-payments-for-woocommerce'
|
86 |
+
);
|
87 |
+
echo '</p></div>';
|
88 |
|
89 |
+
return false;
|
90 |
}
|
91 |
|
92 |
+
function mollie_wc_plugin_inactive_php()
|
93 |
+
{
|
94 |
+
$nextScheduledTime = wp_next_scheduled('pending_payment_confirmation_check');
|
95 |
+
if ($nextScheduledTime) {
|
96 |
+
wp_unschedule_event($nextScheduledTime, 'pending_payment_confirmation_check');
|
97 |
+
}
|
98 |
|
99 |
+
if (!is_admin()) {
|
100 |
+
return false;
|
101 |
+
}
|
102 |
|
103 |
+
echo '<div class="error"><p>';
|
104 |
+
echo sprintf(
|
105 |
+
esc_html__(
|
106 |
+
'Mollie Payments for WooCommerce 4.0 requires PHP 5.6 or higher. Your PHP version is outdated. Upgrade your PHP version and view %sthis FAQ%s.',
|
107 |
+
'mollie-payments-for-woocommerce'
|
108 |
+
),
|
109 |
+
'<a href="https://github.com/mollie/WooCommerce/wiki/PHP-&-Mollie-API-v2" target="_blank">',
|
110 |
+
'</a>'
|
111 |
+
);
|
112 |
+
echo '</p></div>';
|
113 |
+
|
114 |
+
return false;
|
115 |
+
}
|
116 |
|
117 |
+
function mollie_wc_plugin_inactive()
|
118 |
+
{
|
119 |
+
$nextScheduledTime = wp_next_scheduled('pending_payment_confirmation_check');
|
120 |
+
if ($nextScheduledTime) {
|
121 |
+
wp_unschedule_event($nextScheduledTime, 'pending_payment_confirmation_check');
|
122 |
+
}
|
123 |
|
124 |
+
if (!is_admin()) {
|
125 |
+
return false;
|
126 |
+
}
|
127 |
|
128 |
+
if (!is_plugin_active('woocommerce/woocommerce.php')) {
|
129 |
+
echo '<div class="error"><p>';
|
130 |
+
echo sprintf(
|
131 |
+
esc_html__(
|
132 |
+
'%1$sMollie Payments for WooCommerce is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for it to work. Please %5$sinstall & activate WooCommerce »%6$s',
|
133 |
+
'mollie-payments-for-woocommerce'
|
134 |
+
),
|
135 |
+
'<strong>',
|
136 |
+
'</strong>',
|
137 |
+
'<a href="https://wordpress.org/plugins/woocommerce/">',
|
138 |
+
'</a>',
|
139 |
+
'<a href="' . esc_url(admin_url('plugins.php')) . '">',
|
140 |
+
'</a>'
|
141 |
+
);
|
142 |
+
echo '</p></div>';
|
143 |
+
return false;
|
144 |
+
}
|
145 |
|
146 |
+
if (version_compare(get_option('woocommerce_version'), '2.2', '<')) {
|
147 |
+
echo '<div class="error"><p>';
|
148 |
+
echo sprintf(
|
149 |
+
esc_html__(
|
150 |
+
'%1$sMollie Payments for WooCommerce is inactive.%2$s This version requires WooCommerce 2.2 or newer. Please %3$supdate WooCommerce to version 2.2 or newer »%4$s',
|
151 |
+
'mollie-payments-for-woocommerce'
|
152 |
+
),
|
153 |
+
'<strong>',
|
154 |
+
'</strong>',
|
155 |
+
'<a href="' . esc_url(admin_url('plugins.php')) . '">',
|
156 |
+
'</a>'
|
157 |
+
);
|
158 |
+
echo '</p></div>';
|
159 |
+
return false;
|
160 |
+
}
|
161 |
}
|
162 |
|
163 |
+
function autoload()
|
164 |
+
{
|
165 |
+
$autoloader = __DIR__ . '/vendor/autoload.php';
|
166 |
+
if (file_exists($autoloader)) {
|
167 |
+
/** @noinspection PhpIncludeInspection */
|
168 |
+
require $autoloader;
|
169 |
+
}
|
|
|
170 |
|
171 |
+
return class_exists(Mollie_WC_Plugin::class);
|
172 |
}
|
173 |
|
174 |
+
$bootstrap = Closure::bind(
|
175 |
+
function () {
|
176 |
+
add_action(
|
177 |
+
'plugins_loaded',
|
178 |
+
function () {
|
179 |
+
require_once __DIR__ . '/inc/functions.php';
|
180 |
+
require_once __DIR__ . '/src/subscriptions_status_check_functions.php';
|
181 |
+
|
182 |
+
if (!autoload()) {
|
183 |
+
return;
|
184 |
+
}
|
185 |
+
|
186 |
+
if (function_exists('extension_loaded') && !extension_loaded('json')) {
|
187 |
+
add_action('admin_notices', 'mollie_wc_plugin_inactive_json_extension');
|
188 |
+
return;
|
189 |
+
}
|
190 |
+
|
191 |
+
if (version_compare(PHP_VERSION, CompatibilityChecker::MIN_PHP_VERSION, '<')) {
|
192 |
+
add_action('admin_notices', 'mollie_wc_plugin_inactive_php');
|
193 |
+
return;
|
194 |
+
}
|
195 |
+
|
196 |
+
if (!isWooCommerceCompatible()) {
|
197 |
+
add_action('admin_notices', 'mollie_wc_plugin_inactive');
|
198 |
+
return;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
);
|
202 |
+
|
203 |
+
add_action(
|
204 |
+
'init',
|
205 |
+
function () {
|
206 |
+
load_plugin_textdomain('mollie-payments-for-woocommerce');
|
207 |
+
Mollie_WC_Plugin::init();
|
208 |
+
}
|
209 |
+
);
|
210 |
+
},
|
211 |
+
null
|
212 |
+
);
|
213 |
+
|
214 |
+
$bootstrap();
|
215 |
+
|
216 |
+
register_activation_hook(M4W_FILE, 'mollie_wc_plugin_activation_hook');
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, ndijkstra, robin-mollie, wido
|
3 |
Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 5.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -181,6 +181,12 @@ Automatic updates should work like a charm; as always though, ensure you backup
|
|
181 |
|
182 |
== Changelog ==
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
= 5.3.2 - 04-11-2019 =
|
185 |
|
186 |
* Fix - WooCommerce Session is not available before a specific action has been preformed causing null pointer exceptions in backend
|
2 |
Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, ndijkstra, robin-mollie, wido
|
3 |
Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 5.3
|
6 |
+
Stable tag: 5.4.0
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
181 |
|
182 |
== Changelog ==
|
183 |
|
184 |
+
= 5.4.0 - 04-12-2019 =
|
185 |
+
|
186 |
+
* Fix - Apple Pay Gateway is removed from available gateways during WooCommerce Api calls
|
187 |
+
* Fix - Giftcard Gateway does not show the right payment icon in checkout page
|
188 |
+
* Add - Support for Mollie Components
|
189 |
+
|
190 |
= 5.3.2 - 04-11-2019 =
|
191 |
|
192 |
* Fix - WooCommerce Session is not available before a specific action has been preformed causing null pointer exceptions in backend
|
src/Mollie/WC/Components/Styles.php
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mollie_WC_Components_Styles
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* @var Mollie_WC_Settings_Components
|
7 |
+
*/
|
8 |
+
protected $mollieComponentsSettings;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @var WC_Payment_Gateways
|
12 |
+
*/
|
13 |
+
protected $paymentGateways;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Mollie_WC_Components_Styles constructor.
|
17 |
+
* @param Mollie_WC_Settings_Components $mollieComponentsSettings
|
18 |
+
* @param WC_Payment_Gateways $paymentGateways
|
19 |
+
*/
|
20 |
+
public function __construct(
|
21 |
+
Mollie_WC_Settings_Components $mollieComponentsSettings,
|
22 |
+
WC_Payment_Gateways $paymentGateways
|
23 |
+
) {
|
24 |
+
|
25 |
+
$this->mollieComponentsSettings = $mollieComponentsSettings;
|
26 |
+
$this->paymentGateways = $paymentGateways;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Retrieve the mollie components styles for all of the available Gateways
|
31 |
+
*
|
32 |
+
* Gateways are enabled along with mollie components
|
33 |
+
*
|
34 |
+
* @return array
|
35 |
+
*/
|
36 |
+
public function forAvailableGateways()
|
37 |
+
{
|
38 |
+
$availablePaymentGateways = $this->paymentGateways->get_available_payment_gateways();
|
39 |
+
$gatewaysWithMollieComponentsEnabled = $this->gatewaysWithMollieComponentsEnabled(
|
40 |
+
$availablePaymentGateways
|
41 |
+
);
|
42 |
+
|
43 |
+
if (!$gatewaysWithMollieComponentsEnabled) {
|
44 |
+
return [];
|
45 |
+
}
|
46 |
+
|
47 |
+
return $this->mollieComponentsStylesPerGateway(
|
48 |
+
$this->mollieComponentsSettings->styles(),
|
49 |
+
$gatewaysWithMollieComponentsEnabled
|
50 |
+
);
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Retrieve the WooCommerce Gateways Which have the Mollie Components enabled
|
55 |
+
*
|
56 |
+
* @param array $gateways
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
protected function gatewaysWithMollieComponentsEnabled(array $gateways)
|
60 |
+
{
|
61 |
+
$gatewaysWithMollieComponentsEnabled = [];
|
62 |
+
|
63 |
+
/** @var WC_Payment_Gateway $gateway */
|
64 |
+
foreach ($gateways as $gateway) {
|
65 |
+
$isGatewayEnabled = wc_string_to_bool($gateway->enabled);
|
66 |
+
if ($isGatewayEnabled && $this->isMollieComponentsEnabledForGateway($gateway)) {
|
67 |
+
$gatewaysWithMollieComponentsEnabled[] = $gateway;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
return $gatewaysWithMollieComponentsEnabled;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Check if Mollie Components are enabled for the given gateway
|
76 |
+
*
|
77 |
+
* @param WC_Payment_Gateway $gateway
|
78 |
+
* @return bool
|
79 |
+
*/
|
80 |
+
protected function isMollieComponentsEnabledForGateway(WC_Payment_Gateway $gateway)
|
81 |
+
{
|
82 |
+
if (!isset($gateway->settings['mollie_components_enabled'])) {
|
83 |
+
return false;
|
84 |
+
}
|
85 |
+
|
86 |
+
return wc_string_to_bool($gateway->settings['mollie_components_enabled']);
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Retrieve the mollie components styles associated to the given gateways
|
91 |
+
*
|
92 |
+
* @param array $mollieComponentStyles
|
93 |
+
* @param array $gateways
|
94 |
+
* @return array
|
95 |
+
*/
|
96 |
+
protected function mollieComponentsStylesPerGateway(
|
97 |
+
array $mollieComponentStyles,
|
98 |
+
array $gateways
|
99 |
+
) {
|
100 |
+
|
101 |
+
$gatewayNames = $this->gatewayNames($gateways);
|
102 |
+
$mollieComponentsStylesGateways = array_combine(
|
103 |
+
$gatewayNames,
|
104 |
+
array_fill(
|
105 |
+
0,
|
106 |
+
count($gatewayNames),
|
107 |
+
[
|
108 |
+
'styles' => $mollieComponentStyles,
|
109 |
+
]
|
110 |
+
)
|
111 |
+
);
|
112 |
+
|
113 |
+
return $mollieComponentsStylesGateways ?: [];
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Extract the name of the gateways from the given gateways instances
|
118 |
+
*
|
119 |
+
* @param array $gateways
|
120 |
+
* @return array
|
121 |
+
*/
|
122 |
+
protected function gatewayNames(array $gateways)
|
123 |
+
{
|
124 |
+
$gatewayNames = [];
|
125 |
+
|
126 |
+
/** @var WC_Payment_Gateway $gateway */
|
127 |
+
foreach ($gateways as $gateway) {
|
128 |
+
$gatewayNames[] = str_replace('mollie_wc_gateway_', '', $gateway->id);
|
129 |
+
}
|
130 |
+
|
131 |
+
return $gatewayNames;
|
132 |
+
}
|
133 |
+
}
|
src/Mollie/WC/Components/StylesPropertiesDictionary.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mollie_WC_Components_StylesPropertiesDictionary
|
4 |
+
{
|
5 |
+
const BASE_STYLE_KEY = 'base';
|
6 |
+
const INVALID_STYLE_KEY = 'invalid';
|
7 |
+
|
8 |
+
const BACKGROUND_COLOR = 'backgroundColor';
|
9 |
+
const TEXT_COLOR = 'color';
|
10 |
+
const FONT_SIZE = 'fontSize';
|
11 |
+
const FONT_WEIGHT = 'fontWeight';
|
12 |
+
const LETTER_SPACING = 'letterSpacing';
|
13 |
+
const LINE_HEIGHT = 'lineHeight';
|
14 |
+
const PADDING = 'padding';
|
15 |
+
const TEXT_ALIGN = 'textAlign';
|
16 |
+
const TEXT_TRANSFORM = 'textTransform';
|
17 |
+
const INPUT_PLACEHOLDER = '::placeholder';
|
18 |
+
|
19 |
+
const INVALID_TEXT_COLOR = 'invalid_color';
|
20 |
+
const INVALID_BACKGROUND_COLOR = 'invalid_backgroundColor';
|
21 |
+
|
22 |
+
const STYLES_OPTIONS_KEYS_MAP = [
|
23 |
+
self::BACKGROUND_COLOR,
|
24 |
+
self::TEXT_COLOR,
|
25 |
+
self::FONT_SIZE,
|
26 |
+
self::FONT_WEIGHT,
|
27 |
+
self::LETTER_SPACING,
|
28 |
+
self::LINE_HEIGHT,
|
29 |
+
self::PADDING,
|
30 |
+
self::TEXT_ALIGN,
|
31 |
+
self::TEXT_TRANSFORM,
|
32 |
+
self::INPUT_PLACEHOLDER,
|
33 |
+
];
|
34 |
+
|
35 |
+
const INVALID_STYLES_OPTIONS_KEYS_MAP = [
|
36 |
+
self::INVALID_TEXT_COLOR,
|
37 |
+
self::INVALID_BACKGROUND_COLOR,
|
38 |
+
];
|
39 |
+
}
|
includes/mollie/wc/exception.php → src/Mollie/WC/Exception.php
RENAMED
File without changes
|
includes/mollie/wc/exception/couldnotconnecttomollie.php → src/Mollie/WC/Exception/CouldNotConnectToMollie.php
RENAMED
File without changes
|
includes/mollie/wc/exception/incompatibleplatform.php → src/Mollie/WC/Exception/IncompatiblePlatform.php
RENAMED
File without changes
|
includes/mollie/wc/exception/invalidapikey.php → src/Mollie/WC/Exception/InvalidApiKey.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/abstract.php → src/Mollie/WC/Gateway/Abstract.php
RENAMED
@@ -16,6 +16,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
16 |
const STATUS_FAILED = 'failed';
|
17 |
const STATUS_REFUNDED = 'refunded';
|
18 |
|
|
|
|
|
|
|
19 |
/**
|
20 |
* @var string
|
21 |
*/
|
@@ -149,12 +152,10 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
149 |
*/
|
150 |
public function getIconUrl ()
|
151 |
{
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
}
|
157 |
-
|
158 |
return Mollie_WC_Plugin::getPluginUrl('assets/images/' . $this->getMollieMethodId() . '.svg');
|
159 |
}
|
160 |
|
@@ -439,8 +440,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
439 |
) {
|
440 |
|
441 |
try {
|
442 |
-
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()
|
443 |
-
|
|
|
444 |
$paymentRequestData = $payment_object->getPaymentRequestData($order, $customer_id);
|
445 |
$data = array_filter($paymentRequestData);
|
446 |
$data = apply_filters('woocommerce_' . $this->id . '_args', $data, $order);
|
@@ -492,7 +494,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
492 |
// If products are virtual, use Payments API instead of Orders API
|
493 |
//
|
494 |
|
495 |
-
|
496 |
|
497 |
foreach ( $order->get_items() as $cart_item ) {
|
498 |
|
@@ -507,7 +509,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
507 |
}
|
508 |
|
509 |
if ( $product == false ) {
|
510 |
-
|
511 |
do_action( Mollie_WC_Plugin::PLUGIN_ID . '_orderlines_process_items_after_processing_item', $cart_item );
|
512 |
break;
|
513 |
}
|
@@ -524,8 +526,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
524 |
//
|
525 |
// PROCESS REGULAR PAYMENT AS MOLLIE ORDER
|
526 |
//
|
527 |
-
|
528 |
-
if ( $mollie_payment_type == 'order' ) {
|
529 |
|
530 |
if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
|
531 |
Mollie_WC_Plugin::debug( $this->id . ': Create Mollie payment object for order ' . $order->id, true );
|
@@ -534,8 +535,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
534 |
}
|
535 |
|
536 |
try {
|
537 |
-
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()
|
538 |
-
|
|
|
539 |
} catch (ApiException $exception) {
|
540 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
541 |
return array('result' => 'failure');
|
@@ -571,7 +573,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
571 |
Mollie_WC_Plugin::debug( 'Creating payment object: type Order, first try failed: ' . $e->getMessage() );
|
572 |
|
573 |
// Unset missing customer ID
|
574 |
-
|
575 |
|
576 |
try {
|
577 |
|
@@ -587,7 +589,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
587 |
catch ( Mollie\Api\Exceptions\ApiException $e ) {
|
588 |
|
589 |
// Set Mollie payment type to payment, when creating a Mollie Order has failed
|
590 |
-
|
591 |
}
|
592 |
}
|
593 |
}
|
@@ -596,10 +598,12 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
596 |
// PROCESS REGULAR PAYMENT AS MOLLIE PAYMENT
|
597 |
//
|
598 |
|
599 |
-
|
600 |
Mollie_WC_Plugin::debug( 'Creating payment object: type Payment, creating a Payment.' );
|
601 |
|
602 |
-
|
|
|
|
|
603 |
$paymentRequestData = $payment_object->getPaymentRequestData( $order, $customer_id );
|
604 |
|
605 |
$data = array_filter( $paymentRequestData );
|
@@ -875,8 +879,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
875 |
|
876 |
// Load the payment from Mollie, do not use cache
|
877 |
try {
|
878 |
-
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()
|
879 |
-
|
|
|
880 |
} catch (ApiException $exception) {
|
881 |
Mollie_WC_Plugin::setHttpResponseCode(400);
|
882 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
@@ -1242,8 +1247,6 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
1242 |
return $payment_method_title;
|
1243 |
}
|
1244 |
|
1245 |
-
|
1246 |
-
|
1247 |
/**
|
1248 |
* @param WC_Order $order
|
1249 |
*
|
@@ -1356,8 +1359,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
1356 |
}
|
1357 |
|
1358 |
try {
|
1359 |
-
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()
|
1360 |
-
|
|
|
1361 |
} catch (ApiException $exception) {
|
1362 |
$exceptionMessage = $exception->getMessage();
|
1363 |
Mollie_WC_Plugin::debug($exceptionMessage);
|
@@ -2029,4 +2033,61 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
2029 |
return parent::get_transaction_url( $order );
|
2030 |
}
|
2031 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2032 |
}
|
16 |
const STATUS_FAILED = 'failed';
|
17 |
const STATUS_REFUNDED = 'refunded';
|
18 |
|
19 |
+
const PAYMENT_METHOD_TYPE_PAYMENT = 'payment';
|
20 |
+
const PAYMENT_METHOD_TYPE_ORDER = 'order';
|
21 |
+
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
152 |
*/
|
153 |
public function getIconUrl ()
|
154 |
{
|
155 |
+
// In checkout, show the creditcards.svg with multiple logo's
|
156 |
+
if ( $this->getMollieMethodId() === PaymentMethod::CREDITCARD && !is_admin()) {
|
157 |
+
return Mollie_WC_Plugin::getPluginUrl('assets/images/' . $this->getMollieMethodId() . 's.svg');
|
158 |
+
}
|
|
|
|
|
159 |
return Mollie_WC_Plugin::getPluginUrl('assets/images/' . $this->getMollieMethodId() . '.svg');
|
160 |
}
|
161 |
|
440 |
) {
|
441 |
|
442 |
try {
|
443 |
+
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
444 |
+
self::PAYMENT_METHOD_TYPE_PAYMENT
|
445 |
+
);
|
446 |
$paymentRequestData = $payment_object->getPaymentRequestData($order, $customer_id);
|
447 |
$data = array_filter($paymentRequestData);
|
448 |
$data = apply_filters('woocommerce_' . $this->id . '_args', $data, $order);
|
494 |
// If products are virtual, use Payments API instead of Orders API
|
495 |
//
|
496 |
|
497 |
+
$molliePaymentType = 'order';
|
498 |
|
499 |
foreach ( $order->get_items() as $cart_item ) {
|
500 |
|
509 |
}
|
510 |
|
511 |
if ( $product == false ) {
|
512 |
+
$molliePaymentType = self::PAYMENT_METHOD_TYPE_PAYMENT;
|
513 |
do_action( Mollie_WC_Plugin::PLUGIN_ID . '_orderlines_process_items_after_processing_item', $cart_item );
|
514 |
break;
|
515 |
}
|
526 |
//
|
527 |
// PROCESS REGULAR PAYMENT AS MOLLIE ORDER
|
528 |
//
|
529 |
+
if ($molliePaymentType == self::PAYMENT_METHOD_TYPE_ORDER) {
|
|
|
530 |
|
531 |
if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
|
532 |
Mollie_WC_Plugin::debug( $this->id . ': Create Mollie payment object for order ' . $order->id, true );
|
535 |
}
|
536 |
|
537 |
try {
|
538 |
+
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
539 |
+
self::PAYMENT_METHOD_TYPE_ORDER
|
540 |
+
);
|
541 |
} catch (ApiException $exception) {
|
542 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
543 |
return array('result' => 'failure');
|
573 |
Mollie_WC_Plugin::debug( 'Creating payment object: type Order, first try failed: ' . $e->getMessage() );
|
574 |
|
575 |
// Unset missing customer ID
|
576 |
+
unset($data['payment']['customerId']);
|
577 |
|
578 |
try {
|
579 |
|
589 |
catch ( Mollie\Api\Exceptions\ApiException $e ) {
|
590 |
|
591 |
// Set Mollie payment type to payment, when creating a Mollie Order has failed
|
592 |
+
$molliePaymentType = self::PAYMENT_METHOD_TYPE_PAYMENT;
|
593 |
}
|
594 |
}
|
595 |
}
|
598 |
// PROCESS REGULAR PAYMENT AS MOLLIE PAYMENT
|
599 |
//
|
600 |
|
601 |
+
if ($molliePaymentType === self::PAYMENT_METHOD_TYPE_PAYMENT) {
|
602 |
Mollie_WC_Plugin::debug( 'Creating payment object: type Payment, creating a Payment.' );
|
603 |
|
604 |
+
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
605 |
+
self::PAYMENT_METHOD_TYPE_PAYMENT
|
606 |
+
);
|
607 |
$paymentRequestData = $payment_object->getPaymentRequestData( $order, $customer_id );
|
608 |
|
609 |
$data = array_filter( $paymentRequestData );
|
879 |
|
880 |
// Load the payment from Mollie, do not use cache
|
881 |
try {
|
882 |
+
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
883 |
+
$payment_object_id
|
884 |
+
);
|
885 |
} catch (ApiException $exception) {
|
886 |
Mollie_WC_Plugin::setHttpResponseCode(400);
|
887 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
1247 |
return $payment_method_title;
|
1248 |
}
|
1249 |
|
|
|
|
|
1250 |
/**
|
1251 |
* @param WC_Order $order
|
1252 |
*
|
1359 |
}
|
1360 |
|
1361 |
try {
|
1362 |
+
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
1363 |
+
$payment_object_id
|
1364 |
+
);
|
1365 |
} catch (ApiException $exception) {
|
1366 |
$exceptionMessage = $exception->getMessage();
|
1367 |
Mollie_WC_Plugin::debug($exceptionMessage);
|
2033 |
return parent::get_transaction_url( $order );
|
2034 |
}
|
2035 |
|
2036 |
+
protected function hasFieldsIfMollieComponentsIsEnabled()
|
2037 |
+
{
|
2038 |
+
$this->has_fields = $this->isMollieComponentsEnabled() ? true : false;
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
protected function includeMollieComponentsFields()
|
2042 |
+
{
|
2043 |
+
$fields = include Mollie_WC_Plugin::getPluginPath(
|
2044 |
+
'/inc/settings/mollie_components_enabler.php'
|
2045 |
+
);
|
2046 |
+
|
2047 |
+
$this->form_fields = array_merge($this->form_fields, $fields);
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
protected function mollieComponentsFields()
|
2051 |
+
{
|
2052 |
+
if (!$this->isMollieComponentsEnabled()) {
|
2053 |
+
return;
|
2054 |
+
}
|
2055 |
+
|
2056 |
+
?>
|
2057 |
+
<div class="mollie-components"></div>
|
2058 |
+
<p>
|
2059 |
+
<?php
|
2060 |
+
echo $this->lockIcon();
|
2061 |
+
esc_html_e('Secure payments provided by ');
|
2062 |
+
// TODO Check if possible to make svg accessible so we can show `mollie` text
|
2063 |
+
echo $this->mollieLogo();
|
2064 |
+
?>
|
2065 |
+
</p>
|
2066 |
+
<?php
|
2067 |
+
}
|
2068 |
+
|
2069 |
+
protected function isMollieComponentsEnabled()
|
2070 |
+
{
|
2071 |
+
$option = isset($this->settings['mollie_components_enabled'])
|
2072 |
+
? $this->settings['mollie_components_enabled']
|
2073 |
+
: 'no';
|
2074 |
+
|
2075 |
+
$option = wc_string_to_bool($option);
|
2076 |
+
|
2077 |
+
return $option;
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
protected function lockIcon()
|
2081 |
+
{
|
2082 |
+
return file_get_contents(
|
2083 |
+
Mollie_WC_Plugin::getPluginPath('assets/images/lock-icon.svg')
|
2084 |
+
);
|
2085 |
+
}
|
2086 |
+
|
2087 |
+
protected function mollieLogo()
|
2088 |
+
{
|
2089 |
+
return file_get_contents(
|
2090 |
+
Mollie_WC_Plugin::getPluginPath('assets/images/mollie-logo.svg')
|
2091 |
+
);
|
2092 |
+
}
|
2093 |
}
|
includes/mollie/wc/gateway/abstractseparecurring.php → src/Mollie/WC/Gateway/AbstractSepaRecurring.php
RENAMED
@@ -166,8 +166,9 @@ abstract class Mollie_WC_Gateway_AbstractSepaRecurring extends Mollie_WC_Gateway
|
|
166 |
);
|
167 |
|
168 |
try {
|
169 |
-
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()
|
170 |
-
|
|
|
171 |
} catch (ApiException $exception) {
|
172 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
173 |
return;
|
166 |
);
|
167 |
|
168 |
try {
|
169 |
+
$payment_object = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
170 |
+
$payment
|
171 |
+
);
|
172 |
} catch (ApiException $exception) {
|
173 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
174 |
return;
|
includes/mollie/wc/gateway/abstractsubscription.php → src/Mollie/WC/Gateway/AbstractSubscription.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/applepay.php → src/Mollie/WC/Gateway/Applepay.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/bancontact.php → src/Mollie/WC/Gateway/Bancontact.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/banktransfer.php → src/Mollie/WC/Gateway/BankTransfer.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/belfius.php → src/Mollie/WC/Gateway/Belfius.php
RENAMED
File without changes
|
src/Mollie/WC/Gateway/Creditcard.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Mollie\Api\Types\PaymentMethod;
|
4 |
+
|
5 |
+
class Mollie_WC_Gateway_Creditcard extends Mollie_WC_Gateway_AbstractSubscription
|
6 |
+
{
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
$this->supports = [
|
12 |
+
'products',
|
13 |
+
'refunds',
|
14 |
+
];
|
15 |
+
|
16 |
+
$this->initSubscriptionSupport();
|
17 |
+
|
18 |
+
$this->hasFieldsIfMollieComponentsIsEnabled();
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @inheritDoc
|
23 |
+
*/
|
24 |
+
public function getMollieMethodId()
|
25 |
+
{
|
26 |
+
return PaymentMethod::CREDITCARD;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @inheritDoc
|
31 |
+
*/
|
32 |
+
public function getDefaultTitle()
|
33 |
+
{
|
34 |
+
return __('Credit card', 'mollie-payments-for-woocommerce');
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @inheritDoc
|
39 |
+
*/
|
40 |
+
public function init_form_fields()
|
41 |
+
{
|
42 |
+
parent::init_form_fields();
|
43 |
+
|
44 |
+
$this->includeMollieComponentsFields();
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @inheritDoc
|
49 |
+
*/
|
50 |
+
public function payment_fields()
|
51 |
+
{
|
52 |
+
parent::payment_fields();
|
53 |
+
|
54 |
+
$this->mollieComponentsFields();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @inheritDoc
|
59 |
+
*/
|
60 |
+
protected function getSettingsDescription()
|
61 |
+
{
|
62 |
+
return '';
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @inheritDoc
|
67 |
+
*/
|
68 |
+
protected function getDefaultDescription()
|
69 |
+
{
|
70 |
+
return '';
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @inheritDoc
|
75 |
+
*/
|
76 |
+
protected function getInstructions(
|
77 |
+
WC_Order $order,
|
78 |
+
Mollie\Api\Resources\Payment $payment,
|
79 |
+
$admin_instructions,
|
80 |
+
$plain_text
|
81 |
+
) {
|
82 |
+
if ($payment->isPaid() && $payment->details) {
|
83 |
+
return sprintf(
|
84 |
+
/* translators: Placeholder 1: card holder */
|
85 |
+
__('Payment completed by <strong>%s</strong>', 'mollie-payments-for-woocommerce'),
|
86 |
+
$payment->details->cardHolder
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
return parent::getInstructions($order, $payment, $admin_instructions, $plain_text);
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
includes/mollie/wc/gateway/directdebit.php → src/Mollie/WC/Gateway/DirectDebit.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/eps.php → src/Mollie/WC/Gateway/EPS.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/giftcard.php → src/Mollie/WC/Gateway/Giftcard.php
RENAMED
@@ -97,7 +97,8 @@ class Mollie_WC_Gateway_Giftcard extends Mollie_WC_Gateway_Abstract
|
|
97 |
|
98 |
// If only one gift card issuers is available, show it without a dropdown
|
99 |
if ( count( $issuers ) === 1 ) {
|
100 |
-
|
|
|
101 |
$html .= $issuers->description;
|
102 |
echo wpautop( wptexturize( $html ) );
|
103 |
|
@@ -116,4 +117,20 @@ class Mollie_WC_Gateway_Giftcard extends Mollie_WC_Gateway_Abstract
|
|
116 |
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
97 |
|
98 |
// If only one gift card issuers is available, show it without a dropdown
|
99 |
if ( count( $issuers ) === 1 ) {
|
100 |
+
$issuerImageSvg = $this->checkSvgIssuers($issuers);
|
101 |
+
$issuerImageSvg and $html .= '<img src="' . $issuerImageSvg . '" style="vertical-align:middle" />';
|
102 |
$html .= $issuers->description;
|
103 |
echo wpautop( wptexturize( $html ) );
|
104 |
|
117 |
|
118 |
}
|
119 |
|
120 |
+
/**
|
121 |
+
* @param $issuers
|
122 |
+
* @return string
|
123 |
+
*/
|
124 |
+
protected function checkSvgIssuers($issuers)
|
125 |
+
{
|
126 |
+
if(!isset($issuers[0]) || ! is_object($issuers[0])) {
|
127 |
+
return '';
|
128 |
+
}
|
129 |
+
$image = isset($issuers[0]->image) ? $issuers[0]->image : null;
|
130 |
+
if(!$image) {
|
131 |
+
return '';
|
132 |
+
}
|
133 |
+
return isset($image->svg) && is_string($image->svg) ? $image->svg : '';
|
134 |
+
}
|
135 |
+
|
136 |
}
|
includes/mollie/wc/gateway/giropay.php → src/Mollie/WC/Gateway/Giropay.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/ideal.php → src/Mollie/WC/Gateway/Ideal.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/inghomepay.php → src/Mollie/WC/Gateway/IngHomePay.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/kbc.php → src/Mollie/WC/Gateway/Kbc.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/klarnapaylater.php → src/Mollie/WC/Gateway/KlarnaPayLater.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/klarnasliceit.php → src/Mollie/WC/Gateway/KlarnaSliceIt.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/mistercash.php → src/Mollie/WC/Gateway/MisterCash.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/mybank.php → src/Mollie/WC/Gateway/MyBank.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/paypal.php → src/Mollie/WC/Gateway/PayPal.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/paysafecard.php → src/Mollie/WC/Gateway/Paysafecard.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/przelewy24.php → src/Mollie/WC/Gateway/Przelewy24.php
RENAMED
File without changes
|
includes/mollie/wc/gateway/sofort.php → src/Mollie/WC/Gateway/Sofort.php
RENAMED
File without changes
|
includes/mollie/wc/helper/api.php → src/Mollie/WC/Helper/Api.php
RENAMED
File without changes
|
includes/mollie/wc/helper/data.php → src/Mollie/WC/Helper/Data.php
RENAMED
File without changes
|
includes/mollie/wc/helper/orderlines.php → src/Mollie/WC/Helper/OrderLines.php
RENAMED
File without changes
|
includes/mollie/wc/helper/paymentfactory.php → src/Mollie/WC/Helper/PaymentFactory.php
RENAMED
@@ -16,11 +16,11 @@ class Mollie_WC_Helper_PaymentFactory
|
|
16 |
|| (is_object($data) && $data->resource == 'order')
|
17 |
) {
|
18 |
$dataHelper = Mollie_WC_Plugin::getDataHelper();
|
19 |
-
$refundLineItemsBuilder = new
|
20 |
$apiHelper = Mollie_WC_Plugin::getApiHelper();
|
21 |
$settingsHelper = Mollie_WC_Plugin::getSettingsHelper();
|
22 |
|
23 |
-
$orderItemsRefunded = new
|
24 |
$refundLineItemsBuilder,
|
25 |
$dataHelper,
|
26 |
$apiHelper->getApiClient($settingsHelper->isTestModeEnabled())->orders
|
16 |
|| (is_object($data) && $data->resource == 'order')
|
17 |
) {
|
18 |
$dataHelper = Mollie_WC_Plugin::getDataHelper();
|
19 |
+
$refundLineItemsBuilder = new Mollie_WC_Payment_RefundLineItemsBuilder($dataHelper);
|
20 |
$apiHelper = Mollie_WC_Plugin::getApiHelper();
|
21 |
$settingsHelper = Mollie_WC_Plugin::getSettingsHelper();
|
22 |
|
23 |
+
$orderItemsRefunded = new Mollie_WC_Payment_OrderItemsRefunder(
|
24 |
$refundLineItemsBuilder,
|
25 |
$dataHelper,
|
26 |
$apiHelper->getApiClient($settingsHelper->isTestModeEnabled())->orders
|
includes/mollie/wc/helper/settings.php → src/Mollie/WC/Helper/Settings.php
RENAMED
@@ -293,7 +293,7 @@ class Mollie_WC_Helper_Settings
|
|
293 |
*/
|
294 |
public function addGlobalSettingsFields (array $settings)
|
295 |
{
|
296 |
-
wp_register_script('mollie_wc_admin_settings', Mollie_WC_Plugin::getPluginUrl('/assets/js/settings.js'), array('jquery'), Mollie_WC_Plugin::PLUGIN_VERSION);
|
297 |
wp_enqueue_script('mollie_wc_admin_settings');
|
298 |
|
299 |
$content = ''
|
293 |
*/
|
294 |
public function addGlobalSettingsFields (array $settings)
|
295 |
{
|
296 |
+
wp_register_script('mollie_wc_admin_settings', Mollie_WC_Plugin::getPluginUrl('/assets/js/settings.min.js'), array('jquery'), Mollie_WC_Plugin::PLUGIN_VERSION);
|
297 |
wp_enqueue_script('mollie_wc_admin_settings');
|
298 |
|
299 |
$content = ''
|
src/Mollie/WC/Helper/Status.php
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Mollie\Api\CompatibilityChecker;
|
4 |
+
use Mollie\Api\Exceptions\IncompatiblePlatform;
|
5 |
+
use Mollie\Api\MollieApiClient;
|
6 |
+
|
7 |
+
|
8 |
+
class Mollie_WC_Helper_Status
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Minimal required WooCommerce version
|
12 |
+
*
|
13 |
+
* @var string
|
14 |
+
*/
|
15 |
+
const MIN_WOOCOMMERCE_VERSION = '2.2.0';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var string[]
|
19 |
+
*/
|
20 |
+
protected $errors = array();
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @var CompatibilityChecker
|
24 |
+
*/
|
25 |
+
protected $compatibilityChecker;
|
26 |
+
|
27 |
+
public function __construct(Mollie\Api\CompatibilityChecker $compatibilityChecker)
|
28 |
+
{
|
29 |
+
$this->compatibilityChecker = $compatibilityChecker;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @return bool
|
34 |
+
*/
|
35 |
+
public function hasErrors ()
|
36 |
+
{
|
37 |
+
return !empty($this->errors);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @return string[]
|
42 |
+
*/
|
43 |
+
public function getErrors ()
|
44 |
+
{
|
45 |
+
return $this->errors;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Check if this plugin is compatible
|
50 |
+
*
|
51 |
+
* @return bool
|
52 |
+
*/
|
53 |
+
public function isCompatible()
|
54 |
+
{
|
55 |
+
static $isCompatible = null;
|
56 |
+
|
57 |
+
if ($isCompatible !== null) {
|
58 |
+
return $isCompatible;
|
59 |
+
}
|
60 |
+
|
61 |
+
// Default
|
62 |
+
$isCompatible = true;
|
63 |
+
|
64 |
+
if (!$this->hasCompatibleWooCommerceVersion()) {
|
65 |
+
$this->errors[] = sprintf(
|
66 |
+
/* translators: Placeholder 1: Plugin name, placeholder 2: required WooCommerce version, placeholder 3: used WooCommerce version */
|
67 |
+
__(
|
68 |
+
'The %s plugin requires at least WooCommerce version %s, you are using version %s. Please update your WooCommerce plugin.',
|
69 |
+
'mollie-payments-for-woocommerce'
|
70 |
+
),
|
71 |
+
Mollie_WC_Plugin::PLUGIN_TITLE,
|
72 |
+
self::MIN_WOOCOMMERCE_VERSION,
|
73 |
+
$this->getWooCommerceVersion()
|
74 |
+
);
|
75 |
+
|
76 |
+
return $isCompatible = false;
|
77 |
+
}
|
78 |
+
|
79 |
+
if (!$this->isApiClientInstalled()) {
|
80 |
+
$this->errors[] = __(
|
81 |
+
'Mollie API client not installed. Please make sure the plugin is installed correctly.',
|
82 |
+
'mollie-payments-for-woocommerce'
|
83 |
+
);
|
84 |
+
|
85 |
+
return $isCompatible = false;
|
86 |
+
}
|
87 |
+
|
88 |
+
if (function_exists('extension_loaded') && !extension_loaded('json')) {
|
89 |
+
$this->errors[] = __(
|
90 |
+
'Mollie Payments for WooCommerce requires the JSON extension for PHP. Enable it in your server or ask your webhoster to enable it for you.',
|
91 |
+
'mollie-payments-for-woocommerce'
|
92 |
+
);
|
93 |
+
|
94 |
+
return $isCompatible = false;
|
95 |
+
}
|
96 |
+
|
97 |
+
try {
|
98 |
+
$this->compatibilityChecker->checkCompatibility();
|
99 |
+
} catch (IncompatiblePlatform $exception) {
|
100 |
+
switch ($exception->getCode()) {
|
101 |
+
case IncompatiblePlatform::INCOMPATIBLE_PHP_VERSION:
|
102 |
+
$error = sprintf(
|
103 |
+
/* translators: Placeholder 1: Required PHP version, placeholder 2: current PHP version */
|
104 |
+
__(
|
105 |
+
'Mollie Payments for WooCommerce requires PHP %s or higher, you have PHP %s. Please upgrade and view %sthis FAQ%s',
|
106 |
+
'mollie-payments-for-woocommerce'
|
107 |
+
),
|
108 |
+
CompatibilityChecker::MIN_PHP_VERSION,
|
109 |
+
PHP_VERSION,
|
110 |
+
'<a href="https://github.com/mollie/WooCommerce/wiki/PHP-&-Mollie-API-v2" target="_blank">',
|
111 |
+
'</a>'
|
112 |
+
);
|
113 |
+
break;
|
114 |
+
|
115 |
+
case IncompatiblePlatform::INCOMPATIBLE_JSON_EXTENSION:
|
116 |
+
$error = __(
|
117 |
+
'Mollie Payments for WooCommerce requires the PHP extension JSON to be enabled. Please enable the \'json\' extension in your PHP configuration.',
|
118 |
+
'mollie-payments-for-woocommerce'
|
119 |
+
);
|
120 |
+
break;
|
121 |
+
|
122 |
+
case IncompatiblePlatform::INCOMPATIBLE_CURL_EXTENSION:
|
123 |
+
$error = __(
|
124 |
+
'Mollie Payments for WooCommerce requires the PHP extension cURL to be enabled. Please enable the \'curl\' extension in your PHP configuration.',
|
125 |
+
'mollie-payments-for-woocommerce'
|
126 |
+
);
|
127 |
+
break;
|
128 |
+
|
129 |
+
case IncompatiblePlatform::INCOMPATIBLE_CURL_FUNCTION:
|
130 |
+
$error =
|
131 |
+
__(
|
132 |
+
'Mollie Payments for WooCommerce requires PHP cURL functions to be available. Please make sure all of these functions are available.',
|
133 |
+
'mollie-payments-for-woocommerce'
|
134 |
+
);
|
135 |
+
break;
|
136 |
+
|
137 |
+
default:
|
138 |
+
$error = $exception->getMessage();
|
139 |
+
break;
|
140 |
+
}
|
141 |
+
|
142 |
+
$this->errors[] = $error;
|
143 |
+
|
144 |
+
return $isCompatible = false;
|
145 |
+
}
|
146 |
+
|
147 |
+
return $isCompatible;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @return string
|
152 |
+
*/
|
153 |
+
public function getWooCommerceVersion ()
|
154 |
+
{
|
155 |
+
return WooCommerce::instance()->version;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @return bool
|
160 |
+
*/
|
161 |
+
public function hasCompatibleWooCommerceVersion ()
|
162 |
+
{
|
163 |
+
return (bool) version_compare($this->getWooCommerceVersion(), self::MIN_WOOCOMMERCE_VERSION, ">=");
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* @return bool
|
168 |
+
*/
|
169 |
+
protected function isApiClientInstalled ()
|
170 |
+
{
|
171 |
+
return class_exists(MollieApiClient::class);
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
176 |
+
*/
|
177 |
+
public function getMollieApiStatus ()
|
178 |
+
{
|
179 |
+
try
|
180 |
+
{
|
181 |
+
// Is test mode enabled?
|
182 |
+
$test_mode = Mollie_WC_Plugin::getSettingsHelper()->isTestModeEnabled();
|
183 |
+
|
184 |
+
$api_helper = Mollie_WC_Plugin::getApiHelper();
|
185 |
+
$api_client = $api_helper->getApiClient($test_mode);
|
186 |
+
|
187 |
+
// Try to load Mollie issuers
|
188 |
+
$api_client->methods->all();
|
189 |
+
}
|
190 |
+
catch ( \Mollie\Api\Exceptions\ApiException $e )
|
191 |
+
{
|
192 |
+
|
193 |
+
if ( $e->getMessage() == 'Error executing API call (401: Unauthorized Request): Missing authentication, or failed to authenticate. Documentation: https://docs.mollie.com/guides/authentication') {
|
194 |
+
throw new \Mollie\Api\Exceptions\ApiException(
|
195 |
+
'incorrect API key or other authentication issue. Please check your API keys!'
|
196 |
+
);
|
197 |
+
}
|
198 |
+
|
199 |
+
throw new \Mollie\Api\Exceptions\ApiException(
|
200 |
+
$e->getMessage()
|
201 |
+
);
|
202 |
+
}
|
203 |
+
}
|
204 |
+
}
|
{includes/mollie → src/Mollie/WC}/OrderLineStatus.php
RENAMED
@@ -3,9 +3,9 @@
|
|
3 |
use Mollie\Api\Types\OrderLineStatus as ApiOrderLineStatus;
|
4 |
|
5 |
/**
|
6 |
-
* Class
|
7 |
*/
|
8 |
-
class
|
9 |
{
|
10 |
const CAN_BE_CANCELED = [
|
11 |
self::STATUS_CREATED,
|
3 |
use Mollie\Api\Types\OrderLineStatus as ApiOrderLineStatus;
|
4 |
|
5 |
/**
|
6 |
+
* Class Mollie_WC_OrderLineStatus
|
7 |
*/
|
8 |
+
class Mollie_WC_OrderLineStatus extends ApiOrderLineStatus
|
9 |
{
|
10 |
const CAN_BE_CANCELED = [
|
11 |
self::STATUS_CREATED,
|
includes/mollie/wc/payment/object.php → src/Mollie/WC/Payment/Object.php
RENAMED
@@ -398,8 +398,9 @@ class Mollie_WC_Payment_Object {
|
|
398 |
$mollie_order = $this->getPaymentObjectOrder($this->getActiveMollieOrderId( $order_id ));
|
399 |
|
400 |
try {
|
401 |
-
$mollie_order = Mollie_WC_Plugin::getPaymentFactoryHelper()
|
402 |
-
|
|
|
403 |
} catch (ApiException $exception) {
|
404 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
405 |
return;
|
398 |
$mollie_order = $this->getPaymentObjectOrder($this->getActiveMollieOrderId( $order_id ));
|
399 |
|
400 |
try {
|
401 |
+
$mollie_order = Mollie_WC_Plugin::getPaymentFactoryHelper()->getPaymentObject(
|
402 |
+
$mollie_order
|
403 |
+
);
|
404 |
} catch (ApiException $exception) {
|
405 |
Mollie_WC_Plugin::debug($exception->getMessage());
|
406 |
return;
|
includes/mollie/wc/payment/order.php → src/Mollie/WC/Payment/Order.php
RENAMED
@@ -15,16 +15,16 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
|
|
15 |
public static $shop_country;
|
16 |
|
17 |
/**
|
18 |
-
* @var
|
19 |
*/
|
20 |
private $orderItemsRefunder;
|
21 |
|
22 |
/**
|
23 |
* Mollie_WC_Payment_Order constructor.
|
24 |
-
* @param
|
25 |
* @param $data
|
26 |
*/
|
27 |
-
public function __construct(
|
28 |
{
|
29 |
$this->data = $data;
|
30 |
$this->orderItemsRefunder = $orderItemsRefunder;
|
@@ -184,6 +184,11 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
|
|
184 |
$paymentRequestData['payment']['customerId'] = $customer_id;
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
187 |
return $paymentRequestData;
|
188 |
|
189 |
}
|
@@ -796,7 +801,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
|
|
796 |
$payment_object,
|
797 |
$reason
|
798 |
);
|
799 |
-
} catch (
|
800 |
Mollie_WC_Plugin::debug(__METHOD__ . ' - ' . $exception->getMessage());
|
801 |
return $this->refund_amount(
|
802 |
$order,
|
@@ -942,7 +947,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
|
|
942 |
}
|
943 |
|
944 |
do_action(
|
945 |
-
|
946 |
$refund,
|
947 |
$order
|
948 |
);
|
@@ -950,7 +955,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
|
|
950 |
do_action_deprecated(
|
951 |
Mollie_WC_Plugin::PLUGIN_ID . '_refund_created',
|
952 |
[$refund, $order],
|
953 |
-
'
|
954 |
self::ACTION_AFTER_REFUND_PAYMENT_CREATED
|
955 |
);
|
956 |
|
@@ -1036,7 +1041,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
|
|
1036 |
do_action_deprecated(
|
1037 |
Mollie_WC_Plugin::PLUGIN_ID . '_refund_created',
|
1038 |
[$refund, $order],
|
1039 |
-
'
|
1040 |
self::ACTION_AFTER_REFUND_AMOUNT_CREATED
|
1041 |
);
|
1042 |
|
15 |
public static $shop_country;
|
16 |
|
17 |
/**
|
18 |
+
* @var Mollie_WC_Payment_OrderItemsRefunder
|
19 |
*/
|
20 |
private $orderItemsRefunder;
|
21 |
|
22 |
/**
|
23 |
* Mollie_WC_Payment_Order constructor.
|
24 |
+
* @param Mollie_WC_Payment_OrderItemsRefunder $orderItemsRefunder
|
25 |
* @param $data
|
26 |
*/
|
27 |
+
public function __construct(Mollie_WC_Payment_OrderItemsRefunder $orderItemsRefunder, $data)
|
28 |
{
|
29 |
$this->data = $data;
|
30 |
$this->orderItemsRefunder = $orderItemsRefunder;
|
184 |
$paymentRequestData['payment']['customerId'] = $customer_id;
|
185 |
}
|
186 |
|
187 |
+
$cardToken = cardToken();
|
188 |
+
if ($cardToken && isset($paymentRequestData['payment'])) {
|
189 |
+
$paymentRequestData['payment']['cardToken'] = $cardToken;
|
190 |
+
}
|
191 |
+
|
192 |
return $paymentRequestData;
|
193 |
|
194 |
}
|
801 |
$payment_object,
|
802 |
$reason
|
803 |
);
|
804 |
+
} catch (Mollie_WC_Payment_PartialRefundException $exception) {
|
805 |
Mollie_WC_Plugin::debug(__METHOD__ . ' - ' . $exception->getMessage());
|
806 |
return $this->refund_amount(
|
807 |
$order,
|
947 |
}
|
948 |
|
949 |
do_action(
|
950 |
+
self::ACTION_AFTER_REFUND_ORDER_CREATED,
|
951 |
$refund,
|
952 |
$order
|
953 |
);
|
955 |
do_action_deprecated(
|
956 |
Mollie_WC_Plugin::PLUGIN_ID . '_refund_created',
|
957 |
[$refund, $order],
|
958 |
+
'5.3.1',
|
959 |
self::ACTION_AFTER_REFUND_PAYMENT_CREATED
|
960 |
);
|
961 |
|
1041 |
do_action_deprecated(
|
1042 |
Mollie_WC_Plugin::PLUGIN_ID . '_refund_created',
|
1043 |
[$refund, $order],
|
1044 |
+
'5.3.1',
|
1045 |
self::ACTION_AFTER_REFUND_AMOUNT_CREATED
|
1046 |
);
|
1047 |
|
{includes/mollie/wc/payment → src/Mollie/WC/Payment}/OrderItemsRefunder.php
RENAMED
@@ -8,13 +8,13 @@ use Mollie\Api\Resources\Refund;
|
|
8 |
/**
|
9 |
* Refund a WooCommerce order by line items
|
10 |
*/
|
11 |
-
class
|
12 |
{
|
13 |
const ACTION_AFTER_REFUND_ORDER_ITEMS = Mollie_WC_Plugin::PLUGIN_ID . '_refund_items_created';
|
14 |
const ACTION_AFTER_CANCELED_ORDER_ITEMS = Mollie_WC_Plugin::PLUGIN_ID . '_line_items_cancelled';
|
15 |
|
16 |
/**
|
17 |
-
* @var
|
18 |
*/
|
19 |
private $refundLineItemsBuilder;
|
20 |
|
@@ -30,12 +30,12 @@ class OrderItemsRefunder
|
|
30 |
|
31 |
/**
|
32 |
* OrderItemsRefunder constructor.
|
33 |
-
* @param
|
34 |
* @param Mollie_WC_Helper_Data $dataHelper
|
35 |
* @param OrderEndpoint $ordersApiClient
|
36 |
*/
|
37 |
public function __construct(
|
38 |
-
|
39 |
Mollie_WC_Helper_Data $dataHelper,
|
40 |
OrderEndpoint $ordersApiClient
|
41 |
) {
|
@@ -53,6 +53,7 @@ class OrderItemsRefunder
|
|
53 |
* @return bool
|
54 |
* @throws ApiException When the API call fails for any reason
|
55 |
* @throws UnexpectedValueException
|
|
|
56 |
*/
|
57 |
public function refund(
|
58 |
WC_Order $order,
|
8 |
/**
|
9 |
* Refund a WooCommerce order by line items
|
10 |
*/
|
11 |
+
class Mollie_WC_Payment_OrderItemsRefunder
|
12 |
{
|
13 |
const ACTION_AFTER_REFUND_ORDER_ITEMS = Mollie_WC_Plugin::PLUGIN_ID . '_refund_items_created';
|
14 |
const ACTION_AFTER_CANCELED_ORDER_ITEMS = Mollie_WC_Plugin::PLUGIN_ID . '_line_items_cancelled';
|
15 |
|
16 |
/**
|
17 |
+
* @var Mollie_WC_Payment_RefundLineItemsBuilder
|
18 |
*/
|
19 |
private $refundLineItemsBuilder;
|
20 |
|
30 |
|
31 |
/**
|
32 |
* OrderItemsRefunder constructor.
|
33 |
+
* @param Mollie_WC_Payment_RefundLineItemsBuilder $refundLineItemsBuilder
|
34 |
* @param Mollie_WC_Helper_Data $dataHelper
|
35 |
* @param OrderEndpoint $ordersApiClient
|
36 |
*/
|
37 |
public function __construct(
|
38 |
+
Mollie_WC_Payment_RefundLineItemsBuilder $refundLineItemsBuilder,
|
39 |
Mollie_WC_Helper_Data $dataHelper,
|
40 |
OrderEndpoint $ordersApiClient
|
41 |
) {
|
53 |
* @return bool
|
54 |
* @throws ApiException When the API call fails for any reason
|
55 |
* @throws UnexpectedValueException
|
56 |
+
* @throws Mollie_WC_Payment_PartialRefundException
|
57 |
*/
|
58 |
public function refund(
|
59 |
WC_Order $order,
|
src/Mollie/WC/Payment/PartialRefundException.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mollie_WC_Payment_PartialRefundException extends UnexpectedValueException
|
4 |
+
{
|
5 |
+
}
|
includes/mollie/wc/payment/payment.php → src/Mollie/WC/Payment/Payment.php
RENAMED
@@ -120,6 +120,11 @@ class Mollie_WC_Payment_Payment extends Mollie_WC_Payment_Object {
|
|
120 |
$paymentRequestData['customerId'] = $customer_id;
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
123 |
return $paymentRequestData;
|
124 |
|
125 |
}
|
@@ -575,7 +580,7 @@ class Mollie_WC_Payment_Payment extends Mollie_WC_Payment_Object {
|
|
575 |
do_action_deprecated(
|
576 |
Mollie_WC_Plugin::PLUGIN_ID . '_refund_created',
|
577 |
[$refund, $order],
|
578 |
-
'
|
579 |
self::ACTION_AFTER_REFUND_PAYMENT_CREATED
|
580 |
);
|
581 |
|
120 |
$paymentRequestData['customerId'] = $customer_id;
|
121 |
}
|
122 |
|
123 |
+
$cardToken = cardToken();
|
124 |
+
if ($cardToken) {
|
125 |
+
$paymentRequestData['cardToken'] = $cardToken;
|
126 |
+
}
|
127 |
+
|
128 |
return $paymentRequestData;
|
129 |
|
130 |
}
|
580 |
do_action_deprecated(
|
581 |
Mollie_WC_Plugin::PLUGIN_ID . '_refund_created',
|
582 |
[$refund, $order],
|
583 |
+
'5.3.1',
|
584 |
self::ACTION_AFTER_REFUND_PAYMENT_CREATED
|
585 |
);
|
586 |
|
{includes/mollie/wc/payment → src/Mollie/WC/Payment}/RefundLineItemsBuilder.php
RENAMED
@@ -5,7 +5,7 @@
|
|
5 |
*
|
6 |
* @link https://docs.mollie.com/reference/v2/orders-api/create-order-refund
|
7 |
*/
|
8 |
-
class
|
9 |
{
|
10 |
/**
|
11 |
* @var Mollie_WC_Helper_Data
|
@@ -27,7 +27,7 @@ class RefundLineItemsBuilder
|
|
27 |
* @param string $currency
|
28 |
* @param string $refundReason
|
29 |
* @return array
|
30 |
-
* @throws
|
31 |
* @throws UnexpectedValueException
|
32 |
*/
|
33 |
public function buildLineItems(
|
@@ -67,11 +67,11 @@ class RefundLineItemsBuilder
|
|
67 |
continue;
|
68 |
}
|
69 |
|
70 |
-
if (in_array($toRefundRemoteItem->status,
|
71 |
$toCancel['lines'][] = $lineItem;
|
72 |
}
|
73 |
|
74 |
-
if (in_array($toRefundRemoteItem->status,
|
75 |
$toRefund['lines'][] = $lineItem;
|
76 |
}
|
77 |
}
|
@@ -84,7 +84,7 @@ class RefundLineItemsBuilder
|
|
84 |
* @param stdClass $toRefundRemoteItem
|
85 |
* @param string $currency
|
86 |
* @return array
|
87 |
-
* @throws
|
88 |
*/
|
89 |
private function buildLineItem(
|
90 |
WC_Order_Item $toRefundItem,
|
@@ -111,7 +111,7 @@ class RefundLineItemsBuilder
|
|
111 |
);
|
112 |
|
113 |
if ($toRefundRemoteItemAmount !== $toRefundItemAmount) {
|
114 |
-
throw new
|
115 |
__(
|
116 |
'Mollie doesn\'t allow a partial refund of the full amount or quantity of at least one order line. Trying to process this as an amount refund instead.',
|
117 |
'mollie-payments-for-woocommerce'
|
5 |
*
|
6 |
* @link https://docs.mollie.com/reference/v2/orders-api/create-order-refund
|
7 |
*/
|
8 |
+
class Mollie_WC_Payment_RefundLineItemsBuilder
|
9 |
{
|
10 |
/**
|
11 |
* @var Mollie_WC_Helper_Data
|
27 |
* @param string $currency
|
28 |
* @param string $refundReason
|
29 |
* @return array
|
30 |
+
* @throws Mollie_WC_Payment_PartialRefundException
|
31 |
* @throws UnexpectedValueException
|
32 |
*/
|
33 |
public function buildLineItems(
|
67 |
continue;
|
68 |
}
|
69 |
|
70 |
+
if (in_array($toRefundRemoteItem->status, Mollie_WC_OrderLineStatus::CAN_BE_CANCELED, true)) {
|
71 |
$toCancel['lines'][] = $lineItem;
|
72 |
}
|
73 |
|
74 |
+
if (in_array($toRefundRemoteItem->status, Mollie_WC_OrderLineStatus::CAN_BE_REFUNDED, true)) {
|
75 |
$toRefund['lines'][] = $lineItem;
|
76 |
}
|
77 |
}
|
84 |
* @param stdClass $toRefundRemoteItem
|
85 |
* @param string $currency
|
86 |
* @return array
|
87 |
+
* @throws Mollie_WC_Payment_PartialRefundException
|
88 |
*/
|
89 |
private function buildLineItem(
|
90 |
WC_Order_Item $toRefundItem,
|
111 |
);
|
112 |
|
113 |
if ($toRefundRemoteItemAmount !== $toRefundItemAmount) {
|
114 |
+
throw new Mollie_WC_Payment_PartialRefundException(
|
115 |
__(
|
116 |
'Mollie doesn\'t allow a partial refund of the full amount or quantity of at least one order line. Trying to process this as an amount refund instead.',
|
117 |
'mollie-payments-for-woocommerce'
|
includes/mollie/wc/plugin.php → src/Mollie/WC/Plugin.php
RENAMED
@@ -1,15 +1,14 @@
|
|
1 |
<?php
|
2 |
-
// Require WooCommerce fallback functions
|
3 |
-
use Mollie\Api\Resources\Refund;
|
4 |
|
5 |
-
|
6 |
-
|
|
|
7 |
|
8 |
class Mollie_WC_Plugin
|
9 |
{
|
10 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
11 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
12 |
-
const PLUGIN_VERSION = '5.
|
13 |
|
14 |
const DB_VERSION = '1.0';
|
15 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
@@ -236,20 +235,30 @@ class Mollie_WC_Plugin
|
|
236 |
|
237 |
// Enqueue Scripts
|
238 |
add_action('wp_enqueue_scripts', [__CLASS__, 'enqueueFrontendScripts']);
|
|
|
239 |
|
240 |
add_action(
|
241 |
-
|
242 |
[__CLASS__, 'addOrderNoteForRefundCreated'],
|
243 |
10,
|
244 |
3
|
245 |
);
|
246 |
add_action(
|
247 |
-
|
248 |
[__CLASS__, 'addOrderNoteForCancelledLineItems'],
|
249 |
10,
|
250 |
2
|
251 |
);
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
self::initDb();
|
254 |
self::schedulePendingPaymentOrdersExpirationCheck();
|
255 |
self::registerFrontendScripts();
|
@@ -306,15 +315,35 @@ class Mollie_WC_Plugin
|
|
306 |
*/
|
307 |
public static function registerFrontendScripts()
|
308 |
{
|
309 |
-
|
310 |
-
|
311 |
-
|
|
|
|
|
|
|
|
|
312 |
|
313 |
wp_register_script(
|
314 |
'mollie_wc_gateway_applepay',
|
315 |
-
Mollie_WC_Plugin::getPluginUrl('assets/js/applepay.js'),
|
316 |
[],
|
317 |
-
filemtime(Mollie_WC_Plugin::getPluginPath('/assets/js/applepay.js')),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
true
|
319 |
);
|
320 |
}
|
@@ -326,11 +355,82 @@ class Mollie_WC_Plugin
|
|
326 |
*/
|
327 |
public static function enqueueFrontendScripts()
|
328 |
{
|
329 |
-
if (is_admin()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
return;
|
331 |
}
|
332 |
|
333 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
}
|
335 |
|
336 |
/**
|
@@ -338,54 +438,48 @@ class Mollie_WC_Plugin
|
|
338 |
*/
|
339 |
public static function onMollieReturn ()
|
340 |
{
|
341 |
-
$
|
342 |
-
|
343 |
-
$order_id = ! empty( $_GET['order_id'] ) ? sanitize_text_field( $_GET['order_id'] ) : null;
|
344 |
-
$key = ! empty( $_GET['key'] ) ? sanitize_text_field( $_GET['key'] ) : null;
|
345 |
|
346 |
-
$
|
|
|
|
|
347 |
|
348 |
-
if (!$order)
|
349 |
-
{
|
350 |
self::setHttpResponseCode(404);
|
351 |
-
self::debug(__METHOD__ . ": Could not find order $
|
352 |
return;
|
353 |
}
|
354 |
|
355 |
-
if (!$order->key_is_valid($key))
|
356 |
-
{
|
357 |
self::setHttpResponseCode(401);
|
358 |
-
self::debug(__METHOD__ . ": Invalid key $key for order $
|
359 |
return;
|
360 |
}
|
361 |
|
362 |
-
$gateway = $
|
363 |
|
364 |
-
if (!$gateway)
|
365 |
-
|
366 |
-
self::setHttpResponseCode(404);
|
367 |
|
368 |
-
self::
|
|
|
|
|
|
|
369 |
return;
|
370 |
}
|
371 |
|
372 |
-
if (!($gateway instanceof Mollie_WC_Gateway_Abstract))
|
373 |
-
{
|
374 |
self::setHttpResponseCode(400);
|
375 |
-
self::debug(__METHOD__ . ": Invalid gateway " . get_class($gateway) . " for this plugin. Order $
|
376 |
return;
|
377 |
}
|
378 |
|
379 |
-
/** @var Mollie_WC_Gateway_Abstract $gateway */
|
380 |
-
|
381 |
$redirect_url = $gateway->getReturnRedirectUrlForOrder($order);
|
382 |
|
383 |
// Add utm_nooverride query string
|
384 |
-
$redirect_url = add_query_arg(
|
385 |
-
'utm_nooverride' => 1,
|
386 |
-
), $redirect_url);
|
387 |
|
388 |
-
self::debug(__METHOD__ . ": Redirect url on return order " . $gateway->id . ", order $
|
389 |
|
390 |
wp_safe_redirect($redirect_url);
|
391 |
}
|
@@ -446,9 +540,9 @@ class Mollie_WC_Plugin
|
|
446 |
*/
|
447 |
public static function addGateways( array $gateways ) {
|
448 |
|
449 |
-
|
450 |
|
451 |
-
|
452 |
if ( ! function_exists( 'get_current_screen' ) ) {
|
453 |
return $gateways;
|
454 |
}
|
@@ -491,13 +585,21 @@ class Mollie_WC_Plugin
|
|
491 |
*/
|
492 |
public static function maybeDisableApplePayGateway(array $gateways)
|
493 |
{
|
|
|
494 |
$wooCommerceSession = mollieWooCommerceSession();
|
495 |
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
return $gateways;
|
502 |
}
|
503 |
|
@@ -619,12 +721,12 @@ class Mollie_WC_Plugin
|
|
619 |
*/
|
620 |
public static function getPluginUrl ($path = '')
|
621 |
{
|
622 |
-
|
623 |
}
|
624 |
|
625 |
public static function getPluginPath($path = '')
|
626 |
{
|
627 |
-
return M4W_PLUGIN_DIR . $path;
|
628 |
}
|
629 |
|
630 |
/**
|
@@ -703,7 +805,7 @@ class Mollie_WC_Plugin
|
|
703 |
|
704 |
if (!$status_helper)
|
705 |
{
|
706 |
-
$status_helper = new Mollie_WC_Helper_Status();
|
707 |
}
|
708 |
|
709 |
return $status_helper;
|
@@ -794,8 +896,7 @@ class Mollie_WC_Plugin
|
|
794 |
}
|
795 |
|
796 |
// Is test mode enabled?
|
797 |
-
|
798 |
-
$test_mode = $settings_helper->isTestModeEnabled();
|
799 |
|
800 |
try {
|
801 |
// Get the order from the Mollie API
|
@@ -880,8 +981,7 @@ class Mollie_WC_Plugin
|
|
880 |
}
|
881 |
|
882 |
// Is test mode enabled?
|
883 |
-
|
884 |
-
$test_mode = $settings_helper->isTestModeEnabled();
|
885 |
|
886 |
try {
|
887 |
// Get the order from the Mollie API
|
1 |
<?php
|
|
|
|
|
2 |
|
3 |
+
use Mollie\Api\CompatibilityChecker;
|
4 |
+
use Mollie\Api\Exceptions\ApiException;
|
5 |
+
use Mollie\Api\Resources\Refund;
|
6 |
|
7 |
class Mollie_WC_Plugin
|
8 |
{
|
9 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
10 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
11 |
+
const PLUGIN_VERSION = '5.4.0';
|
12 |
|
13 |
const DB_VERSION = '1.0';
|
14 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
235 |
|
236 |
// Enqueue Scripts
|
237 |
add_action('wp_enqueue_scripts', [__CLASS__, 'enqueueFrontendScripts']);
|
238 |
+
add_action('wp_enqueue_scripts', [__CLASS__, 'enqueueComponentsAssets']);
|
239 |
|
240 |
add_action(
|
241 |
+
Mollie_WC_Payment_OrderItemsRefunder::ACTION_AFTER_REFUND_ORDER_ITEMS,
|
242 |
[__CLASS__, 'addOrderNoteForRefundCreated'],
|
243 |
10,
|
244 |
3
|
245 |
);
|
246 |
add_action(
|
247 |
+
Mollie_WC_Payment_OrderItemsRefunder::ACTION_AFTER_CANCELED_ORDER_ITEMS,
|
248 |
[__CLASS__, 'addOrderNoteForCancelledLineItems'],
|
249 |
10,
|
250 |
2
|
251 |
);
|
252 |
|
253 |
+
add_filter(
|
254 |
+
'woocommerce_get_settings_pages',
|
255 |
+
function ($settings) {
|
256 |
+
$settings[] = new Mollie_WC_Settings_Page_Components();
|
257 |
+
|
258 |
+
return $settings;
|
259 |
+
}
|
260 |
+
);
|
261 |
+
|
262 |
self::initDb();
|
263 |
self::schedulePendingPaymentOrdersExpirationCheck();
|
264 |
self::registerFrontendScripts();
|
315 |
*/
|
316 |
public static function registerFrontendScripts()
|
317 |
{
|
318 |
+
wp_register_script(
|
319 |
+
'babel-polyfill',
|
320 |
+
Mollie_WC_Plugin::getPluginUrl('/assets/js/babel-polyfill.min.js'),
|
321 |
+
[],
|
322 |
+
filemtime(Mollie_WC_Plugin::getPluginPath('/assets/js/babel-polyfill.min.js')),
|
323 |
+
true
|
324 |
+
);
|
325 |
|
326 |
wp_register_script(
|
327 |
'mollie_wc_gateway_applepay',
|
328 |
+
Mollie_WC_Plugin::getPluginUrl('/assets/js/applepay.min.js'),
|
329 |
[],
|
330 |
+
filemtime(Mollie_WC_Plugin::getPluginPath('/assets/js/applepay.min.js')),
|
331 |
+
true
|
332 |
+
);
|
333 |
+
|
334 |
+
wp_register_style(
|
335 |
+
'mollie-components',
|
336 |
+
Mollie_WC_Plugin::getPluginUrl('/assets/css/mollie-components.css'),
|
337 |
+
[],
|
338 |
+
filemtime(Mollie_WC_Plugin::getPluginPath('/assets/css/mollie-components.css')),
|
339 |
+
'screen'
|
340 |
+
);
|
341 |
+
wp_register_script('mollie', 'https://js.mollie.com/v1/mollie.js', [], null, true);
|
342 |
+
wp_register_script(
|
343 |
+
'mollie-components',
|
344 |
+
Mollie_WC_Plugin::getPluginUrl('/assets/js/mollie-components.min.js'),
|
345 |
+
['underscore', 'jquery', 'mollie', 'babel-polyfill'],
|
346 |
+
filemtime(Mollie_WC_Plugin::getPluginPath('/assets/js/mollie-components.min.js')),
|
347 |
true
|
348 |
);
|
349 |
}
|
355 |
*/
|
356 |
public static function enqueueFrontendScripts()
|
357 |
{
|
358 |
+
if (is_admin() || !isCheckoutContext()) {
|
359 |
+
return;
|
360 |
+
}
|
361 |
+
|
362 |
+
wp_enqueue_script('mollie_wc_gateway_applepay');
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Enqueue Mollie Component Assets
|
367 |
+
*/
|
368 |
+
public static function enqueueComponentsAssets()
|
369 |
+
{
|
370 |
+
try {
|
371 |
+
$merchantProfileId = merchantProfileId();
|
372 |
+
} catch (ApiException $exception) {
|
373 |
+
return;
|
374 |
+
}
|
375 |
+
|
376 |
+
$mollieComponentsStylesGateways = mollieComponentsStylesForAvailableGateways();
|
377 |
+
$gatewayNames = array_keys($mollieComponentsStylesGateways);
|
378 |
+
|
379 |
+
if (!$merchantProfileId || !$mollieComponentsStylesGateways) {
|
380 |
+
return;
|
381 |
+
}
|
382 |
+
|
383 |
+
if (is_admin() || !isCheckoutContext()) {
|
384 |
return;
|
385 |
}
|
386 |
|
387 |
+
$locale = get_locale();
|
388 |
+
|
389 |
+
wp_enqueue_style('mollie-components');
|
390 |
+
wp_enqueue_script('mollie-components');
|
391 |
+
|
392 |
+
wp_localize_script(
|
393 |
+
'mollie-components',
|
394 |
+
'mollieComponentsSettings',
|
395 |
+
[
|
396 |
+
'merchantProfileId' => $merchantProfileId,
|
397 |
+
'options' => [
|
398 |
+
'locale' => $locale,
|
399 |
+
'testmode' => isTestModeEnabled(),
|
400 |
+
],
|
401 |
+
'enabledGateways' => $gatewayNames,
|
402 |
+
'componentsSettings' => $mollieComponentsStylesGateways,
|
403 |
+
'componentsAttributes' => [
|
404 |
+
[
|
405 |
+
'name' => 'cardHolder',
|
406 |
+
'label' => esc_html__('Card Holder', 'mollie-payments-for-woocommerce')
|
407 |
+
],
|
408 |
+
[
|
409 |
+
'name' => 'cardNumber',
|
410 |
+
'label' => esc_html__('Card Number', 'mollie-payments-for-woocommerce')
|
411 |
+
],
|
412 |
+
[
|
413 |
+
'name' => 'expiryDate',
|
414 |
+
'label' => esc_html__('Expiry Date', 'mollie-payments-for-woocommerce')
|
415 |
+
],
|
416 |
+
[
|
417 |
+
'name' => 'verificationCode',
|
418 |
+
'label' => esc_html__(
|
419 |
+
'Verification Code',
|
420 |
+
'mollie-payments-for-woocommerce'
|
421 |
+
)
|
422 |
+
],
|
423 |
+
],
|
424 |
+
'messages' => [
|
425 |
+
'defaultErrorMessage' => esc_html__(
|
426 |
+
'An unknown error occurred, please check the card fields.',
|
427 |
+
'mollie-payments-for-woocommerce'
|
428 |
+
),
|
429 |
+
],
|
430 |
+
'isCheckout' => is_checkout(),
|
431 |
+
'isCheckoutPayPage' => is_checkout_pay_page()
|
432 |
+
]
|
433 |
+
);
|
434 |
}
|
435 |
|
436 |
/**
|
438 |
*/
|
439 |
public static function onMollieReturn ()
|
440 |
{
|
441 |
+
$dataHelper = self::getDataHelper();
|
|
|
|
|
|
|
442 |
|
443 |
+
$orderId = filter_input(INPUT_GET, 'order_id', FILTER_SANITIZE_NUMBER_INT) ?: null;
|
444 |
+
$key = filter_input(INPUT_GET, 'key', FILTER_SANITIZE_STRING) ?: null;
|
445 |
+
$order = $dataHelper->getWcOrder($orderId);
|
446 |
|
447 |
+
if (!$order) {
|
|
|
448 |
self::setHttpResponseCode(404);
|
449 |
+
self::debug(__METHOD__ . ": Could not find order $orderId.");
|
450 |
return;
|
451 |
}
|
452 |
|
453 |
+
if (!$order->key_is_valid($key)) {
|
|
|
454 |
self::setHttpResponseCode(401);
|
455 |
+
self::debug(__METHOD__ . ": Invalid key $key for order $orderId.");
|
456 |
return;
|
457 |
}
|
458 |
|
459 |
+
$gateway = $dataHelper->getWcPaymentGatewayByOrder($order);
|
460 |
|
461 |
+
if (!$gateway) {
|
462 |
+
$gatewayName = $order->get_payment_method();
|
|
|
463 |
|
464 |
+
self::setHttpResponseCode(404);
|
465 |
+
self::debug(
|
466 |
+
__METHOD__ . ": Could not find gateway {$gatewayName} for order {$orderId}."
|
467 |
+
);
|
468 |
return;
|
469 |
}
|
470 |
|
471 |
+
if (!($gateway instanceof Mollie_WC_Gateway_Abstract)) {
|
|
|
472 |
self::setHttpResponseCode(400);
|
473 |
+
self::debug(__METHOD__ . ": Invalid gateway " . get_class($gateway) . " for this plugin. Order $orderId.");
|
474 |
return;
|
475 |
}
|
476 |
|
|
|
|
|
477 |
$redirect_url = $gateway->getReturnRedirectUrlForOrder($order);
|
478 |
|
479 |
// Add utm_nooverride query string
|
480 |
+
$redirect_url = add_query_arg(['utm_nooverride' => 1], $redirect_url);
|
|
|
|
|
481 |
|
482 |
+
self::debug(__METHOD__ . ": Redirect url on return order " . $gateway->id . ", order $orderId: $redirect_url");
|
483 |
|
484 |
wp_safe_redirect($redirect_url);
|
485 |
}
|
540 |
*/
|
541 |
public static function addGateways( array $gateways ) {
|
542 |
|
543 |
+
$gateways = array_merge( $gateways, self::$GATEWAYS );
|
544 |
|
545 |
+
// Return if function get_current_screen() is not defined
|
546 |
if ( ! function_exists( 'get_current_screen' ) ) {
|
547 |
return $gateways;
|
548 |
}
|
585 |
*/
|
586 |
public static function maybeDisableApplePayGateway(array $gateways)
|
587 |
{
|
588 |
+
$isWcApiRequest = (bool)filter_input(INPUT_GET, 'wc-api', FILTER_SANITIZE_STRING);
|
589 |
$wooCommerceSession = mollieWooCommerceSession();
|
590 |
|
591 |
+
/*
|
592 |
+
* There is only one case where we want to filter the gateway and it's when the checkout
|
593 |
+
* page render the available payments methods.
|
594 |
+
*
|
595 |
+
* For any other case we want to be sure apple pay gateway is included.
|
596 |
+
*/
|
597 |
+
if ($isWcApiRequest ||
|
598 |
+
!$wooCommerceSession instanceof WC_Session ||
|
599 |
+
!doing_action('woocommerce_payment_gateways') ||
|
600 |
+
!wp_doing_ajax() ||
|
601 |
+
is_admin()
|
602 |
+
) {
|
603 |
return $gateways;
|
604 |
}
|
605 |
|
721 |
*/
|
722 |
public static function getPluginUrl ($path = '')
|
723 |
{
|
724 |
+
return untrailingslashit(M4W_PLUGIN_URL) . '/' . ltrim($path, '/');
|
725 |
}
|
726 |
|
727 |
public static function getPluginPath($path = '')
|
728 |
{
|
729 |
+
return untrailingslashit(M4W_PLUGIN_DIR) . '/' . ltrim($path, '/');
|
730 |
}
|
731 |
|
732 |
/**
|
805 |
|
806 |
if (!$status_helper)
|
807 |
{
|
808 |
+
$status_helper = new Mollie_WC_Helper_Status(new CompatibilityChecker());
|
809 |
}
|
810 |
|
811 |
return $status_helper;
|
896 |
}
|
897 |
|
898 |
// Is test mode enabled?
|
899 |
+
$test_mode = isTestModeEnabled();
|
|
|
900 |
|
901 |
try {
|
902 |
// Get the order from the Mollie API
|
981 |
}
|
982 |
|
983 |
// Is test mode enabled?
|
984 |
+
$test_mode = isTestModeEnabled();
|
|
|
985 |
|
986 |
try {
|
987 |
// Get the order from the Mollie API
|
src/Mollie/WC/Settings/Components.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mollie_WC_Settings_Components
|
4 |
+
{
|
5 |
+
const STYLE_KEY_PREFIXES = [
|
6 |
+
'invalid_',
|
7 |
+
];
|
8 |
+
|
9 |
+
public function styles()
|
10 |
+
{
|
11 |
+
$defaults = $this->defaultSettings();
|
12 |
+
$settings = [];
|
13 |
+
|
14 |
+
$settings[Mollie_WC_Components_StylesPropertiesDictionary::BASE_STYLE_KEY] = $this->optionsFor(
|
15 |
+
Mollie_WC_Components_StylesPropertiesDictionary::STYLES_OPTIONS_KEYS_MAP,
|
16 |
+
$defaults
|
17 |
+
);
|
18 |
+
$settings[Mollie_WC_Components_StylesPropertiesDictionary::INVALID_STYLE_KEY] = $this->optionsFor(
|
19 |
+
Mollie_WC_Components_StylesPropertiesDictionary::INVALID_STYLES_OPTIONS_KEYS_MAP,
|
20 |
+
$defaults
|
21 |
+
);
|
22 |
+
|
23 |
+
return $settings;
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function optionsFor($group, $defaults)
|
27 |
+
{
|
28 |
+
$settings = [];
|
29 |
+
|
30 |
+
foreach ($group as $key) {
|
31 |
+
$styleKey = str_replace(self::STYLE_KEY_PREFIXES, '', $key);
|
32 |
+
$optionValue = get_option(
|
33 |
+
"mollie_components_{$key}",
|
34 |
+
$this->defaultOptionFor($defaults, $key)
|
35 |
+
);
|
36 |
+
$settings[$styleKey] = $optionValue;
|
37 |
+
}
|
38 |
+
|
39 |
+
return $settings;
|
40 |
+
}
|
41 |
+
|
42 |
+
protected function defaultSettings()
|
43 |
+
{
|
44 |
+
// TODO May be a function?
|
45 |
+
$mollieComponentsFilePath = Mollie_WC_Plugin::getPluginPath(
|
46 |
+
'/inc/settings/mollie_components.php'
|
47 |
+
);
|
48 |
+
|
49 |
+
if (!file_exists($mollieComponentsFilePath)) {
|
50 |
+
return [];
|
51 |
+
}
|
52 |
+
|
53 |
+
$componentsFields = include $mollieComponentsFilePath;
|
54 |
+
|
55 |
+
return (array)$componentsFields;
|
56 |
+
}
|
57 |
+
|
58 |
+
protected function defaultOptionFor($options, $key)
|
59 |
+
{
|
60 |
+
return isset($options[$key]['default']) ? $options[$key]['default'] : null;
|
61 |
+
}
|
62 |
+
}
|
src/Mollie/WC/Settings/Page/Components.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mollie_WC_Settings_Page_Components extends WC_Settings_Page
|
4 |
+
{
|
5 |
+
const FILTER_COMPONENTS_SETTINGS = 'components_settings';
|
6 |
+
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
$this->id = 'mollie_components';
|
10 |
+
$this->label = __('Mollie Components', 'mollie-payments-for-woocommerce');
|
11 |
+
|
12 |
+
parent::__construct();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function output()
|
16 |
+
{
|
17 |
+
$settings = $this->get_settings();
|
18 |
+
WC_Admin_Settings::output_fields($settings);
|
19 |
+
}
|
20 |
+
|
21 |
+
public function get_settings()
|
22 |
+
{
|
23 |
+
$componentsSettings = $this->componentsSettings();
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Filter Component Settings
|
27 |
+
*
|
28 |
+
* @param array $componentSettings Default components settings for the Credit Card Gateway
|
29 |
+
*/
|
30 |
+
$componentsSettings = apply_filters(self::FILTER_COMPONENTS_SETTINGS, $componentsSettings);
|
31 |
+
|
32 |
+
return $componentsSettings;
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function componentsSettings()
|
36 |
+
{
|
37 |
+
$componentSettingsFilePath = $this->componentsFilePath();
|
38 |
+
|
39 |
+
if (!file_exists($componentSettingsFilePath)) {
|
40 |
+
return [];
|
41 |
+
}
|
42 |
+
|
43 |
+
$components = include $componentSettingsFilePath;
|
44 |
+
|
45 |
+
if (!is_array($components)) {
|
46 |
+
$components = [];
|
47 |
+
}
|
48 |
+
|
49 |
+
return $components;
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function componentsFilePath()
|
53 |
+
{
|
54 |
+
return Mollie_WC_Plugin::getPluginPath(
|
55 |
+
'/inc/settings/mollie_components.php'
|
56 |
+
);
|
57 |
+
}
|
58 |
+
}
|
{includes → src}/subscriptions_status_check_functions.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/autoload.php
RENAMED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a::getLoader();
|
{includes/mollie-api-php/vendor → vendor}/composer/ClassLoader.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/composer/LICENSE
RENAMED
File without changes
|
vendor/composer/autoload_classmap.php
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_classmap.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Composer\\CaBundle\\CaBundle' => $vendorDir . '/composer/ca-bundle/src/CaBundle.php',
|
10 |
+
'GuzzleHttp\\Client' => $vendorDir . '/guzzlehttp/guzzle/src/Client.php',
|
11 |
+
'GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php',
|
12 |
+
'GuzzleHttp\\Cookie\\CookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
|
13 |
+
'GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
|
14 |
+
'GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
|
15 |
+
'GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
|
16 |
+
'GuzzleHttp\\Cookie\\SetCookie' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php',
|
17 |
+
'GuzzleHttp\\Exception\\BadResponseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php',
|
18 |
+
'GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
19 |
+
'GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
20 |
+
'GuzzleHttp\\Exception\\GuzzleException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php',
|
21 |
+
'GuzzleHttp\\Exception\\InvalidArgumentException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php',
|
22 |
+
'GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
23 |
+
'GuzzleHttp\\Exception\\SeekException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
|
24 |
+
'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
25 |
+
'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
|
26 |
+
'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
|
27 |
+
'GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php',
|
28 |
+
'GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php',
|
29 |
+
'GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php',
|
30 |
+
'GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php',
|
31 |
+
'GuzzleHttp\\Handler\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php',
|
32 |
+
'GuzzleHttp\\Handler\\EasyHandle' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php',
|
33 |
+
'GuzzleHttp\\Handler\\MockHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/MockHandler.php',
|
34 |
+
'GuzzleHttp\\Handler\\Proxy' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/Proxy.php',
|
35 |
+
'GuzzleHttp\\Handler\\StreamHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php',
|
36 |
+
'GuzzleHttp\\MessageFormatter' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatter.php',
|
37 |
+
'GuzzleHttp\\Middleware' => $vendorDir . '/guzzlehttp/guzzle/src/Middleware.php',
|
38 |
+
'GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php',
|
39 |
+
'GuzzleHttp\\PrepareBodyMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php',
|
40 |
+
'GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php',
|
41 |
+
'GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php',
|
42 |
+
'GuzzleHttp\\Promise\\Coroutine' => $vendorDir . '/guzzlehttp/promises/src/Coroutine.php',
|
43 |
+
'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php',
|
44 |
+
'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php',
|
45 |
+
'GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php',
|
46 |
+
'GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php',
|
47 |
+
'GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php',
|
48 |
+
'GuzzleHttp\\Promise\\RejectedPromise' => $vendorDir . '/guzzlehttp/promises/src/RejectedPromise.php',
|
49 |
+
'GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php',
|
50 |
+
'GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php',
|
51 |
+
'GuzzleHttp\\Promise\\TaskQueueInterface' => $vendorDir . '/guzzlehttp/promises/src/TaskQueueInterface.php',
|
52 |
+
'GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php',
|
53 |
+
'GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php',
|
54 |
+
'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php',
|
55 |
+
'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php',
|
56 |
+
'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php',
|
57 |
+
'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php',
|
58 |
+
'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php',
|
59 |
+
'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php',
|
60 |
+
'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php',
|
61 |
+
'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php',
|
62 |
+
'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php',
|
63 |
+
'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php',
|
64 |
+
'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php',
|
65 |
+
'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php',
|
66 |
+
'GuzzleHttp\\Psr7\\Rfc7230' => $vendorDir . '/guzzlehttp/psr7/src/Rfc7230.php',
|
67 |
+
'GuzzleHttp\\Psr7\\ServerRequest' => $vendorDir . '/guzzlehttp/psr7/src/ServerRequest.php',
|
68 |
+
'GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php',
|
69 |
+
'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
|
70 |
+
'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php',
|
71 |
+
'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php',
|
72 |
+
'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php',
|
73 |
+
'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php',
|
74 |
+
'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php',
|
75 |
+
'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
|
76 |
+
'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php',
|
77 |
+
'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
|
78 |
+
'GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php',
|
79 |
+
'GuzzleHttp\\UriTemplate' => $vendorDir . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
80 |
+
'Mollie\\Api\\CompatibilityChecker' => $vendorDir . '/mollie/mollie-api-php/src/CompatibilityChecker.php',
|
81 |
+
'Mollie\\Api\\Endpoints\\ChargebackEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/ChargebackEndpoint.php',
|
82 |
+
'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/CollectionEndpointAbstract.php',
|
83 |
+
'Mollie\\Api\\Endpoints\\CustomerEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/CustomerEndpoint.php',
|
84 |
+
'Mollie\\Api\\Endpoints\\CustomerPaymentsEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/CustomerPaymentsEndpoint.php',
|
85 |
+
'Mollie\\Api\\Endpoints\\EndpointAbstract' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/EndpointAbstract.php',
|
86 |
+
'Mollie\\Api\\Endpoints\\InvoiceEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/InvoiceEndpoint.php',
|
87 |
+
'Mollie\\Api\\Endpoints\\MandateEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/MandateEndpoint.php',
|
88 |
+
'Mollie\\Api\\Endpoints\\MethodEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/MethodEndpoint.php',
|
89 |
+
'Mollie\\Api\\Endpoints\\OnboardingEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/OnboardingEndpoint.php',
|
90 |
+
'Mollie\\Api\\Endpoints\\OrderEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/OrderEndpoint.php',
|
91 |
+
'Mollie\\Api\\Endpoints\\OrderLineEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/OrderLineEndpoint.php',
|
92 |
+
'Mollie\\Api\\Endpoints\\OrderPaymentEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/OrderPaymentEndpoint.php',
|
93 |
+
'Mollie\\Api\\Endpoints\\OrderRefundEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php',
|
94 |
+
'Mollie\\Api\\Endpoints\\OrganizationEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/OrganizationEndpoint.php',
|
95 |
+
'Mollie\\Api\\Endpoints\\PaymentCaptureEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/PaymentCaptureEndpoint.php',
|
96 |
+
'Mollie\\Api\\Endpoints\\PaymentChargebackEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/PaymentChargebackEndpoint.php',
|
97 |
+
'Mollie\\Api\\Endpoints\\PaymentEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/PaymentEndpoint.php',
|
98 |
+
'Mollie\\Api\\Endpoints\\PaymentRefundEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/PaymentRefundEndpoint.php',
|
99 |
+
'Mollie\\Api\\Endpoints\\PermissionEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/PermissionEndpoint.php',
|
100 |
+
'Mollie\\Api\\Endpoints\\ProfileEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/ProfileEndpoint.php',
|
101 |
+
'Mollie\\Api\\Endpoints\\ProfileMethodEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/ProfileMethodEndpoint.php',
|
102 |
+
'Mollie\\Api\\Endpoints\\RefundEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/RefundEndpoint.php',
|
103 |
+
'Mollie\\Api\\Endpoints\\SettlementsEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/SettlementsEndpoint.php',
|
104 |
+
'Mollie\\Api\\Endpoints\\ShipmentEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/ShipmentEndpoint.php',
|
105 |
+
'Mollie\\Api\\Endpoints\\SubscriptionEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/SubscriptionEndpoint.php',
|
106 |
+
'Mollie\\Api\\Endpoints\\WalletEndpoint' => $vendorDir . '/mollie/mollie-api-php/src/Endpoints/WalletEndpoint.php',
|
107 |
+
'Mollie\\Api\\Exceptions\\ApiException' => $vendorDir . '/mollie/mollie-api-php/src/Exceptions/ApiException.php',
|
108 |
+
'Mollie\\Api\\Exceptions\\IncompatiblePlatform' => $vendorDir . '/mollie/mollie-api-php/src/Exceptions/IncompatiblePlatform.php',
|
109 |
+
'Mollie\\Api\\MollieApiClient' => $vendorDir . '/mollie/mollie-api-php/src/MollieApiClient.php',
|
110 |
+
'Mollie\\Api\\Resources\\BaseCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/BaseCollection.php',
|
111 |
+
'Mollie\\Api\\Resources\\BaseResource' => $vendorDir . '/mollie/mollie-api-php/src/Resources/BaseResource.php',
|
112 |
+
'Mollie\\Api\\Resources\\Capture' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Capture.php',
|
113 |
+
'Mollie\\Api\\Resources\\CaptureCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/CaptureCollection.php',
|
114 |
+
'Mollie\\Api\\Resources\\Chargeback' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Chargeback.php',
|
115 |
+
'Mollie\\Api\\Resources\\ChargebackCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/ChargebackCollection.php',
|
116 |
+
'Mollie\\Api\\Resources\\CurrentProfile' => $vendorDir . '/mollie/mollie-api-php/src/Resources/CurrentProfile.php',
|
117 |
+
'Mollie\\Api\\Resources\\CursorCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/CursorCollection.php',
|
118 |
+
'Mollie\\Api\\Resources\\Customer' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Customer.php',
|
119 |
+
'Mollie\\Api\\Resources\\CustomerCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/CustomerCollection.php',
|
120 |
+
'Mollie\\Api\\Resources\\Invoice' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Invoice.php',
|
121 |
+
'Mollie\\Api\\Resources\\InvoiceCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/InvoiceCollection.php',
|
122 |
+
'Mollie\\Api\\Resources\\Issuer' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Issuer.php',
|
123 |
+
'Mollie\\Api\\Resources\\IssuerCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/IssuerCollection.php',
|
124 |
+
'Mollie\\Api\\Resources\\Mandate' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Mandate.php',
|
125 |
+
'Mollie\\Api\\Resources\\MandateCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/MandateCollection.php',
|
126 |
+
'Mollie\\Api\\Resources\\Method' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Method.php',
|
127 |
+
'Mollie\\Api\\Resources\\MethodCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/MethodCollection.php',
|
128 |
+
'Mollie\\Api\\Resources\\MethodPrice' => $vendorDir . '/mollie/mollie-api-php/src/Resources/MethodPrice.php',
|
129 |
+
'Mollie\\Api\\Resources\\MethodPriceCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/MethodPriceCollection.php',
|
130 |
+
'Mollie\\Api\\Resources\\Onboarding' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Onboarding.php',
|
131 |
+
'Mollie\\Api\\Resources\\Order' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Order.php',
|
132 |
+
'Mollie\\Api\\Resources\\OrderCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/OrderCollection.php',
|
133 |
+
'Mollie\\Api\\Resources\\OrderLine' => $vendorDir . '/mollie/mollie-api-php/src/Resources/OrderLine.php',
|
134 |
+
'Mollie\\Api\\Resources\\OrderLineCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/OrderLineCollection.php',
|
135 |
+
'Mollie\\Api\\Resources\\Organization' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Organization.php',
|
136 |
+
'Mollie\\Api\\Resources\\OrganizationCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/OrganizationCollection.php',
|
137 |
+
'Mollie\\Api\\Resources\\Payment' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Payment.php',
|
138 |
+
'Mollie\\Api\\Resources\\PaymentCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/PaymentCollection.php',
|
139 |
+
'Mollie\\Api\\Resources\\Permission' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Permission.php',
|
140 |
+
'Mollie\\Api\\Resources\\PermissionCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/PermissionCollection.php',
|
141 |
+
'Mollie\\Api\\Resources\\Profile' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Profile.php',
|
142 |
+
'Mollie\\Api\\Resources\\ProfileCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/ProfileCollection.php',
|
143 |
+
'Mollie\\Api\\Resources\\Refund' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Refund.php',
|
144 |
+
'Mollie\\Api\\Resources\\RefundCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/RefundCollection.php',
|
145 |
+
'Mollie\\Api\\Resources\\ResourceFactory' => $vendorDir . '/mollie/mollie-api-php/src/Resources/ResourceFactory.php',
|
146 |
+
'Mollie\\Api\\Resources\\Settlement' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Settlement.php',
|
147 |
+
'Mollie\\Api\\Resources\\SettlementCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/SettlementCollection.php',
|
148 |
+
'Mollie\\Api\\Resources\\Shipment' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Shipment.php',
|
149 |
+
'Mollie\\Api\\Resources\\ShipmentCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/ShipmentCollection.php',
|
150 |
+
'Mollie\\Api\\Resources\\Subscription' => $vendorDir . '/mollie/mollie-api-php/src/Resources/Subscription.php',
|
151 |
+
'Mollie\\Api\\Resources\\SubscriptionCollection' => $vendorDir . '/mollie/mollie-api-php/src/Resources/SubscriptionCollection.php',
|
152 |
+
'Mollie\\Api\\Types\\InvoiceStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/InvoiceStatus.php',
|
153 |
+
'Mollie\\Api\\Types\\MandateMethod' => $vendorDir . '/mollie/mollie-api-php/src/Types/MandateMethod.php',
|
154 |
+
'Mollie\\Api\\Types\\MandateStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/MandateStatus.php',
|
155 |
+
'Mollie\\Api\\Types\\OnboardingStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/OnboardingStatus.php',
|
156 |
+
'Mollie\\Api\\Types\\OrderLineStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/OrderLineStatus.php',
|
157 |
+
'Mollie\\Api\\Types\\OrderLineType' => $vendorDir . '/mollie/mollie-api-php/src/Types/OrderLineType.php',
|
158 |
+
'Mollie\\Api\\Types\\OrderStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/OrderStatus.php',
|
159 |
+
'Mollie\\Api\\Types\\PaymentMethod' => $vendorDir . '/mollie/mollie-api-php/src/Types/PaymentMethod.php',
|
160 |
+
'Mollie\\Api\\Types\\PaymentStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/PaymentStatus.php',
|
161 |
+
'Mollie\\Api\\Types\\ProfileStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/ProfileStatus.php',
|
162 |
+
'Mollie\\Api\\Types\\RefundStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/RefundStatus.php',
|
163 |
+
'Mollie\\Api\\Types\\SequenceType' => $vendorDir . '/mollie/mollie-api-php/src/Types/SequenceType.php',
|
164 |
+
'Mollie\\Api\\Types\\SettlementStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/SettlementStatus.php',
|
165 |
+
'Mollie\\Api\\Types\\SubscriptionStatus' => $vendorDir . '/mollie/mollie-api-php/src/Types/SubscriptionStatus.php',
|
166 |
+
'Mollie_WC_Components_Styles' => $baseDir . '/src/Mollie/WC/Components/Styles.php',
|
167 |
+
'Mollie_WC_Components_StylesPropertiesDictionary' => $baseDir . '/src/Mollie/WC/Components/StylesPropertiesDictionary.php',
|
168 |
+
'Mollie_WC_Exception' => $baseDir . '/src/Mollie/WC/Exception.php',
|
169 |
+
'Mollie_WC_Exception_CouldNotConnectToMollie' => $baseDir . '/src/Mollie/WC/Exception/CouldNotConnectToMollie.php',
|
170 |
+
'Mollie_WC_Exception_IncompatiblePlatform' => $baseDir . '/src/Mollie/WC/Exception/IncompatiblePlatform.php',
|
171 |
+
'Mollie_WC_Exception_InvalidApiKey' => $baseDir . '/src/Mollie/WC/Exception/InvalidApiKey.php',
|
172 |
+
'Mollie_WC_Gateway_Abstract' => $baseDir . '/src/Mollie/WC/Gateway/Abstract.php',
|
173 |
+
'Mollie_WC_Gateway_AbstractSepaRecurring' => $baseDir . '/src/Mollie/WC/Gateway/AbstractSepaRecurring.php',
|
174 |
+
'Mollie_WC_Gateway_AbstractSubscription' => $baseDir . '/src/Mollie/WC/Gateway/AbstractSubscription.php',
|
175 |
+
'Mollie_WC_Gateway_Applepay' => $baseDir . '/src/Mollie/WC/Gateway/Applepay.php',
|
176 |
+
'Mollie_WC_Gateway_Bancontact' => $baseDir . '/src/Mollie/WC/Gateway/Bancontact.php',
|
177 |
+
'Mollie_WC_Gateway_BankTransfer' => $baseDir . '/src/Mollie/WC/Gateway/BankTransfer.php',
|
178 |
+
'Mollie_WC_Gateway_Belfius' => $baseDir . '/src/Mollie/WC/Gateway/Belfius.php',
|
179 |
+
'Mollie_WC_Gateway_Creditcard' => $baseDir . '/src/Mollie/WC/Gateway/Creditcard.php',
|
180 |
+
'Mollie_WC_Gateway_DirectDebit' => $baseDir . '/src/Mollie/WC/Gateway/DirectDebit.php',
|
181 |
+
'Mollie_WC_Gateway_EPS' => $baseDir . '/src/Mollie/WC/Gateway/EPS.php',
|
182 |
+
'Mollie_WC_Gateway_Giftcard' => $baseDir . '/src/Mollie/WC/Gateway/Giftcard.php',
|
183 |
+
'Mollie_WC_Gateway_Giropay' => $baseDir . '/src/Mollie/WC/Gateway/Giropay.php',
|
184 |
+
'Mollie_WC_Gateway_Ideal' => $baseDir . '/src/Mollie/WC/Gateway/Ideal.php',
|
185 |
+
'Mollie_WC_Gateway_IngHomePay' => $baseDir . '/src/Mollie/WC/Gateway/IngHomePay.php',
|
186 |
+
'Mollie_WC_Gateway_Kbc' => $baseDir . '/src/Mollie/WC/Gateway/Kbc.php',
|
187 |
+
'Mollie_WC_Gateway_KlarnaPayLater' => $baseDir . '/src/Mollie/WC/Gateway/KlarnaPayLater.php',
|
188 |
+
'Mollie_WC_Gateway_KlarnaSliceIt' => $baseDir . '/src/Mollie/WC/Gateway/KlarnaSliceIt.php',
|
189 |
+
'Mollie_WC_Gateway_MisterCash' => $baseDir . '/src/Mollie/WC/Gateway/MisterCash.php',
|
190 |
+
'Mollie_WC_Gateway_MyBank' => $baseDir . '/src/Mollie/WC/Gateway/MyBank.php',
|
191 |
+
'Mollie_WC_Gateway_PayPal' => $baseDir . '/src/Mollie/WC/Gateway/PayPal.php',
|
192 |
+
'Mollie_WC_Gateway_Paysafecard' => $baseDir . '/src/Mollie/WC/Gateway/Paysafecard.php',
|
193 |
+
'Mollie_WC_Gateway_Przelewy24' => $baseDir . '/src/Mollie/WC/Gateway/Przelewy24.php',
|
194 |
+
'Mollie_WC_Gateway_Sofort' => $baseDir . '/src/Mollie/WC/Gateway/Sofort.php',
|
195 |
+
'Mollie_WC_Helper_Api' => $baseDir . '/src/Mollie/WC/Helper/Api.php',
|
196 |
+
'Mollie_WC_Helper_Data' => $baseDir . '/src/Mollie/WC/Helper/Data.php',
|
197 |
+
'Mollie_WC_Helper_OrderLines' => $baseDir . '/src/Mollie/WC/Helper/OrderLines.php',
|
198 |
+
'Mollie_WC_Helper_PaymentFactory' => $baseDir . '/src/Mollie/WC/Helper/PaymentFactory.php',
|
199 |
+
'Mollie_WC_Helper_Settings' => $baseDir . '/src/Mollie/WC/Helper/Settings.php',
|
200 |
+
'Mollie_WC_Helper_Status' => $baseDir . '/src/Mollie/WC/Helper/Status.php',
|
201 |
+
'Mollie_WC_OrderLineStatus' => $baseDir . '/src/Mollie/WC/OrderLineStatus.php',
|
202 |
+
'Mollie_WC_Payment_Object' => $baseDir . '/src/Mollie/WC/Payment/Object.php',
|
203 |
+
'Mollie_WC_Payment_Order' => $baseDir . '/src/Mollie/WC/Payment/Order.php',
|
204 |
+
'Mollie_WC_Payment_OrderItemsRefunder' => $baseDir . '/src/Mollie/WC/Payment/OrderItemsRefunder.php',
|
205 |
+
'Mollie_WC_Payment_PartialRefundException' => $baseDir . '/src/Mollie/WC/Payment/PartialRefundException.php',
|
206 |
+
'Mollie_WC_Payment_Payment' => $baseDir . '/src/Mollie/WC/Payment/Payment.php',
|
207 |
+
'Mollie_WC_Payment_RefundLineItemsBuilder' => $baseDir . '/src/Mollie/WC/Payment/RefundLineItemsBuilder.php',
|
208 |
+
'Mollie_WC_Plugin' => $baseDir . '/src/Mollie/WC/Plugin.php',
|
209 |
+
'Mollie_WC_Settings_Components' => $baseDir . '/src/Mollie/WC/Settings/Components.php',
|
210 |
+
'Mollie_WC_Settings_Page_Components' => $baseDir . '/src/Mollie/WC/Settings/Page/Components.php',
|
211 |
+
'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php',
|
212 |
+
'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php',
|
213 |
+
'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php',
|
214 |
+
'Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php',
|
215 |
+
'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php',
|
216 |
+
'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php',
|
217 |
+
'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php',
|
218 |
+
);
|
{includes/mollie-api-php/vendor → vendor}/composer/autoload_files.php
RENAMED
@@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
10 |
-
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
11 |
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
|
|
12 |
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
13 |
);
|
7 |
|
8 |
return array(
|
9 |
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
|
|
10 |
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
11 |
+
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
12 |
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
13 |
);
|
{includes/mollie-api-php/vendor → vendor}/composer/autoload_namespaces.php
RENAMED
@@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Mollie_WC_' => array($baseDir . '/src'),
|
10 |
);
|
{includes/mollie-api-php/vendor → vendor}/composer/autoload_psr4.php
RENAMED
@@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
10 |
-
'Mollie\\Api\\' => array($
|
11 |
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
|
12 |
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
|
13 |
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
|
7 |
|
8 |
return array(
|
9 |
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
10 |
+
'Mollie\\Api\\' => array($vendorDir . '/mollie/mollie-api-php/src'),
|
11 |
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
|
12 |
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
|
13 |
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
|
{includes/mollie-api-php/vendor → vendor}/composer/autoload_real.php
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitb9d9e22242fec492b0c00057c2b37715
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitb9d9e22242fec492b0c00057c2b37715
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit3ea1880a2740a3571db7cff67650474a', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit3ea1880a2740a3571db7cff67650474a::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequire3ea1880a2740a3571db7cff67650474a($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequire3ea1880a2740a3571db7cff67650474a($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
vendor/composer/autoload_static.php
ADDED
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInit3ea1880a2740a3571db7cff67650474a
|
8 |
+
{
|
9 |
+
public static $files = array (
|
10 |
+
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
+
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
12 |
+
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
13 |
+
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
14 |
+
);
|
15 |
+
|
16 |
+
public static $prefixLengthsPsr4 = array (
|
17 |
+
'P' =>
|
18 |
+
array (
|
19 |
+
'Psr\\Http\\Message\\' => 17,
|
20 |
+
),
|
21 |
+
'M' =>
|
22 |
+
array (
|
23 |
+
'Mollie\\Api\\' => 11,
|
24 |
+
),
|
25 |
+
'G' =>
|
26 |
+
array (
|
27 |
+
'GuzzleHttp\\Psr7\\' => 16,
|
28 |
+
'GuzzleHttp\\Promise\\' => 19,
|
29 |
+
'GuzzleHttp\\' => 11,
|
30 |
+
),
|
31 |
+
'C' =>
|
32 |
+
array (
|
33 |
+
'Composer\\CaBundle\\' => 18,
|
34 |
+
),
|
35 |
+
);
|
36 |
+
|
37 |
+
public static $prefixDirsPsr4 = array (
|
38 |
+
'Psr\\Http\\Message\\' =>
|
39 |
+
array (
|
40 |
+
0 => __DIR__ . '/..' . '/psr/http-message/src',
|
41 |
+
),
|
42 |
+
'Mollie\\Api\\' =>
|
43 |
+
array (
|
44 |
+
0 => __DIR__ . '/..' . '/mollie/mollie-api-php/src',
|
45 |
+
),
|
46 |
+
'GuzzleHttp\\Psr7\\' =>
|
47 |
+
array (
|
48 |
+
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
|
49 |
+
),
|
50 |
+
'GuzzleHttp\\Promise\\' =>
|
51 |
+
array (
|
52 |
+
0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
|
53 |
+
),
|
54 |
+
'GuzzleHttp\\' =>
|
55 |
+
array (
|
56 |
+
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
|
57 |
+
),
|
58 |
+
'Composer\\CaBundle\\' =>
|
59 |
+
array (
|
60 |
+
0 => __DIR__ . '/..' . '/composer/ca-bundle/src',
|
61 |
+
),
|
62 |
+
);
|
63 |
+
|
64 |
+
public static $prefixesPsr0 = array (
|
65 |
+
'M' =>
|
66 |
+
array (
|
67 |
+
'Mollie_WC_' =>
|
68 |
+
array (
|
69 |
+
0 => __DIR__ . '/../..' . '/src',
|
70 |
+
),
|
71 |
+
),
|
72 |
+
);
|
73 |
+
|
74 |
+
public static $classMap = array (
|
75 |
+
'Composer\\CaBundle\\CaBundle' => __DIR__ . '/..' . '/composer/ca-bundle/src/CaBundle.php',
|
76 |
+
'GuzzleHttp\\Client' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Client.php',
|
77 |
+
'GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php',
|
78 |
+
'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
|
79 |
+
'GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
|
80 |
+
'GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
|
81 |
+
'GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
|
82 |
+
'GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php',
|
83 |
+
'GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php',
|
84 |
+
'GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
85 |
+
'GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
86 |
+
'GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php',
|
87 |
+
'GuzzleHttp\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php',
|
88 |
+
'GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
89 |
+
'GuzzleHttp\\Exception\\SeekException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
|
90 |
+
'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
91 |
+
'GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
|
92 |
+
'GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
|
93 |
+
'GuzzleHttp\\HandlerStack' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HandlerStack.php',
|
94 |
+
'GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php',
|
95 |
+
'GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php',
|
96 |
+
'GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php',
|
97 |
+
'GuzzleHttp\\Handler\\CurlMultiHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php',
|
98 |
+
'GuzzleHttp\\Handler\\EasyHandle' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php',
|
99 |
+
'GuzzleHttp\\Handler\\MockHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/MockHandler.php',
|
100 |
+
'GuzzleHttp\\Handler\\Proxy' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/Proxy.php',
|
101 |
+
'GuzzleHttp\\Handler\\StreamHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php',
|
102 |
+
'GuzzleHttp\\MessageFormatter' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatter.php',
|
103 |
+
'GuzzleHttp\\Middleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Middleware.php',
|
104 |
+
'GuzzleHttp\\Pool' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Pool.php',
|
105 |
+
'GuzzleHttp\\PrepareBodyMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php',
|
106 |
+
'GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/AggregateException.php',
|
107 |
+
'GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/CancellationException.php',
|
108 |
+
'GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Coroutine.php',
|
109 |
+
'GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php',
|
110 |
+
'GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php',
|
111 |
+
'GuzzleHttp\\Promise\\Promise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Promise.php',
|
112 |
+
'GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromiseInterface.php',
|
113 |
+
'GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromisorInterface.php',
|
114 |
+
'GuzzleHttp\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectedPromise.php',
|
115 |
+
'GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectionException.php',
|
116 |
+
'GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueue.php',
|
117 |
+
'GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueueInterface.php',
|
118 |
+
'GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/AppendStream.php',
|
119 |
+
'GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/BufferStream.php',
|
120 |
+
'GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php',
|
121 |
+
'GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php',
|
122 |
+
'GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php',
|
123 |
+
'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php',
|
124 |
+
'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php',
|
125 |
+
'GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php',
|
126 |
+
'GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php',
|
127 |
+
'GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php',
|
128 |
+
'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php',
|
129 |
+
'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php',
|
130 |
+
'GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php',
|
131 |
+
'GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php',
|
132 |
+
'GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Rfc7230.php',
|
133 |
+
'GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/ServerRequest.php',
|
134 |
+
'GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Stream.php',
|
135 |
+
'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
|
136 |
+
'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php',
|
137 |
+
'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php',
|
138 |
+
'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php',
|
139 |
+
'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php',
|
140 |
+
'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php',
|
141 |
+
'GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
|
142 |
+
'GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php',
|
143 |
+
'GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
|
144 |
+
'GuzzleHttp\\TransferStats' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/TransferStats.php',
|
145 |
+
'GuzzleHttp\\UriTemplate' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
146 |
+
'Mollie\\Api\\CompatibilityChecker' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/CompatibilityChecker.php',
|
147 |
+
'Mollie\\Api\\Endpoints\\ChargebackEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/ChargebackEndpoint.php',
|
148 |
+
'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/CollectionEndpointAbstract.php',
|
149 |
+
'Mollie\\Api\\Endpoints\\CustomerEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/CustomerEndpoint.php',
|
150 |
+
'Mollie\\Api\\Endpoints\\CustomerPaymentsEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/CustomerPaymentsEndpoint.php',
|
151 |
+
'Mollie\\Api\\Endpoints\\EndpointAbstract' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/EndpointAbstract.php',
|
152 |
+
'Mollie\\Api\\Endpoints\\InvoiceEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/InvoiceEndpoint.php',
|
153 |
+
'Mollie\\Api\\Endpoints\\MandateEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/MandateEndpoint.php',
|
154 |
+
'Mollie\\Api\\Endpoints\\MethodEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/MethodEndpoint.php',
|
155 |
+
'Mollie\\Api\\Endpoints\\OnboardingEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/OnboardingEndpoint.php',
|
156 |
+
'Mollie\\Api\\Endpoints\\OrderEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/OrderEndpoint.php',
|
157 |
+
'Mollie\\Api\\Endpoints\\OrderLineEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/OrderLineEndpoint.php',
|
158 |
+
'Mollie\\Api\\Endpoints\\OrderPaymentEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/OrderPaymentEndpoint.php',
|
159 |
+
'Mollie\\Api\\Endpoints\\OrderRefundEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php',
|
160 |
+
'Mollie\\Api\\Endpoints\\OrganizationEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/OrganizationEndpoint.php',
|
161 |
+
'Mollie\\Api\\Endpoints\\PaymentCaptureEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/PaymentCaptureEndpoint.php',
|
162 |
+
'Mollie\\Api\\Endpoints\\PaymentChargebackEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/PaymentChargebackEndpoint.php',
|
163 |
+
'Mollie\\Api\\Endpoints\\PaymentEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/PaymentEndpoint.php',
|
164 |
+
'Mollie\\Api\\Endpoints\\PaymentRefundEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/PaymentRefundEndpoint.php',
|
165 |
+
'Mollie\\Api\\Endpoints\\PermissionEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/PermissionEndpoint.php',
|
166 |
+
'Mollie\\Api\\Endpoints\\ProfileEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/ProfileEndpoint.php',
|
167 |
+
'Mollie\\Api\\Endpoints\\ProfileMethodEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/ProfileMethodEndpoint.php',
|
168 |
+
'Mollie\\Api\\Endpoints\\RefundEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/RefundEndpoint.php',
|
169 |
+
'Mollie\\Api\\Endpoints\\SettlementsEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/SettlementsEndpoint.php',
|
170 |
+
'Mollie\\Api\\Endpoints\\ShipmentEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/ShipmentEndpoint.php',
|
171 |
+
'Mollie\\Api\\Endpoints\\SubscriptionEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/SubscriptionEndpoint.php',
|
172 |
+
'Mollie\\Api\\Endpoints\\WalletEndpoint' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Endpoints/WalletEndpoint.php',
|
173 |
+
'Mollie\\Api\\Exceptions\\ApiException' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Exceptions/ApiException.php',
|
174 |
+
'Mollie\\Api\\Exceptions\\IncompatiblePlatform' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Exceptions/IncompatiblePlatform.php',
|
175 |
+
'Mollie\\Api\\MollieApiClient' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/MollieApiClient.php',
|
176 |
+
'Mollie\\Api\\Resources\\BaseCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/BaseCollection.php',
|
177 |
+
'Mollie\\Api\\Resources\\BaseResource' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/BaseResource.php',
|
178 |
+
'Mollie\\Api\\Resources\\Capture' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Capture.php',
|
179 |
+
'Mollie\\Api\\Resources\\CaptureCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/CaptureCollection.php',
|
180 |
+
'Mollie\\Api\\Resources\\Chargeback' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Chargeback.php',
|
181 |
+
'Mollie\\Api\\Resources\\ChargebackCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/ChargebackCollection.php',
|
182 |
+
'Mollie\\Api\\Resources\\CurrentProfile' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/CurrentProfile.php',
|
183 |
+
'Mollie\\Api\\Resources\\CursorCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/CursorCollection.php',
|
184 |
+
'Mollie\\Api\\Resources\\Customer' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Customer.php',
|
185 |
+
'Mollie\\Api\\Resources\\CustomerCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/CustomerCollection.php',
|
186 |
+
'Mollie\\Api\\Resources\\Invoice' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Invoice.php',
|
187 |
+
'Mollie\\Api\\Resources\\InvoiceCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/InvoiceCollection.php',
|
188 |
+
'Mollie\\Api\\Resources\\Issuer' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Issuer.php',
|
189 |
+
'Mollie\\Api\\Resources\\IssuerCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/IssuerCollection.php',
|
190 |
+
'Mollie\\Api\\Resources\\Mandate' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Mandate.php',
|
191 |
+
'Mollie\\Api\\Resources\\MandateCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/MandateCollection.php',
|
192 |
+
'Mollie\\Api\\Resources\\Method' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Method.php',
|
193 |
+
'Mollie\\Api\\Resources\\MethodCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/MethodCollection.php',
|
194 |
+
'Mollie\\Api\\Resources\\MethodPrice' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/MethodPrice.php',
|
195 |
+
'Mollie\\Api\\Resources\\MethodPriceCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/MethodPriceCollection.php',
|
196 |
+
'Mollie\\Api\\Resources\\Onboarding' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Onboarding.php',
|
197 |
+
'Mollie\\Api\\Resources\\Order' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Order.php',
|
198 |
+
'Mollie\\Api\\Resources\\OrderCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/OrderCollection.php',
|
199 |
+
'Mollie\\Api\\Resources\\OrderLine' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/OrderLine.php',
|
200 |
+
'Mollie\\Api\\Resources\\OrderLineCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/OrderLineCollection.php',
|
201 |
+
'Mollie\\Api\\Resources\\Organization' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Organization.php',
|
202 |
+
'Mollie\\Api\\Resources\\OrganizationCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/OrganizationCollection.php',
|
203 |
+
'Mollie\\Api\\Resources\\Payment' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Payment.php',
|
204 |
+
'Mollie\\Api\\Resources\\PaymentCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/PaymentCollection.php',
|
205 |
+
'Mollie\\Api\\Resources\\Permission' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Permission.php',
|
206 |
+
'Mollie\\Api\\Resources\\PermissionCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/PermissionCollection.php',
|
207 |
+
'Mollie\\Api\\Resources\\Profile' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Profile.php',
|
208 |
+
'Mollie\\Api\\Resources\\ProfileCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/ProfileCollection.php',
|
209 |
+
'Mollie\\Api\\Resources\\Refund' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Refund.php',
|
210 |
+
'Mollie\\Api\\Resources\\RefundCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/RefundCollection.php',
|
211 |
+
'Mollie\\Api\\Resources\\ResourceFactory' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/ResourceFactory.php',
|
212 |
+
'Mollie\\Api\\Resources\\Settlement' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Settlement.php',
|
213 |
+
'Mollie\\Api\\Resources\\SettlementCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/SettlementCollection.php',
|
214 |
+
'Mollie\\Api\\Resources\\Shipment' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Shipment.php',
|
215 |
+
'Mollie\\Api\\Resources\\ShipmentCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/ShipmentCollection.php',
|
216 |
+
'Mollie\\Api\\Resources\\Subscription' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/Subscription.php',
|
217 |
+
'Mollie\\Api\\Resources\\SubscriptionCollection' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Resources/SubscriptionCollection.php',
|
218 |
+
'Mollie\\Api\\Types\\InvoiceStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/InvoiceStatus.php',
|
219 |
+
'Mollie\\Api\\Types\\MandateMethod' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/MandateMethod.php',
|
220 |
+
'Mollie\\Api\\Types\\MandateStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/MandateStatus.php',
|
221 |
+
'Mollie\\Api\\Types\\OnboardingStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/OnboardingStatus.php',
|
222 |
+
'Mollie\\Api\\Types\\OrderLineStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/OrderLineStatus.php',
|
223 |
+
'Mollie\\Api\\Types\\OrderLineType' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/OrderLineType.php',
|
224 |
+
'Mollie\\Api\\Types\\OrderStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/OrderStatus.php',
|
225 |
+
'Mollie\\Api\\Types\\PaymentMethod' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/PaymentMethod.php',
|
226 |
+
'Mollie\\Api\\Types\\PaymentStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/PaymentStatus.php',
|
227 |
+
'Mollie\\Api\\Types\\ProfileStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/ProfileStatus.php',
|
228 |
+
'Mollie\\Api\\Types\\RefundStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/RefundStatus.php',
|
229 |
+
'Mollie\\Api\\Types\\SequenceType' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/SequenceType.php',
|
230 |
+
'Mollie\\Api\\Types\\SettlementStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/SettlementStatus.php',
|
231 |
+
'Mollie\\Api\\Types\\SubscriptionStatus' => __DIR__ . '/..' . '/mollie/mollie-api-php/src/Types/SubscriptionStatus.php',
|
232 |
+
'Mollie_WC_Components_Styles' => __DIR__ . '/../..' . '/src/Mollie/WC/Components/Styles.php',
|
233 |
+
'Mollie_WC_Components_StylesPropertiesDictionary' => __DIR__ . '/../..' . '/src/Mollie/WC/Components/StylesPropertiesDictionary.php',
|
234 |
+
'Mollie_WC_Exception' => __DIR__ . '/../..' . '/src/Mollie/WC/Exception.php',
|
235 |
+
'Mollie_WC_Exception_CouldNotConnectToMollie' => __DIR__ . '/../..' . '/src/Mollie/WC/Exception/CouldNotConnectToMollie.php',
|
236 |
+
'Mollie_WC_Exception_IncompatiblePlatform' => __DIR__ . '/../..' . '/src/Mollie/WC/Exception/IncompatiblePlatform.php',
|
237 |
+
'Mollie_WC_Exception_InvalidApiKey' => __DIR__ . '/../..' . '/src/Mollie/WC/Exception/InvalidApiKey.php',
|
238 |
+
'Mollie_WC_Gateway_Abstract' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Abstract.php',
|
239 |
+
'Mollie_WC_Gateway_AbstractSepaRecurring' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/AbstractSepaRecurring.php',
|
240 |
+
'Mollie_WC_Gateway_AbstractSubscription' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/AbstractSubscription.php',
|
241 |
+
'Mollie_WC_Gateway_Applepay' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Applepay.php',
|
242 |
+
'Mollie_WC_Gateway_Bancontact' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Bancontact.php',
|
243 |
+
'Mollie_WC_Gateway_BankTransfer' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/BankTransfer.php',
|
244 |
+
'Mollie_WC_Gateway_Belfius' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Belfius.php',
|
245 |
+
'Mollie_WC_Gateway_Creditcard' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Creditcard.php',
|
246 |
+
'Mollie_WC_Gateway_DirectDebit' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/DirectDebit.php',
|
247 |
+
'Mollie_WC_Gateway_EPS' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/EPS.php',
|
248 |
+
'Mollie_WC_Gateway_Giftcard' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Giftcard.php',
|
249 |
+
'Mollie_WC_Gateway_Giropay' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Giropay.php',
|
250 |
+
'Mollie_WC_Gateway_Ideal' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Ideal.php',
|
251 |
+
'Mollie_WC_Gateway_IngHomePay' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/IngHomePay.php',
|
252 |
+
'Mollie_WC_Gateway_Kbc' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Kbc.php',
|
253 |
+
'Mollie_WC_Gateway_KlarnaPayLater' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/KlarnaPayLater.php',
|
254 |
+
'Mollie_WC_Gateway_KlarnaSliceIt' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/KlarnaSliceIt.php',
|
255 |
+
'Mollie_WC_Gateway_MisterCash' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/MisterCash.php',
|
256 |
+
'Mollie_WC_Gateway_MyBank' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/MyBank.php',
|
257 |
+
'Mollie_WC_Gateway_PayPal' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/PayPal.php',
|
258 |
+
'Mollie_WC_Gateway_Paysafecard' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Paysafecard.php',
|
259 |
+
'Mollie_WC_Gateway_Przelewy24' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Przelewy24.php',
|
260 |
+
'Mollie_WC_Gateway_Sofort' => __DIR__ . '/../..' . '/src/Mollie/WC/Gateway/Sofort.php',
|
261 |
+
'Mollie_WC_Helper_Api' => __DIR__ . '/../..' . '/src/Mollie/WC/Helper/Api.php',
|
262 |
+
'Mollie_WC_Helper_Data' => __DIR__ . '/../..' . '/src/Mollie/WC/Helper/Data.php',
|
263 |
+
'Mollie_WC_Helper_OrderLines' => __DIR__ . '/../..' . '/src/Mollie/WC/Helper/OrderLines.php',
|
264 |
+
'Mollie_WC_Helper_PaymentFactory' => __DIR__ . '/../..' . '/src/Mollie/WC/Helper/PaymentFactory.php',
|
265 |
+
'Mollie_WC_Helper_Settings' => __DIR__ . '/../..' . '/src/Mollie/WC/Helper/Settings.php',
|
266 |
+
'Mollie_WC_Helper_Status' => __DIR__ . '/../..' . '/src/Mollie/WC/Helper/Status.php',
|
267 |
+
'Mollie_WC_OrderLineStatus' => __DIR__ . '/../..' . '/src/Mollie/WC/OrderLineStatus.php',
|
268 |
+
'Mollie_WC_Payment_Object' => __DIR__ . '/../..' . '/src/Mollie/WC/Payment/Object.php',
|
269 |
+
'Mollie_WC_Payment_Order' => __DIR__ . '/../..' . '/src/Mollie/WC/Payment/Order.php',
|
270 |
+
'Mollie_WC_Payment_OrderItemsRefunder' => __DIR__ . '/../..' . '/src/Mollie/WC/Payment/OrderItemsRefunder.php',
|
271 |
+
'Mollie_WC_Payment_PartialRefundException' => __DIR__ . '/../..' . '/src/Mollie/WC/Payment/PartialRefundException.php',
|
272 |
+
'Mollie_WC_Payment_Payment' => __DIR__ . '/../..' . '/src/Mollie/WC/Payment/Payment.php',
|
273 |
+
'Mollie_WC_Payment_RefundLineItemsBuilder' => __DIR__ . '/../..' . '/src/Mollie/WC/Payment/RefundLineItemsBuilder.php',
|
274 |
+
'Mollie_WC_Plugin' => __DIR__ . '/../..' . '/src/Mollie/WC/Plugin.php',
|
275 |
+
'Mollie_WC_Settings_Components' => __DIR__ . '/../..' . '/src/Mollie/WC/Settings/Components.php',
|
276 |
+
'Mollie_WC_Settings_Page_Components' => __DIR__ . '/../..' . '/src/Mollie/WC/Settings/Page/Components.php',
|
277 |
+
'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php',
|
278 |
+
'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php',
|
279 |
+
'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php',
|
280 |
+
'Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php',
|
281 |
+
'Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php',
|
282 |
+
'Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php',
|
283 |
+
'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php',
|
284 |
+
);
|
285 |
+
|
286 |
+
public static function getInitializer(ClassLoader $loader)
|
287 |
+
{
|
288 |
+
return \Closure::bind(function () use ($loader) {
|
289 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$prefixLengthsPsr4;
|
290 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$prefixDirsPsr4;
|
291 |
+
$loader->prefixesPsr0 = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$prefixesPsr0;
|
292 |
+
$loader->classMap = ComposerStaticInit3ea1880a2740a3571db7cff67650474a::$classMap;
|
293 |
+
|
294 |
+
}, null, ClassLoader::class);
|
295 |
+
}
|
296 |
+
}
|
{includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/LICENSE
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/README.md
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/res/cacert.pem
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/composer/ca-bundle/src/CaBundle.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/composer/installed.json
RENAMED
@@ -1,17 +1,17 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "composer/ca-bundle",
|
4 |
-
"version": "
|
5 |
-
"version_normalized": "
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/composer/ca-bundle.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
@@ -22,16 +22,16 @@
|
|
22 |
"require-dev": {
|
23 |
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
|
24 |
"psr/log": "^1.0",
|
25 |
-
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
26 |
},
|
27 |
-
"time": "2019-
|
28 |
"type": "library",
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
31 |
"dev-master": "1.x-dev"
|
32 |
}
|
33 |
},
|
34 |
-
"installation-source": "
|
35 |
"autoload": {
|
36 |
"psr-4": {
|
37 |
"Composer\\CaBundle\\": "src"
|
@@ -59,17 +59,17 @@
|
|
59 |
},
|
60 |
{
|
61 |
"name": "guzzlehttp/guzzle",
|
62 |
-
"version": "
|
63 |
-
"version_normalized": "
|
64 |
"source": {
|
65 |
"type": "git",
|
66 |
"url": "https://github.com/guzzle/guzzle.git",
|
67 |
-
"reference": "
|
68 |
},
|
69 |
"dist": {
|
70 |
"type": "zip",
|
71 |
-
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/
|
72 |
-
"reference": "
|
73 |
"shasum": ""
|
74 |
},
|
75 |
"require": {
|
@@ -86,14 +86,14 @@
|
|
86 |
"suggest": {
|
87 |
"psr/log": "Required for using the Log middleware"
|
88 |
},
|
89 |
-
"time": "2019-10-
|
90 |
"type": "library",
|
91 |
"extra": {
|
92 |
"branch-alias": {
|
93 |
-
"dev-master": "6.
|
94 |
}
|
95 |
},
|
96 |
-
"installation-source": "
|
97 |
"autoload": {
|
98 |
"psr-4": {
|
99 |
"GuzzleHttp\\": "src/"
|
@@ -127,33 +127,33 @@
|
|
127 |
},
|
128 |
{
|
129 |
"name": "guzzlehttp/promises",
|
130 |
-
"version": "
|
131 |
-
"version_normalized": "
|
132 |
"source": {
|
133 |
"type": "git",
|
134 |
"url": "https://github.com/guzzle/promises.git",
|
135 |
-
"reference": "
|
136 |
},
|
137 |
"dist": {
|
138 |
"type": "zip",
|
139 |
-
"url": "https://api.github.com/repos/guzzle/promises/zipball/
|
140 |
-
"reference": "
|
141 |
"shasum": ""
|
142 |
},
|
143 |
"require": {
|
144 |
-
"php": ">=5.
|
145 |
},
|
146 |
"require-dev": {
|
147 |
-
"phpunit/phpunit": "^
|
148 |
},
|
149 |
-
"time": "
|
150 |
"type": "library",
|
151 |
"extra": {
|
152 |
"branch-alias": {
|
153 |
"dev-master": "1.4-dev"
|
154 |
}
|
155 |
},
|
156 |
-
"installation-source": "
|
157 |
"autoload": {
|
158 |
"psr-4": {
|
159 |
"GuzzleHttp\\Promise\\": "src/"
|
@@ -180,17 +180,17 @@
|
|
180 |
},
|
181 |
{
|
182 |
"name": "guzzlehttp/psr7",
|
183 |
-
"version": "1.
|
184 |
-
"version_normalized": "1.
|
185 |
"source": {
|
186 |
"type": "git",
|
187 |
"url": "https://github.com/guzzle/psr7.git",
|
188 |
-
"reference": "
|
189 |
},
|
190 |
"dist": {
|
191 |
"type": "zip",
|
192 |
-
"url": "https://api.github.com/repos/guzzle/psr7/zipball/
|
193 |
-
"reference": "
|
194 |
"shasum": ""
|
195 |
},
|
196 |
"require": {
|
@@ -208,14 +208,14 @@
|
|
208 |
"suggest": {
|
209 |
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
210 |
},
|
211 |
-
"time": "2019-
|
212 |
"type": "library",
|
213 |
"extra": {
|
214 |
"branch-alias": {
|
215 |
"dev-master": "1.6-dev"
|
216 |
}
|
217 |
},
|
218 |
-
"installation-source": "
|
219 |
"autoload": {
|
220 |
"psr-4": {
|
221 |
"GuzzleHttp\\Psr7\\": "src/"
|
@@ -251,32 +251,120 @@
|
|
251 |
"url"
|
252 |
]
|
253 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
{
|
255 |
"name": "psr/http-message",
|
256 |
-
"version": "
|
257 |
-
"version_normalized": "
|
258 |
"source": {
|
259 |
"type": "git",
|
260 |
"url": "https://github.com/php-fig/http-message.git",
|
261 |
-
"reference": "
|
262 |
},
|
263 |
"dist": {
|
264 |
"type": "zip",
|
265 |
-
"url": "https://api.github.com/repos/php-fig/http-message/zipball/
|
266 |
-
"reference": "
|
267 |
"shasum": ""
|
268 |
},
|
269 |
"require": {
|
270 |
"php": ">=5.3.0"
|
271 |
},
|
272 |
-
"time": "
|
273 |
"type": "library",
|
274 |
"extra": {
|
275 |
"branch-alias": {
|
276 |
"dev-master": "1.0.x-dev"
|
277 |
}
|
278 |
},
|
279 |
-
"installation-source": "
|
280 |
"autoload": {
|
281 |
"psr-4": {
|
282 |
"Psr\\Http\\Message\\": "src/"
|
1 |
[
|
2 |
{
|
3 |
"name": "composer/ca-bundle",
|
4 |
+
"version": "dev-master",
|
5 |
+
"version_normalized": "9999999-dev",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/composer/ca-bundle.git",
|
9 |
+
"reference": "2655f9fa49d8996622b9d7371481648467573ac0"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/2655f9fa49d8996622b9d7371481648467573ac0",
|
14 |
+
"reference": "2655f9fa49d8996622b9d7371481648467573ac0",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
22 |
"require-dev": {
|
23 |
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
|
24 |
"psr/log": "^1.0",
|
25 |
+
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
|
26 |
},
|
27 |
+
"time": "2019-11-01T11:58:05+00:00",
|
28 |
"type": "library",
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
31 |
"dev-master": "1.x-dev"
|
32 |
}
|
33 |
},
|
34 |
+
"installation-source": "source",
|
35 |
"autoload": {
|
36 |
"psr-4": {
|
37 |
"Composer\\CaBundle\\": "src"
|
59 |
},
|
60 |
{
|
61 |
"name": "guzzlehttp/guzzle",
|
62 |
+
"version": "dev-master",
|
63 |
+
"version_normalized": "9999999-dev",
|
64 |
"source": {
|
65 |
"type": "git",
|
66 |
"url": "https://github.com/guzzle/guzzle.git",
|
67 |
+
"reference": "df36d8dae3979cf927d5bbbed6f0427f39aadfec"
|
68 |
},
|
69 |
"dist": {
|
70 |
"type": "zip",
|
71 |
+
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/df36d8dae3979cf927d5bbbed6f0427f39aadfec",
|
72 |
+
"reference": "df36d8dae3979cf927d5bbbed6f0427f39aadfec",
|
73 |
"shasum": ""
|
74 |
},
|
75 |
"require": {
|
86 |
"suggest": {
|
87 |
"psr/log": "Required for using the Log middleware"
|
88 |
},
|
89 |
+
"time": "2019-10-30T11:22:04+00:00",
|
90 |
"type": "library",
|
91 |
"extra": {
|
92 |
"branch-alias": {
|
93 |
+
"dev-master": "6.5-dev"
|
94 |
}
|
95 |
},
|
96 |
+
"installation-source": "source",
|
97 |
"autoload": {
|
98 |
"psr-4": {
|
99 |
"GuzzleHttp\\": "src/"
|
127 |
},
|
128 |
{
|
129 |
"name": "guzzlehttp/promises",
|
130 |
+
"version": "dev-master",
|
131 |
+
"version_normalized": "9999999-dev",
|
132 |
"source": {
|
133 |
"type": "git",
|
134 |
"url": "https://github.com/guzzle/promises.git",
|
135 |
+
"reference": "17d36ed176c998839582c739ce0753381598edf0"
|
136 |
},
|
137 |
"dist": {
|
138 |
"type": "zip",
|
139 |
+
"url": "https://api.github.com/repos/guzzle/promises/zipball/17d36ed176c998839582c739ce0753381598edf0",
|
140 |
+
"reference": "17d36ed176c998839582c739ce0753381598edf0",
|
141 |
"shasum": ""
|
142 |
},
|
143 |
"require": {
|
144 |
+
"php": ">=5.6"
|
145 |
},
|
146 |
"require-dev": {
|
147 |
+
"phpunit/phpunit": "^5.7.27 || ^7.5"
|
148 |
},
|
149 |
+
"time": "2019-07-02T14:54:06+00:00",
|
150 |
"type": "library",
|
151 |
"extra": {
|
152 |
"branch-alias": {
|
153 |
"dev-master": "1.4-dev"
|
154 |
}
|
155 |
},
|
156 |
+
"installation-source": "source",
|
157 |
"autoload": {
|
158 |
"psr-4": {
|
159 |
"GuzzleHttp\\Promise\\": "src/"
|
180 |
},
|
181 |
{
|
182 |
"name": "guzzlehttp/psr7",
|
183 |
+
"version": "1.x-dev",
|
184 |
+
"version_normalized": "1.9999999.9999999.9999999-dev",
|
185 |
"source": {
|
186 |
"type": "git",
|
187 |
"url": "https://github.com/guzzle/psr7.git",
|
188 |
+
"reference": "2595b33c1c924889b474d324f3d719fa40b6954e"
|
189 |
},
|
190 |
"dist": {
|
191 |
"type": "zip",
|
192 |
+
"url": "https://api.github.com/repos/guzzle/psr7/zipball/2595b33c1c924889b474d324f3d719fa40b6954e",
|
193 |
+
"reference": "2595b33c1c924889b474d324f3d719fa40b6954e",
|
194 |
"shasum": ""
|
195 |
},
|
196 |
"require": {
|
208 |
"suggest": {
|
209 |
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
210 |
},
|
211 |
+
"time": "2019-08-13T16:05:52+00:00",
|
212 |
"type": "library",
|
213 |
"extra": {
|
214 |
"branch-alias": {
|
215 |
"dev-master": "1.6-dev"
|
216 |
}
|
217 |
},
|
218 |
+
"installation-source": "source",
|
219 |
"autoload": {
|
220 |
"psr-4": {
|
221 |
"GuzzleHttp\\Psr7\\": "src/"
|
251 |
"url"
|
252 |
]
|
253 |
},
|
254 |
+
{
|
255 |
+
"name": "mollie/mollie-api-php",
|
256 |
+
"version": "v2.12.0",
|
257 |
+
"version_normalized": "2.12.0.0",
|
258 |
+
"source": {
|
259 |
+
"type": "git",
|
260 |
+
"url": "https://github.com/mollie/mollie-api-php.git",
|
261 |
+
"reference": "a8540896e069fca409cf18351b33ec10f58622c6"
|
262 |
+
},
|
263 |
+
"dist": {
|
264 |
+
"type": "zip",
|
265 |
+
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/a8540896e069fca409cf18351b33ec10f58622c6",
|
266 |
+
"reference": "a8540896e069fca409cf18351b33ec10f58622c6",
|
267 |
+
"shasum": ""
|
268 |
+
},
|
269 |
+
"require": {
|
270 |
+
"composer/ca-bundle": "^1.1",
|
271 |
+
"ext-curl": "*",
|
272 |
+
"ext-json": "*",
|
273 |
+
"ext-openssl": "*",
|
274 |
+
"guzzlehttp/guzzle": "^6.3",
|
275 |
+
"php": ">=5.6"
|
276 |
+
},
|
277 |
+
"require-dev": {
|
278 |
+
"eloquent/liberator": "^2.0",
|
279 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.1"
|
280 |
+
},
|
281 |
+
"suggest": {
|
282 |
+
"mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://docs.mollie.com/ for more information."
|
283 |
+
},
|
284 |
+
"time": "2019-09-26T12:36:04+00:00",
|
285 |
+
"type": "library",
|
286 |
+
"installation-source": "dist",
|
287 |
+
"autoload": {
|
288 |
+
"psr-4": {
|
289 |
+
"Mollie\\Api\\": "src/"
|
290 |
+
}
|
291 |
+
},
|
292 |
+
"notification-url": "https://packagist.org/downloads/",
|
293 |
+
"license": [
|
294 |
+
"BSD-2-Clause"
|
295 |
+
],
|
296 |
+
"authors": [
|
297 |
+
{
|
298 |
+
"name": "Mollie B.V.",
|
299 |
+
"email": "info@mollie.com"
|
300 |
+
}
|
301 |
+
],
|
302 |
+
"description": "Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.",
|
303 |
+
"homepage": "https://www.mollie.com/en/developers",
|
304 |
+
"keywords": [
|
305 |
+
"Apple Pay",
|
306 |
+
"CBC",
|
307 |
+
"Przelewy24",
|
308 |
+
"api",
|
309 |
+
"bancontact",
|
310 |
+
"banktransfer",
|
311 |
+
"belfius",
|
312 |
+
"belfius direct net",
|
313 |
+
"charges",
|
314 |
+
"creditcard",
|
315 |
+
"direct debit",
|
316 |
+
"fashioncheque",
|
317 |
+
"gateway",
|
318 |
+
"gift cards",
|
319 |
+
"ideal",
|
320 |
+
"inghomepay",
|
321 |
+
"intersolve",
|
322 |
+
"kbc",
|
323 |
+
"klarna",
|
324 |
+
"mistercash",
|
325 |
+
"mollie",
|
326 |
+
"paylater",
|
327 |
+
"payment",
|
328 |
+
"payments",
|
329 |
+
"paypal",
|
330 |
+
"paysafecard",
|
331 |
+
"podiumcadeaukaart",
|
332 |
+
"recurring",
|
333 |
+
"refunds",
|
334 |
+
"sepa",
|
335 |
+
"service",
|
336 |
+
"sliceit",
|
337 |
+
"sofort",
|
338 |
+
"sofortbanking",
|
339 |
+
"subscriptions"
|
340 |
+
]
|
341 |
+
},
|
342 |
{
|
343 |
"name": "psr/http-message",
|
344 |
+
"version": "dev-master",
|
345 |
+
"version_normalized": "9999999-dev",
|
346 |
"source": {
|
347 |
"type": "git",
|
348 |
"url": "https://github.com/php-fig/http-message.git",
|
349 |
+
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4"
|
350 |
},
|
351 |
"dist": {
|
352 |
"type": "zip",
|
353 |
+
"url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
|
354 |
+
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
|
355 |
"shasum": ""
|
356 |
},
|
357 |
"require": {
|
358 |
"php": ">=5.3.0"
|
359 |
},
|
360 |
+
"time": "2019-08-29T13:16:46+00:00",
|
361 |
"type": "library",
|
362 |
"extra": {
|
363 |
"branch-alias": {
|
364 |
"dev-master": "1.0.x-dev"
|
365 |
}
|
366 |
},
|
367 |
+
"installation-source": "source",
|
368 |
"autoload": {
|
369 |
"psr-4": {
|
370 |
"Psr\\Http\\Message\\": "src/"
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/CHANGELOG.md
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/LICENSE
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/README.md
RENAMED
@@ -78,7 +78,7 @@ composer update
|
|
78 |
|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
|
79 |
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
|
80 |
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
|
81 |
-
| 5.x |
|
82 |
| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
|
83 |
|
84 |
[guzzle-3-repo]: https://github.com/guzzle/guzzle3
|
78 |
|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
|
79 |
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
|
80 |
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
|
81 |
+
| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
|
82 |
| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
|
83 |
|
84 |
[guzzle-3-repo]: https://github.com/guzzle/guzzle3
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/UPGRADING.md
RENAMED
File without changes
|
vendor/guzzlehttp/guzzle/build/Burgomaster.php
ADDED
@@ -0,0 +1,385 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Packages the zip and phar file using a staging directory.
|
5 |
+
*
|
6 |
+
* @license MIT, Michael Dowling https://github.com/mtdowling
|
7 |
+
* @license https://github.com/mtdowling/Burgomaster/LICENSE
|
8 |
+
*/
|
9 |
+
class Burgomaster
|
10 |
+
{
|
11 |
+
/** @var string Base staging directory of the project */
|
12 |
+
public $stageDir;
|
13 |
+
|
14 |
+
/** @var string Root directory of the project */
|
15 |
+
public $projectRoot;
|
16 |
+
|
17 |
+
/** @var array stack of sections */
|
18 |
+
private $sections = array();
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param string $stageDir Staging base directory where your packaging
|
22 |
+
* takes place. This folder will be created for
|
23 |
+
* you if it does not exist. If it exists, it
|
24 |
+
* will be deleted and recreated to start fresh.
|
25 |
+
* @param string $projectRoot Root directory of the project.
|
26 |
+
*
|
27 |
+
* @throws \InvalidArgumentException
|
28 |
+
* @throws \RuntimeException
|
29 |
+
*/
|
30 |
+
public function __construct($stageDir, $projectRoot = null)
|
31 |
+
{
|
32 |
+
$this->startSection('setting_up');
|
33 |
+
$this->stageDir = $stageDir;
|
34 |
+
$this->projectRoot = $projectRoot;
|
35 |
+
|
36 |
+
if (!$this->stageDir || $this->stageDir == '/') {
|
37 |
+
throw new \InvalidArgumentException('Invalid base directory');
|
38 |
+
}
|
39 |
+
|
40 |
+
if (is_dir($this->stageDir)) {
|
41 |
+
$this->debug("Removing existing directory: $this->stageDir");
|
42 |
+
echo $this->exec("rm -rf $this->stageDir");
|
43 |
+
}
|
44 |
+
|
45 |
+
$this->debug("Creating staging directory: $this->stageDir");
|
46 |
+
|
47 |
+
if (!mkdir($this->stageDir, 0777, true)) {
|
48 |
+
throw new \RuntimeException("Could not create {$this->stageDir}");
|
49 |
+
}
|
50 |
+
|
51 |
+
$this->stageDir = realpath($this->stageDir);
|
52 |
+
$this->debug("Creating staging directory at: {$this->stageDir}");
|
53 |
+
|
54 |
+
if (!is_dir($this->projectRoot)) {
|
55 |
+
throw new \InvalidArgumentException(
|
56 |
+
"Project root not found: $this->projectRoot"
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
$this->endSection();
|
61 |
+
$this->startSection('staging');
|
62 |
+
|
63 |
+
chdir($this->projectRoot);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Cleanup if the last section was not already closed.
|
68 |
+
*/
|
69 |
+
public function __destruct()
|
70 |
+
{
|
71 |
+
if ($this->sections) {
|
72 |
+
$this->endSection();
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Call this method when starting a specific section of the packager.
|
78 |
+
*
|
79 |
+
* This makes the debug messages used in your script more meaningful and
|
80 |
+
* adds context when things go wrong. Be sure to call endSection() when
|
81 |
+
* you have finished a section of your packaging script.
|
82 |
+
*
|
83 |
+
* @param string $section Part of the packager that is running
|
84 |
+
*/
|
85 |
+
public function startSection($section)
|
86 |
+
{
|
87 |
+
$this->sections[] = $section;
|
88 |
+
$this->debug('Starting');
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Call this method when leaving the last pushed section of the packager.
|
93 |
+
*/
|
94 |
+
public function endSection()
|
95 |
+
{
|
96 |
+
if ($this->sections) {
|
97 |
+
$this->debug('Completed');
|
98 |
+
array_pop($this->sections);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Prints a debug message to STDERR bound to the current section.
|
104 |
+
*
|
105 |
+
* @param string $message Message to echo to STDERR
|
106 |
+
*/
|
107 |
+
public function debug($message)
|
108 |
+
{
|
109 |
+
$prefix = date('c') . ': ';
|
110 |
+
|
111 |
+
if ($this->sections) {
|
112 |
+
$prefix .= '[' . end($this->sections) . '] ';
|
113 |
+
}
|
114 |
+
|
115 |
+
fwrite(STDERR, $prefix . $message . "\n");
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Copies a file and creates the destination directory if needed.
|
120 |
+
*
|
121 |
+
* @param string $from File to copy
|
122 |
+
* @param string $to Destination to copy the file to, relative to the
|
123 |
+
* base staging directory.
|
124 |
+
* @throws \InvalidArgumentException if the file cannot be found
|
125 |
+
* @throws \RuntimeException if the directory cannot be created.
|
126 |
+
* @throws \RuntimeException if the file cannot be copied.
|
127 |
+
*/
|
128 |
+
public function deepCopy($from, $to)
|
129 |
+
{
|
130 |
+
if (!is_file($from)) {
|
131 |
+
throw new \InvalidArgumentException("File not found: {$from}");
|
132 |
+
}
|
133 |
+
|
134 |
+
$to = str_replace('//', '/', $this->stageDir . '/' . $to);
|
135 |
+
$dir = dirname($to);
|
136 |
+
|
137 |
+
if (!is_dir($dir)) {
|
138 |
+
if (!mkdir($dir, 0777, true)) {
|
139 |
+
throw new \RuntimeException("Unable to create directory: $dir");
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
if (!copy($from, $to)) {
|
144 |
+
throw new \RuntimeException("Unable to copy $from to $to");
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Recursively copy one folder to another.
|
150 |
+
*
|
151 |
+
* Any LICENSE file is automatically copied.
|
152 |
+
*
|
153 |
+
* @param string $sourceDir Source directory to copy from
|
154 |
+
* @param string $destDir Directory to copy the files to that is relative
|
155 |
+
* to the the stage base directory.
|
156 |
+
* @param array $extensions File extensions to copy from the $sourceDir.
|
157 |
+
* Defaults to "php" files only (e.g., ['php']).
|
158 |
+
* @throws \InvalidArgumentException if the source directory is invalid.
|
159 |
+
*/
|
160 |
+
public function recursiveCopy(
|
161 |
+
$sourceDir,
|
162 |
+
$destDir,
|
163 |
+
$extensions = array('php')
|
164 |
+
) {
|
165 |
+
if (!realpath($sourceDir)) {
|
166 |
+
throw new \InvalidArgumentException("$sourceDir not found");
|
167 |
+
}
|
168 |
+
|
169 |
+
if (!$extensions) {
|
170 |
+
throw new \InvalidArgumentException('$extensions is empty!');
|
171 |
+
}
|
172 |
+
|
173 |
+
$sourceDir = realpath($sourceDir);
|
174 |
+
$exts = array_fill_keys($extensions, true);
|
175 |
+
$iter = new \RecursiveDirectoryIterator($sourceDir);
|
176 |
+
$iter = new \RecursiveIteratorIterator($iter);
|
177 |
+
$total = 0;
|
178 |
+
|
179 |
+
$this->startSection('copy');
|
180 |
+
$this->debug("Starting to copy files from $sourceDir");
|
181 |
+
|
182 |
+
foreach ($iter as $file) {
|
183 |
+
if (isset($exts[$file->getExtension()])
|
184 |
+
|| $file->getBaseName() == 'LICENSE'
|
185 |
+
) {
|
186 |
+
// Remove the source directory from the destination path
|
187 |
+
$toPath = str_replace($sourceDir, '', (string) $file);
|
188 |
+
$toPath = $destDir . '/' . $toPath;
|
189 |
+
$toPath = str_replace('//', '/', $toPath);
|
190 |
+
$this->deepCopy((string) $file, $toPath);
|
191 |
+
$total++;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
$this->debug("Copied $total files from $sourceDir");
|
196 |
+
$this->endSection();
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Execute a command and throw an exception if the return code is not 0.
|
201 |
+
*
|
202 |
+
* @param string $command Command to execute
|
203 |
+
*
|
204 |
+
* @return string Returns the output of the command as a string
|
205 |
+
* @throws \RuntimeException on error.
|
206 |
+
*/
|
207 |
+
public function exec($command)
|
208 |
+
{
|
209 |
+
$this->debug("Executing: $command");
|
210 |
+
$output = $returnValue = null;
|
211 |
+
exec($command, $output, $returnValue);
|
212 |
+
|
213 |
+
if ($returnValue != 0) {
|
214 |
+
throw new \RuntimeException('Error executing command: '
|
215 |
+
. $command . ' : ' . implode("\n", $output));
|
216 |
+
}
|
217 |
+
|
218 |
+
return implode("\n", $output);
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Creates a class-map autoloader to the staging directory in a file
|
223 |
+
* named autoloader.php
|
224 |
+
*
|
225 |
+
* @param array $files Files to explicitly require in the autoloader. This
|
226 |
+
* is similar to Composer's "files" "autoload" section.
|
227 |
+
* @param string $filename Name of the autoloader file.
|
228 |
+
* @throws \RuntimeException if the file cannot be written
|
229 |
+
*/
|
230 |
+
public function createAutoloader($files = array(), $filename = 'autoloader.php')
|
231 |
+
{
|
232 |
+
$sourceDir = realpath($this->stageDir);
|
233 |
+
$iter = new \RecursiveDirectoryIterator($sourceDir);
|
234 |
+
$iter = new \RecursiveIteratorIterator($iter);
|
235 |
+
|
236 |
+
$this->startSection('autoloader');
|
237 |
+
$this->debug('Creating classmap autoloader');
|
238 |
+
$this->debug("Collecting valid PHP files from {$this->stageDir}");
|
239 |
+
|
240 |
+
$classMap = array();
|
241 |
+
foreach ($iter as $file) {
|
242 |
+
if ($file->getExtension() == 'php') {
|
243 |
+
$location = str_replace($this->stageDir . '/', '', (string) $file);
|
244 |
+
$className = str_replace('/', '\\', $location);
|
245 |
+
$className = substr($className, 0, -4);
|
246 |
+
|
247 |
+
// Remove "src\" or "lib\"
|
248 |
+
if (strpos($className, 'src\\') === 0
|
249 |
+
|| strpos($className, 'lib\\') === 0
|
250 |
+
) {
|
251 |
+
$className = substr($className, 4);
|
252 |
+
}
|
253 |
+
|
254 |
+
$classMap[$className] = "__DIR__ . '/$location'";
|
255 |
+
$this->debug("Found $className");
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
$destFile = $this->stageDir . '/' . $filename;
|
260 |
+
$this->debug("Writing autoloader to {$destFile}");
|
261 |
+
|
262 |
+
if (!($h = fopen($destFile, 'w'))) {
|
263 |
+
throw new \RuntimeException('Unable to open file for writing');
|
264 |
+
}
|
265 |
+
|
266 |
+
$this->debug('Writing classmap files');
|
267 |
+
fwrite($h, "<?php\n\n");
|
268 |
+
fwrite($h, "\$mapping = array(\n");
|
269 |
+
foreach ($classMap as $c => $f) {
|
270 |
+
fwrite($h, " '$c' => $f,\n");
|
271 |
+
}
|
272 |
+
fwrite($h, ");\n\n");
|
273 |
+
fwrite($h, <<<EOT
|
274 |
+
spl_autoload_register(function (\$class) use (\$mapping) {
|
275 |
+
if (isset(\$mapping[\$class])) {
|
276 |
+
require \$mapping[\$class];
|
277 |
+
}
|
278 |
+
}, true);
|
279 |
+
|
280 |
+
EOT
|
281 |
+
);
|
282 |
+
|
283 |
+
fwrite($h, "\n");
|
284 |
+
|
285 |
+
$this->debug('Writing automatically included files');
|
286 |
+
foreach ($files as $file) {
|
287 |
+
fwrite($h, "require __DIR__ . '/$file';\n");
|
288 |
+
}
|
289 |
+
|
290 |
+
fclose($h);
|
291 |
+
|
292 |
+
$this->endSection();
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Creates a default stub for the phar that includeds the generated
|
297 |
+
* autoloader.
|
298 |
+
*
|
299 |
+
* This phar also registers a constant that can be used to check if you
|
300 |
+
* are running the phar. The constant is the basename of the $dest variable
|
301 |
+
* without the extension, with "_PHAR" appended, then converted to all
|
302 |
+
* caps (e.g., "/foo/guzzle.phar" gets a contant defined as GUZZLE_PHAR.
|
303 |
+
*
|
304 |
+
* @param $dest
|
305 |
+
* @param string $autoloaderFilename Name of the autoloader file.
|
306 |
+
*
|
307 |
+
* @return string
|
308 |
+
*/
|
309 |
+
private function createStub($dest, $autoloaderFilename = 'autoloader.php')
|
310 |
+
{
|
311 |
+
$this->startSection('stub');
|
312 |
+
$this->debug("Creating phar stub at $dest");
|
313 |
+
|
314 |
+
$alias = basename($dest);
|
315 |
+
$constName = str_replace('.phar', '', strtoupper($alias)) . '_PHAR';
|
316 |
+
$stub = "<?php\n";
|
317 |
+
$stub .= "define('$constName', true);\n";
|
318 |
+
$stub .= "require 'phar://$alias/{$autoloaderFilename}';\n";
|
319 |
+
$stub .= "__HALT_COMPILER();\n";
|
320 |
+
$this->endSection();
|
321 |
+
|
322 |
+
return $stub;
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Creates a phar that automatically registers an autoloader.
|
327 |
+
*
|
328 |
+
* Call this only after your staging directory is built.
|
329 |
+
*
|
330 |
+
* @param string $dest Where to save the file. The basename of the file
|
331 |
+
* is also used as the alias name in the phar
|
332 |
+
* (e.g., /path/to/guzzle.phar => guzzle.phar).
|
333 |
+
* @param string|bool|null $stub The path to the phar stub file. Pass or
|
334 |
+
* leave null to automatically have one created for you. Pass false
|
335 |
+
* to no use a stub in the generated phar.
|
336 |
+
* @param string $autoloaderFilename Name of the autolaoder filename.
|
337 |
+
*/
|
338 |
+
public function createPhar(
|
339 |
+
$dest,
|
340 |
+
$stub = null,
|
341 |
+
$autoloaderFilename = 'autoloader.php'
|
342 |
+
) {
|
343 |
+
$this->startSection('phar');
|
344 |
+
$this->debug("Creating phar file at $dest");
|
345 |
+
$this->createDirIfNeeded(dirname($dest));
|
346 |
+
$phar = new \Phar($dest, 0, basename($dest));
|
347 |
+
$phar->buildFromDirectory($this->stageDir);
|
348 |
+
|
349 |
+
if ($stub !== false) {
|
350 |
+
if (!$stub) {
|
351 |
+
$stub = $this->createStub($dest, $autoloaderFilename);
|
352 |
+
}
|
353 |
+
$phar->setStub($stub);
|
354 |
+
}
|
355 |
+
|
356 |
+
$this->debug("Created phar at $dest");
|
357 |
+
$this->endSection();
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* Creates a zip file containing the staged files of your project.
|
362 |
+
*
|
363 |
+
* Call this only after your staging directory is built.
|
364 |
+
*
|
365 |
+
* @param string $dest Where to save the zip file
|
366 |
+
*/
|
367 |
+
public function createZip($dest)
|
368 |
+
{
|
369 |
+
$this->startSection('zip');
|
370 |
+
$this->debug("Creating a zip file at $dest");
|
371 |
+
$this->createDirIfNeeded(dirname($dest));
|
372 |
+
chdir($this->stageDir);
|
373 |
+
$this->exec("zip -r $dest ./");
|
374 |
+
$this->debug(" > Created at $dest");
|
375 |
+
chdir(__DIR__);
|
376 |
+
$this->endSection();
|
377 |
+
}
|
378 |
+
|
379 |
+
private function createDirIfNeeded($dir)
|
380 |
+
{
|
381 |
+
if (!is_dir($dir) && !mkdir($dir, 0755, true)) {
|
382 |
+
throw new \RuntimeException("Could not create dir: $dir");
|
383 |
+
}
|
384 |
+
}
|
385 |
+
}
|
vendor/guzzlehttp/guzzle/build/packager.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require __DIR__ . '/Burgomaster.php';
|
3 |
+
|
4 |
+
$stageDirectory = __DIR__ . '/artifacts/staging';
|
5 |
+
$projectRoot = __DIR__ . '/../';
|
6 |
+
$packager = new \Burgomaster($stageDirectory, $projectRoot);
|
7 |
+
|
8 |
+
// Copy basic files to the stage directory. Note that we have chdir'd onto
|
9 |
+
// the $projectRoot directory, so use relative paths.
|
10 |
+
foreach (['README.md', 'LICENSE'] as $file) {
|
11 |
+
$packager->deepCopy($file, $file);
|
12 |
+
}
|
13 |
+
|
14 |
+
// Copy each dependency to the staging directory. Copy *.php and *.pem files.
|
15 |
+
$packager->recursiveCopy('src', 'GuzzleHttp', ['php']);
|
16 |
+
$packager->recursiveCopy('vendor/guzzlehttp/promises/src', 'GuzzleHttp/Promise');
|
17 |
+
$packager->recursiveCopy('vendor/guzzlehttp/psr7/src', 'GuzzleHttp/Psr7');
|
18 |
+
$packager->recursiveCopy('vendor/psr/http-message/src', 'Psr/Http/Message');
|
19 |
+
|
20 |
+
$packager->createAutoloader([
|
21 |
+
'GuzzleHttp/functions_include.php',
|
22 |
+
'GuzzleHttp/Psr7/functions_include.php',
|
23 |
+
'GuzzleHttp/Promise/functions_include.php',
|
24 |
+
]);
|
25 |
+
|
26 |
+
$packager->createPhar(__DIR__ . '/artifacts/guzzle.phar');
|
27 |
+
$packager->createZip(__DIR__ . '/artifacts/guzzle.zip');
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Client.php
RENAMED
@@ -4,9 +4,9 @@ namespace GuzzleHttp;
|
|
4 |
use GuzzleHttp\Cookie\CookieJar;
|
5 |
use GuzzleHttp\Promise;
|
6 |
use GuzzleHttp\Psr7;
|
7 |
-
use Psr\Http\Message\UriInterface;
|
8 |
use Psr\Http\Message\RequestInterface;
|
9 |
use Psr\Http\Message\ResponseInterface;
|
|
|
10 |
|
11 |
/**
|
12 |
* @method ResponseInterface get(string|UriInterface $uri, array $options = [])
|
@@ -75,6 +75,12 @@ class Client implements ClientInterface
|
|
75 |
$this->configureDefaults($config);
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
public function __call($method, $args)
|
79 |
{
|
80 |
if (count($args) < 1) {
|
@@ -89,6 +95,14 @@ class Client implements ClientInterface
|
|
89 |
: $this->request($method, $uri, $opts);
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
public function sendAsync(RequestInterface $request, array $options = [])
|
93 |
{
|
94 |
// Merge the base URI into the request URI if needed.
|
@@ -100,12 +114,35 @@ class Client implements ClientInterface
|
|
100 |
);
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
public function send(RequestInterface $request, array $options = [])
|
104 |
{
|
105 |
$options[RequestOptions::SYNCHRONOUS] = true;
|
106 |
return $this->sendAsync($request, $options)->wait();
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
public function requestAsync($method, $uri = '', array $options = [])
|
110 |
{
|
111 |
$options = $this->prepareDefaults($options);
|
@@ -125,12 +162,37 @@ class Client implements ClientInterface
|
|
125 |
return $this->transfer($request, $options);
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
public function request($method, $uri = '', array $options = [])
|
129 |
{
|
130 |
$options[RequestOptions::SYNCHRONOUS] = true;
|
131 |
return $this->requestAsync($method, $uri, $options)->wait();
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
public function getConfig($option = null)
|
135 |
{
|
136 |
return $option === null
|
@@ -138,6 +200,11 @@ class Client implements ClientInterface
|
|
138 |
: (isset($this->config[$option]) ? $this->config[$option] : null);
|
139 |
}
|
140 |
|
|
|
|
|
|
|
|
|
|
|
141 |
private function buildUri($uri, array $config)
|
142 |
{
|
143 |
// for BC we accept null which would otherwise fail in uri_for
|
@@ -154,6 +221,7 @@ class Client implements ClientInterface
|
|
154 |
* Configures the default options for a client.
|
155 |
*
|
156 |
* @param array $config
|
|
|
157 |
*/
|
158 |
private function configureDefaults(array $config)
|
159 |
{
|
@@ -225,7 +293,7 @@ class Client implements ClientInterface
|
|
225 |
if (array_key_exists('headers', $options)) {
|
226 |
// Allows default headers to be unset.
|
227 |
if ($options['headers'] === null) {
|
228 |
-
$defaults['_conditional'] =
|
229 |
unset($options['headers']);
|
230 |
} elseif (!is_array($options['headers'])) {
|
231 |
throw new \InvalidArgumentException('headers must be an array');
|
@@ -251,8 +319,7 @@ class Client implements ClientInterface
|
|
251 |
* The URI of the request is not modified and the request options are used
|
252 |
* as-is without merging in default options.
|
253 |
*
|
254 |
-
* @param
|
255 |
-
* @param array $options
|
256 |
*
|
257 |
* @return Promise\PromiseInterface
|
258 |
*/
|
@@ -271,6 +338,7 @@ class Client implements ClientInterface
|
|
271 |
}
|
272 |
|
273 |
$request = $this->applyOptions($request, $options);
|
|
|
274 |
$handler = $options['handler'];
|
275 |
|
276 |
try {
|
@@ -411,6 +479,11 @@ class Client implements ClientInterface
|
|
411 |
return $request;
|
412 |
}
|
413 |
|
|
|
|
|
|
|
|
|
|
|
414 |
private function invalidBody()
|
415 |
{
|
416 |
throw new \InvalidArgumentException('Passing in the "body" request '
|
4 |
use GuzzleHttp\Cookie\CookieJar;
|
5 |
use GuzzleHttp\Promise;
|
6 |
use GuzzleHttp\Psr7;
|
|
|
7 |
use Psr\Http\Message\RequestInterface;
|
8 |
use Psr\Http\Message\ResponseInterface;
|
9 |
+
use Psr\Http\Message\UriInterface;
|
10 |
|
11 |
/**
|
12 |
* @method ResponseInterface get(string|UriInterface $uri, array $options = [])
|
75 |
$this->configureDefaults($config);
|
76 |
}
|
77 |
|
78 |
+
/**
|
79 |
+
* @param string $method
|
80 |
+
* @param array $args
|
81 |
+
*
|
82 |
+
* @return Promise\PromiseInterface
|
83 |
+
*/
|
84 |
public function __call($method, $args)
|
85 |
{
|
86 |
if (count($args) < 1) {
|
95 |
: $this->request($method, $uri, $opts);
|
96 |
}
|
97 |
|
98 |
+
/**
|
99 |
+
* Asynchronously send an HTTP request.
|
100 |
+
*
|
101 |
+
* @param array $options Request options to apply to the given
|
102 |
+
* request and to the transfer. See \GuzzleHttp\RequestOptions.
|
103 |
+
*
|
104 |
+
* @return PromiseInterface
|
105 |
+
*/
|
106 |
public function sendAsync(RequestInterface $request, array $options = [])
|
107 |
{
|
108 |
// Merge the base URI into the request URI if needed.
|
114 |
);
|
115 |
}
|
116 |
|
117 |
+
/**
|
118 |
+
* Send an HTTP request.
|
119 |
+
*
|
120 |
+
* @param array $options Request options to apply to the given
|
121 |
+
* request and to the transfer. See \GuzzleHttp\RequestOptions.
|
122 |
+
*
|
123 |
+
* @return ResponseInterface
|
124 |
+
* @throws GuzzleException
|
125 |
+
*/
|
126 |
public function send(RequestInterface $request, array $options = [])
|
127 |
{
|
128 |
$options[RequestOptions::SYNCHRONOUS] = true;
|
129 |
return $this->sendAsync($request, $options)->wait();
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* Create and send an asynchronous HTTP request.
|
134 |
+
*
|
135 |
+
* Use an absolute path to override the base path of the client, or a
|
136 |
+
* relative path to append to the base path of the client. The URL can
|
137 |
+
* contain the query string as well. Use an array to provide a URL
|
138 |
+
* template and additional variables to use in the URL template expansion.
|
139 |
+
*
|
140 |
+
* @param string $method HTTP method
|
141 |
+
* @param string|UriInterface $uri URI object or string.
|
142 |
+
* @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
|
143 |
+
*
|
144 |
+
* @return PromiseInterface
|
145 |
+
*/
|
146 |
public function requestAsync($method, $uri = '', array $options = [])
|
147 |
{
|
148 |
$options = $this->prepareDefaults($options);
|
162 |
return $this->transfer($request, $options);
|
163 |
}
|
164 |
|
165 |
+
/**
|
166 |
+
* Create and send an HTTP request.
|
167 |
+
*
|
168 |
+
* Use an absolute path to override the base path of the client, or a
|
169 |
+
* relative path to append to the base path of the client. The URL can
|
170 |
+
* contain the query string as well.
|
171 |
+
*
|
172 |
+
* @param string $method HTTP method.
|
173 |
+
* @param string|UriInterface $uri URI object or string.
|
174 |
+
* @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
|
175 |
+
*
|
176 |
+
* @return ResponseInterface
|
177 |
+
* @throws GuzzleException
|
178 |
+
*/
|
179 |
public function request($method, $uri = '', array $options = [])
|
180 |
{
|
181 |
$options[RequestOptions::SYNCHRONOUS] = true;
|
182 |
return $this->requestAsync($method, $uri, $options)->wait();
|
183 |
}
|
184 |
|
185 |
+
/**
|
186 |
+
* Get a client configuration option.
|
187 |
+
*
|
188 |
+
* These options include default request options of the client, a "handler"
|
189 |
+
* (if utilized by the concrete client), and a "base_uri" if utilized by
|
190 |
+
* the concrete client.
|
191 |
+
*
|
192 |
+
* @param string|null $option The config option to retrieve.
|
193 |
+
*
|
194 |
+
* @return mixed
|
195 |
+
*/
|
196 |
public function getConfig($option = null)
|
197 |
{
|
198 |
return $option === null
|
200 |
: (isset($this->config[$option]) ? $this->config[$option] : null);
|
201 |
}
|
202 |
|
203 |
+
/**
|
204 |
+
* @param string|null $uri
|
205 |
+
*
|
206 |
+
* @return UriInterface
|
207 |
+
*/
|
208 |
private function buildUri($uri, array $config)
|
209 |
{
|
210 |
// for BC we accept null which would otherwise fail in uri_for
|
221 |
* Configures the default options for a client.
|
222 |
*
|
223 |
* @param array $config
|
224 |
+
* @return void
|
225 |
*/
|
226 |
private function configureDefaults(array $config)
|
227 |
{
|
293 |
if (array_key_exists('headers', $options)) {
|
294 |
// Allows default headers to be unset.
|
295 |
if ($options['headers'] === null) {
|
296 |
+
$defaults['_conditional'] = [];
|
297 |
unset($options['headers']);
|
298 |
} elseif (!is_array($options['headers'])) {
|
299 |
throw new \InvalidArgumentException('headers must be an array');
|
319 |
* The URI of the request is not modified and the request options are used
|
320 |
* as-is without merging in default options.
|
321 |
*
|
322 |
+
* @param array $options See \GuzzleHttp\RequestOptions.
|
|
|
323 |
*
|
324 |
* @return Promise\PromiseInterface
|
325 |
*/
|
338 |
}
|
339 |
|
340 |
$request = $this->applyOptions($request, $options);
|
341 |
+
/** @var HandlerStack $handler */
|
342 |
$handler = $options['handler'];
|
343 |
|
344 |
try {
|
479 |
return $request;
|
480 |
}
|
481 |
|
482 |
+
/**
|
483 |
+
* Throw Exception with pre-set message.
|
484 |
+
* @return void
|
485 |
+
* @throws InvalidArgumentException Invalid body.
|
486 |
+
*/
|
487 |
private function invalidBody()
|
488 |
{
|
489 |
throw new \InvalidArgumentException('Passing in the "body" request '
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/ClientInterface.php
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
4 |
-
use GuzzleHttp\Promise\PromiseInterface;
|
5 |
use GuzzleHttp\Exception\GuzzleException;
|
|
|
6 |
use Psr\Http\Message\RequestInterface;
|
7 |
use Psr\Http\Message\ResponseInterface;
|
8 |
use Psr\Http\Message\UriInterface;
|
@@ -12,6 +12,9 @@ use Psr\Http\Message\UriInterface;
|
|
12 |
*/
|
13 |
interface ClientInterface
|
14 |
{
|
|
|
|
|
|
|
15 |
const VERSION = '6.4.1';
|
16 |
|
17 |
/**
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
|
|
4 |
use GuzzleHttp\Exception\GuzzleException;
|
5 |
+
use GuzzleHttp\Promise\PromiseInterface;
|
6 |
use Psr\Http\Message\RequestInterface;
|
7 |
use Psr\Http\Message\ResponseInterface;
|
8 |
use Psr\Http\Message\UriInterface;
|
12 |
*/
|
13 |
interface ClientInterface
|
14 |
{
|
15 |
+
/**
|
16 |
+
* @deprecated Will be removed in Guzzle 7.0.0
|
17 |
+
*/
|
18 |
const VERSION = '6.4.1';
|
19 |
|
20 |
/**
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/CookieJar.php
RENAMED
@@ -94,8 +94,8 @@ class CookieJar implements CookieJarInterface
|
|
94 |
*/
|
95 |
public function getCookieByName($name)
|
96 |
{
|
97 |
-
// don't allow a
|
98 |
-
if ($name === null) {
|
99 |
return null;
|
100 |
}
|
101 |
foreach ($this->cookies as $cookie) {
|
@@ -103,6 +103,8 @@ class CookieJar implements CookieJarInterface
|
|
103 |
return $cookie;
|
104 |
}
|
105 |
}
|
|
|
|
|
106 |
}
|
107 |
|
108 |
public function toArray()
|
94 |
*/
|
95 |
public function getCookieByName($name)
|
96 |
{
|
97 |
+
// don't allow a non string name
|
98 |
+
if ($name === null || !is_scalar($name)) {
|
99 |
return null;
|
100 |
}
|
101 |
foreach ($this->cookies as $cookie) {
|
103 |
return $cookie;
|
104 |
}
|
105 |
}
|
106 |
+
|
107 |
+
return null;
|
108 |
}
|
109 |
|
110 |
public function toArray()
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
RENAMED
@@ -58,9 +58,9 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
|
|
58 |
* arguments, then the cookie with the specified name, path and domain is
|
59 |
* removed.
|
60 |
*
|
61 |
-
* @param string $domain Clears cookies matching a domain
|
62 |
-
* @param string $path Clears cookies matching a domain and path
|
63 |
-
* @param string $name Clears cookies matching a domain, path, and name
|
64 |
*
|
65 |
* @return CookieJarInterface
|
66 |
*/
|
58 |
* arguments, then the cookie with the specified name, path and domain is
|
59 |
* removed.
|
60 |
*
|
61 |
+
* @param string|null $domain Clears cookies matching a domain
|
62 |
+
* @param string|null $path Clears cookies matching a domain and path
|
63 |
+
* @param string|null $name Clears cookies matching a domain, path, and name
|
64 |
*
|
65 |
* @return CookieJarInterface
|
66 |
*/
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Cookie/SetCookie.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/BadResponseException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/ClientException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/ConnectException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/GuzzleException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/RequestException.php
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Exception;
|
3 |
|
|
|
4 |
use Psr\Http\Message\RequestInterface;
|
5 |
use Psr\Http\Message\ResponseInterface;
|
6 |
-
use GuzzleHttp\Promise\PromiseInterface;
|
7 |
use Psr\Http\Message\UriInterface;
|
8 |
|
9 |
/**
|
@@ -14,7 +14,7 @@ class RequestException extends TransferException
|
|
14 |
/** @var RequestInterface */
|
15 |
private $request;
|
16 |
|
17 |
-
/** @var ResponseInterface */
|
18 |
private $response;
|
19 |
|
20 |
/** @var array */
|
@@ -124,32 +124,7 @@ class RequestException extends TransferException
|
|
124 |
*/
|
125 |
public static function getResponseBodySummary(ResponseInterface $response)
|
126 |
{
|
127 |
-
|
128 |
-
|
129 |
-
if (!$body->isSeekable() || !$body->isReadable()) {
|
130 |
-
return null;
|
131 |
-
}
|
132 |
-
|
133 |
-
$size = $body->getSize();
|
134 |
-
|
135 |
-
if ($size === 0) {
|
136 |
-
return null;
|
137 |
-
}
|
138 |
-
|
139 |
-
$summary = $body->read(120);
|
140 |
-
$body->rewind();
|
141 |
-
|
142 |
-
if ($size > 120) {
|
143 |
-
$summary .= ' (truncated...)';
|
144 |
-
}
|
145 |
-
|
146 |
-
// Matches any printable character, including unicode characters:
|
147 |
-
// letters, marks, numbers, punctuation, spacing, and separators.
|
148 |
-
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
|
149 |
-
return null;
|
150 |
-
}
|
151 |
-
|
152 |
-
return $summary;
|
153 |
}
|
154 |
|
155 |
/**
|
@@ -159,7 +134,7 @@ class RequestException extends TransferException
|
|
159 |
*
|
160 |
* @return UriInterface
|
161 |
*/
|
162 |
-
private static function obfuscateUri($uri)
|
163 |
{
|
164 |
$userInfo = $uri->getUserInfo();
|
165 |
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Exception;
|
3 |
|
4 |
+
use GuzzleHttp\Promise\PromiseInterface;
|
5 |
use Psr\Http\Message\RequestInterface;
|
6 |
use Psr\Http\Message\ResponseInterface;
|
|
|
7 |
use Psr\Http\Message\UriInterface;
|
8 |
|
9 |
/**
|
14 |
/** @var RequestInterface */
|
15 |
private $request;
|
16 |
|
17 |
+
/** @var ResponseInterface|null */
|
18 |
private $response;
|
19 |
|
20 |
/** @var array */
|
124 |
*/
|
125 |
public static function getResponseBodySummary(ResponseInterface $response)
|
126 |
{
|
127 |
+
return \GuzzleHttp\Psr7\get_message_body_summary($response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
/**
|
134 |
*
|
135 |
* @return UriInterface
|
136 |
*/
|
137 |
+
private static function obfuscateUri(UriInterface $uri)
|
138 |
{
|
139 |
$userInfo = $uri->getUserInfo();
|
140 |
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/SeekException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/ServerException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Exception/TransferException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlFactory.php
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Handler;
|
3 |
|
4 |
-
use GuzzleHttp\Exception\RequestException;
|
5 |
use GuzzleHttp\Exception\ConnectException;
|
|
|
6 |
use GuzzleHttp\Promise\FulfilledPromise;
|
7 |
use GuzzleHttp\Psr7;
|
8 |
use GuzzleHttp\Psr7\LazyOpenStream;
|
@@ -454,11 +454,16 @@ class CurlFactory implements CurlFactoryInterface
|
|
454 |
}
|
455 |
|
456 |
if (isset($options['ssl_key'])) {
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
|
|
|
|
461 |
}
|
|
|
|
|
|
|
462 |
if (!file_exists($sslKey)) {
|
463 |
throw new \InvalidArgumentException(
|
464 |
"SSL private key not found: {$sslKey}"
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Handler;
|
3 |
|
|
|
4 |
use GuzzleHttp\Exception\ConnectException;
|
5 |
+
use GuzzleHttp\Exception\RequestException;
|
6 |
use GuzzleHttp\Promise\FulfilledPromise;
|
7 |
use GuzzleHttp\Psr7;
|
8 |
use GuzzleHttp\Psr7\LazyOpenStream;
|
454 |
}
|
455 |
|
456 |
if (isset($options['ssl_key'])) {
|
457 |
+
if (is_array($options['ssl_key'])) {
|
458 |
+
if (count($options['ssl_key']) === 2) {
|
459 |
+
list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
|
460 |
+
} else {
|
461 |
+
list($sslKey) = $options['ssl_key'];
|
462 |
+
}
|
463 |
}
|
464 |
+
|
465 |
+
$sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
|
466 |
+
|
467 |
if (!file_exists($sslKey)) {
|
468 |
throw new \InvalidArgumentException(
|
469 |
"SSL private key not found: {$sslKey}"
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlHandler.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Handler;
|
3 |
|
|
|
4 |
use GuzzleHttp\Promise as P;
|
5 |
use GuzzleHttp\Promise\Promise;
|
6 |
-
use GuzzleHttp\Psr7;
|
7 |
use Psr\Http\Message\RequestInterface;
|
8 |
|
9 |
/**
|
@@ -23,6 +23,7 @@ class CurlMultiHandler
|
|
23 |
private $active;
|
24 |
private $handles = [];
|
25 |
private $delays = [];
|
|
|
26 |
|
27 |
/**
|
28 |
* This handler accepts the following options:
|
@@ -30,6 +31,8 @@ class CurlMultiHandler
|
|
30 |
* - handle_factory: An optional factory used to create curl handles
|
31 |
* - select_timeout: Optional timeout (in seconds) to block before timing
|
32 |
* out while selecting curl handles. Defaults to 1 second.
|
|
|
|
|
33 |
*
|
34 |
* @param array $options
|
35 |
*/
|
@@ -45,12 +48,23 @@ class CurlMultiHandler
|
|
45 |
} else {
|
46 |
$this->selectTimeout = 1;
|
47 |
}
|
|
|
|
|
48 |
}
|
49 |
|
50 |
public function __get($name)
|
51 |
{
|
52 |
if ($name === '_mh') {
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
throw new \BadMethodCallException();
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Handler;
|
3 |
|
4 |
+
use GuzzleHttp\Exception\InvalidArgumentException;
|
5 |
use GuzzleHttp\Promise as P;
|
6 |
use GuzzleHttp\Promise\Promise;
|
|
|
7 |
use Psr\Http\Message\RequestInterface;
|
8 |
|
9 |
/**
|
23 |
private $active;
|
24 |
private $handles = [];
|
25 |
private $delays = [];
|
26 |
+
private $options = [];
|
27 |
|
28 |
/**
|
29 |
* This handler accepts the following options:
|
31 |
* - handle_factory: An optional factory used to create curl handles
|
32 |
* - select_timeout: Optional timeout (in seconds) to block before timing
|
33 |
* out while selecting curl handles. Defaults to 1 second.
|
34 |
+
* - options: An associative array of CURLMOPT_* options and
|
35 |
+
* corresponding values for curl_multi_setopt()
|
36 |
*
|
37 |
* @param array $options
|
38 |
*/
|
48 |
} else {
|
49 |
$this->selectTimeout = 1;
|
50 |
}
|
51 |
+
|
52 |
+
$this->options = isset($options['options']) ? $options['options'] : [];
|
53 |
}
|
54 |
|
55 |
public function __get($name)
|
56 |
{
|
57 |
if ($name === '_mh') {
|
58 |
+
$this->_mh = curl_multi_init();
|
59 |
+
|
60 |
+
foreach ($this->options as $option => $value) {
|
61 |
+
// A warning is raised in case of a wrong option.
|
62 |
+
curl_multi_setopt($this->_mh, $option, $value);
|
63 |
+
}
|
64 |
+
|
65 |
+
// Further calls to _mh will return the value directly, without entering the
|
66 |
+
// __get() method at all.
|
67 |
+
return $this->_mh;
|
68 |
}
|
69 |
|
70 |
throw new \BadMethodCallException();
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/EasyHandle.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/MockHandler.php
RENAMED
@@ -66,7 +66,7 @@ class MockHandler implements \Countable
|
|
66 |
throw new \OutOfBoundsException('Mock queue is empty');
|
67 |
}
|
68 |
|
69 |
-
if (isset($options['delay'])) {
|
70 |
usleep($options['delay'] * 1000);
|
71 |
}
|
72 |
|
@@ -175,6 +175,11 @@ class MockHandler implements \Countable
|
|
175 |
return count($this->queue);
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
178 |
private function invokeStats(
|
179 |
RequestInterface $request,
|
180 |
array $options,
|
66 |
throw new \OutOfBoundsException('Mock queue is empty');
|
67 |
}
|
68 |
|
69 |
+
if (isset($options['delay']) && is_numeric($options['delay'])) {
|
70 |
usleep($options['delay'] * 1000);
|
71 |
}
|
72 |
|
175 |
return count($this->queue);
|
176 |
}
|
177 |
|
178 |
+
public function reset()
|
179 |
+
{
|
180 |
+
$this->queue = [];
|
181 |
+
}
|
182 |
+
|
183 |
private function invokeStats(
|
184 |
RequestInterface $request,
|
185 |
array $options,
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/Proxy.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Handler/StreamHandler.php
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Handler;
|
3 |
|
4 |
-
use GuzzleHttp\Exception\RequestException;
|
5 |
use GuzzleHttp\Exception\ConnectException;
|
|
|
6 |
use GuzzleHttp\Promise\FulfilledPromise;
|
7 |
use GuzzleHttp\Promise\PromiseInterface;
|
8 |
use GuzzleHttp\Psr7;
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Handler;
|
3 |
|
|
|
4 |
use GuzzleHttp\Exception\ConnectException;
|
5 |
+
use GuzzleHttp\Exception\RequestException;
|
6 |
use GuzzleHttp\Promise\FulfilledPromise;
|
7 |
use GuzzleHttp\Promise\PromiseInterface;
|
8 |
use GuzzleHttp\Psr7;
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/HandlerStack.php
RENAMED
@@ -1,7 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
|
|
4 |
use Psr\Http\Message\RequestInterface;
|
|
|
5 |
|
6 |
/**
|
7 |
* Creates a composed Guzzle handler function by stacking middlewares on top of
|
@@ -9,7 +11,7 @@ use Psr\Http\Message\RequestInterface;
|
|
9 |
*/
|
10 |
class HandlerStack
|
11 |
{
|
12 |
-
/** @var callable */
|
13 |
private $handler;
|
14 |
|
15 |
/** @var array */
|
@@ -59,6 +61,8 @@ class HandlerStack
|
|
59 |
*
|
60 |
* @param RequestInterface $request
|
61 |
* @param array $options
|
|
|
|
|
62 |
*/
|
63 |
public function __invoke(RequestInterface $request, array $options)
|
64 |
{
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
4 |
+
use GuzzleHttp\Promise\PromiseInterface;
|
5 |
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\ResponseInterface;
|
7 |
|
8 |
/**
|
9 |
* Creates a composed Guzzle handler function by stacking middlewares on top of
|
11 |
*/
|
12 |
class HandlerStack
|
13 |
{
|
14 |
+
/** @var callable|null */
|
15 |
private $handler;
|
16 |
|
17 |
/** @var array */
|
61 |
*
|
62 |
* @param RequestInterface $request
|
63 |
* @param array $options
|
64 |
+
*
|
65 |
+
* @return ResponseInterface|PromiseInterface
|
66 |
*/
|
67 |
public function __invoke(RequestInterface $request, array $options)
|
68 |
{
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/MessageFormatter.php
RENAMED
@@ -168,6 +168,11 @@ class MessageFormatter
|
|
168 |
);
|
169 |
}
|
170 |
|
|
|
|
|
|
|
|
|
|
|
171 |
private function headers(MessageInterface $message)
|
172 |
{
|
173 |
$result = '';
|
168 |
);
|
169 |
}
|
170 |
|
171 |
+
/**
|
172 |
+
* Get headers from message as string
|
173 |
+
*
|
174 |
+
* @return string
|
175 |
+
*/
|
176 |
private function headers(MessageInterface $message)
|
177 |
{
|
178 |
$result = '';
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Middleware.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/Pool.php
RENAMED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
|
|
4 |
use GuzzleHttp\Promise\PromisorInterface;
|
5 |
use Psr\Http\Message\RequestInterface;
|
6 |
-
use GuzzleHttp\Promise\EachPromise;
|
7 |
|
8 |
/**
|
9 |
* Sends an iterator of requests concurrently using a capped pool size.
|
@@ -69,6 +69,10 @@ class Pool implements PromisorInterface
|
|
69 |
$this->each = new EachPromise($requests(), $config);
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
72 |
public function promise()
|
73 |
{
|
74 |
return $this->each->promise();
|
@@ -106,6 +110,11 @@ class Pool implements PromisorInterface
|
|
106 |
return $res;
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
|
|
109 |
private static function cmpCallback(array &$options, $name, array &$results)
|
110 |
{
|
111 |
if (!isset($options[$name])) {
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
4 |
+
use GuzzleHttp\Promise\EachPromise;
|
5 |
use GuzzleHttp\Promise\PromisorInterface;
|
6 |
use Psr\Http\Message\RequestInterface;
|
|
|
7 |
|
8 |
/**
|
9 |
* Sends an iterator of requests concurrently using a capped pool size.
|
69 |
$this->each = new EachPromise($requests(), $config);
|
70 |
}
|
71 |
|
72 |
+
/**
|
73 |
+
* Get promise
|
74 |
+
* @return GuzzleHttp\Promise\Promise
|
75 |
+
*/
|
76 |
public function promise()
|
77 |
{
|
78 |
return $this->each->promise();
|
110 |
return $res;
|
111 |
}
|
112 |
|
113 |
+
/**
|
114 |
+
* Execute callback(s)
|
115 |
+
*
|
116 |
+
* @return void
|
117 |
+
*/
|
118 |
private static function cmpCallback(array &$options, $name, array &$results)
|
119 |
{
|
120 |
if (!isset($options[$name])) {
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
RENAMED
@@ -66,6 +66,11 @@ class PrepareBodyMiddleware
|
|
66 |
return $fn(Psr7\modify_request($request, $modify), $options);
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
private function addExpectHeader(
|
70 |
RequestInterface $request,
|
71 |
array $options,
|
66 |
return $fn(Psr7\modify_request($request, $modify), $options);
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Add expect header
|
71 |
+
*
|
72 |
+
* @return void
|
73 |
+
*/
|
74 |
private function addExpectHeader(
|
75 |
RequestInterface $request,
|
76 |
array $options,
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/RedirectMiddleware.php
RENAMED
@@ -76,7 +76,7 @@ class RedirectMiddleware
|
|
76 |
/**
|
77 |
* @param RequestInterface $request
|
78 |
* @param array $options
|
79 |
-
* @param ResponseInterface
|
80 |
*
|
81 |
* @return ResponseInterface|PromiseInterface
|
82 |
*/
|
@@ -118,6 +118,11 @@ class RedirectMiddleware
|
|
118 |
return $promise;
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
121 |
private function withTracking(PromiseInterface $promise, $uri, $statusCode)
|
122 |
{
|
123 |
return $promise->then(
|
@@ -135,6 +140,13 @@ class RedirectMiddleware
|
|
135 |
);
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
private function guardMax(RequestInterface $request, array &$options)
|
139 |
{
|
140 |
$current = isset($options['__redirect_count'])
|
@@ -172,7 +184,7 @@ class RedirectMiddleware
|
|
172 |
// would do.
|
173 |
$statusCode = $response->getStatusCode();
|
174 |
if ($statusCode == 303 ||
|
175 |
-
($statusCode <= 302 &&
|
176 |
) {
|
177 |
$modify['method'] = 'GET';
|
178 |
$modify['body'] = '';
|
76 |
/**
|
77 |
* @param RequestInterface $request
|
78 |
* @param array $options
|
79 |
+
* @param ResponseInterface $response
|
80 |
*
|
81 |
* @return ResponseInterface|PromiseInterface
|
82 |
*/
|
118 |
return $promise;
|
119 |
}
|
120 |
|
121 |
+
/**
|
122 |
+
* Enable tracking on promise.
|
123 |
+
*
|
124 |
+
* @return PromiseInterface
|
125 |
+
*/
|
126 |
private function withTracking(PromiseInterface $promise, $uri, $statusCode)
|
127 |
{
|
128 |
return $promise->then(
|
140 |
);
|
141 |
}
|
142 |
|
143 |
+
/**
|
144 |
+
* Check for too many redirects
|
145 |
+
*
|
146 |
+
* @return void
|
147 |
+
*
|
148 |
+
* @throws TooManyRedirectsException Too many redirects.
|
149 |
+
*/
|
150 |
private function guardMax(RequestInterface $request, array &$options)
|
151 |
{
|
152 |
$current = isset($options['__redirect_count'])
|
184 |
// would do.
|
185 |
$statusCode = $response->getStatusCode();
|
186 |
if ($statusCode == 303 ||
|
187 |
+
($statusCode <= 302 && !$options['allow_redirects']['strict'])
|
188 |
) {
|
189 |
$modify['method'] = 'GET';
|
190 |
$modify['body'] = '';
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/RequestOptions.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/RetryMiddleware.php
RENAMED
@@ -74,6 +74,11 @@ class RetryMiddleware
|
|
74 |
);
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
private function onFulfilled(RequestInterface $req, array $options)
|
78 |
{
|
79 |
return function ($value) use ($req, $options) {
|
@@ -90,6 +95,11 @@ class RetryMiddleware
|
|
90 |
};
|
91 |
}
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
private function onRejected(RequestInterface $req, array $options)
|
94 |
{
|
95 |
return function ($reason) use ($req, $options) {
|
@@ -106,6 +116,9 @@ class RetryMiddleware
|
|
106 |
};
|
107 |
}
|
108 |
|
|
|
|
|
|
|
109 |
private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
|
110 |
{
|
111 |
$options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
|
74 |
);
|
75 |
}
|
76 |
|
77 |
+
/**
|
78 |
+
* Execute fulfilled closure
|
79 |
+
*
|
80 |
+
* @return mixed
|
81 |
+
*/
|
82 |
private function onFulfilled(RequestInterface $req, array $options)
|
83 |
{
|
84 |
return function ($value) use ($req, $options) {
|
95 |
};
|
96 |
}
|
97 |
|
98 |
+
/**
|
99 |
+
* Execute rejected closure
|
100 |
+
*
|
101 |
+
* @return callable
|
102 |
+
*/
|
103 |
private function onRejected(RequestInterface $req, array $options)
|
104 |
{
|
105 |
return function ($reason) use ($req, $options) {
|
116 |
};
|
117 |
}
|
118 |
|
119 |
+
/**
|
120 |
+
* @return self
|
121 |
+
*/
|
122 |
private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
|
123 |
{
|
124 |
$options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/TransferStats.php
RENAMED
@@ -18,11 +18,11 @@ final class TransferStats
|
|
18 |
private $handlerErrorData;
|
19 |
|
20 |
/**
|
21 |
-
* @param RequestInterface
|
22 |
-
* @param ResponseInterface $response Response received (if any)
|
23 |
-
* @param float|null
|
24 |
-
* @param mixed
|
25 |
-
* @param array
|
26 |
*/
|
27 |
public function __construct(
|
28 |
RequestInterface $request,
|
@@ -93,7 +93,7 @@ final class TransferStats
|
|
93 |
/**
|
94 |
* Get the estimated time the request was being transferred by the handler.
|
95 |
*
|
96 |
-
* @return float Time in seconds.
|
97 |
*/
|
98 |
public function getTransferTime()
|
99 |
{
|
18 |
private $handlerErrorData;
|
19 |
|
20 |
/**
|
21 |
+
* @param RequestInterface $request Request that was sent.
|
22 |
+
* @param ResponseInterface|null $response Response received (if any)
|
23 |
+
* @param float|null $transferTime Total handler transfer time.
|
24 |
+
* @param mixed $handlerErrorData Handler error data.
|
25 |
+
* @param array $handlerStats Handler specific stats.
|
26 |
*/
|
27 |
public function __construct(
|
28 |
RequestInterface $request,
|
93 |
/**
|
94 |
* Get the estimated time the request was being transferred by the handler.
|
95 |
*
|
96 |
+
* @return float|null Time in seconds.
|
97 |
*/
|
98 |
public function getTransferTime()
|
99 |
{
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/UriTemplate.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/functions.php
RENAMED
@@ -56,7 +56,7 @@ function describe_type($input)
|
|
56 |
/**
|
57 |
* Parses an array of header lines into an associative array of headers.
|
58 |
*
|
59 |
-
* @param
|
60 |
* format: "Name: Value"
|
61 |
* @return array
|
62 |
*/
|
56 |
/**
|
57 |
* Parses an array of header lines into an associative array of headers.
|
58 |
*
|
59 |
+
* @param iterable $lines Header lines array of strings in the following
|
60 |
* format: "Name: Value"
|
61 |
* @return array
|
62 |
*/
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/guzzle/src/functions_include.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/CHANGELOG.md
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/LICENSE
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/AggregateException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/CancellationException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/Coroutine.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/EachPromise.php
RENAMED
@@ -74,7 +74,9 @@ class EachPromise implements PromisorInterface
|
|
74 |
try {
|
75 |
$this->createPromise();
|
76 |
$this->iterable->rewind();
|
77 |
-
|
|
|
|
|
78 |
} catch (\Throwable $e) {
|
79 |
$this->aggregate->reject($e);
|
80 |
} catch (\Exception $e) {
|
@@ -89,11 +91,6 @@ class EachPromise implements PromisorInterface
|
|
89 |
$this->mutex = false;
|
90 |
$this->aggregate = new Promise(function () {
|
91 |
reset($this->pending);
|
92 |
-
if (empty($this->pending) && !$this->iterable->valid()) {
|
93 |
-
$this->aggregate->resolve(null);
|
94 |
-
return;
|
95 |
-
}
|
96 |
-
|
97 |
// Consume a potentially fluctuating list of promises while
|
98 |
// ensuring that indexes are maintained (precluding array_shift).
|
99 |
while ($promise = current($this->pending)) {
|
@@ -149,21 +146,27 @@ class EachPromise implements PromisorInterface
|
|
149 |
}
|
150 |
|
151 |
$promise = promise_for($this->iterable->current());
|
152 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
$this->pending[$idx] = $promise->then(
|
155 |
-
function ($value) use ($idx) {
|
156 |
if ($this->onFulfilled) {
|
157 |
call_user_func(
|
158 |
-
$this->onFulfilled, $value, $
|
159 |
);
|
160 |
}
|
161 |
$this->step($idx);
|
162 |
},
|
163 |
-
function ($reason) use ($idx) {
|
164 |
if ($this->onRejected) {
|
165 |
call_user_func(
|
166 |
-
$this->onRejected, $reason, $
|
167 |
);
|
168 |
}
|
169 |
$this->step($idx);
|
74 |
try {
|
75 |
$this->createPromise();
|
76 |
$this->iterable->rewind();
|
77 |
+
if (!$this->checkIfFinished()) {
|
78 |
+
$this->refillPending();
|
79 |
+
}
|
80 |
} catch (\Throwable $e) {
|
81 |
$this->aggregate->reject($e);
|
82 |
} catch (\Exception $e) {
|
91 |
$this->mutex = false;
|
92 |
$this->aggregate = new Promise(function () {
|
93 |
reset($this->pending);
|
|
|
|
|
|
|
|
|
|
|
94 |
// Consume a potentially fluctuating list of promises while
|
95 |
// ensuring that indexes are maintained (precluding array_shift).
|
96 |
while ($promise = current($this->pending)) {
|
146 |
}
|
147 |
|
148 |
$promise = promise_for($this->iterable->current());
|
149 |
+
$key = $this->iterable->key();
|
150 |
+
|
151 |
+
// Iterable keys may not be unique, so we add the promises at the end
|
152 |
+
// of the pending array and retrieve the array index being used
|
153 |
+
$this->pending[] = null;
|
154 |
+
end($this->pending);
|
155 |
+
$idx = key($this->pending);
|
156 |
|
157 |
$this->pending[$idx] = $promise->then(
|
158 |
+
function ($value) use ($idx, $key) {
|
159 |
if ($this->onFulfilled) {
|
160 |
call_user_func(
|
161 |
+
$this->onFulfilled, $value, $key, $this->aggregate
|
162 |
);
|
163 |
}
|
164 |
$this->step($idx);
|
165 |
},
|
166 |
+
function ($reason) use ($idx, $key) {
|
167 |
if ($this->onRejected) {
|
168 |
call_user_func(
|
169 |
+
$this->onRejected, $reason, $key, $this->aggregate
|
170 |
);
|
171 |
}
|
172 |
$this->step($idx);
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/FulfilledPromise.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/Promise.php
RENAMED
@@ -224,7 +224,7 @@ class Promise implements PromiseInterface
|
|
224 |
} elseif ($this->waitList) {
|
225 |
$this->invokeWaitList();
|
226 |
} else {
|
227 |
-
// If there's
|
228 |
$this->reject('Cannot wait on a promise that has '
|
229 |
. 'no internal wait function. You must provide a wait '
|
230 |
. 'function when constructing the promise to be able to '
|
224 |
} elseif ($this->waitList) {
|
225 |
$this->invokeWaitList();
|
226 |
} else {
|
227 |
+
// If there's no wait function, then reject the promise.
|
228 |
$this->reject('Cannot wait on a promise that has '
|
229 |
. 'no internal wait function. You must provide a wait '
|
230 |
. 'function when constructing the promise to be able to '
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/PromiseInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/PromisorInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/RejectedPromise.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/RejectionException.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/TaskQueue.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/TaskQueueInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/functions.php
RENAMED
@@ -213,13 +213,14 @@ function unwrap($promises)
|
|
213 |
* rejects, the returned promise is rejected with the rejection reason.
|
214 |
*
|
215 |
* @param mixed $promises Promises or values.
|
|
|
216 |
*
|
217 |
* @return PromiseInterface
|
218 |
*/
|
219 |
-
function all($promises)
|
220 |
{
|
221 |
$results = [];
|
222 |
-
|
223 |
$promises,
|
224 |
function ($value, $idx) use (&$results) {
|
225 |
$results[$idx] = $value;
|
@@ -231,6 +232,19 @@ function all($promises)
|
|
231 |
ksort($results);
|
232 |
return $results;
|
233 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
|
236 |
/**
|
@@ -241,7 +255,7 @@ function all($promises)
|
|
241 |
* fulfilled with an array that contains the fulfillment values of the winners
|
242 |
* in order of resolution.
|
243 |
*
|
244 |
-
* This
|
245 |
* if the number of fulfilled promises is less than the desired $count.
|
246 |
*
|
247 |
* @param int $count Total number of promises.
|
@@ -254,7 +268,7 @@ function some($count, $promises)
|
|
254 |
$results = [];
|
255 |
$rejections = [];
|
256 |
|
257 |
-
return each(
|
258 |
$promises,
|
259 |
function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
|
260 |
if ($p->getState() !== PromiseInterface::PENDING) {
|
@@ -310,7 +324,7 @@ function settle($promises)
|
|
310 |
{
|
311 |
$results = [];
|
312 |
|
313 |
-
return each(
|
314 |
$promises,
|
315 |
function ($value, $idx) use (&$results) {
|
316 |
$results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
|
213 |
* rejects, the returned promise is rejected with the rejection reason.
|
214 |
*
|
215 |
* @param mixed $promises Promises or values.
|
216 |
+
* @param bool $recursive - If true, resolves new promises that might have been added to the stack during its own resolution.
|
217 |
*
|
218 |
* @return PromiseInterface
|
219 |
*/
|
220 |
+
function all($promises, $recursive = false)
|
221 |
{
|
222 |
$results = [];
|
223 |
+
$promise = \GuzzleHttp\Promise\each(
|
224 |
$promises,
|
225 |
function ($value, $idx) use (&$results) {
|
226 |
$results[$idx] = $value;
|
232 |
ksort($results);
|
233 |
return $results;
|
234 |
});
|
235 |
+
|
236 |
+
if (true === $recursive) {
|
237 |
+
$promise = $promise->then(function ($results) use ($recursive, &$promises) {
|
238 |
+
foreach ($promises AS $promise) {
|
239 |
+
if (\GuzzleHttp\Promise\PromiseInterface::PENDING === $promise->getState()) {
|
240 |
+
return all($promises, $recursive);
|
241 |
+
}
|
242 |
+
}
|
243 |
+
return $results;
|
244 |
+
});
|
245 |
+
}
|
246 |
+
|
247 |
+
return $promise;
|
248 |
}
|
249 |
|
250 |
/**
|
255 |
* fulfilled with an array that contains the fulfillment values of the winners
|
256 |
* in order of resolution.
|
257 |
*
|
258 |
+
* This promise is rejected with a {@see GuzzleHttp\Promise\AggregateException}
|
259 |
* if the number of fulfilled promises is less than the desired $count.
|
260 |
*
|
261 |
* @param int $count Total number of promises.
|
268 |
$results = [];
|
269 |
$rejections = [];
|
270 |
|
271 |
+
return \GuzzleHttp\Promise\each(
|
272 |
$promises,
|
273 |
function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
|
274 |
if ($p->getState() !== PromiseInterface::PENDING) {
|
324 |
{
|
325 |
$results = [];
|
326 |
|
327 |
+
return \GuzzleHttp\Promise\each(
|
328 |
$promises,
|
329 |
function ($value, $idx) use (&$results) {
|
330 |
$results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/promises/src/functions_include.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/CHANGELOG.md
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/LICENSE
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/AppendStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/BufferStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/CachingStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/DroppingStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/FnStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/InflateStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/LazyOpenStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/LimitStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/MessageTrait.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/MultipartStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/NoSeekStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/PumpStream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Request.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Response.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Rfc7230.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/ServerRequest.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Stream.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/StreamDecoratorTrait.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/StreamWrapper.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/UploadedFile.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/Uri.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/UriNormalizer.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/UriResolver.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/functions.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/guzzlehttp/psr7/src/functions_include.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/LICENSE
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/README.md
RENAMED
File without changes
|
vendor/mollie/mollie-api-php/composer.json
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "mollie/mollie-api-php",
|
3 |
+
"description": "Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.",
|
4 |
+
"keywords": [
|
5 |
+
"mollie",
|
6 |
+
"payment",
|
7 |
+
"service",
|
8 |
+
"ideal",
|
9 |
+
"creditcard",
|
10 |
+
"apple pay",
|
11 |
+
"mistercash",
|
12 |
+
"bancontact",
|
13 |
+
"sofort",
|
14 |
+
"sofortbanking",
|
15 |
+
"sepa",
|
16 |
+
"paypal",
|
17 |
+
"paysafecard",
|
18 |
+
"podiumcadeaukaart",
|
19 |
+
"przelewy24",
|
20 |
+
"banktransfer",
|
21 |
+
"direct debit",
|
22 |
+
"belfius",
|
23 |
+
"belfius direct net",
|
24 |
+
"refunds",
|
25 |
+
"api",
|
26 |
+
"payments",
|
27 |
+
"gateway",
|
28 |
+
"subscriptions",
|
29 |
+
"recurring",
|
30 |
+
"charges",
|
31 |
+
"kbc",
|
32 |
+
"cbc",
|
33 |
+
"gift cards",
|
34 |
+
"intersolve",
|
35 |
+
"fashioncheque",
|
36 |
+
"inghomepay",
|
37 |
+
"klarna",
|
38 |
+
"paylater",
|
39 |
+
"sliceit"
|
40 |
+
],
|
41 |
+
"homepage": "https://www.mollie.com/en/developers",
|
42 |
+
"license": "BSD-2-Clause",
|
43 |
+
"authors": [
|
44 |
+
{
|
45 |
+
"name": "Mollie B.V.",
|
46 |
+
"email": "info@mollie.com"
|
47 |
+
}
|
48 |
+
],
|
49 |
+
"require": {
|
50 |
+
"php": ">=5.6",
|
51 |
+
"ext-curl": "*",
|
52 |
+
"ext-json": "*",
|
53 |
+
"ext-openssl": "*",
|
54 |
+
"composer/ca-bundle": "^1.1",
|
55 |
+
"guzzlehttp/guzzle": "^6.3"
|
56 |
+
},
|
57 |
+
"require-dev": {
|
58 |
+
"eloquent/liberator": "^2.0",
|
59 |
+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.1"
|
60 |
+
},
|
61 |
+
"suggest": {
|
62 |
+
"mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://docs.mollie.com/ for more information."
|
63 |
+
},
|
64 |
+
"config": {
|
65 |
+
"sort-packages": true
|
66 |
+
},
|
67 |
+
"autoload": {
|
68 |
+
"psr-4": {
|
69 |
+
"Mollie\\Api\\": "src/"
|
70 |
+
}
|
71 |
+
},
|
72 |
+
"autoload-dev": {
|
73 |
+
"psr-4": {
|
74 |
+
"Tests\\": "tests"
|
75 |
+
}
|
76 |
+
},
|
77 |
+
"scripts": {
|
78 |
+
"test": "./vendor/bin/phpunit tests"
|
79 |
+
}
|
80 |
+
}
|
vendor/mollie/mollie-api-php/examples/captures/get-capture.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Retrieve a payment capture using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve a capture with ID 'cpt_4qqhO89gsT' for payment with
|
14 |
+
* ID 'tr_WDqYK6vllg'.
|
15 |
+
*
|
16 |
+
* See: https://docs.mollie.com/reference/v2/captures-api/get-capture
|
17 |
+
*/
|
18 |
+
|
19 |
+
$payment = $mollie->payments->get('tr_WDqYK6vllg');
|
20 |
+
$capture = $payment->getCapture('cpt_4qqhO89gsT');
|
21 |
+
|
22 |
+
$amount = $capture->amount->currency . ' ' . $capture->amount->value;
|
23 |
+
|
24 |
+
echo 'Captured ' . $amount;
|
25 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
26 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
27 |
+
}
|
vendor/mollie/mollie-api-php/examples/captures/list-captures.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* List captures for a payment using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* List captures for payment with ID 'tr_WDqYK6vllg'.
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/captures-api/list-captures
|
16 |
+
*/
|
17 |
+
|
18 |
+
$payment = $mollie->payments->get('tr_WDqYK6vllg');
|
19 |
+
$captures = $payment->captures();
|
20 |
+
|
21 |
+
foreach ($captures as $capture) {
|
22 |
+
$amount = $capture->amount->currency . ' ' . $capture->amount->value;
|
23 |
+
echo 'Captured ' . $amount . ' for payment ' . $payment->id;
|
24 |
+
}
|
25 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
26 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
27 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/create-customer-first-payment.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to create a first payment to allow recurring payments later.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve the last created customer for this example.
|
14 |
+
* If no customers are created yet, run the create-customer example.
|
15 |
+
*/
|
16 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Generate a unique order id for this example. It is important to include this unique attribute
|
20 |
+
* in the redirectUrl (below) so a proper return page can be shown to the customer.
|
21 |
+
*/
|
22 |
+
$orderId = time();
|
23 |
+
|
24 |
+
/*
|
25 |
+
* Determine the url parts to these example files.
|
26 |
+
*/
|
27 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
28 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
29 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Customer Payment creation parameters.
|
33 |
+
*
|
34 |
+
* @See: https://docs.mollie.com/reference/v2/customers-api/create-customer-payment
|
35 |
+
*/
|
36 |
+
$payment = $customer->createPayment([
|
37 |
+
"amount" => [
|
38 |
+
"value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings
|
39 |
+
"currency" => "EUR"
|
40 |
+
],
|
41 |
+
"description" => "First payment - Order #{$orderId}",
|
42 |
+
"redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}",
|
43 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php",
|
44 |
+
"metadata" => [
|
45 |
+
"order_id" => $orderId,
|
46 |
+
],
|
47 |
+
|
48 |
+
// Flag this payment as a first payment to allow recurring payments later.
|
49 |
+
"sequenceType" => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_FIRST,
|
50 |
+
]);
|
51 |
+
|
52 |
+
/*
|
53 |
+
* In this example we store the order with its payment status in a database.
|
54 |
+
*/
|
55 |
+
database_write($orderId, $payment->status);
|
56 |
+
|
57 |
+
/*
|
58 |
+
* Send the customer off to complete the payment.
|
59 |
+
* This request should always be a GET, thus we enforce 303 http response code
|
60 |
+
*
|
61 |
+
* After completion, the customer will have a pending or valid mandate that can be
|
62 |
+
* used for recurring payments and subscriptions.
|
63 |
+
*/
|
64 |
+
header("Location: " . $payment->getCheckoutUrl(), true, 303);
|
65 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
66 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
67 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/create-customer-payment.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to create a new customer in the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve the last created customer for this example.
|
14 |
+
* If no customers are created yet, run create-customer example.
|
15 |
+
*/
|
16 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Generate a unique order id for this example. It is important to include this unique attribute
|
20 |
+
* in the redirectUrl (below) so a proper return page can be shown to the customer.
|
21 |
+
*/
|
22 |
+
$orderId = time();
|
23 |
+
|
24 |
+
/*
|
25 |
+
* Determine the url parts to these example files.
|
26 |
+
*/
|
27 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
28 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
29 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Linking customers to payments has a few benefits
|
33 |
+
*
|
34 |
+
* @see https://docs.mollie.com/reference/v2/customers-api/create-customer-payment
|
35 |
+
*/
|
36 |
+
$payment = $customer->createPayment([
|
37 |
+
"amount" => [
|
38 |
+
"value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings
|
39 |
+
"currency" => "EUR"
|
40 |
+
],
|
41 |
+
"description" => "Order #{$orderId}",
|
42 |
+
"redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}",
|
43 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php",
|
44 |
+
"metadata" => [
|
45 |
+
"order_id" => $orderId,
|
46 |
+
]
|
47 |
+
]);
|
48 |
+
|
49 |
+
/*
|
50 |
+
* In this example we store the order with its payment status in a database.
|
51 |
+
*/
|
52 |
+
database_write($orderId, $payment->status);
|
53 |
+
|
54 |
+
/*
|
55 |
+
* Send the customer off to complete the payment.
|
56 |
+
* This request should always be a GET, thus we enforce 303 http response code
|
57 |
+
*/
|
58 |
+
header("Location: " . $payment->getCheckoutUrl(), true, 303);
|
59 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
60 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
61 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/create-customer-recurring-payment.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to create an on-demand recurring payment.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve the last created customer for this example.
|
14 |
+
* If no customers are created yet, run the create-customer example.
|
15 |
+
*/
|
16 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Generate a unique order id for this example.
|
20 |
+
*/
|
21 |
+
$orderId = time();
|
22 |
+
|
23 |
+
/*
|
24 |
+
* Determine the url parts to these example files.
|
25 |
+
*/
|
26 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
27 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
28 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Customer Payment creation parameters.
|
32 |
+
*
|
33 |
+
* @See: https://docs.mollie.com/reference/v2/customers-api/create-customer-payment
|
34 |
+
*/
|
35 |
+
$payment = $customer->createPayment([
|
36 |
+
"amount" => [
|
37 |
+
"value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings
|
38 |
+
"currency" => "EUR"
|
39 |
+
],
|
40 |
+
"description" => "On-demand payment - Order #{$orderId}",
|
41 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php",
|
42 |
+
"metadata" => [
|
43 |
+
"order_id" => $orderId,
|
44 |
+
],
|
45 |
+
|
46 |
+
// Flag this payment as a recurring payment.
|
47 |
+
"sequenceType" => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_RECURRING,
|
48 |
+
]);
|
49 |
+
|
50 |
+
/*
|
51 |
+
* In this example we store the order with its payment status in a database.
|
52 |
+
*/
|
53 |
+
database_write($orderId, $payment->status);
|
54 |
+
|
55 |
+
/*
|
56 |
+
* The payment will be either pending or paid immediately. The customer
|
57 |
+
* does not have to perform any payment steps.
|
58 |
+
*/
|
59 |
+
echo "<p>Selected mandate is '" . htmlspecialchars($payment->mandateId) . "' (" . htmlspecialchars($payment->method) . ").</p>\n";
|
60 |
+
echo "<p>The payment status is '" . htmlspecialchars($payment->status) . "'.</p>\n";
|
61 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
62 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
63 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/create-customer.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to create a new customer in the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Customer creation parameters.
|
14 |
+
*
|
15 |
+
* @See https://docs.mollie.com/reference/v2/customers-api/create-customer
|
16 |
+
*/
|
17 |
+
$customer = $mollie->customers->create([
|
18 |
+
"name" => "Luke Skywalker",
|
19 |
+
"email" => "luke@example.org",
|
20 |
+
"metadata" => [
|
21 |
+
"isJedi" => TRUE,
|
22 |
+
],
|
23 |
+
]);
|
24 |
+
echo "<p>New customer created " . htmlspecialchars($customer->id) . " (" . htmlspecialchars($customer->name) . ").</p>";
|
25 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
26 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
27 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/delete-customer.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Delete a customer from the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
$mollie->customers->delete("cst_fE3F6nvX");
|
13 |
+
echo "<p>Customer deleted!</p>";
|
14 |
+
|
15 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
16 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
17 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/list-customer-payments.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to retrieve your customers' payments history.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* Determine the url parts to these example files.
|
16 |
+
*/
|
17 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
18 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
19 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
20 |
+
|
21 |
+
/*
|
22 |
+
* Retrieve the last created customer for this example.
|
23 |
+
* If no customers are created yet, run create-customer example.
|
24 |
+
*/
|
25 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
26 |
+
|
27 |
+
/*
|
28 |
+
* Get the all payments for this API key ordered by newest.
|
29 |
+
*/
|
30 |
+
$payments = $customer->payments();
|
31 |
+
|
32 |
+
echo "<ul>";
|
33 |
+
foreach ($payments as $payment) {
|
34 |
+
echo "<li>";
|
35 |
+
echo "<strong style='font-family: monospace'>" . htmlspecialchars($payment->id) . "</strong><br />";
|
36 |
+
echo htmlspecialchars($payment->description) . "<br />";
|
37 |
+
echo htmlspecialchars($payment->amount->currency) . " " . htmlspecialchars($payment->amount->value) . "<br />";
|
38 |
+
|
39 |
+
echo "Status: " . htmlspecialchars($payment->status) . "<br />";
|
40 |
+
|
41 |
+
if ($payment->hasRefunds()) {
|
42 |
+
echo "Payment has been (partially) refunded.<br />";
|
43 |
+
}
|
44 |
+
|
45 |
+
if ($payment->hasChargebacks()) {
|
46 |
+
echo "Payment has been charged back.<br />";
|
47 |
+
}
|
48 |
+
|
49 |
+
if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') {
|
50 |
+
echo " (<a href=\"{$protocol}://{$hostname}{$path}/payments/refund-payment.php?payment_id=" . htmlspecialchars($payment->id) . "\">refund</a>)";
|
51 |
+
}
|
52 |
+
|
53 |
+
echo "</li>";
|
54 |
+
}
|
55 |
+
echo "</ul>";
|
56 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
57 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
58 |
+
}
|
vendor/mollie/mollie-api-php/examples/customers/update-customer.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Updating an existing customer via the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve an existing customer by his customerId
|
14 |
+
*/
|
15 |
+
$customer = $mollie->customers->get("cst_cUe8HjeBuz");
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Customer fields that can be updated.
|
19 |
+
*
|
20 |
+
* @See https://docs.mollie.com/reference/v2/customers-api/update-customer
|
21 |
+
*/
|
22 |
+
$customer->name = "Luke Sky";
|
23 |
+
$customer->email = "luke@example.org";
|
24 |
+
$customer->locale = "en_US";
|
25 |
+
$customer->metadata->isJedi = TRUE;
|
26 |
+
$customer->update();
|
27 |
+
|
28 |
+
echo "<p>Customer updated: " . htmlspecialchars($customer->name) . "</p>";
|
29 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
30 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
31 |
+
}
|
vendor/mollie/mollie-api-php/examples/database/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
*.txt
|
vendor/mollie/mollie-api-php/examples/functions.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* NOTE: The examples are using a text file as a database.
|
4 |
+
* Please use a real database like MySQL in production code.
|
5 |
+
*/
|
6 |
+
|
7 |
+
function database_read($orderId)
|
8 |
+
{
|
9 |
+
$orderId = intval($orderId);
|
10 |
+
$database = dirname(__FILE__) . "/database/order-{$orderId}.txt";
|
11 |
+
|
12 |
+
$status = @file_get_contents($database);
|
13 |
+
|
14 |
+
return $status ? $status : "unknown order";
|
15 |
+
}
|
16 |
+
|
17 |
+
function database_write($orderId, $status)
|
18 |
+
{
|
19 |
+
$orderId = intval($orderId);
|
20 |
+
$database = dirname(__FILE__) . "/database/order-{$orderId}.txt";
|
21 |
+
|
22 |
+
file_put_contents($database, $status);
|
23 |
+
}
|
vendor/mollie/mollie-api-php/examples/initialize.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Make sure to disable the display of errors in production code!
|
4 |
+
*/
|
5 |
+
ini_set('display_errors', 1);
|
6 |
+
ini_set('display_startup_errors', 1);
|
7 |
+
error_reporting(E_ALL);
|
8 |
+
|
9 |
+
require_once __DIR__ . "/../vendor/autoload.php";
|
10 |
+
require_once __DIR__ . "/functions.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Initialize the Mollie API library with your API key.
|
14 |
+
*
|
15 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
16 |
+
*/
|
17 |
+
$mollie = new \Mollie\Api\MollieApiClient();
|
18 |
+
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
|
vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Make sure to disable the display of errors in production code!
|
5 |
+
*/
|
6 |
+
ini_set('display_errors', 1);
|
7 |
+
ini_set('display_startup_errors', 1);
|
8 |
+
error_reporting(E_ALL);
|
9 |
+
|
10 |
+
require_once __DIR__ . "/../vendor/autoload.php";
|
11 |
+
require_once __DIR__ . "/functions.php";
|
12 |
+
|
13 |
+
/*
|
14 |
+
* Initialize the Mollie API library with OAuth.
|
15 |
+
*
|
16 |
+
* See: https://docs.mollie.com/oauth/overview
|
17 |
+
*/
|
18 |
+
$mollie = new \Mollie\Api\MollieApiClient();
|
19 |
+
$mollie->setAccessToken("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ");
|
vendor/mollie/mollie-api-php/examples/invoices/list-invoices.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* List the Mollie invoices.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Get all the activated methods for this API key.
|
14 |
+
*/
|
15 |
+
$invoices = $mollie->invoices->all();
|
16 |
+
foreach ($invoices as $invoice) {
|
17 |
+
echo '<li><b>Invoice ' . htmlspecialchars($invoice->reference) . ':</b> (' . htmlspecialchars($invoice->issuedAt) . ')';
|
18 |
+
echo '<br>Status: <b>' . $invoice->status;
|
19 |
+
echo '<table border="1"><tr><th>Period</th><th>Description</th><th>Count</th><th>VAT Percentage</th><th>Amount</th></tr>';
|
20 |
+
foreach ($invoice->lines as $line) {
|
21 |
+
echo '<tr>';
|
22 |
+
echo '<td>' . htmlspecialchars($line->period) . '</td>';
|
23 |
+
echo '<td>' . htmlspecialchars($line->description) . '</td>';
|
24 |
+
echo '<td align="right">' . htmlspecialchars($line->count) . '</td>';
|
25 |
+
echo '<td align="right">' . htmlspecialchars($line->vatPercentage) . '</td>';
|
26 |
+
echo '<td align="right">' . htmlspecialchars($line->amount->currency . " " . $line->amount->value) . '</td>';
|
27 |
+
echo '</tr>';
|
28 |
+
}
|
29 |
+
echo '<tr><th colspan="5" align="right">Gross Total</th><th align="right">' . htmlspecialchars($invoice->grossAmount->value . " " . $invoice->grossAmount->currency) . '</th></tr>';
|
30 |
+
echo '</table>';
|
31 |
+
echo '<a href="'. $invoice->_links->pdf->href .'" target="_blank">Click here to open PDF</a>';
|
32 |
+
echo '</li>';
|
33 |
+
}
|
34 |
+
|
35 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
36 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
37 |
+
}
|
vendor/mollie/mollie-api-php/examples/mandates/create-mandate.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Create a customer mandate via the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve the last created customer for this example.
|
14 |
+
* If no customers are created yet, run create-customer example.
|
15 |
+
*/
|
16 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Create a SEPA Direct Debit mandate for the customer
|
20 |
+
*/
|
21 |
+
$mandate = $customer->createMandate([
|
22 |
+
"method" => \Mollie\Api\Types\MandateMethod::DIRECTDEBIT,
|
23 |
+
"consumerAccount" => 'NL34ABNA0243341423',
|
24 |
+
"consumerName" => 'B. A. Example',
|
25 |
+
]);
|
26 |
+
|
27 |
+
echo "<p>Mandate created with id " . $mandate->id . " for customer " . $customer->name . "</p>";
|
28 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
29 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
30 |
+
}
|
vendor/mollie/mollie-api-php/examples/mandates/list-mandates.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* List all customer mandates
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve an existing customer by his customerId
|
14 |
+
*/
|
15 |
+
$customer = $mollie->customers->get("cst_cUa8HjKBus");
|
16 |
+
|
17 |
+
/*
|
18 |
+
* List the mandates of this customer
|
19 |
+
*/
|
20 |
+
echo "<ul>";
|
21 |
+
foreach ($customer->mandates() as $mandate) {
|
22 |
+
echo "<li>" . htmlspecialchars($mandate->id) . " - " . htmlspecialchars($mandate->method) . ": " . htmlspecialchars($mandate->status) . "</li>";
|
23 |
+
}
|
24 |
+
echo "</ul>";
|
25 |
+
|
26 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
27 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
28 |
+
}
|
vendor/mollie/mollie-api-php/examples/mandates/revoke-mandate.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Revoke a customer mandate
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve an existing customer by his customerId
|
14 |
+
*/
|
15 |
+
$customer = $mollie->customers->get("cst_cUa8HjKBus");
|
16 |
+
|
17 |
+
/*
|
18 |
+
* Retrieve an existing mandate by his mandateId
|
19 |
+
*/
|
20 |
+
$mandate = $customer->getMandate("mdt_pa3s7rGnrC");
|
21 |
+
|
22 |
+
/*
|
23 |
+
* Revoke the mandate
|
24 |
+
*/
|
25 |
+
$mandate->revoke();
|
26 |
+
|
27 |
+
echo "<p>Mandate has been successfully revoked.</p>";
|
28 |
+
|
29 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
30 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
31 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/cancel-order-lines.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Cancel order lines using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Cancel an order line with ID "odl_dgtxyl" for order ID "ord_8wmqcHMN4U"
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/cancel-order-line
|
16 |
+
*/
|
17 |
+
|
18 |
+
$orderId = 'ord_8wmqcHMN4U';
|
19 |
+
$lineId = 'odl_dgtxyl';
|
20 |
+
|
21 |
+
$order = $mollie->orders->get($orderId);
|
22 |
+
$line = $order->lines()->get($lineId);
|
23 |
+
if ($line && $line->isCancelable) {
|
24 |
+
$order->cancelLines([
|
25 |
+
'lines' => [
|
26 |
+
[
|
27 |
+
'id' => $lineId,
|
28 |
+
'quantity' => 1, // optional parameter
|
29 |
+
]
|
30 |
+
],
|
31 |
+
]);
|
32 |
+
|
33 |
+
$updatedOrder = $mollie->orders->get($orderId);
|
34 |
+
|
35 |
+
echo 'Your order ' . $order->id . ' was updated:';
|
36 |
+
foreach ($order->lines as $line) {
|
37 |
+
echo $line->description . '. Status: <b>' . $line->status . '</b>.';
|
38 |
+
}
|
39 |
+
} else {
|
40 |
+
echo "Unable to cancel line " . $lineId . " for your order " . $orderId . ".";
|
41 |
+
}
|
42 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
43 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
44 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/cancel-order.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Cancel an order using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Cancel the order with ID "ord_pbjz8x"
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/cancel-order
|
16 |
+
*/
|
17 |
+
$order = $mollie->orders->get("ord_pbjz8x");
|
18 |
+
if ($order->isCancelable) {
|
19 |
+
$canceledOrder = $order->cancel();
|
20 |
+
echo "Your order " . $order->id . " has been canceled.";
|
21 |
+
} else {
|
22 |
+
echo "Unable to cancel your order " . $order->id . ".";
|
23 |
+
}
|
24 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
25 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
26 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/create-order.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to create a new order in the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Generate a unique order id for this example. It is important to include this unique attribute
|
14 |
+
* in the redirectUrl (below) so a proper return page can be shown to the customer.
|
15 |
+
*/
|
16 |
+
$orderId = time();
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Determine the url parts to these example files.
|
20 |
+
*/
|
21 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
22 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
23 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
24 |
+
|
25 |
+
/*
|
26 |
+
* Order creation parameters.
|
27 |
+
*
|
28 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/create-order
|
29 |
+
*/
|
30 |
+
$order = $mollie->orders->create([
|
31 |
+
"amount" => [
|
32 |
+
"value" => "1027.99",
|
33 |
+
"currency" => "EUR"
|
34 |
+
],
|
35 |
+
"billingAddress" => [
|
36 |
+
"streetAndNumber" => "Keizersgracht 313",
|
37 |
+
"postalCode" => "1016 EE",
|
38 |
+
"city" => "Amsterdam",
|
39 |
+
"country" => "nl",
|
40 |
+
"givenName" => "Luke",
|
41 |
+
"familyName" => "Skywalker",
|
42 |
+
"email" => "luke@skywalker.com",
|
43 |
+
],
|
44 |
+
"shippingAddress" => [
|
45 |
+
"streetAndNumber" => "Keizersgracht 313",
|
46 |
+
"postalCode" => "1016 EE",
|
47 |
+
"city" => "Amsterdam",
|
48 |
+
"country" => "nl",
|
49 |
+
"givenName" => "Luke",
|
50 |
+
"familyName" => "Skywalker",
|
51 |
+
"email" => "luke@skywalker.com",
|
52 |
+
],
|
53 |
+
"metadata" => [
|
54 |
+
"order_id" => $orderId
|
55 |
+
],
|
56 |
+
"consumerDateOfBirth" => "1958-01-31",
|
57 |
+
"locale" => "en_US",
|
58 |
+
"orderNumber" => strval($orderId),
|
59 |
+
"redirectUrl" => "{$protocol}://{$hostname}{$path}/orders/return.php?order_id={$orderId}",
|
60 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/orders/webhook.php",
|
61 |
+
"method" => "ideal",
|
62 |
+
"lines" => [
|
63 |
+
[
|
64 |
+
"sku" => "5702016116977",
|
65 |
+
"name" => "LEGO 42083 Bugatti Chiron",
|
66 |
+
"productUrl" => "https://shop.lego.com/nl-NL/Bugatti-Chiron-42083",
|
67 |
+
"imageUrl" => 'https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$',
|
68 |
+
"quantity" => 2,
|
69 |
+
"vatRate" => "21.00",
|
70 |
+
"unitPrice" => [
|
71 |
+
"currency" => "EUR",
|
72 |
+
"value" => "399.00"
|
73 |
+
],
|
74 |
+
"totalAmount" => [
|
75 |
+
"currency" => "EUR",
|
76 |
+
"value" => "698.00"
|
77 |
+
],
|
78 |
+
"discountAmount" => [
|
79 |
+
"currency" => "EUR",
|
80 |
+
"value" => "100.00"
|
81 |
+
],
|
82 |
+
"vatAmount" => [
|
83 |
+
"currency" => "EUR",
|
84 |
+
"value" => "121.14"
|
85 |
+
]
|
86 |
+
],
|
87 |
+
[
|
88 |
+
"type" => "digital",
|
89 |
+
"sku" => "5702015594028",
|
90 |
+
"name" => "LEGO 42056 Porsche 911 GT3 RS",
|
91 |
+
"productUrl" => "https://shop.lego.com/nl-NL/Porsche-911-GT3-RS-42056",
|
92 |
+
"imageUrl" => 'https://sh-s7-live-s.legocdn.com/is/image/LEGO/42056?$PDPDefault$',
|
93 |
+
"quantity" => 1,
|
94 |
+
"vatRate" => "21.00",
|
95 |
+
"unitPrice" => [
|
96 |
+
"currency" => "EUR",
|
97 |
+
"value" => "329.99"
|
98 |
+
],
|
99 |
+
"totalAmount" => [
|
100 |
+
"currency" => "EUR",
|
101 |
+
"value" => "329.99"
|
102 |
+
],
|
103 |
+
"vatAmount" => [
|
104 |
+
"currency" => "EUR",
|
105 |
+
"value" => "57.27"
|
106 |
+
]
|
107 |
+
]
|
108 |
+
]
|
109 |
+
]);
|
110 |
+
|
111 |
+
/*
|
112 |
+
* Send the customer off to complete the order payment.
|
113 |
+
* This request should always be a GET, thus we enforce 303 http response code
|
114 |
+
*/
|
115 |
+
header("Location: " . $order->getCheckoutUrl(), true, 303);
|
116 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
117 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
118 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/list-methods.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to get the currently activated payment methods for the Orders API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* Get all the activated methods for this API key.
|
16 |
+
* To get methods that are compatible with the Orders API
|
17 |
+
* we are passing the 'resource' parameter.
|
18 |
+
*/
|
19 |
+
$methods = $mollie->methods->all(['resource' => 'orders']);
|
20 |
+
foreach ($methods as $method) {
|
21 |
+
echo '<div style="line-height:40px; vertical-align:top">';
|
22 |
+
echo '<img src="' . htmlspecialchars($method->image->size1x) . '" srcset="' . htmlspecialchars($method->image->size2x) . ' 2x"> ';
|
23 |
+
echo htmlspecialchars($method->description) . ' (' . htmlspecialchars($method->id) . ')';
|
24 |
+
echo '</div>';
|
25 |
+
}
|
26 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
27 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
28 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/list-orders.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* List orders using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
use Mollie\Api\Resources\OrderCollection;
|
7 |
+
|
8 |
+
try {
|
9 |
+
/*
|
10 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* List the most recent orders
|
16 |
+
*
|
17 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/list-orders
|
18 |
+
*/
|
19 |
+
echo '<ul>';
|
20 |
+
$latestOrders = $mollie->orders->page();
|
21 |
+
printOrders($latestOrders);
|
22 |
+
|
23 |
+
$previousOrders = $latestOrders->next();
|
24 |
+
printOrders($previousOrders);
|
25 |
+
echo '</ul>';
|
26 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
27 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
28 |
+
}
|
29 |
+
|
30 |
+
function printOrders($orders)
|
31 |
+
{
|
32 |
+
if (empty($orders)) {
|
33 |
+
return ;
|
34 |
+
}
|
35 |
+
|
36 |
+
foreach ($orders as $order) {
|
37 |
+
echo '<li><b>Order ' . htmlspecialchars($order->id) . ':</b> (' . htmlspecialchars($order->createdAt) . ')';
|
38 |
+
echo '<br>Status: <b>' . htmlspecialchars($order->status);
|
39 |
+
echo '<table border="1"><tr><th>Billed to</th><th>Shipped to</th><th>Total amount</th></tr>';
|
40 |
+
echo '<tr>';
|
41 |
+
echo '<td>' . htmlspecialchars($order->shippingAddress->givenName) . ' ' . htmlspecialchars($order->shippingAddress->familyName) . '</td>';
|
42 |
+
echo '<td>' . htmlspecialchars($order->billingAddress->givenName) . ' ' . htmlspecialchars($order->billingAddress->familyName) . '</td>';
|
43 |
+
echo '<td>' . htmlspecialchars($order->amount->currency) . str_replace('.', ',', htmlspecialchars($order->amount->value)) . '</td>';
|
44 |
+
echo '</tr>';
|
45 |
+
echo '</table>';
|
46 |
+
echo '<a href="'. $order->getCheckoutUrl() .'" target="_blank">Click here to pay</a>';
|
47 |
+
echo '</li>';
|
48 |
+
}
|
49 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Refund all eligible items for an order using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Refund all eligible items for an order with ID "ord_8wmqcHMN4U".
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/create-order-refund
|
16 |
+
*/
|
17 |
+
|
18 |
+
$order = $mollie->orders->get('ord_8wmqcHMN4U');
|
19 |
+
$refund = $order->refundAll();
|
20 |
+
|
21 |
+
echo 'Refund ' . $refund->id . ' was created for order ' . $order->id;
|
22 |
+
echo 'You will receive ' . $refund->amount->currency . $refund->amount->value;
|
23 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
24 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
25 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Refund some items for an order using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Refund 1 item of order line "odl_dgtxyl" for an order with ID "ord_8wmqcHMN4U".
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/create-order-refund
|
16 |
+
*/
|
17 |
+
|
18 |
+
$order = $mollie->orders->get('ord_8wmqcHMN4U');
|
19 |
+
$refund = $order->refund([
|
20 |
+
'lines' => [
|
21 |
+
[
|
22 |
+
'id' => 'odl_dgtxyl',
|
23 |
+
'quantity' => 1,
|
24 |
+
]
|
25 |
+
],
|
26 |
+
"description" => "Required quantity not in stock, refunding one photo book.",
|
27 |
+
]);
|
28 |
+
|
29 |
+
echo 'Refund ' . $refund->id . ' was created for part of your order ' . $order->id;
|
30 |
+
echo 'You will receive ' . $refund->amount->currency . $refund->amount->value;
|
31 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
32 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
33 |
+
}
|
vendor/mollie/mollie-api-php/examples/orders/webhook.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Handle an order status change using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* After your webhook has been called with the order ID in its body, you'd like
|
14 |
+
* to handle the order's status change. This is how you can do that.
|
15 |
+
*
|
16 |
+
* See: https://docs.mollie.com/reference/v2/orders-api/get-order
|
17 |
+
*/
|
18 |
+
$order = $mollie->orders->get($_POST["id"]);
|
19 |
+
$orderId = $order->metadata->order_id;
|
20 |
+
|
21 |
+
/*
|
22 |
+
* Update the order in the database.
|
23 |
+
*/
|
24 |
+
database_write($orderId, $order->status);
|
25 |
+
|
26 |
+
if ($order->isPaid() || $order->isAuthorized()) {
|
27 |
+
/*
|
28 |
+
* The order is paid or authorized
|
29 |
+
* At this point you'd probably want to start the process of delivering the product to the customer.
|
30 |
+
*/
|
31 |
+
} elseif ($order->isCanceled()) {
|
32 |
+
/*
|
33 |
+
* The order is canceled.
|
34 |
+
*/
|
35 |
+
} elseif ($order->isExpired()) {
|
36 |
+
/*
|
37 |
+
* The order is expired.
|
38 |
+
*/
|
39 |
+
} elseif ($order->isCompleted()) {
|
40 |
+
/*
|
41 |
+
* The order is completed.
|
42 |
+
*/
|
43 |
+
} elseif ($order->isPending()) {
|
44 |
+
/*
|
45 |
+
* The order is pending.
|
46 |
+
*/
|
47 |
+
}
|
48 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
49 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
50 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to prepare an iDEAL payment with the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* First, let the customer pick the bank in a simple HTML form. This step is actually optional.
|
16 |
+
*/
|
17 |
+
if ($_SERVER["REQUEST_METHOD"] != "POST") {
|
18 |
+
$method = $mollie->methods->get(\Mollie\Api\Types\PaymentMethod::IDEAL, ["include" => "issuers"]);
|
19 |
+
|
20 |
+
echo '<form method="post">Select your bank: <select name="issuer">';
|
21 |
+
|
22 |
+
foreach ($method->issuers() as $issuer) {
|
23 |
+
echo '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>';
|
24 |
+
}
|
25 |
+
|
26 |
+
echo '<option value="">or select later</option>';
|
27 |
+
echo '</select><button>OK</button></form>';
|
28 |
+
exit;
|
29 |
+
}
|
30 |
+
|
31 |
+
/*
|
32 |
+
* Generate a unique order id for this example. It is important to include this unique attribute
|
33 |
+
* in the redirectUrl (below) so a proper return page can be shown to the customer.
|
34 |
+
*/
|
35 |
+
$orderId = time();
|
36 |
+
|
37 |
+
/*
|
38 |
+
* Determine the url parts to these example files.
|
39 |
+
*/
|
40 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
41 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
42 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
43 |
+
|
44 |
+
/*
|
45 |
+
* Payment parameters:
|
46 |
+
* amount Amount in EUROs. This example creates a € 27.50 payment.
|
47 |
+
* method Payment method "ideal".
|
48 |
+
* description Description of the payment.
|
49 |
+
* redirectUrl Redirect location. The customer will be redirected there after the payment.
|
50 |
+
* webhookUrl Webhook location, used to report when the payment changes state.
|
51 |
+
* metadata Custom metadata that is stored with the payment.
|
52 |
+
* issuer The customer's bank. If empty the customer can select it later.
|
53 |
+
*/
|
54 |
+
$payment = $mollie->payments->create([
|
55 |
+
"amount" => [
|
56 |
+
"currency" => "EUR",
|
57 |
+
"value" => "27.50" // You must send the correct number of decimals, thus we enforce the use of strings
|
58 |
+
],
|
59 |
+
"method" => \Mollie\Api\Types\PaymentMethod::IDEAL,
|
60 |
+
"description" => "Order #{$orderId}",
|
61 |
+
"redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}",
|
62 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php",
|
63 |
+
"metadata" => [
|
64 |
+
"order_id" => $orderId,
|
65 |
+
],
|
66 |
+
"issuer" => !empty($_POST["issuer"]) ? $_POST["issuer"] : null
|
67 |
+
]);
|
68 |
+
|
69 |
+
/*
|
70 |
+
* In this example we store the order with its payment status in a database.
|
71 |
+
*/
|
72 |
+
database_write($orderId, $payment->status);
|
73 |
+
|
74 |
+
/*
|
75 |
+
* Send the customer off to complete the payment.
|
76 |
+
* This request should always be a GET, thus we enforce 303 http response code
|
77 |
+
*/
|
78 |
+
header("Location: " . $payment->getCheckoutUrl(), true, 303);
|
79 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
80 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
81 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Example 10 - Using OAuth access token to prepare a new payment.
|
4 |
+
*/
|
5 |
+
try
|
6 |
+
{
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
/*
|
12 |
+
* Generate a unique order id for this example. It is important to include this unique attribute
|
13 |
+
* in the redirectUrl (below) so a proper return page can be shown to the customer.
|
14 |
+
*/
|
15 |
+
$orderId = time();
|
16 |
+
/*
|
17 |
+
* Determine the url parts to these example files.
|
18 |
+
*/
|
19 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
20 |
+
$hostname = $_SERVER['HTTP_HOST'] ? : "my.app";
|
21 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
22 |
+
/*
|
23 |
+
* Since unlike an API key the OAuth access token does NOT belong to a profile, we need to retrieve a profile
|
24 |
+
* so we can specify the profileId-parameter when creating a payment below.
|
25 |
+
*/
|
26 |
+
$profiles = $mollie->profiles->page();
|
27 |
+
$profile = reset($profiles);
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Paramaters for creating a payment via oAuth
|
31 |
+
*
|
32 |
+
* @See https://docs.mollie.com/reference/v2/payments-api/create-payment
|
33 |
+
*/
|
34 |
+
$payment = $mollie->payments->create([
|
35 |
+
"amount" => [
|
36 |
+
"value" => "10.00",
|
37 |
+
"currency" => "EUR"
|
38 |
+
],
|
39 |
+
"description" => "My first API payment",
|
40 |
+
"redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}",
|
41 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php",
|
42 |
+
"metadata" => [
|
43 |
+
"order_id" => $orderId,
|
44 |
+
],
|
45 |
+
"profileId" => $profile->id // This is specifically necessary for payment resources via OAuth access.
|
46 |
+
]);
|
47 |
+
|
48 |
+
/*
|
49 |
+
* In this example we store the order with its payment status in a database.
|
50 |
+
*/
|
51 |
+
database_write($orderId, $payment->status);
|
52 |
+
|
53 |
+
/*
|
54 |
+
* Send the customer off to complete the payment.
|
55 |
+
* This request should always be a GET, thus we enforce 303 http response code
|
56 |
+
*/
|
57 |
+
if (PHP_SAPI === "cli")
|
58 |
+
{
|
59 |
+
echo "Redirect to: " . $payment->getCheckoutUrl() . PHP_EOL;
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
header("Location: " . $payment->getCheckoutUrl(), true, 303);
|
63 |
+
}
|
64 |
+
catch (\Mollie\Api\Exceptions\ApiException $e)
|
65 |
+
{
|
66 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
67 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/create-payment.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to prepare a new payment with the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* Generate a unique order id for this example. It is important to include this unique attribute
|
16 |
+
* in the redirectUrl (below) so a proper return page can be shown to the customer.
|
17 |
+
*/
|
18 |
+
$orderId = time();
|
19 |
+
|
20 |
+
/*
|
21 |
+
* Determine the url parts to these example files.
|
22 |
+
*/
|
23 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
24 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
25 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
26 |
+
|
27 |
+
/*
|
28 |
+
* Payment parameters:
|
29 |
+
* amount Amount in EUROs. This example creates a € 10,- payment.
|
30 |
+
* description Description of the payment.
|
31 |
+
* redirectUrl Redirect location. The customer will be redirected there after the payment.
|
32 |
+
* webhookUrl Webhook location, used to report when the payment changes state.
|
33 |
+
* metadata Custom metadata that is stored with the payment.
|
34 |
+
*/
|
35 |
+
$payment = $mollie->payments->create([
|
36 |
+
"amount" => [
|
37 |
+
"currency" => "EUR",
|
38 |
+
"value" => "10.00" // You must send the correct number of decimals, thus we enforce the use of strings
|
39 |
+
],
|
40 |
+
"description" => "Order #{$orderId}",
|
41 |
+
"redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}",
|
42 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php",
|
43 |
+
"metadata" => [
|
44 |
+
"order_id" => $orderId,
|
45 |
+
],
|
46 |
+
]);
|
47 |
+
|
48 |
+
/*
|
49 |
+
* In this example we store the order with its payment status in a database.
|
50 |
+
*/
|
51 |
+
database_write($orderId, $payment->status);
|
52 |
+
|
53 |
+
/*
|
54 |
+
* Send the customer off to complete the payment.
|
55 |
+
* This request should always be a GET, thus we enforce 303 http response code
|
56 |
+
*/
|
57 |
+
header("Location: " . $payment->getCheckoutUrl(), true, 303);
|
58 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
59 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
60 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/list-methods.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to get the currently activated payment methods for the Payments API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
/*
|
14 |
+
* Get all the activated methods for this API key.
|
15 |
+
* By default we are using the resource "payments".
|
16 |
+
* See the orders folder for an example with the Orders API.
|
17 |
+
*/
|
18 |
+
$methods = $mollie->methods->all();
|
19 |
+
foreach ($methods as $method) {
|
20 |
+
echo '<div style="line-height:40px; vertical-align:top">';
|
21 |
+
echo '<img src="' . htmlspecialchars($method->image->size1x) . '" srcset="' . htmlspecialchars($method->image->size2x) . ' 2x"> ';
|
22 |
+
echo htmlspecialchars($method->description) . ' (' . htmlspecialchars($method->id) . ')';
|
23 |
+
echo '</div>';
|
24 |
+
}
|
25 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
26 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
27 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/list-payments.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to list your payments.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* Determine the url parts to these example files.
|
16 |
+
*/
|
17 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
18 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
19 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
20 |
+
|
21 |
+
/*
|
22 |
+
* Get the all payments for this API key ordered by newest.
|
23 |
+
*/
|
24 |
+
$payments = $mollie->payments->page();
|
25 |
+
|
26 |
+
echo "<ul>";
|
27 |
+
foreach ($payments as $payment) {
|
28 |
+
echo "<li>";
|
29 |
+
echo "<strong style='font-family: monospace'>" . htmlspecialchars($payment->id) . "</strong><br />";
|
30 |
+
echo htmlspecialchars($payment->description) . "<br />";
|
31 |
+
echo htmlspecialchars($payment->amount->currency) . " " . htmlspecialchars($payment->amount->value) . "<br />";
|
32 |
+
|
33 |
+
echo "Status: " . htmlspecialchars($payment->status) . "<br />";
|
34 |
+
|
35 |
+
if ($payment->hasRefunds()) {
|
36 |
+
echo "Payment has been (partially) refunded.<br />";
|
37 |
+
}
|
38 |
+
|
39 |
+
if ($payment->hasChargebacks()) {
|
40 |
+
echo "Payment has been charged back.<br />";
|
41 |
+
}
|
42 |
+
|
43 |
+
if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') {
|
44 |
+
echo " (<a href=\"{$protocol}://{$hostname}{$path}/payments/refund-payment.php?payment_id=" . htmlspecialchars($payment->id) . "\">refund</a>)";
|
45 |
+
}
|
46 |
+
|
47 |
+
echo "</li>";
|
48 |
+
}
|
49 |
+
echo "</ul>";
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get the next set of Payments if applicable
|
53 |
+
*/
|
54 |
+
$nextPayments = $payments->next();
|
55 |
+
|
56 |
+
if (!empty($nextPayments)) {
|
57 |
+
echo "<ul>";
|
58 |
+
foreach ($nextPayments as $payment) {
|
59 |
+
echo "<li>";
|
60 |
+
echo "<strong style='font-family: monospace'>" . htmlspecialchars($payment->id) . "</strong><br />";
|
61 |
+
echo htmlspecialchars($payment->description) . "<br />";
|
62 |
+
echo htmlspecialchars($payment->amount->currency) . " " . htmlspecialchars($payment->amount->value) . "<br />";
|
63 |
+
|
64 |
+
echo "Status: " . htmlspecialchars($payment->status) . "<br />";
|
65 |
+
|
66 |
+
if ($payment->hasRefunds()) {
|
67 |
+
echo "Payment has been (partially) refunded.<br />";
|
68 |
+
}
|
69 |
+
|
70 |
+
if ($payment->hasChargebacks()) {
|
71 |
+
echo "Payment has been charged back.<br />";
|
72 |
+
}
|
73 |
+
|
74 |
+
if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') {
|
75 |
+
echo " (<a href=\"{$protocol}://{$hostname}{$path}/payments/refund-payment.php?payment_id=" . htmlspecialchars($payment->id) . "\">refund</a>)";
|
76 |
+
}
|
77 |
+
|
78 |
+
echo "</li>";
|
79 |
+
}
|
80 |
+
echo "</ul>";
|
81 |
+
}
|
82 |
+
|
83 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
84 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
85 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/refund-payment.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to refund a payment programmatically
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key.
|
9 |
+
*
|
10 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
11 |
+
*/
|
12 |
+
require "../initialize.php";
|
13 |
+
|
14 |
+
/*
|
15 |
+
* Determine the url parts to these example files.
|
16 |
+
*/
|
17 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
18 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
19 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
20 |
+
|
21 |
+
if (isset($_GET['payment_id'])) {
|
22 |
+
/*
|
23 |
+
* Retrieve the payment you want to refund from the API.
|
24 |
+
*/
|
25 |
+
$paymentId = $_GET['payment_id'];
|
26 |
+
$payment = $mollie->payments->get($paymentId);
|
27 |
+
|
28 |
+
if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') {
|
29 |
+
/*
|
30 |
+
* Refund € 2,00 of the payment.
|
31 |
+
*
|
32 |
+
* https://docs.mollie.com/reference/v2/refunds-api/create-refund
|
33 |
+
*/
|
34 |
+
$refund = $payment->refund([
|
35 |
+
"amount" => [
|
36 |
+
"currency" => "EUR",
|
37 |
+
"value" => "2.00" // You must send the correct number of decimals, thus we enforce the use of strings
|
38 |
+
]
|
39 |
+
]);
|
40 |
+
|
41 |
+
echo "{$refund->amount->currency} {$refund->amount->value} of payment {$paymentId} refunded.", PHP_EOL;
|
42 |
+
} else {
|
43 |
+
echo "Payment {$paymentId} can not be refunded.", PHP_EOL;
|
44 |
+
}
|
45 |
+
|
46 |
+
/*
|
47 |
+
* Retrieve all refunds on a payment.
|
48 |
+
*/
|
49 |
+
echo "<ul>";
|
50 |
+
foreach ($payment->refunds() as $refund) {
|
51 |
+
echo "<li>";
|
52 |
+
echo "<strong style='font-family: monospace'>" . htmlspecialchars($refund->id) . "</strong><br />";
|
53 |
+
echo htmlspecialchars($refund->description) . "<br />";
|
54 |
+
echo htmlspecialchars($refund->amount->currency) . " " . htmlspecialchars($refund->amount->value) . "<br />";
|
55 |
+
echo "Status: " . htmlspecialchars($refund->status);
|
56 |
+
echo "</li>";
|
57 |
+
}
|
58 |
+
echo "</ul>";
|
59 |
+
}
|
60 |
+
|
61 |
+
echo "Refund payment: ";
|
62 |
+
echo "<form method='get'><input name='payment_id' value='tr_xxx'/><input type='submit' /></form>";
|
63 |
+
|
64 |
+
echo "<p>";
|
65 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/payments/create-payment.php">Create a payment</a><br>';
|
66 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/payments/create-ideal-payment.php">Create an iDEAL payment</a><br>';
|
67 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/payments/list-payments.php">List payments</a><br>';
|
68 |
+
echo "</p>";
|
69 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
70 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
71 |
+
}
|
vendor/mollie/mollie-api-php/examples/payments/return.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to show a return page to the customer.
|
4 |
+
*
|
5 |
+
* In this example we retrieve the order stored in the database.
|
6 |
+
* Here, it's unnecessary to use the Mollie API Client.
|
7 |
+
*/
|
8 |
+
|
9 |
+
/*
|
10 |
+
* NOTE: The examples are using a text file as a database.
|
11 |
+
* Please use a real database like MySQL in production code.
|
12 |
+
*/
|
13 |
+
require_once "../functions.php";
|
14 |
+
|
15 |
+
$status = database_read($_GET["order_id"]);
|
16 |
+
|
17 |
+
/*
|
18 |
+
* Determine the url parts to these example files.
|
19 |
+
*/
|
20 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
21 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
22 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
23 |
+
|
24 |
+
echo "<p>Your payment status is '" . htmlspecialchars($status) . "'.</p>";
|
25 |
+
echo "<p>";
|
26 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/payments/create-payment.php">Create a payment</a><br>';
|
27 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/payments/create-ideal-payment.php">Create an iDEAL payment</a><br>';
|
28 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/payments/list-payments.php">List payments</a><br>';
|
29 |
+
echo "</p>";
|
vendor/mollie/mollie-api-php/examples/payments/webhook.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to verify Mollie API Payments in a webhook.
|
4 |
+
*
|
5 |
+
* See: https://docs.mollie.com/guides/webhooks
|
6 |
+
*/
|
7 |
+
|
8 |
+
try {
|
9 |
+
/*
|
10 |
+
* Initialize the Mollie API library with your API key.
|
11 |
+
*
|
12 |
+
* See: https://www.mollie.com/dashboard/developers/api-keys
|
13 |
+
*/
|
14 |
+
require "../initialize.php";
|
15 |
+
|
16 |
+
/*
|
17 |
+
* Retrieve the payment's current state.
|
18 |
+
*/
|
19 |
+
$payment = $mollie->payments->get($_POST["id"]);
|
20 |
+
$orderId = $payment->metadata->order_id;
|
21 |
+
|
22 |
+
/*
|
23 |
+
* Update the order in the database.
|
24 |
+
*/
|
25 |
+
database_write($orderId, $payment->status);
|
26 |
+
|
27 |
+
if ($payment->isPaid() && !$payment->hasRefunds() && !$payment->hasChargebacks()) {
|
28 |
+
/*
|
29 |
+
* The payment is paid and isn't refunded or charged back.
|
30 |
+
* At this point you'd probably want to start the process of delivering the product to the customer.
|
31 |
+
*/
|
32 |
+
} elseif ($payment->isOpen()) {
|
33 |
+
/*
|
34 |
+
* The payment is open.
|
35 |
+
*/
|
36 |
+
} elseif ($payment->isPending()) {
|
37 |
+
/*
|
38 |
+
* The payment is pending.
|
39 |
+
*/
|
40 |
+
} elseif ($payment->isFailed()) {
|
41 |
+
/*
|
42 |
+
* The payment has failed.
|
43 |
+
*/
|
44 |
+
} elseif ($payment->isExpired()) {
|
45 |
+
/*
|
46 |
+
* The payment is expired.
|
47 |
+
*/
|
48 |
+
} elseif ($payment->isCanceled()) {
|
49 |
+
/*
|
50 |
+
* The payment has been canceled.
|
51 |
+
*/
|
52 |
+
} elseif ($payment->hasRefunds()) {
|
53 |
+
/*
|
54 |
+
* The payment has been (partially) refunded.
|
55 |
+
* The status of the payment is still "paid"
|
56 |
+
*/
|
57 |
+
} elseif ($payment->hasChargebacks()) {
|
58 |
+
/*
|
59 |
+
* The payment has been (partially) charged back.
|
60 |
+
* The status of the payment is still "paid"
|
61 |
+
*/
|
62 |
+
}
|
63 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
64 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
65 |
+
}
|
vendor/mollie/mollie-api-php/examples/profiles/create-profile.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Create a profile via the Mollie API.
|
4 |
+
*/
|
5 |
+
try
|
6 |
+
{
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Create the profile
|
14 |
+
*
|
15 |
+
* @See https://docs.mollie.com/reference/v2/profiles-api/create-profile
|
16 |
+
*/
|
17 |
+
$profile = $mollie->profiles->create([
|
18 |
+
"name" => "My website name",
|
19 |
+
"website" => "https://www.mywebsite.com",
|
20 |
+
"email" => "info@mywebsite.com",
|
21 |
+
"phone" => "+31208202070",
|
22 |
+
"categoryCode" => 5399,
|
23 |
+
"mode" => "live",
|
24 |
+
]);
|
25 |
+
echo "<p>Profile created: " . htmlspecialchars($profile->name) . "</p>";
|
26 |
+
}
|
27 |
+
catch (\Mollie\Api\Exceptions\ApiException $e)
|
28 |
+
{
|
29 |
+
echo "<p>API call failed: " . htmlspecialchars($e->getMessage()) . "</p>";
|
30 |
+
}
|
vendor/mollie/mollie-api-php/examples/profiles/delete-profile.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Delete a profile via the Mollie API.
|
4 |
+
*/
|
5 |
+
try
|
6 |
+
{
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Delete a profile via the profileId
|
14 |
+
*
|
15 |
+
* @See https://docs.mollie.com/reference/v2/profiles-api/delete-profile
|
16 |
+
*/
|
17 |
+
$profile = $mollie->profiles->delete("pfl_v9hTwCvYqw");
|
18 |
+
echo "<p>Profile deleted</p>";
|
19 |
+
}
|
20 |
+
catch (\Mollie\Api\Exceptions\ApiException $e)
|
21 |
+
{
|
22 |
+
echo "<p>API call failed: " . htmlspecialchars($e->getMessage()) . "</p>";
|
23 |
+
}
|
vendor/mollie/mollie-api-php/examples/profiles/list-profiles.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Using OAuth access token to list profiles of an account.
|
4 |
+
*/
|
5 |
+
try
|
6 |
+
{
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Get the all the profiles for this account.
|
14 |
+
*/
|
15 |
+
$profiles = $mollie->profiles->page();
|
16 |
+
foreach ($profiles as $profile)
|
17 |
+
{
|
18 |
+
echo '<div style="line-height:40px; vertical-align:top">';
|
19 |
+
echo htmlspecialchars($profile->name) .
|
20 |
+
' - ' . htmlspecialchars($profile->website) .
|
21 |
+
' (' . htmlspecialchars($profile->id) . ')';
|
22 |
+
echo '</div>';
|
23 |
+
}
|
24 |
+
}
|
25 |
+
catch (\Mollie\Api\Exceptions\ApiException $e)
|
26 |
+
{
|
27 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
28 |
+
}
|
vendor/mollie/mollie-api-php/examples/profiles/update-profile.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Updating an existing profile via the Mollie API.
|
4 |
+
*/
|
5 |
+
try
|
6 |
+
{
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve an existing profile by his profileId
|
14 |
+
*/
|
15 |
+
$profile = $mollie->profiles->get("pfl_eA4MSz7Bvy");
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Profile fields that can be updated.
|
19 |
+
*
|
20 |
+
* @See https://docs.mollie.com/reference/v2/profiles-api/update-profile
|
21 |
+
*/
|
22 |
+
$profile->name = "Mollie B.V.";
|
23 |
+
$profile->website = 'www.mollie.com';
|
24 |
+
$profile->email = 'info@mollie.com';
|
25 |
+
$profile->phone = '0612345670';
|
26 |
+
$profile->categoryCode = 5399;
|
27 |
+
$profile->update();
|
28 |
+
echo "<p>Profile updated: " . htmlspecialchars($profile->name) . "</p>";
|
29 |
+
}
|
30 |
+
catch (\Mollie\Api\Exceptions\ApiException $e)
|
31 |
+
{
|
32 |
+
echo "<p>API call failed: " . htmlspecialchars($e->getMessage()) . "</p>";
|
33 |
+
}
|
vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Using OAuth access token to list settlements of an account.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize_with_oauth.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Get the all the settlements for this account.
|
14 |
+
*/
|
15 |
+
$settlements = $mollie->settlements->page();
|
16 |
+
echo '<ul>';
|
17 |
+
foreach ($settlements as $settlement) {
|
18 |
+
echo '<li><b>Settlement ' . htmlspecialchars($settlement->reference) . ':</b> (' . htmlspecialchars($settlement->createdAt) . ')';
|
19 |
+
echo '<table border="1"><tr><th>Month</th><th>Description</th><th>Count</th><th>Net</th><th>VAT</th><th>Gross</th></tr>';
|
20 |
+
// Convert from stdClass to array
|
21 |
+
$settlement_periods = json_decode(json_encode($settlement->periods), TRUE);
|
22 |
+
foreach ($settlement_periods as $year => $months) {
|
23 |
+
foreach ($months as $month => $monthly_settlement) {
|
24 |
+
foreach ($monthly_settlement['revenue'] as $revenue) {
|
25 |
+
echo '<tr>';
|
26 |
+
echo '<td>' . htmlspecialchars($year . '-' . $month) . '</td>';
|
27 |
+
echo '<td>' . htmlspecialchars($revenue['description']) . '</td>';
|
28 |
+
echo '<td align="right">' . htmlspecialchars($revenue['count']) . ' x</td>';
|
29 |
+
echo '<td align="right">' . htmlspecialchars($revenue['amountNet']['value'] ? $revenue['amountNet']['value'] . " " . $revenue['amountNet']['currency'] : '-') . '</td>';
|
30 |
+
echo '<td align="right">' . htmlspecialchars($revenue['amountVat']['value'] ? $revenue['amountVat']['value'] . " " . $revenue['amountVat']['currency'] : '-') . '</td>';
|
31 |
+
echo '<td align="right">' . htmlspecialchars($revenue['amountGross']['value'] ? $revenue['amountGross']['value'] . " " . $revenue['amountGross']['currency'] : '-') . '</td>';
|
32 |
+
echo '</tr>';
|
33 |
+
}
|
34 |
+
foreach ($monthly_settlement['costs'] as $revenue) {
|
35 |
+
echo '<tr>';
|
36 |
+
echo '<td>' . htmlspecialchars($year . '-' . $month) . '</td>';
|
37 |
+
echo '<td>' . htmlspecialchars($revenue['description']) . '</td>';
|
38 |
+
echo '<td align="right">' . htmlspecialchars($revenue['count']) . ' x</td>';
|
39 |
+
echo '<td align="right">' . htmlspecialchars($revenue['amountNet']['value'] ? $revenue['amountNet']['value'] . " " . $revenue['amountNet']['currency'] : '-') . '</td>';
|
40 |
+
echo '<td align="right">' . htmlspecialchars($revenue['amountVat']['value'] ? $revenue['amountVat']['value'] . " " . $revenue['amountVat']['currency'] : '-') . '</td>';
|
41 |
+
echo '<td align="right">' . htmlspecialchars($revenue['amountGross']['value'] ? $revenue['amountGross']['value'] . " " . $revenue['amountGross']['currency'] : '-') . '</td>';
|
42 |
+
echo '</tr>';
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
echo '<tr><th colspan="5" align="right">TOTAL</th><th align="right">' . htmlspecialchars($settlement->amount->value . " " . $settlement->amount->currency) . '</th></tr>';
|
47 |
+
echo '</table>';
|
48 |
+
echo '</li>';
|
49 |
+
}
|
50 |
+
echo '</ul>';
|
51 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
52 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
53 |
+
}
|
vendor/mollie/mollie-api-php/examples/shipments/create-shipment-all.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Create a shipment for an entire order using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Create a shipment for the entire order with ID "ord_8wmqcHMN4U"
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/shipments-api/create-shipment
|
16 |
+
*/
|
17 |
+
|
18 |
+
$order = $mollie->orders->get('ord_8wmqcHMN4U');
|
19 |
+
$shipment = $order->shipAll();
|
20 |
+
|
21 |
+
echo 'A shipment with ID ' . $shipment->id. ' has been created for your order with ID ' . $order->id . '.';
|
22 |
+
foreach ($shipment->lines as $line) {
|
23 |
+
echo $line->name . ' - status: <b>' . $line->status . '</b>.';
|
24 |
+
}
|
25 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
26 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
27 |
+
}
|
vendor/mollie/mollie-api-php/examples/shipments/create-shipment-partial.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Example 32 - Create a shipment for part of an order using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "./initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Create a shipment for only two lines of the order with ID "ord_8wmqcHMN4U".
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/shipments-api/create-shipment
|
16 |
+
*/
|
17 |
+
|
18 |
+
$order = $this->getOrder('ord_8wmqcHMN4U');
|
19 |
+
$lineId1 = $order->lines()[0]->id;
|
20 |
+
$lineId2 = $order->lines()[1]->id;
|
21 |
+
$shipment = $order->createShipment(
|
22 |
+
[
|
23 |
+
'lines' => [
|
24 |
+
[
|
25 |
+
'id' => $lineId1,
|
26 |
+
// assume all is shipped if no quantity is specified
|
27 |
+
],
|
28 |
+
[
|
29 |
+
'id' => $lineId2,
|
30 |
+
'quantity' => 1, // you can set the quantity if not all is shipped at once
|
31 |
+
],
|
32 |
+
],
|
33 |
+
]
|
34 |
+
);
|
35 |
+
|
36 |
+
echo 'A shipment with ID ' . $shipment->id. ' has been created for your order with ID ' . $order->id . '.';
|
37 |
+
foreach ($shipment->lines as $line) {
|
38 |
+
echo $line->name . '- status: <b>' . $line->status . '</b>.';
|
39 |
+
}
|
40 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
41 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
42 |
+
}
|
vendor/mollie/mollie-api-php/examples/shipments/get-shipment.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Retrieve a shipment using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve a shipment with ID "shp_3wmsgCJN4U" for the order with ID "ord_8wmqcHMN4U".
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/shipments-api/get-shipment
|
16 |
+
*/
|
17 |
+
|
18 |
+
$order = $mollie->orders->get('ord_8wmqcHMN4U');
|
19 |
+
$shipment = $order->getShipment("shp_3wmsgCJN4U");
|
20 |
+
|
21 |
+
echo 'Shipment with ID ' . $shipment->id. ' for order with ID ' . $order->id . '.';
|
22 |
+
foreach ($shipment->lines as $line) {
|
23 |
+
echo $line->name . ' - status: <b>' . $line->status . '</b>.';
|
24 |
+
}
|
25 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
26 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
27 |
+
}
|
vendor/mollie/mollie-api-php/examples/shipments/list-shipments.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* List shipment for an order using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Listing shipments for the order with ID "ord_8wmqcHMN4U".
|
14 |
+
*
|
15 |
+
* See: https://docs.mollie.com/reference/v2/shipments-api/get-shipment
|
16 |
+
*/
|
17 |
+
|
18 |
+
$order = $mollie->orders->get('ord_8wmqcHMN4U');
|
19 |
+
$shipments = $order->shipments();
|
20 |
+
|
21 |
+
echo 'Shipments for order with ID ' . $order->id . ':';
|
22 |
+
foreach ($shipments as $shipment) {
|
23 |
+
echo 'Shipment ' . $shipment->id . '. Items:';
|
24 |
+
foreach ($shipment->lines as $line) {
|
25 |
+
echo $line->name . ' - status: <b>' . $line->status . '</b>.';
|
26 |
+
}
|
27 |
+
}
|
28 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
29 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
30 |
+
}
|
vendor/mollie/mollie-api-php/examples/shipments/update-shipment.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Update shipment tracking information using the Mollie API.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Update the tracking information for a shipment with ID "shp_3wmsgCJN4U" and
|
14 |
+
* order ID "ord_8wmqcHMN4U"
|
15 |
+
*
|
16 |
+
* See: https://docs.mollie.com/reference/v2/shipments-api/update-shipment
|
17 |
+
*/
|
18 |
+
|
19 |
+
$order = $mollie->orders->get('ord_8wmqcHMN4U');
|
20 |
+
$shipment = $order->getShipment("shp_3wmsgCJN4U");
|
21 |
+
|
22 |
+
$shipment->tracking = [
|
23 |
+
'carrier' => 'PostNL',
|
24 |
+
'code' => '3SKABA000000000',
|
25 |
+
'url' => 'http://postnl.nl/tracktrace/?B=3SKABA000000000&P=1016EE&D=NL&T=C',
|
26 |
+
];
|
27 |
+
$shipment = $shipment->update();
|
28 |
+
|
29 |
+
echo 'Shipment with ID ' . $shipment->id. ' for order with ID ' . $order->id . '.';
|
30 |
+
echo 'Tracking information updated:';
|
31 |
+
echo 'Carrier: ' . $shipment->tracking->carrier;
|
32 |
+
echo 'Code: ' . $shipment->tracking->code;
|
33 |
+
echo 'Url: ' . $shipment->tracking->url;
|
34 |
+
|
35 |
+
foreach ($shipment->lines as $line) {
|
36 |
+
echo $line->name . ' - status: <b>' . $line->status . '</b>.';
|
37 |
+
}
|
38 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
39 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
40 |
+
}
|
vendor/mollie/mollie-api-php/examples/subscriptions/cancel-subscription.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to cancel a subscription.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Retrieve the last created customer for this example.
|
14 |
+
* If no customers are created yet, run the create-customer example.
|
15 |
+
*/
|
16 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
17 |
+
|
18 |
+
/*
|
19 |
+
* The subscription ID, starting with sub_
|
20 |
+
*/
|
21 |
+
$subscriptionId = isset($_GET['subscription_id']) ? $_GET['subscription_id'] : '';
|
22 |
+
|
23 |
+
/*
|
24 |
+
* Customer Subscription deletion parameters.
|
25 |
+
*
|
26 |
+
* See: https://www.mollie.com/nl/docs/reference/subscriptions/delete
|
27 |
+
*/
|
28 |
+
$canceledSubscription = $customer->cancelSubscription($subscriptionId);
|
29 |
+
|
30 |
+
/*
|
31 |
+
* The subscription status should now be canceled
|
32 |
+
*/
|
33 |
+
echo "<p>The subscription status is now: '" . htmlspecialchars($canceledSubscription->status) . "'.</p>\n";
|
34 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
35 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
36 |
+
}
|
vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* How to create a regular subscription.
|
4 |
+
*/
|
5 |
+
|
6 |
+
try {
|
7 |
+
/*
|
8 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
9 |
+
*/
|
10 |
+
require "../initialize.php";
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Determine the url parts to these example files.
|
14 |
+
*/
|
15 |
+
$protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
|
16 |
+
$hostname = $_SERVER['HTTP_HOST'];
|
17 |
+
$path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
|
18 |
+
|
19 |
+
/*
|
20 |
+
* Retrieve the last created customer for this example.
|
21 |
+
* If no customers are created yet, run create-customer example.
|
22 |
+
*/
|
23 |
+
$customer = $mollie->customers->page(null, 1)[0];
|
24 |
+
|
25 |
+
/*
|
26 |
+
* Generate a unique subscription id for this example. It is important to include this unique attribute
|
27 |
+
* in the webhookUrl (below) so new payments can be associated with this subscription.
|
28 |
+
*/
|
29 |
+
$subscriptionId = time();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Customer Subscription creation parameters.
|
33 |
+
*
|
34 |
+
* @See: https://docs.mollie.com/reference/v2/subscriptions-api/create-subscription
|
35 |
+
*/
|
36 |
+
$subscription = $customer->createSubscription([
|
37 |
+
"amount" => [
|
38 |
+
"value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings
|
39 |
+
"currency" => "EUR"
|
40 |
+
],
|
41 |
+
"times" => 12,
|
42 |
+
"interval" => "1 month",
|
43 |
+
"description" => "Subscription #{$subscriptionId}",
|
44 |
+
"webhookUrl" => "{$protocol}://{$hostname}{$path}/subscriptions/webhook.php",
|
45 |
+
"metadata" => [
|
46 |
+
"subscription_id" => $subscriptionId
|
47 |
+
],
|
48 |
+
]);
|
49 |
+
|
50 |
+
/*
|
51 |
+
* The subscription will be either pending or active depending on whether the customer has
|
52 |
+
* a pending or valid mandate. If the customer has no mandates an error is returned. You
|
53 |
+
* should then set up a "first payment" for the customer.
|
54 |
+
*/
|
55 |
+
echo "<p>The subscription status is '" . htmlspecialchars($subscription->status) . "'.</p>\n";
|
56 |
+
echo "<p>";
|
57 |
+
echo '<a href="' . $protocol . '://' . $hostname . $path . '/17-cancel-subscription.php?subscription_id=' . $subscription->id . '">18-cancel-subscription</a><br>';
|
58 |
+
echo "</p>";
|
59 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
60 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
61 |
+
}
|
vendor/mollie/mollie-api-php/examples/subscriptions/update-subscription.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Updating an existing subscription via the Mollie API.
|
4 |
+
*/
|
5 |
+
try {
|
6 |
+
/*
|
7 |
+
* Initialize the Mollie API library with your API key or OAuth access token.
|
8 |
+
*/
|
9 |
+
require "../initialize.php";
|
10 |
+
|
11 |
+
/*
|
12 |
+
* Retrieve an existing subscription
|
13 |
+
*/
|
14 |
+
$customer = $mollie->customers->get("cst_cUe8HjeBuz");
|
15 |
+
$subscription = $customer->getSubscription("sub_DRjwaT5qHx");
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Subscription fields that can be updated are described by the link:
|
19 |
+
* See https://docs.mollie.com/reference/v2/subscriptions-api/update-subscription
|
20 |
+
*/
|
21 |
+
$subscription->times = 10;
|
22 |
+
$subscription->startDate = '2018-12-02'; // Year-month-day
|
23 |
+
$subscription->amount = (object)['value' => '12.12', 'currency' => 'EUR'];
|
24 |
+
$subscription->webhookUrl = 'https://some-webhook-url.com/with/path';
|
25 |
+
$subscription->description = 'Monthly subscription';
|
26 |
+
$subscription->update();
|
27 |
+
|
28 |
+
echo "<p>Subscription updated: " . $subscription->id . "</p>";
|
29 |
+
} catch (\Mollie\Api\Exceptions\ApiException $e) {
|
30 |
+
echo "API call failed: " . htmlspecialchars($e->getMessage());
|
31 |
+
}
|
{includes → vendor/mollie}/mollie-api-php/src/CompatibilityChecker.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/ChargebackEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/CollectionEndpointAbstract.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/CustomerEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/CustomerPaymentsEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/EndpointAbstract.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/InvoiceEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/MandateEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/MethodEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/OnboardingEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderLineEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderPaymentEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/OrganizationEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentCaptureEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentChargebackEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/PaymentRefundEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/PermissionEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/ProfileEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/ProfileMethodEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/RefundEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/SettlementsEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/ShipmentEndpoint.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Endpoints/SubscriptionEndpoint.php
RENAMED
@@ -2,9 +2,8 @@
|
|
2 |
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
5 |
-
use Mollie\Api\Resources\BaseCollection;
|
6 |
-
use Mollie\Api\Resources\BaseResource;
|
7 |
use Mollie\Api\Resources\Customer;
|
|
|
8 |
use Mollie\Api\Resources\Subscription;
|
9 |
use Mollie\Api\Resources\SubscriptionCollection;
|
10 |
|
@@ -94,4 +93,32 @@ class SubscriptionEndpoint extends CollectionEndpointAbstract
|
|
94 |
|
95 |
return parent::rest_delete($subscriptionId, $data);
|
96 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
2 |
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
|
|
|
|
5 |
use Mollie\Api\Resources\Customer;
|
6 |
+
use Mollie\Api\Resources\ResourceFactory;
|
7 |
use Mollie\Api\Resources\Subscription;
|
8 |
use Mollie\Api\Resources\SubscriptionCollection;
|
9 |
|
93 |
|
94 |
return parent::rest_delete($subscriptionId, $data);
|
95 |
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Retrieves a collection of Subscriptions from Mollie.
|
99 |
+
*
|
100 |
+
* @param string $from The first payment ID you want to include in your list.
|
101 |
+
* @param int $limit
|
102 |
+
* @param array $parameters
|
103 |
+
*
|
104 |
+
* @return SubscriptionCollection
|
105 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
106 |
+
*/
|
107 |
+
public function page($from = null, $limit = null, array $parameters = [])
|
108 |
+
{
|
109 |
+
$filters = array_merge(["from" => $from, "limit" => $limit], $parameters);
|
110 |
+
|
111 |
+
$apiPath = 'subscriptions' . $this->buildQueryString($filters);
|
112 |
+
|
113 |
+
$result = $this->client->performHttpCall(self::REST_LIST, $apiPath);
|
114 |
+
|
115 |
+
/** @var SubscriptionCollection $collection */
|
116 |
+
$collection = $this->getResourceCollectionObject($result->count, $result->_links);
|
117 |
+
|
118 |
+
foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) {
|
119 |
+
$collection[] = ResourceFactory::createFromApiResult($dataResult, $this->getResourceObject());
|
120 |
+
}
|
121 |
+
|
122 |
+
return $collection;
|
123 |
+
}
|
124 |
}
|
vendor/mollie/mollie-api-php/src/Endpoints/WalletEndpoint.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Endpoints;
|
4 |
+
|
5 |
+
use Mollie\Api\Resources\BaseResource;
|
6 |
+
|
7 |
+
class WalletEndpoint extends EndpointAbstract
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
|
11 |
+
*
|
12 |
+
* @return BaseResource
|
13 |
+
*/
|
14 |
+
protected function getResourceObject()
|
15 |
+
{
|
16 |
+
// Not used
|
17 |
+
}
|
18 |
+
|
19 |
+
public function requestApplePayPaymentSession($domain, $validationUrl)
|
20 |
+
{
|
21 |
+
$body = $this->parseRequestBody([
|
22 |
+
'domain'=> $domain,
|
23 |
+
'validationUrl' => $validationUrl,
|
24 |
+
]);
|
25 |
+
|
26 |
+
$response = $this->client->performHttpCall(
|
27 |
+
self::REST_CREATE,
|
28 |
+
'wallets/applepay/sessions',
|
29 |
+
$body
|
30 |
+
);
|
31 |
+
|
32 |
+
return json_encode($response);
|
33 |
+
}
|
34 |
+
}
|
{includes → vendor/mollie}/mollie-api-php/src/Exceptions/ApiException.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Exceptions/IncompatiblePlatform.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/MollieApiClient.php
RENAMED
@@ -29,6 +29,7 @@ use Mollie\Api\Endpoints\RefundEndpoint;
|
|
29 |
use Mollie\Api\Endpoints\SettlementsEndpoint;
|
30 |
use Mollie\Api\Endpoints\ShipmentEndpoint;
|
31 |
use Mollie\Api\Endpoints\SubscriptionEndpoint;
|
|
|
32 |
use Mollie\Api\Exceptions\ApiException;
|
33 |
use Mollie\Api\Exceptions\IncompatiblePlatform;
|
34 |
use Psr\Http\Message\ResponseInterface;
|
@@ -39,7 +40,7 @@ class MollieApiClient
|
|
39 |
/**
|
40 |
* Version of our client.
|
41 |
*/
|
42 |
-
const CLIENT_VERSION = "2.
|
43 |
|
44 |
/**
|
45 |
* Endpoint of the remote API.
|
@@ -234,6 +235,13 @@ class MollieApiClient
|
|
234 |
*/
|
235 |
public $orderRefunds;
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
/**
|
238 |
* @var string
|
239 |
*/
|
@@ -304,6 +312,7 @@ class MollieApiClient
|
|
304 |
$this->paymentCaptures = new PaymentCaptureEndpoint($this);
|
305 |
$this->chargebacks = new ChargebackEndpoint($this);
|
306 |
$this->paymentChargebacks = new PaymentChargebackEndpoint($this);
|
|
|
307 |
}
|
308 |
|
309 |
/**
|
29 |
use Mollie\Api\Endpoints\SettlementsEndpoint;
|
30 |
use Mollie\Api\Endpoints\ShipmentEndpoint;
|
31 |
use Mollie\Api\Endpoints\SubscriptionEndpoint;
|
32 |
+
use Mollie\Api\Endpoints\WalletEndpoint;
|
33 |
use Mollie\Api\Exceptions\ApiException;
|
34 |
use Mollie\Api\Exceptions\IncompatiblePlatform;
|
35 |
use Psr\Http\Message\ResponseInterface;
|
40 |
/**
|
41 |
* Version of our client.
|
42 |
*/
|
43 |
+
const CLIENT_VERSION = "2.12.0";
|
44 |
|
45 |
/**
|
46 |
* Endpoint of the remote API.
|
235 |
*/
|
236 |
public $orderRefunds;
|
237 |
|
238 |
+
/**
|
239 |
+
* Manages Wallet requests
|
240 |
+
*
|
241 |
+
* @var WalletEndpoint
|
242 |
+
*/
|
243 |
+
public $wallets;
|
244 |
+
|
245 |
/**
|
246 |
* @var string
|
247 |
*/
|
312 |
$this->paymentCaptures = new PaymentCaptureEndpoint($this);
|
313 |
$this->chargebacks = new ChargebackEndpoint($this);
|
314 |
$this->paymentChargebacks = new PaymentChargebackEndpoint($this);
|
315 |
+
$this->wallets = new WalletEndpoint($this);
|
316 |
}
|
317 |
|
318 |
/**
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/BaseCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/BaseResource.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Capture.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/CaptureCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Chargeback.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/ChargebackCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/CurrentProfile.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/CursorCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Customer.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/CustomerCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Invoice.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/InvoiceCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Issuer.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/IssuerCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Mandate.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/MandateCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Method.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/MethodCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/MethodPrice.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/MethodPriceCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Onboarding.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Order.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/OrderCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/OrderLine.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/OrderLineCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Organization.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/OrganizationCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Payment.php
RENAMED
@@ -549,4 +549,26 @@ class Payment extends BaseResource
|
|
549 |
new Refund($this->client)
|
550 |
);
|
551 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
}
|
549 |
new Refund($this->client)
|
550 |
);
|
551 |
}
|
552 |
+
|
553 |
+
public function update()
|
554 |
+
{
|
555 |
+
if (!isset($this->_links->self->href)) {
|
556 |
+
return $this;
|
557 |
+
}
|
558 |
+
|
559 |
+
$body = json_encode([
|
560 |
+
"description" => $this->description,
|
561 |
+
"redirectUrl" => $this->redirectUrl,
|
562 |
+
"webhookUrl" => $this->webhookUrl,
|
563 |
+
"metadata" => $this->metadata,
|
564 |
+
]);
|
565 |
+
|
566 |
+
$result = $this->client->performHttpCallToFullUrl(
|
567 |
+
MollieApiClient::HTTP_PATCH,
|
568 |
+
$this->_links->self->href,
|
569 |
+
$body
|
570 |
+
);
|
571 |
+
|
572 |
+
return ResourceFactory::createFromApiResult($result, new Payment($this->client));
|
573 |
+
}
|
574 |
}
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/PaymentCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Permission.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/PermissionCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Profile.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/ProfileCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Refund.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/RefundCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/ResourceFactory.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Settlement.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/SettlementCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Shipment.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/ShipmentCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/Subscription.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Resources/SubscriptionCollection.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/InvoiceStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/MandateMethod.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/MandateStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/OnboardingStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/OrderLineStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/OrderLineType.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/OrderStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/PaymentMethod.php
RENAMED
@@ -79,6 +79,11 @@ class PaymentMethod
|
|
79 |
*/
|
80 |
const KLARNA_SLICE_IT = "klarnasliceit";
|
81 |
|
|
|
|
|
|
|
|
|
|
|
82 |
/**
|
83 |
* @link https://www.mollie.com/en/payments/paypal
|
84 |
*/
|
79 |
*/
|
80 |
const KLARNA_SLICE_IT = "klarnasliceit";
|
81 |
|
82 |
+
/**
|
83 |
+
* @link https://www.mollie.com/en/payments/mybank
|
84 |
+
*/
|
85 |
+
const MYBANK = "mybank";
|
86 |
+
|
87 |
/**
|
88 |
* @link https://www.mollie.com/en/payments/paypal
|
89 |
*/
|
{includes → vendor/mollie}/mollie-api-php/src/Types/PaymentStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/ProfileStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/RefundStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/SequenceType.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/SettlementStatus.php
RENAMED
File without changes
|
{includes → vendor/mollie}/mollie-api-php/src/Types/SubscriptionStatus.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/CHANGELOG.md
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/LICENSE
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/README.md
RENAMED
@@ -10,4 +10,7 @@ interface that describes a HTTP message. See the specification for more details.
|
|
10 |
Usage
|
11 |
-----
|
12 |
|
13 |
-
|
|
|
|
|
|
10 |
Usage
|
11 |
-----
|
12 |
|
13 |
+
Before reading the usage guide we recommend reading the PSR-7 interfaces method list:
|
14 |
+
|
15 |
+
* [`PSR-7 Interfaces Method List`](docs/PSR7-Interfaces.md)
|
16 |
+
* [`PSR-7 Usage Guide`](docs/PSR7-Usage.md)
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/MessageInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/RequestInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/ResponseInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/ServerRequestInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/StreamInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/UploadedFileInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/psr/http-message/src/UriInterface.php
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/ralouphie/getallheaders/LICENSE
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/ralouphie/getallheaders/README.md
RENAMED
File without changes
|
{includes/mollie-api-php/vendor → vendor}/ralouphie/getallheaders/src/getallheaders.php
RENAMED
File without changes
|