Version Description
23-07-2019 =
Fix - Missing browser language detect in payment settings
Add - Apple Pay payment method
Download this release
Release Info
Developer | wido |
Plugin | Mollie Payments for WooCommerce |
Version | 5.2.0 |
Comparing to | |
See all releases |
Code changes from version 5.1.8 to 5.2.0
- assets/images/applepay.svg +10 -0
- assets/js/applepay.js +24 -0
- includes/mollie-api-php/README.md +3 -3
- includes/mollie-api-php/composer.json +0 -79
- includes/mollie-api-php/composer.lock +0 -1921
- includes/mollie-api-php/examples/captures/get-capture.php +0 -27
- includes/mollie-api-php/examples/captures/list-captures.php +0 -27
- includes/mollie-api-php/examples/customers/create-customer-first-payment.php +0 -67
- includes/mollie-api-php/examples/customers/create-customer-payment.php +0 -61
- includes/mollie-api-php/examples/customers/create-customer-recurring-payment.php +0 -63
- includes/mollie-api-php/examples/customers/create-customer.php +0 -27
- includes/mollie-api-php/examples/customers/delete-customer.php +0 -17
- includes/mollie-api-php/examples/customers/list-customer-payments.php +0 -58
- includes/mollie-api-php/examples/customers/update-customer.php +0 -31
- includes/mollie-api-php/examples/database/.gitignore +0 -1
- includes/mollie-api-php/examples/functions.php +0 -23
- includes/mollie-api-php/examples/initialize.php +0 -18
- includes/mollie-api-php/examples/initialize_with_oauth.php +0 -19
- includes/mollie-api-php/examples/invoices/list-invoices.php +0 -37
- includes/mollie-api-php/examples/mandates/create-mandate.php +0 -30
- includes/mollie-api-php/examples/mandates/list-mandates.php +0 -28
- includes/mollie-api-php/examples/mandates/revoke-mandate.php +0 -31
- includes/mollie-api-php/examples/orders/cancel-order-lines.php +0 -44
- includes/mollie-api-php/examples/orders/cancel-order.php +0 -26
- includes/mollie-api-php/examples/orders/create-order.php +0 -118
- includes/mollie-api-php/examples/orders/list-methods.php +0 -28
- includes/mollie-api-php/examples/orders/list-orders.php +0 -49
- includes/mollie-api-php/examples/orders/refund-order-completely.php +0 -25
- includes/mollie-api-php/examples/orders/refund-order-partially.php +0 -33
- includes/mollie-api-php/examples/orders/webhook.php +0 -50
- includes/mollie-api-php/examples/payments/create-ideal-payment.php +0 -81
- includes/mollie-api-php/examples/payments/create-payment-oauth.php +0 -67
- includes/mollie-api-php/examples/payments/create-payment.php +0 -60
- includes/mollie-api-php/examples/payments/list-methods.php +0 -27
- includes/mollie-api-php/examples/payments/list-payments.php +0 -85
- includes/mollie-api-php/examples/payments/refund-payment.php +0 -71
- includes/mollie-api-php/examples/payments/return.php +0 -29
- includes/mollie-api-php/examples/payments/webhook.php +0 -65
- includes/mollie-api-php/examples/profiles/create-profile.php +0 -30
- includes/mollie-api-php/examples/profiles/delete-profile.php +0 -23
- includes/mollie-api-php/examples/profiles/list-profiles.php +0 -28
- includes/mollie-api-php/examples/profiles/update-profile.php +0 -33
- includes/mollie-api-php/examples/settlements/list-settlements.php +0 -53
- includes/mollie-api-php/examples/shipments/create-shipment-all.php +0 -27
- includes/mollie-api-php/examples/shipments/create-shipment-partial.php +0 -42
- includes/mollie-api-php/examples/shipments/get-shipment.php +0 -27
- includes/mollie-api-php/examples/shipments/list-shipments.php +0 -30
- includes/mollie-api-php/examples/shipments/update-shipment.php +0 -40
- includes/mollie-api-php/examples/subscriptions/cancel-subscription.php +0 -36
- includes/mollie-api-php/examples/subscriptions/create-subscription.php +0 -61
- includes/mollie-api-php/examples/subscriptions/update-subscription.php +0 -31
- includes/mollie-api-php/scoper.inc.php +13 -0
- includes/mollie-api-php/src/Endpoints/ChargebackEndpoint.php +2 -2
- includes/mollie-api-php/src/Endpoints/CollectionEndpointAbstract.php +18 -0
- includes/mollie-api-php/src/Endpoints/CustomerEndpoint.php +2 -2
- includes/mollie-api-php/src/Endpoints/CustomerPaymentsEndpoint.php +36 -6
- includes/mollie-api-php/src/Endpoints/EndpointAbstract.php +2 -12
- includes/mollie-api-php/src/Endpoints/InvoiceEndpoint.php +3 -3
- includes/mollie-api-php/src/Endpoints/MandateEndpoint.php +67 -11
- includes/mollie-api-php/src/Endpoints/MethodEndpoint.php +54 -16
- includes/mollie-api-php/src/Endpoints/OnboardingEndpoint.php +72 -0
- includes/mollie-api-php/src/Endpoints/OrderEndpoint.php +3 -3
- includes/mollie-api-php/src/Endpoints/OrderLineEndpoint.php +20 -3
- includes/mollie-api-php/src/Endpoints/OrderPaymentEndpoint.php +74 -0
- includes/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php +22 -4
- includes/mollie-api-php/src/Endpoints/OrganizationEndpoint.php +2 -2
- includes/mollie-api-php/src/Endpoints/PaymentCaptureEndpoint.php +19 -4
- includes/mollie-api-php/src/Endpoints/PaymentChargebackEndpoint.php +17 -3
- includes/mollie-api-php/src/Endpoints/PaymentEndpoint.php +3 -3
- includes/mollie-api-php/src/Endpoints/PaymentRefundEndpoint.php +17 -3
- includes/mollie-api-php/src/Endpoints/PermissionEndpoint.php +2 -2
- includes/mollie-api-php/src/Endpoints/ProfileEndpoint.php +30 -9
- includes/mollie-api-php/src/Endpoints/ProfileMethodEndpoint.php +130 -0
- includes/mollie-api-php/src/Endpoints/RefundEndpoint.php +2 -2
- includes/mollie-api-php/src/Endpoints/SettlementsEndpoint.php +3 -3
- includes/mollie-api-php/src/Endpoints/ShipmentEndpoint.php +54 -5
- includes/mollie-api-php/src/Endpoints/SubscriptionEndpoint.php +3 -3
- includes/mollie-api-php/src/Exceptions/ApiException.php +154 -13
- includes/mollie-api-php/src/MollieApiClient.php +33 -27
- includes/mollie-api-php/src/Resources/BaseCollection.php +2 -2
- includes/mollie-api-php/src/Resources/Capture.php +3 -3
- includes/mollie-api-php/src/Resources/Chargeback.php +3 -3
- includes/mollie-api-php/src/Resources/CurrentProfile.php +34 -0
- includes/mollie-api-php/src/Resources/CursorCollection.php +2 -2
- includes/mollie-api-php/src/Resources/Customer.php +2 -2
- includes/mollie-api-php/src/Resources/Invoice.php +5 -5
- includes/mollie-api-php/src/Resources/Issuer.php +1 -1
- includes/mollie-api-php/src/Resources/Mandate.php +2 -2
- includes/mollie-api-php/src/Resources/Method.php +44 -7
- includes/mollie-api-php/src/Resources/MethodPrice.php +28 -0
- includes/mollie-api-php/src/Resources/MethodPriceCollection.php +14 -0
- includes/mollie-api-php/src/Resources/Onboarding.php +70 -0
- includes/mollie-api-php/src/Resources/Order.php +53 -24
- includes/mollie-api-php/src/Resources/OrderLine.php +4 -4
- includes/mollie-api-php/src/Resources/Organization.php +16 -2
- includes/mollie-api-php/src/Resources/Payment.php +22 -41
- includes/mollie-api-php/src/Resources/Permission.php +1 -1
- includes/mollie-api-php/src/Resources/Profile.php +52 -25
- includes/mollie-api-php/src/Resources/Refund.php +4 -4
- includes/mollie-api-php/src/Resources/ResourceFactory.php +56 -0
- includes/mollie-api-php/src/Resources/Settlement.php +27 -27
- includes/mollie-api-php/src/Resources/Shipment.php +4 -8
- includes/mollie-api-php/src/Resources/Subscription.php +3 -3
- includes/mollie-api-php/src/Types/MandateMethod.php +13 -0
- includes/mollie-api-php/src/Types/OnboardingStatus.php +21 -0
- includes/mollie-api-php/src/Types/PaymentMethod.php +102 -95
- includes/mollie-api-php/vendor/autoload.php +1 -1
- includes/mollie-api-php/vendor/composer/ClassLoader.php +2 -2
- includes/mollie-api-php/vendor/composer/autoload_classmap.php +162 -0
- includes/mollie-api-php/vendor/composer/autoload_real.php +7 -7
- includes/mollie-api-php/vendor/composer/autoload_static.php +169 -3
- includes/mollie-api-php/vendor/composer/installed.json +21 -17
- includes/mollie-api-php/vendor/guzzlehttp/psr7/.editorconfig +0 -9
- includes/mollie-api-php/vendor/guzzlehttp/psr7/CHANGELOG.md +22 -1
- includes/mollie-api-php/vendor/guzzlehttp/psr7/composer.json +7 -3
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/LimitStream.php +1 -1
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/MessageTrait.php +45 -15
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Request.php +9 -0
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Response.php +23 -5
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/ServerRequest.php +1 -1
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Stream.php +15 -18
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Uri.php +29 -7
- includes/mollie-api-php/vendor/guzzlehttp/psr7/src/functions.php +1 -0
- includes/mollie-api-php/vendor/ralouphie/getallheaders/.gitignore +0 -5
- includes/mollie-api-php/vendor/ralouphie/getallheaders/.travis.yml +0 -18
- includes/mollie-api-php/vendor/ralouphie/getallheaders/README.md +8 -0
- includes/mollie-api-php/vendor/ralouphie/getallheaders/composer.json +9 -4
- includes/mollie-api-php/vendor/ralouphie/getallheaders/phpunit.xml +0 -22
- includes/mollie-api-php/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php +0 -121
- includes/mollie/wc/gateway/abstract.php +5 -4
- includes/mollie/wc/gateway/applepay.php +87 -0
- includes/mollie/wc/helper/data.php +1 -0
- includes/mollie/wc/helper/settings.php +175 -87
- includes/mollie/wc/plugin.php +72 -4
- mollie-payments-for-woocommerce.php +2 -2
- readme.txt +10 -5
assets/images/applepay.svg
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="165.52px" height="105.97px" enable-background="new 0 0 165.52107 105.9651" version="1.1" viewBox="0 0 165.52107 105.9651" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
3 |
+
<path d="m150.7 0h-135.87c-0.5659 0-1.1328 0-1.6977 0.0033-0.47751 0.0034-0.95391 0.0087-1.4303 0.0217-1.039 0.0281-2.0869 0.0894-3.1129 0.2738-1.0424 0.1876-2.0124 0.4936-2.9587 0.9754-0.9303 0.4731-1.782 1.0919-2.5201 1.8303-0.73841 0.7384-1.3572 1.5887-1.8302 2.52-0.4819 0.9463-0.7881 1.9166-0.9744 2.9598-0.18539 1.0263-0.2471 2.074-0.2751 3.1119-0.0128 0.4764-0.01829 0.9528-0.0214 1.4291-0.0033 0.5661-0.0022 1.1318-0.0022 1.6989v76.318c0 0.5671-0.0011 1.1318 0.0022 1.699 0.00311 0.4763 0.0086 0.9527 0.0214 1.4291 0.028 1.037 0.08971 2.0847 0.2751 3.1107 0.1863 1.0436 0.4925 2.0135 0.9744 2.9599 0.473 0.9313 1.0918 1.7827 1.8302 2.52 0.73809 0.7396 1.5898 1.3583 2.5201 1.8302 0.9463 0.4831 1.9163 0.7892 2.9587 0.9767 1.026 0.1832 2.0739 0.2456 3.1129 0.2737 0.4764 0.0108 0.9528 0.0172 1.4303 0.0194 0.56489 0.0044 1.1318 0.0044 1.6977 0.0044h135.87c0.5649 0 1.1318 0 1.6966-0.0044 0.47641-0.0022 0.95282-0.0086 1.4314-0.0194 1.0368-0.0281 2.0845-0.0905 3.113-0.2737 1.041-0.1875 2.0112-0.4936 2.9576-0.9767 0.9313-0.4719 1.7805-1.0906 2.5201-1.8302 0.7372-0.7373 1.356-1.5887 1.8302-2.52 0.48299-0.9464 0.78889-1.9163 0.97429-2.9599 0.1855-1.026 0.2457-2.0737 0.2738-3.1107 0.013-0.4764 0.01941-0.9528 0.02161-1.4291 0.00439-0.5672 0.00439-1.1319 0.00439-1.699v-76.318c0-0.5671 0-1.1328-0.00439-1.6989-0.0022-0.4763-0.00861-0.9527-0.02161-1.4291-0.02811-1.0379-0.0883-2.0856-0.2738-3.1119-0.18539-1.0432-0.4913-2.0135-0.97429-2.9598-0.47421-0.9313-1.093-1.7816-1.8302-2.52-0.73961-0.7384-1.5888-1.3572-2.5201-1.8303-0.9464-0.4818-1.9166-0.7878-2.9576-0.9754-1.0285-0.1844-2.0762-0.2457-3.113-0.2738-0.47858-0.013-0.95499-0.0183-1.4314-0.0217-0.56478-0.0033-1.1317-0.0033-1.6966-0.0033z"/>
|
4 |
+
<path d="m150.7 3.532l1.6715 0.0032c0.4528 0.0032 0.90561 0.0081 1.3609 0.0205 0.79201 0.0214 1.7185 0.0643 2.5821 0.2191 0.7507 0.1352 1.3803 0.3408 1.9845 0.6484 0.5965 0.3031 1.143 0.7003 1.6202 1.1768 0.479 0.4797 0.87671 1.0271 1.1838 1.6302 0.30589 0.5995 0.51019 1.2261 0.64459 1.9823 0.1544 0.8542 0.1971 1.7832 0.21881 2.5801 0.01219 0.4498 0.01819 0.8996 0.0204 1.3601 0.00429 0.5569 0.0042 1.1135 0.0042 1.6715v76.318c0 0.558 9e-5 1.1136-0.0043 1.6824-0.00211 0.4497-0.0081 0.8995-0.0204 1.3501-0.02161 0.7957-0.0643 1.7242-0.2206 2.5885-0.13251 0.7458-0.3367 1.3725-0.64429 1.975-0.30621 0.6016-0.70331 1.1484-1.1802 1.6251-0.47989 0.48-1.0246 0.876-1.6282 1.1819-0.5997 0.3061-1.2282 0.51151-1.9715 0.6453-0.88109 0.157-1.8464 0.2002-2.5734 0.2199-0.4574 0.0103-0.9126 0.01649-1.3789 0.0187-0.55571 0.0043-1.1134 0.0042-1.6692 0.0042h-135.87-0.0221c-0.5494 0-1.0999 0-1.6593-0.0043-0.4561-0.00211-0.9112-0.0082-1.3512-0.0182-0.7436-0.0201-1.7095-0.0632-2.5834-0.2193-0.74969-0.1348-1.3782-0.3402-1.9858-0.6503-0.59789-0.3032-1.1422-0.6988-1.6223-1.1797-0.4764-0.4756-0.8723-1.0207-1.1784-1.6232-0.3064-0.6019-0.5114-1.2305-0.64619-1.9852-0.15581-0.8626-0.19861-1.7874-0.22-2.5777-0.01221-0.4525-0.01731-0.9049-0.02021-1.3547l-0.0022-1.3279 1e-4 -0.3506v-76.318l-1e-4 -0.3506 0.0021-1.3251c3e-3 -0.4525 0.0081-0.9049 0.02031-1.357 0.02139-0.7911 0.06419-1.7163 0.22129-2.5861 0.1336-0.7479 0.3385-1.3765 0.6465-1.9814 0.3037-0.5979 0.7003-1.1437 1.1792-1.6225 0.477-0.4772 1.0231-0.8739 1.6248-1.1799 0.6011-0.3061 1.2308-0.5116 1.9805-0.6465 0.8638-0.1552 1.7909-0.198 2.5849-0.2195 0.4526-0.0123 0.9052-0.0172 1.3544-0.0203l1.6771-0.0033h135.87" fill="#fff"/>
|
5 |
+
<path d="m45.186 35.641c1.4172-1.7727 2.379-4.1528 2.1253-6.5851-2.0746 0.10316-4.6063 1.3687-6.0721 3.1428-1.3161 1.5192-2.4809 3.999-2.1772 6.3293 2.3289 0.20201 4.6556-1.1641 6.124-2.887"/>
|
6 |
+
<path d="m47.285 38.983c-3.3821-0.20146-6.2577 1.9195-7.8729 1.9195-1.616 0-4.0893-1.818-6.7644-1.769-3.4818 0.05114-6.7124 2.0198-8.4793 5.1508-3.6341 6.2636-0.95904 15.555 2.5749 20.656 1.7162 2.5238 3.7845 5.3027 6.5098 5.2029 2.5749-0.10104 3.5842-1.6673 6.7142-1.6673 3.1276 0 4.0368 1.6673 6.7625 1.6168 2.8266-0.05054 4.5938-2.5251 6.31-5.0513 1.9688-2.877 2.7747-5.655 2.8254-5.8075-0.0507-0.05051-5.4506-2.122-5.5006-8.3336-0.05098-5.201 4.2395-7.6749 4.4414-7.8283-2.4229-3.5834-6.2086-3.9875-7.521-4.089"/>
|
7 |
+
<path d="m76.734 31.944c7.351 0 12.47 5.0671 12.47 12.444 0 7.4036-5.2241 12.497-12.654 12.497h-8.1389v12.943h-5.8804v-37.885h14.204zm-8.3233 20.005h6.7473c5.1198 0 8.0336-2.7564 8.0336-7.5348 0-4.7779-2.9138-7.5084-8.0073-7.5084h-6.7736v15.043z"/>
|
8 |
+
<path d="m90.74 61.979c0-4.8311 3.7018-7.7976 10.266-8.1653l7.5606-0.44614v-2.1264c0-3.0718-2.0742-4.9096-5.539-4.9096-3.2825 0-5.3304 1.5749-5.8287 4.0431h-5.3557c0.31499-4.9886 4.5678-8.6641 11.394-8.6641 6.6947 0 10.974 3.5443 10.974 9.0839v19.034h-5.4347v-4.5419h-0.13065c-1.6012 3.0718-5.0934 5.0144-8.7162 5.0144-5.4084 0-9.1892-3.3605-9.1892-8.3222zm17.826-2.494v-2.179l-6.8 0.41981c-3.3868 0.23649-5.3031 1.7329-5.3031 4.0958 0 2.415 1.9952 3.9905 5.0408 3.9905 3.9641 0 7.0623-2.7305 7.0623-6.327z"/>
|
9 |
+
<path d="m119.34 79.989v-4.5946c0.4193 0.10483 1.3642 0.10483 1.8372 0.10483 2.6252 0 4.0431-1.1024 4.9091-3.9378 0-0.05267 0.49931-1.6802 0.49931-1.7066l-9.9762-27.646h6.1427l6.9843 22.474h0.10432l6.9843-22.474h5.9857l-10.345 29.063c-2.3619 6.6952-5.0924 8.8479-10.816 8.8479-0.47297 0-1.8909-0.05267-2.3102-0.13116z"/>
|
10 |
+
</svg>
|
assets/js/applepay.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function (ApplePaySession) {
|
2 |
+
document.addEventListener('DOMContentLoaded', function () {
|
3 |
+
var applePayMethodElement = document.querySelector(
|
4 |
+
'.payment_method_mollie_wc_gateway_applepay',
|
5 |
+
)
|
6 |
+
var woocommerceCheckoutForm = document.querySelector(
|
7 |
+
'form.woocommerce-checkout',
|
8 |
+
)
|
9 |
+
|
10 |
+
if (!woocommerceCheckoutForm) {
|
11 |
+
return
|
12 |
+
}
|
13 |
+
|
14 |
+
if (!ApplePaySession || !ApplePaySession.canMakePayments()) {
|
15 |
+
applePayMethodElement &&
|
16 |
+
applePayMethodElement.parentNode.removeChild(applePayMethodElement)
|
17 |
+
|
18 |
+
woocommerceCheckoutForm.insertAdjacentHTML(
|
19 |
+
'beforeend',
|
20 |
+
'<input type="hidden" name="mollie_apple_pay_method_not_allowed" value="1" />',
|
21 |
+
)
|
22 |
+
}
|
23 |
+
})
|
24 |
+
})(window.ApplePaySession)
|
includes/mollie-api-php/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
|
6 |
<img src="https://info.mollie.com/hubfs/github/php/editor.png" />
|
7 |
|
8 |
-
Accepting [iDEAL](https://www.mollie.com/
|
9 |
|
10 |
[![Build Status](https://travis-ci.org/mollie/mollie-api-php.png)](https://travis-ci.org/mollie/mollie-api-php)
|
11 |
[![Latest Stable Version](https://poser.pugx.org/mollie/mollie-api-php/v/stable)](https://packagist.org/packages/mollie/mollie-api-php)
|
@@ -187,11 +187,11 @@ $refund = $payment->refund([
|
|
187 |
For a working example, see [Example - Refund payment](https://github.com/mollie/mollie-api-php/blob/master/examples/payments/refund-payment.php).
|
188 |
|
189 |
## API documentation ##
|
190 |
-
If you wish to learn more about our API, please visit the [Mollie Developer Portal](https://www.mollie.com/
|
191 |
|
192 |
## Want to help us make our API client even better? ##
|
193 |
|
194 |
-
Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-php/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a
|
195 |
|
196 |
## License ##
|
197 |
[BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php).
|
5 |
|
6 |
<img src="https://info.mollie.com/hubfs/github/php/editor.png" />
|
7 |
|
8 |
+
Accepting [iDEAL](https://www.mollie.com/payments/ideal/), [Apple Pay](https://www.mollie.com/payments/apple-pay), [Bancontact](https://www.mollie.com/payments/bancontact/), [SOFORT Banking](https://www.mollie.com/payments/sofort/), [Creditcard](https://www.mollie.com/payments/credit-card/), [SEPA Bank transfer](https://www.mollie.com/payments/bank-transfer/), [SEPA Direct debit](https://www.mollie.com/payments/direct-debit/), [PayPal](https://www.mollie.com/payments/paypal/), [Belfius Direct Net](https://www.mollie.com/payments/belfius/), [KBC/CBC](https://www.mollie.com/payments/kbc-cbc/), [paysafecard](https://www.mollie.com/payments/paysafecard/), [ING Home'Pay](https://www.mollie.com/payments/ing-homepay/), [Giftcards](https://www.mollie.com/payments/gift-cards/), [Giropay](https://www.mollie.com/payments/giropay/), [EPS](https://www.mollie.com/payments/eps/) and [Przelewy24](https://www.mollie.com/payments/przelewy24/) online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.
|
9 |
|
10 |
[![Build Status](https://travis-ci.org/mollie/mollie-api-php.png)](https://travis-ci.org/mollie/mollie-api-php)
|
11 |
[![Latest Stable Version](https://poser.pugx.org/mollie/mollie-api-php/v/stable)](https://packagist.org/packages/mollie/mollie-api-php)
|
187 |
For a working example, see [Example - Refund payment](https://github.com/mollie/mollie-api-php/blob/master/examples/payments/refund-payment.php).
|
188 |
|
189 |
## API documentation ##
|
190 |
+
If you wish to learn more about our API, please visit the [Mollie Developer Portal](https://www.mollie.com/developers). API Documentation is available in English.
|
191 |
|
192 |
## Want to help us make our API client even better? ##
|
193 |
|
194 |
+
Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-php/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a technology oriented organization? Mollie is hiring developers and system engineers. [Check out our vacancies](https://jobs.mollie.com/) or [get in touch](mailto:personeel@mollie.com).
|
195 |
|
196 |
## License ##
|
197 |
[BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php).
|
includes/mollie-api-php/composer.json
DELETED
@@ -1,79 +0,0 @@
|
|
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 |
-
"mistercash",
|
11 |
-
"bancontact",
|
12 |
-
"sofort",
|
13 |
-
"sofortbanking",
|
14 |
-
"sepa",
|
15 |
-
"bitcoin",
|
16 |
-
"paypal",
|
17 |
-
"paysafecard",
|
18 |
-
"podiumcadeaukaart",
|
19 |
-
"banktransfer",
|
20 |
-
"direct debit",
|
21 |
-
"belfius",
|
22 |
-
"belfius direct net",
|
23 |
-
"refunds",
|
24 |
-
"api",
|
25 |
-
"payments",
|
26 |
-
"gateway",
|
27 |
-
"subscriptions",
|
28 |
-
"recurring",
|
29 |
-
"charges",
|
30 |
-
"kbc",
|
31 |
-
"cbc",
|
32 |
-
"gift cards",
|
33 |
-
"intersolve",
|
34 |
-
"fashioncheque",
|
35 |
-
"inghomepay",
|
36 |
-
"klarna",
|
37 |
-
"paylater",
|
38 |
-
"sliceit"
|
39 |
-
],
|
40 |
-
"homepage": "https://www.mollie.com/en/developers",
|
41 |
-
"license": "BSD-2-Clause",
|
42 |
-
"authors": [
|
43 |
-
{
|
44 |
-
"name": "Mollie B.V.",
|
45 |
-
"email": "info@mollie.com"
|
46 |
-
}
|
47 |
-
],
|
48 |
-
"require": {
|
49 |
-
"php": ">=5.6",
|
50 |
-
"ext-curl": "*",
|
51 |
-
"ext-json": "*",
|
52 |
-
"ext-openssl": "*",
|
53 |
-
"composer/ca-bundle": "^1.1",
|
54 |
-
"guzzlehttp/guzzle": "^6.3"
|
55 |
-
},
|
56 |
-
"require-dev": {
|
57 |
-
"eloquent/liberator": "^2.0",
|
58 |
-
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.1"
|
59 |
-
},
|
60 |
-
"suggest": {
|
61 |
-
"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."
|
62 |
-
},
|
63 |
-
"config": {
|
64 |
-
"sort-packages": true
|
65 |
-
},
|
66 |
-
"autoload": {
|
67 |
-
"psr-4": {
|
68 |
-
"Mollie\\Api\\": "src/"
|
69 |
-
}
|
70 |
-
},
|
71 |
-
"autoload-dev": {
|
72 |
-
"psr-4": {
|
73 |
-
"Tests\\": "tests"
|
74 |
-
}
|
75 |
-
},
|
76 |
-
"scripts": {
|
77 |
-
"test": "./vendor/bin/phpunit tests"
|
78 |
-
}
|
79 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/composer.lock
DELETED
@@ -1,1921 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"content-hash": "6288d2efa31b78a6af8dd28bece5c421",
|
8 |
-
"packages": [
|
9 |
-
{
|
10 |
-
"name": "composer/ca-bundle",
|
11 |
-
"version": "1.1.4",
|
12 |
-
"source": {
|
13 |
-
"type": "git",
|
14 |
-
"url": "https://github.com/composer/ca-bundle.git",
|
15 |
-
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d"
|
16 |
-
},
|
17 |
-
"dist": {
|
18 |
-
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
|
20 |
-
"reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d",
|
21 |
-
"shasum": ""
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"ext-openssl": "*",
|
25 |
-
"ext-pcre": "*",
|
26 |
-
"php": "^5.3.2 || ^7.0"
|
27 |
-
},
|
28 |
-
"require-dev": {
|
29 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
30 |
-
"psr/log": "^1.0",
|
31 |
-
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
32 |
-
},
|
33 |
-
"type": "library",
|
34 |
-
"extra": {
|
35 |
-
"branch-alias": {
|
36 |
-
"dev-master": "1.x-dev"
|
37 |
-
}
|
38 |
-
},
|
39 |
-
"autoload": {
|
40 |
-
"psr-4": {
|
41 |
-
"Composer\\CaBundle\\": "src"
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"notification-url": "https://packagist.org/downloads/",
|
45 |
-
"license": [
|
46 |
-
"MIT"
|
47 |
-
],
|
48 |
-
"authors": [
|
49 |
-
{
|
50 |
-
"name": "Jordi Boggiano",
|
51 |
-
"email": "j.boggiano@seld.be",
|
52 |
-
"homepage": "http://seld.be"
|
53 |
-
}
|
54 |
-
],
|
55 |
-
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
56 |
-
"keywords": [
|
57 |
-
"cabundle",
|
58 |
-
"cacert",
|
59 |
-
"certificate",
|
60 |
-
"ssl",
|
61 |
-
"tls"
|
62 |
-
],
|
63 |
-
"time": "2019-01-28T09:30:10+00:00"
|
64 |
-
},
|
65 |
-
{
|
66 |
-
"name": "guzzlehttp/guzzle",
|
67 |
-
"version": "6.3.3",
|
68 |
-
"source": {
|
69 |
-
"type": "git",
|
70 |
-
"url": "https://github.com/guzzle/guzzle.git",
|
71 |
-
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
72 |
-
},
|
73 |
-
"dist": {
|
74 |
-
"type": "zip",
|
75 |
-
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
76 |
-
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
77 |
-
"shasum": ""
|
78 |
-
},
|
79 |
-
"require": {
|
80 |
-
"guzzlehttp/promises": "^1.0",
|
81 |
-
"guzzlehttp/psr7": "^1.4",
|
82 |
-
"php": ">=5.5"
|
83 |
-
},
|
84 |
-
"require-dev": {
|
85 |
-
"ext-curl": "*",
|
86 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
87 |
-
"psr/log": "^1.0"
|
88 |
-
},
|
89 |
-
"suggest": {
|
90 |
-
"psr/log": "Required for using the Log middleware"
|
91 |
-
},
|
92 |
-
"type": "library",
|
93 |
-
"extra": {
|
94 |
-
"branch-alias": {
|
95 |
-
"dev-master": "6.3-dev"
|
96 |
-
}
|
97 |
-
},
|
98 |
-
"autoload": {
|
99 |
-
"files": [
|
100 |
-
"src/functions_include.php"
|
101 |
-
],
|
102 |
-
"psr-4": {
|
103 |
-
"GuzzleHttp\\": "src/"
|
104 |
-
}
|
105 |
-
},
|
106 |
-
"notification-url": "https://packagist.org/downloads/",
|
107 |
-
"license": [
|
108 |
-
"MIT"
|
109 |
-
],
|
110 |
-
"authors": [
|
111 |
-
{
|
112 |
-
"name": "Michael Dowling",
|
113 |
-
"email": "mtdowling@gmail.com",
|
114 |
-
"homepage": "https://github.com/mtdowling"
|
115 |
-
}
|
116 |
-
],
|
117 |
-
"description": "Guzzle is a PHP HTTP client library",
|
118 |
-
"homepage": "http://guzzlephp.org/",
|
119 |
-
"keywords": [
|
120 |
-
"client",
|
121 |
-
"curl",
|
122 |
-
"framework",
|
123 |
-
"http",
|
124 |
-
"http client",
|
125 |
-
"rest",
|
126 |
-
"web service"
|
127 |
-
],
|
128 |
-
"time": "2018-04-22T15:46:56+00:00"
|
129 |
-
},
|
130 |
-
{
|
131 |
-
"name": "guzzlehttp/promises",
|
132 |
-
"version": "v1.3.1",
|
133 |
-
"source": {
|
134 |
-
"type": "git",
|
135 |
-
"url": "https://github.com/guzzle/promises.git",
|
136 |
-
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
|
137 |
-
},
|
138 |
-
"dist": {
|
139 |
-
"type": "zip",
|
140 |
-
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
141 |
-
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
142 |
-
"shasum": ""
|
143 |
-
},
|
144 |
-
"require": {
|
145 |
-
"php": ">=5.5.0"
|
146 |
-
},
|
147 |
-
"require-dev": {
|
148 |
-
"phpunit/phpunit": "^4.0"
|
149 |
-
},
|
150 |
-
"type": "library",
|
151 |
-
"extra": {
|
152 |
-
"branch-alias": {
|
153 |
-
"dev-master": "1.4-dev"
|
154 |
-
}
|
155 |
-
},
|
156 |
-
"autoload": {
|
157 |
-
"psr-4": {
|
158 |
-
"GuzzleHttp\\Promise\\": "src/"
|
159 |
-
},
|
160 |
-
"files": [
|
161 |
-
"src/functions_include.php"
|
162 |
-
]
|
163 |
-
},
|
164 |
-
"notification-url": "https://packagist.org/downloads/",
|
165 |
-
"license": [
|
166 |
-
"MIT"
|
167 |
-
],
|
168 |
-
"authors": [
|
169 |
-
{
|
170 |
-
"name": "Michael Dowling",
|
171 |
-
"email": "mtdowling@gmail.com",
|
172 |
-
"homepage": "https://github.com/mtdowling"
|
173 |
-
}
|
174 |
-
],
|
175 |
-
"description": "Guzzle promises library",
|
176 |
-
"keywords": [
|
177 |
-
"promise"
|
178 |
-
],
|
179 |
-
"time": "2016-12-20T10:07:11+00:00"
|
180 |
-
},
|
181 |
-
{
|
182 |
-
"name": "guzzlehttp/psr7",
|
183 |
-
"version": "1.5.2",
|
184 |
-
"source": {
|
185 |
-
"type": "git",
|
186 |
-
"url": "https://github.com/guzzle/psr7.git",
|
187 |
-
"reference": "9f83dded91781a01c63574e387eaa769be769115"
|
188 |
-
},
|
189 |
-
"dist": {
|
190 |
-
"type": "zip",
|
191 |
-
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115",
|
192 |
-
"reference": "9f83dded91781a01c63574e387eaa769be769115",
|
193 |
-
"shasum": ""
|
194 |
-
},
|
195 |
-
"require": {
|
196 |
-
"php": ">=5.4.0",
|
197 |
-
"psr/http-message": "~1.0",
|
198 |
-
"ralouphie/getallheaders": "^2.0.5"
|
199 |
-
},
|
200 |
-
"provide": {
|
201 |
-
"psr/http-message-implementation": "1.0"
|
202 |
-
},
|
203 |
-
"require-dev": {
|
204 |
-
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
205 |
-
},
|
206 |
-
"type": "library",
|
207 |
-
"extra": {
|
208 |
-
"branch-alias": {
|
209 |
-
"dev-master": "1.5-dev"
|
210 |
-
}
|
211 |
-
},
|
212 |
-
"autoload": {
|
213 |
-
"psr-4": {
|
214 |
-
"GuzzleHttp\\Psr7\\": "src/"
|
215 |
-
},
|
216 |
-
"files": [
|
217 |
-
"src/functions_include.php"
|
218 |
-
]
|
219 |
-
},
|
220 |
-
"notification-url": "https://packagist.org/downloads/",
|
221 |
-
"license": [
|
222 |
-
"MIT"
|
223 |
-
],
|
224 |
-
"authors": [
|
225 |
-
{
|
226 |
-
"name": "Michael Dowling",
|
227 |
-
"email": "mtdowling@gmail.com",
|
228 |
-
"homepage": "https://github.com/mtdowling"
|
229 |
-
},
|
230 |
-
{
|
231 |
-
"name": "Tobias Schultze",
|
232 |
-
"homepage": "https://github.com/Tobion"
|
233 |
-
}
|
234 |
-
],
|
235 |
-
"description": "PSR-7 message implementation that also provides common utility methods",
|
236 |
-
"keywords": [
|
237 |
-
"http",
|
238 |
-
"message",
|
239 |
-
"psr-7",
|
240 |
-
"request",
|
241 |
-
"response",
|
242 |
-
"stream",
|
243 |
-
"uri",
|
244 |
-
"url"
|
245 |
-
],
|
246 |
-
"time": "2018-12-04T20:46:45+00:00"
|
247 |
-
},
|
248 |
-
{
|
249 |
-
"name": "psr/http-message",
|
250 |
-
"version": "1.0.1",
|
251 |
-
"source": {
|
252 |
-
"type": "git",
|
253 |
-
"url": "https://github.com/php-fig/http-message.git",
|
254 |
-
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
255 |
-
},
|
256 |
-
"dist": {
|
257 |
-
"type": "zip",
|
258 |
-
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
259 |
-
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
260 |
-
"shasum": ""
|
261 |
-
},
|
262 |
-
"require": {
|
263 |
-
"php": ">=5.3.0"
|
264 |
-
},
|
265 |
-
"type": "library",
|
266 |
-
"extra": {
|
267 |
-
"branch-alias": {
|
268 |
-
"dev-master": "1.0.x-dev"
|
269 |
-
}
|
270 |
-
},
|
271 |
-
"autoload": {
|
272 |
-
"psr-4": {
|
273 |
-
"Psr\\Http\\Message\\": "src/"
|
274 |
-
}
|
275 |
-
},
|
276 |
-
"notification-url": "https://packagist.org/downloads/",
|
277 |
-
"license": [
|
278 |
-
"MIT"
|
279 |
-
],
|
280 |
-
"authors": [
|
281 |
-
{
|
282 |
-
"name": "PHP-FIG",
|
283 |
-
"homepage": "http://www.php-fig.org/"
|
284 |
-
}
|
285 |
-
],
|
286 |
-
"description": "Common interface for HTTP messages",
|
287 |
-
"homepage": "https://github.com/php-fig/http-message",
|
288 |
-
"keywords": [
|
289 |
-
"http",
|
290 |
-
"http-message",
|
291 |
-
"psr",
|
292 |
-
"psr-7",
|
293 |
-
"request",
|
294 |
-
"response"
|
295 |
-
],
|
296 |
-
"time": "2016-08-06T14:39:51+00:00"
|
297 |
-
},
|
298 |
-
{
|
299 |
-
"name": "ralouphie/getallheaders",
|
300 |
-
"version": "2.0.5",
|
301 |
-
"source": {
|
302 |
-
"type": "git",
|
303 |
-
"url": "https://github.com/ralouphie/getallheaders.git",
|
304 |
-
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
|
305 |
-
},
|
306 |
-
"dist": {
|
307 |
-
"type": "zip",
|
308 |
-
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
|
309 |
-
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
|
310 |
-
"shasum": ""
|
311 |
-
},
|
312 |
-
"require": {
|
313 |
-
"php": ">=5.3"
|
314 |
-
},
|
315 |
-
"require-dev": {
|
316 |
-
"phpunit/phpunit": "~3.7.0",
|
317 |
-
"satooshi/php-coveralls": ">=1.0"
|
318 |
-
},
|
319 |
-
"type": "library",
|
320 |
-
"autoload": {
|
321 |
-
"files": [
|
322 |
-
"src/getallheaders.php"
|
323 |
-
]
|
324 |
-
},
|
325 |
-
"notification-url": "https://packagist.org/downloads/",
|
326 |
-
"license": [
|
327 |
-
"MIT"
|
328 |
-
],
|
329 |
-
"authors": [
|
330 |
-
{
|
331 |
-
"name": "Ralph Khattar",
|
332 |
-
"email": "ralph.khattar@gmail.com"
|
333 |
-
}
|
334 |
-
],
|
335 |
-
"description": "A polyfill for getallheaders.",
|
336 |
-
"time": "2016-02-11T07:05:27+00:00"
|
337 |
-
}
|
338 |
-
],
|
339 |
-
"packages-dev": [
|
340 |
-
{
|
341 |
-
"name": "doctrine/instantiator",
|
342 |
-
"version": "1.1.0",
|
343 |
-
"source": {
|
344 |
-
"type": "git",
|
345 |
-
"url": "https://github.com/doctrine/instantiator.git",
|
346 |
-
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
|
347 |
-
},
|
348 |
-
"dist": {
|
349 |
-
"type": "zip",
|
350 |
-
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
|
351 |
-
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
|
352 |
-
"shasum": ""
|
353 |
-
},
|
354 |
-
"require": {
|
355 |
-
"php": "^7.1"
|
356 |
-
},
|
357 |
-
"require-dev": {
|
358 |
-
"athletic/athletic": "~0.1.8",
|
359 |
-
"ext-pdo": "*",
|
360 |
-
"ext-phar": "*",
|
361 |
-
"phpunit/phpunit": "^6.2.3",
|
362 |
-
"squizlabs/php_codesniffer": "^3.0.2"
|
363 |
-
},
|
364 |
-
"type": "library",
|
365 |
-
"extra": {
|
366 |
-
"branch-alias": {
|
367 |
-
"dev-master": "1.2.x-dev"
|
368 |
-
}
|
369 |
-
},
|
370 |
-
"autoload": {
|
371 |
-
"psr-4": {
|
372 |
-
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
373 |
-
}
|
374 |
-
},
|
375 |
-
"notification-url": "https://packagist.org/downloads/",
|
376 |
-
"license": [
|
377 |
-
"MIT"
|
378 |
-
],
|
379 |
-
"authors": [
|
380 |
-
{
|
381 |
-
"name": "Marco Pivetta",
|
382 |
-
"email": "ocramius@gmail.com",
|
383 |
-
"homepage": "http://ocramius.github.com/"
|
384 |
-
}
|
385 |
-
],
|
386 |
-
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
387 |
-
"homepage": "https://github.com/doctrine/instantiator",
|
388 |
-
"keywords": [
|
389 |
-
"constructor",
|
390 |
-
"instantiate"
|
391 |
-
],
|
392 |
-
"time": "2017-07-22T11:58:36+00:00"
|
393 |
-
},
|
394 |
-
{
|
395 |
-
"name": "eloquent/liberator",
|
396 |
-
"version": "2.0.0",
|
397 |
-
"source": {
|
398 |
-
"type": "git",
|
399 |
-
"url": "https://github.com/eloquent/liberator.git",
|
400 |
-
"reference": "8d71b1ff4794b09fc7d0e205ee994780412d3a1f"
|
401 |
-
},
|
402 |
-
"dist": {
|
403 |
-
"type": "zip",
|
404 |
-
"url": "https://api.github.com/repos/eloquent/liberator/zipball/8d71b1ff4794b09fc7d0e205ee994780412d3a1f",
|
405 |
-
"reference": "8d71b1ff4794b09fc7d0e205ee994780412d3a1f",
|
406 |
-
"shasum": ""
|
407 |
-
},
|
408 |
-
"require": {
|
409 |
-
"eloquent/pops": "~4.1.0",
|
410 |
-
"php": ">=5.3"
|
411 |
-
},
|
412 |
-
"require-dev": {
|
413 |
-
"icecave/archer": "~1"
|
414 |
-
},
|
415 |
-
"type": "library",
|
416 |
-
"autoload": {
|
417 |
-
"psr-4": {
|
418 |
-
"Eloquent\\Liberator\\": "src"
|
419 |
-
}
|
420 |
-
},
|
421 |
-
"notification-url": "https://packagist.org/downloads/",
|
422 |
-
"license": [
|
423 |
-
"MIT"
|
424 |
-
],
|
425 |
-
"authors": [
|
426 |
-
{
|
427 |
-
"name": "Erin Millard",
|
428 |
-
"email": "ezzatron@gmail.com",
|
429 |
-
"homepage": "http://ezzatron.com/"
|
430 |
-
}
|
431 |
-
],
|
432 |
-
"description": "A proxy for circumventing PHP access modifier restrictions.",
|
433 |
-
"homepage": "https://github.com/eloquent/liberator",
|
434 |
-
"keywords": [
|
435 |
-
"access",
|
436 |
-
"modifier",
|
437 |
-
"object",
|
438 |
-
"private",
|
439 |
-
"protected",
|
440 |
-
"proxy",
|
441 |
-
"reflection"
|
442 |
-
],
|
443 |
-
"time": "2014-02-09T12:27:12+00:00"
|
444 |
-
},
|
445 |
-
{
|
446 |
-
"name": "eloquent/pops",
|
447 |
-
"version": "4.1.0",
|
448 |
-
"source": {
|
449 |
-
"type": "git",
|
450 |
-
"url": "https://github.com/eloquent/pops.git",
|
451 |
-
"reference": "80dbee5422347dc581d38ade92001509dce34926"
|
452 |
-
},
|
453 |
-
"dist": {
|
454 |
-
"type": "zip",
|
455 |
-
"url": "https://api.github.com/repos/eloquent/pops/zipball/80dbee5422347dc581d38ade92001509dce34926",
|
456 |
-
"reference": "80dbee5422347dc581d38ade92001509dce34926",
|
457 |
-
"shasum": ""
|
458 |
-
},
|
459 |
-
"require": {
|
460 |
-
"php": ">=5.3"
|
461 |
-
},
|
462 |
-
"require-dev": {
|
463 |
-
"icecave/archer": "~1"
|
464 |
-
},
|
465 |
-
"type": "library",
|
466 |
-
"autoload": {
|
467 |
-
"psr-4": {
|
468 |
-
"Eloquent\\Pops\\": "src"
|
469 |
-
}
|
470 |
-
},
|
471 |
-
"notification-url": "https://packagist.org/downloads/",
|
472 |
-
"license": [
|
473 |
-
"MIT"
|
474 |
-
],
|
475 |
-
"authors": [
|
476 |
-
{
|
477 |
-
"name": "Erin Millard",
|
478 |
-
"email": "ezzatron@gmail.com",
|
479 |
-
"homepage": "http://ezzatron.com/"
|
480 |
-
}
|
481 |
-
],
|
482 |
-
"description": "PHP object proxy system.",
|
483 |
-
"homepage": "https://github.com/eloquent/pops",
|
484 |
-
"keywords": [
|
485 |
-
"method",
|
486 |
-
"object",
|
487 |
-
"property",
|
488 |
-
"proxy"
|
489 |
-
],
|
490 |
-
"time": "2014-02-09T10:09:42+00:00"
|
491 |
-
},
|
492 |
-
{
|
493 |
-
"name": "myclabs/deep-copy",
|
494 |
-
"version": "1.8.1",
|
495 |
-
"source": {
|
496 |
-
"type": "git",
|
497 |
-
"url": "https://github.com/myclabs/DeepCopy.git",
|
498 |
-
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
|
499 |
-
},
|
500 |
-
"dist": {
|
501 |
-
"type": "zip",
|
502 |
-
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
|
503 |
-
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
|
504 |
-
"shasum": ""
|
505 |
-
},
|
506 |
-
"require": {
|
507 |
-
"php": "^7.1"
|
508 |
-
},
|
509 |
-
"replace": {
|
510 |
-
"myclabs/deep-copy": "self.version"
|
511 |
-
},
|
512 |
-
"require-dev": {
|
513 |
-
"doctrine/collections": "^1.0",
|
514 |
-
"doctrine/common": "^2.6",
|
515 |
-
"phpunit/phpunit": "^7.1"
|
516 |
-
},
|
517 |
-
"type": "library",
|
518 |
-
"autoload": {
|
519 |
-
"psr-4": {
|
520 |
-
"DeepCopy\\": "src/DeepCopy/"
|
521 |
-
},
|
522 |
-
"files": [
|
523 |
-
"src/DeepCopy/deep_copy.php"
|
524 |
-
]
|
525 |
-
},
|
526 |
-
"notification-url": "https://packagist.org/downloads/",
|
527 |
-
"license": [
|
528 |
-
"MIT"
|
529 |
-
],
|
530 |
-
"description": "Create deep copies (clones) of your objects",
|
531 |
-
"keywords": [
|
532 |
-
"clone",
|
533 |
-
"copy",
|
534 |
-
"duplicate",
|
535 |
-
"object",
|
536 |
-
"object graph"
|
537 |
-
],
|
538 |
-
"time": "2018-06-11T23:09:50+00:00"
|
539 |
-
},
|
540 |
-
{
|
541 |
-
"name": "phar-io/manifest",
|
542 |
-
"version": "1.0.3",
|
543 |
-
"source": {
|
544 |
-
"type": "git",
|
545 |
-
"url": "https://github.com/phar-io/manifest.git",
|
546 |
-
"reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
|
547 |
-
},
|
548 |
-
"dist": {
|
549 |
-
"type": "zip",
|
550 |
-
"url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
|
551 |
-
"reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
|
552 |
-
"shasum": ""
|
553 |
-
},
|
554 |
-
"require": {
|
555 |
-
"ext-dom": "*",
|
556 |
-
"ext-phar": "*",
|
557 |
-
"phar-io/version": "^2.0",
|
558 |
-
"php": "^5.6 || ^7.0"
|
559 |
-
},
|
560 |
-
"type": "library",
|
561 |
-
"extra": {
|
562 |
-
"branch-alias": {
|
563 |
-
"dev-master": "1.0.x-dev"
|
564 |
-
}
|
565 |
-
},
|
566 |
-
"autoload": {
|
567 |
-
"classmap": [
|
568 |
-
"src/"
|
569 |
-
]
|
570 |
-
},
|
571 |
-
"notification-url": "https://packagist.org/downloads/",
|
572 |
-
"license": [
|
573 |
-
"BSD-3-Clause"
|
574 |
-
],
|
575 |
-
"authors": [
|
576 |
-
{
|
577 |
-
"name": "Arne Blankerts",
|
578 |
-
"email": "arne@blankerts.de",
|
579 |
-
"role": "Developer"
|
580 |
-
},
|
581 |
-
{
|
582 |
-
"name": "Sebastian Heuer",
|
583 |
-
"email": "sebastian@phpeople.de",
|
584 |
-
"role": "Developer"
|
585 |
-
},
|
586 |
-
{
|
587 |
-
"name": "Sebastian Bergmann",
|
588 |
-
"email": "sebastian@phpunit.de",
|
589 |
-
"role": "Developer"
|
590 |
-
}
|
591 |
-
],
|
592 |
-
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
|
593 |
-
"time": "2018-07-08T19:23:20+00:00"
|
594 |
-
},
|
595 |
-
{
|
596 |
-
"name": "phar-io/version",
|
597 |
-
"version": "2.0.1",
|
598 |
-
"source": {
|
599 |
-
"type": "git",
|
600 |
-
"url": "https://github.com/phar-io/version.git",
|
601 |
-
"reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
|
602 |
-
},
|
603 |
-
"dist": {
|
604 |
-
"type": "zip",
|
605 |
-
"url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
|
606 |
-
"reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
|
607 |
-
"shasum": ""
|
608 |
-
},
|
609 |
-
"require": {
|
610 |
-
"php": "^5.6 || ^7.0"
|
611 |
-
},
|
612 |
-
"type": "library",
|
613 |
-
"autoload": {
|
614 |
-
"classmap": [
|
615 |
-
"src/"
|
616 |
-
]
|
617 |
-
},
|
618 |
-
"notification-url": "https://packagist.org/downloads/",
|
619 |
-
"license": [
|
620 |
-
"BSD-3-Clause"
|
621 |
-
],
|
622 |
-
"authors": [
|
623 |
-
{
|
624 |
-
"name": "Arne Blankerts",
|
625 |
-
"email": "arne@blankerts.de",
|
626 |
-
"role": "Developer"
|
627 |
-
},
|
628 |
-
{
|
629 |
-
"name": "Sebastian Heuer",
|
630 |
-
"email": "sebastian@phpeople.de",
|
631 |
-
"role": "Developer"
|
632 |
-
},
|
633 |
-
{
|
634 |
-
"name": "Sebastian Bergmann",
|
635 |
-
"email": "sebastian@phpunit.de",
|
636 |
-
"role": "Developer"
|
637 |
-
}
|
638 |
-
],
|
639 |
-
"description": "Library for handling version information and constraints",
|
640 |
-
"time": "2018-07-08T19:19:57+00:00"
|
641 |
-
},
|
642 |
-
{
|
643 |
-
"name": "phpdocumentor/reflection-common",
|
644 |
-
"version": "1.0.1",
|
645 |
-
"source": {
|
646 |
-
"type": "git",
|
647 |
-
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
648 |
-
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
|
649 |
-
},
|
650 |
-
"dist": {
|
651 |
-
"type": "zip",
|
652 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
653 |
-
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
654 |
-
"shasum": ""
|
655 |
-
},
|
656 |
-
"require": {
|
657 |
-
"php": ">=5.5"
|
658 |
-
},
|
659 |
-
"require-dev": {
|
660 |
-
"phpunit/phpunit": "^4.6"
|
661 |
-
},
|
662 |
-
"type": "library",
|
663 |
-
"extra": {
|
664 |
-
"branch-alias": {
|
665 |
-
"dev-master": "1.0.x-dev"
|
666 |
-
}
|
667 |
-
},
|
668 |
-
"autoload": {
|
669 |
-
"psr-4": {
|
670 |
-
"phpDocumentor\\Reflection\\": [
|
671 |
-
"src"
|
672 |
-
]
|
673 |
-
}
|
674 |
-
},
|
675 |
-
"notification-url": "https://packagist.org/downloads/",
|
676 |
-
"license": [
|
677 |
-
"MIT"
|
678 |
-
],
|
679 |
-
"authors": [
|
680 |
-
{
|
681 |
-
"name": "Jaap van Otterdijk",
|
682 |
-
"email": "opensource@ijaap.nl"
|
683 |
-
}
|
684 |
-
],
|
685 |
-
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
|
686 |
-
"homepage": "http://www.phpdoc.org",
|
687 |
-
"keywords": [
|
688 |
-
"FQSEN",
|
689 |
-
"phpDocumentor",
|
690 |
-
"phpdoc",
|
691 |
-
"reflection",
|
692 |
-
"static analysis"
|
693 |
-
],
|
694 |
-
"time": "2017-09-11T18:02:19+00:00"
|
695 |
-
},
|
696 |
-
{
|
697 |
-
"name": "phpdocumentor/reflection-docblock",
|
698 |
-
"version": "4.3.0",
|
699 |
-
"source": {
|
700 |
-
"type": "git",
|
701 |
-
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
702 |
-
"reference": "94fd0001232e47129dd3504189fa1c7225010d08"
|
703 |
-
},
|
704 |
-
"dist": {
|
705 |
-
"type": "zip",
|
706 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
|
707 |
-
"reference": "94fd0001232e47129dd3504189fa1c7225010d08",
|
708 |
-
"shasum": ""
|
709 |
-
},
|
710 |
-
"require": {
|
711 |
-
"php": "^7.0",
|
712 |
-
"phpdocumentor/reflection-common": "^1.0.0",
|
713 |
-
"phpdocumentor/type-resolver": "^0.4.0",
|
714 |
-
"webmozart/assert": "^1.0"
|
715 |
-
},
|
716 |
-
"require-dev": {
|
717 |
-
"doctrine/instantiator": "~1.0.5",
|
718 |
-
"mockery/mockery": "^1.0",
|
719 |
-
"phpunit/phpunit": "^6.4"
|
720 |
-
},
|
721 |
-
"type": "library",
|
722 |
-
"extra": {
|
723 |
-
"branch-alias": {
|
724 |
-
"dev-master": "4.x-dev"
|
725 |
-
}
|
726 |
-
},
|
727 |
-
"autoload": {
|
728 |
-
"psr-4": {
|
729 |
-
"phpDocumentor\\Reflection\\": [
|
730 |
-
"src/"
|
731 |
-
]
|
732 |
-
}
|
733 |
-
},
|
734 |
-
"notification-url": "https://packagist.org/downloads/",
|
735 |
-
"license": [
|
736 |
-
"MIT"
|
737 |
-
],
|
738 |
-
"authors": [
|
739 |
-
{
|
740 |
-
"name": "Mike van Riel",
|
741 |
-
"email": "me@mikevanriel.com"
|
742 |
-
}
|
743 |
-
],
|
744 |
-
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
745 |
-
"time": "2017-11-30T07:14:17+00:00"
|
746 |
-
},
|
747 |
-
{
|
748 |
-
"name": "phpdocumentor/type-resolver",
|
749 |
-
"version": "0.4.0",
|
750 |
-
"source": {
|
751 |
-
"type": "git",
|
752 |
-
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
753 |
-
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
|
754 |
-
},
|
755 |
-
"dist": {
|
756 |
-
"type": "zip",
|
757 |
-
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
|
758 |
-
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
|
759 |
-
"shasum": ""
|
760 |
-
},
|
761 |
-
"require": {
|
762 |
-
"php": "^5.5 || ^7.0",
|
763 |
-
"phpdocumentor/reflection-common": "^1.0"
|
764 |
-
},
|
765 |
-
"require-dev": {
|
766 |
-
"mockery/mockery": "^0.9.4",
|
767 |
-
"phpunit/phpunit": "^5.2||^4.8.24"
|
768 |
-
},
|
769 |
-
"type": "library",
|
770 |
-
"extra": {
|
771 |
-
"branch-alias": {
|
772 |
-
"dev-master": "1.0.x-dev"
|
773 |
-
}
|
774 |
-
},
|
775 |
-
"autoload": {
|
776 |
-
"psr-4": {
|
777 |
-
"phpDocumentor\\Reflection\\": [
|
778 |
-
"src/"
|
779 |
-
]
|
780 |
-
}
|
781 |
-
},
|
782 |
-
"notification-url": "https://packagist.org/downloads/",
|
783 |
-
"license": [
|
784 |
-
"MIT"
|
785 |
-
],
|
786 |
-
"authors": [
|
787 |
-
{
|
788 |
-
"name": "Mike van Riel",
|
789 |
-
"email": "me@mikevanriel.com"
|
790 |
-
}
|
791 |
-
],
|
792 |
-
"time": "2017-07-14T14:27:02+00:00"
|
793 |
-
},
|
794 |
-
{
|
795 |
-
"name": "phpspec/prophecy",
|
796 |
-
"version": "1.8.0",
|
797 |
-
"source": {
|
798 |
-
"type": "git",
|
799 |
-
"url": "https://github.com/phpspec/prophecy.git",
|
800 |
-
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
|
801 |
-
},
|
802 |
-
"dist": {
|
803 |
-
"type": "zip",
|
804 |
-
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
|
805 |
-
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
|
806 |
-
"shasum": ""
|
807 |
-
},
|
808 |
-
"require": {
|
809 |
-
"doctrine/instantiator": "^1.0.2",
|
810 |
-
"php": "^5.3|^7.0",
|
811 |
-
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
|
812 |
-
"sebastian/comparator": "^1.1|^2.0|^3.0",
|
813 |
-
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
814 |
-
},
|
815 |
-
"require-dev": {
|
816 |
-
"phpspec/phpspec": "^2.5|^3.2",
|
817 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
|
818 |
-
},
|
819 |
-
"type": "library",
|
820 |
-
"extra": {
|
821 |
-
"branch-alias": {
|
822 |
-
"dev-master": "1.8.x-dev"
|
823 |
-
}
|
824 |
-
},
|
825 |
-
"autoload": {
|
826 |
-
"psr-0": {
|
827 |
-
"Prophecy\\": "src/"
|
828 |
-
}
|
829 |
-
},
|
830 |
-
"notification-url": "https://packagist.org/downloads/",
|
831 |
-
"license": [
|
832 |
-
"MIT"
|
833 |
-
],
|
834 |
-
"authors": [
|
835 |
-
{
|
836 |
-
"name": "Konstantin Kudryashov",
|
837 |
-
"email": "ever.zet@gmail.com",
|
838 |
-
"homepage": "http://everzet.com"
|
839 |
-
},
|
840 |
-
{
|
841 |
-
"name": "Marcello Duarte",
|
842 |
-
"email": "marcello.duarte@gmail.com"
|
843 |
-
}
|
844 |
-
],
|
845 |
-
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
846 |
-
"homepage": "https://github.com/phpspec/prophecy",
|
847 |
-
"keywords": [
|
848 |
-
"Double",
|
849 |
-
"Dummy",
|
850 |
-
"fake",
|
851 |
-
"mock",
|
852 |
-
"spy",
|
853 |
-
"stub"
|
854 |
-
],
|
855 |
-
"time": "2018-08-05T17:53:17+00:00"
|
856 |
-
},
|
857 |
-
{
|
858 |
-
"name": "phpunit/php-code-coverage",
|
859 |
-
"version": "6.1.4",
|
860 |
-
"source": {
|
861 |
-
"type": "git",
|
862 |
-
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
863 |
-
"reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
|
864 |
-
},
|
865 |
-
"dist": {
|
866 |
-
"type": "zip",
|
867 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
|
868 |
-
"reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
|
869 |
-
"shasum": ""
|
870 |
-
},
|
871 |
-
"require": {
|
872 |
-
"ext-dom": "*",
|
873 |
-
"ext-xmlwriter": "*",
|
874 |
-
"php": "^7.1",
|
875 |
-
"phpunit/php-file-iterator": "^2.0",
|
876 |
-
"phpunit/php-text-template": "^1.2.1",
|
877 |
-
"phpunit/php-token-stream": "^3.0",
|
878 |
-
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
879 |
-
"sebastian/environment": "^3.1 || ^4.0",
|
880 |
-
"sebastian/version": "^2.0.1",
|
881 |
-
"theseer/tokenizer": "^1.1"
|
882 |
-
},
|
883 |
-
"require-dev": {
|
884 |
-
"phpunit/phpunit": "^7.0"
|
885 |
-
},
|
886 |
-
"suggest": {
|
887 |
-
"ext-xdebug": "^2.6.0"
|
888 |
-
},
|
889 |
-
"type": "library",
|
890 |
-
"extra": {
|
891 |
-
"branch-alias": {
|
892 |
-
"dev-master": "6.1-dev"
|
893 |
-
}
|
894 |
-
},
|
895 |
-
"autoload": {
|
896 |
-
"classmap": [
|
897 |
-
"src/"
|
898 |
-
]
|
899 |
-
},
|
900 |
-
"notification-url": "https://packagist.org/downloads/",
|
901 |
-
"license": [
|
902 |
-
"BSD-3-Clause"
|
903 |
-
],
|
904 |
-
"authors": [
|
905 |
-
{
|
906 |
-
"name": "Sebastian Bergmann",
|
907 |
-
"email": "sebastian@phpunit.de",
|
908 |
-
"role": "lead"
|
909 |
-
}
|
910 |
-
],
|
911 |
-
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
912 |
-
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
913 |
-
"keywords": [
|
914 |
-
"coverage",
|
915 |
-
"testing",
|
916 |
-
"xunit"
|
917 |
-
],
|
918 |
-
"time": "2018-10-31T16:06:48+00:00"
|
919 |
-
},
|
920 |
-
{
|
921 |
-
"name": "phpunit/php-file-iterator",
|
922 |
-
"version": "2.0.2",
|
923 |
-
"source": {
|
924 |
-
"type": "git",
|
925 |
-
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
926 |
-
"reference": "050bedf145a257b1ff02746c31894800e5122946"
|
927 |
-
},
|
928 |
-
"dist": {
|
929 |
-
"type": "zip",
|
930 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
|
931 |
-
"reference": "050bedf145a257b1ff02746c31894800e5122946",
|
932 |
-
"shasum": ""
|
933 |
-
},
|
934 |
-
"require": {
|
935 |
-
"php": "^7.1"
|
936 |
-
},
|
937 |
-
"require-dev": {
|
938 |
-
"phpunit/phpunit": "^7.1"
|
939 |
-
},
|
940 |
-
"type": "library",
|
941 |
-
"extra": {
|
942 |
-
"branch-alias": {
|
943 |
-
"dev-master": "2.0.x-dev"
|
944 |
-
}
|
945 |
-
},
|
946 |
-
"autoload": {
|
947 |
-
"classmap": [
|
948 |
-
"src/"
|
949 |
-
]
|
950 |
-
},
|
951 |
-
"notification-url": "https://packagist.org/downloads/",
|
952 |
-
"license": [
|
953 |
-
"BSD-3-Clause"
|
954 |
-
],
|
955 |
-
"authors": [
|
956 |
-
{
|
957 |
-
"name": "Sebastian Bergmann",
|
958 |
-
"email": "sebastian@phpunit.de",
|
959 |
-
"role": "lead"
|
960 |
-
}
|
961 |
-
],
|
962 |
-
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
963 |
-
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
964 |
-
"keywords": [
|
965 |
-
"filesystem",
|
966 |
-
"iterator"
|
967 |
-
],
|
968 |
-
"time": "2018-09-13T20:33:42+00:00"
|
969 |
-
},
|
970 |
-
{
|
971 |
-
"name": "phpunit/php-text-template",
|
972 |
-
"version": "1.2.1",
|
973 |
-
"source": {
|
974 |
-
"type": "git",
|
975 |
-
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
976 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
977 |
-
},
|
978 |
-
"dist": {
|
979 |
-
"type": "zip",
|
980 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
981 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
982 |
-
"shasum": ""
|
983 |
-
},
|
984 |
-
"require": {
|
985 |
-
"php": ">=5.3.3"
|
986 |
-
},
|
987 |
-
"type": "library",
|
988 |
-
"autoload": {
|
989 |
-
"classmap": [
|
990 |
-
"src/"
|
991 |
-
]
|
992 |
-
},
|
993 |
-
"notification-url": "https://packagist.org/downloads/",
|
994 |
-
"license": [
|
995 |
-
"BSD-3-Clause"
|
996 |
-
],
|
997 |
-
"authors": [
|
998 |
-
{
|
999 |
-
"name": "Sebastian Bergmann",
|
1000 |
-
"email": "sebastian@phpunit.de",
|
1001 |
-
"role": "lead"
|
1002 |
-
}
|
1003 |
-
],
|
1004 |
-
"description": "Simple template engine.",
|
1005 |
-
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
1006 |
-
"keywords": [
|
1007 |
-
"template"
|
1008 |
-
],
|
1009 |
-
"time": "2015-06-21T13:50:34+00:00"
|
1010 |
-
},
|
1011 |
-
{
|
1012 |
-
"name": "phpunit/php-timer",
|
1013 |
-
"version": "2.1.1",
|
1014 |
-
"source": {
|
1015 |
-
"type": "git",
|
1016 |
-
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
1017 |
-
"reference": "8b389aebe1b8b0578430bda0c7c95a829608e059"
|
1018 |
-
},
|
1019 |
-
"dist": {
|
1020 |
-
"type": "zip",
|
1021 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059",
|
1022 |
-
"reference": "8b389aebe1b8b0578430bda0c7c95a829608e059",
|
1023 |
-
"shasum": ""
|
1024 |
-
},
|
1025 |
-
"require": {
|
1026 |
-
"php": "^7.1"
|
1027 |
-
},
|
1028 |
-
"require-dev": {
|
1029 |
-
"phpunit/phpunit": "^7.0"
|
1030 |
-
},
|
1031 |
-
"type": "library",
|
1032 |
-
"extra": {
|
1033 |
-
"branch-alias": {
|
1034 |
-
"dev-master": "2.1-dev"
|
1035 |
-
}
|
1036 |
-
},
|
1037 |
-
"autoload": {
|
1038 |
-
"classmap": [
|
1039 |
-
"src/"
|
1040 |
-
]
|
1041 |
-
},
|
1042 |
-
"notification-url": "https://packagist.org/downloads/",
|
1043 |
-
"license": [
|
1044 |
-
"BSD-3-Clause"
|
1045 |
-
],
|
1046 |
-
"authors": [
|
1047 |
-
{
|
1048 |
-
"name": "Sebastian Bergmann",
|
1049 |
-
"email": "sebastian@phpunit.de",
|
1050 |
-
"role": "lead"
|
1051 |
-
}
|
1052 |
-
],
|
1053 |
-
"description": "Utility class for timing",
|
1054 |
-
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
1055 |
-
"keywords": [
|
1056 |
-
"timer"
|
1057 |
-
],
|
1058 |
-
"time": "2019-02-20T10:12:59+00:00"
|
1059 |
-
},
|
1060 |
-
{
|
1061 |
-
"name": "phpunit/php-token-stream",
|
1062 |
-
"version": "3.0.1",
|
1063 |
-
"source": {
|
1064 |
-
"type": "git",
|
1065 |
-
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
1066 |
-
"reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18"
|
1067 |
-
},
|
1068 |
-
"dist": {
|
1069 |
-
"type": "zip",
|
1070 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18",
|
1071 |
-
"reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18",
|
1072 |
-
"shasum": ""
|
1073 |
-
},
|
1074 |
-
"require": {
|
1075 |
-
"ext-tokenizer": "*",
|
1076 |
-
"php": "^7.1"
|
1077 |
-
},
|
1078 |
-
"require-dev": {
|
1079 |
-
"phpunit/phpunit": "^7.0"
|
1080 |
-
},
|
1081 |
-
"type": "library",
|
1082 |
-
"extra": {
|
1083 |
-
"branch-alias": {
|
1084 |
-
"dev-master": "3.0-dev"
|
1085 |
-
}
|
1086 |
-
},
|
1087 |
-
"autoload": {
|
1088 |
-
"classmap": [
|
1089 |
-
"src/"
|
1090 |
-
]
|
1091 |
-
},
|
1092 |
-
"notification-url": "https://packagist.org/downloads/",
|
1093 |
-
"license": [
|
1094 |
-
"BSD-3-Clause"
|
1095 |
-
],
|
1096 |
-
"authors": [
|
1097 |
-
{
|
1098 |
-
"name": "Sebastian Bergmann",
|
1099 |
-
"email": "sebastian@phpunit.de"
|
1100 |
-
}
|
1101 |
-
],
|
1102 |
-
"description": "Wrapper around PHP's tokenizer extension.",
|
1103 |
-
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
1104 |
-
"keywords": [
|
1105 |
-
"tokenizer"
|
1106 |
-
],
|
1107 |
-
"time": "2018-10-30T05:52:18+00:00"
|
1108 |
-
},
|
1109 |
-
{
|
1110 |
-
"name": "phpunit/phpunit",
|
1111 |
-
"version": "7.5.7",
|
1112 |
-
"source": {
|
1113 |
-
"type": "git",
|
1114 |
-
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
1115 |
-
"reference": "eb343b86753d26de07ecba7868fa983104361948"
|
1116 |
-
},
|
1117 |
-
"dist": {
|
1118 |
-
"type": "zip",
|
1119 |
-
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/eb343b86753d26de07ecba7868fa983104361948",
|
1120 |
-
"reference": "eb343b86753d26de07ecba7868fa983104361948",
|
1121 |
-
"shasum": ""
|
1122 |
-
},
|
1123 |
-
"require": {
|
1124 |
-
"doctrine/instantiator": "^1.1",
|
1125 |
-
"ext-dom": "*",
|
1126 |
-
"ext-json": "*",
|
1127 |
-
"ext-libxml": "*",
|
1128 |
-
"ext-mbstring": "*",
|
1129 |
-
"ext-xml": "*",
|
1130 |
-
"myclabs/deep-copy": "^1.7",
|
1131 |
-
"phar-io/manifest": "^1.0.2",
|
1132 |
-
"phar-io/version": "^2.0",
|
1133 |
-
"php": "^7.1",
|
1134 |
-
"phpspec/prophecy": "^1.7",
|
1135 |
-
"phpunit/php-code-coverage": "^6.0.7",
|
1136 |
-
"phpunit/php-file-iterator": "^2.0.1",
|
1137 |
-
"phpunit/php-text-template": "^1.2.1",
|
1138 |
-
"phpunit/php-timer": "^2.1",
|
1139 |
-
"sebastian/comparator": "^3.0",
|
1140 |
-
"sebastian/diff": "^3.0",
|
1141 |
-
"sebastian/environment": "^4.0",
|
1142 |
-
"sebastian/exporter": "^3.1",
|
1143 |
-
"sebastian/global-state": "^2.0",
|
1144 |
-
"sebastian/object-enumerator": "^3.0.3",
|
1145 |
-
"sebastian/resource-operations": "^2.0",
|
1146 |
-
"sebastian/version": "^2.0.1"
|
1147 |
-
},
|
1148 |
-
"conflict": {
|
1149 |
-
"phpunit/phpunit-mock-objects": "*"
|
1150 |
-
},
|
1151 |
-
"require-dev": {
|
1152 |
-
"ext-pdo": "*"
|
1153 |
-
},
|
1154 |
-
"suggest": {
|
1155 |
-
"ext-soap": "*",
|
1156 |
-
"ext-xdebug": "*",
|
1157 |
-
"phpunit/php-invoker": "^2.0"
|
1158 |
-
},
|
1159 |
-
"bin": [
|
1160 |
-
"phpunit"
|
1161 |
-
],
|
1162 |
-
"type": "library",
|
1163 |
-
"extra": {
|
1164 |
-
"branch-alias": {
|
1165 |
-
"dev-master": "7.5-dev"
|
1166 |
-
}
|
1167 |
-
},
|
1168 |
-
"autoload": {
|
1169 |
-
"classmap": [
|
1170 |
-
"src/"
|
1171 |
-
]
|
1172 |
-
},
|
1173 |
-
"notification-url": "https://packagist.org/downloads/",
|
1174 |
-
"license": [
|
1175 |
-
"BSD-3-Clause"
|
1176 |
-
],
|
1177 |
-
"authors": [
|
1178 |
-
{
|
1179 |
-
"name": "Sebastian Bergmann",
|
1180 |
-
"email": "sebastian@phpunit.de",
|
1181 |
-
"role": "lead"
|
1182 |
-
}
|
1183 |
-
],
|
1184 |
-
"description": "The PHP Unit Testing framework.",
|
1185 |
-
"homepage": "https://phpunit.de/",
|
1186 |
-
"keywords": [
|
1187 |
-
"phpunit",
|
1188 |
-
"testing",
|
1189 |
-
"xunit"
|
1190 |
-
],
|
1191 |
-
"time": "2019-03-16T07:31:17+00:00"
|
1192 |
-
},
|
1193 |
-
{
|
1194 |
-
"name": "sebastian/code-unit-reverse-lookup",
|
1195 |
-
"version": "1.0.1",
|
1196 |
-
"source": {
|
1197 |
-
"type": "git",
|
1198 |
-
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
|
1199 |
-
"reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
|
1200 |
-
},
|
1201 |
-
"dist": {
|
1202 |
-
"type": "zip",
|
1203 |
-
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
|
1204 |
-
"reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
|
1205 |
-
"shasum": ""
|
1206 |
-
},
|
1207 |
-
"require": {
|
1208 |
-
"php": "^5.6 || ^7.0"
|
1209 |
-
},
|
1210 |
-
"require-dev": {
|
1211 |
-
"phpunit/phpunit": "^5.7 || ^6.0"
|
1212 |
-
},
|
1213 |
-
"type": "library",
|
1214 |
-
"extra": {
|
1215 |
-
"branch-alias": {
|
1216 |
-
"dev-master": "1.0.x-dev"
|
1217 |
-
}
|
1218 |
-
},
|
1219 |
-
"autoload": {
|
1220 |
-
"classmap": [
|
1221 |
-
"src/"
|
1222 |
-
]
|
1223 |
-
},
|
1224 |
-
"notification-url": "https://packagist.org/downloads/",
|
1225 |
-
"license": [
|
1226 |
-
"BSD-3-Clause"
|
1227 |
-
],
|
1228 |
-
"authors": [
|
1229 |
-
{
|
1230 |
-
"name": "Sebastian Bergmann",
|
1231 |
-
"email": "sebastian@phpunit.de"
|
1232 |
-
}
|
1233 |
-
],
|
1234 |
-
"description": "Looks up which function or method a line of code belongs to",
|
1235 |
-
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
|
1236 |
-
"time": "2017-03-04T06:30:41+00:00"
|
1237 |
-
},
|
1238 |
-
{
|
1239 |
-
"name": "sebastian/comparator",
|
1240 |
-
"version": "3.0.2",
|
1241 |
-
"source": {
|
1242 |
-
"type": "git",
|
1243 |
-
"url": "https://github.com/sebastianbergmann/comparator.git",
|
1244 |
-
"reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
|
1245 |
-
},
|
1246 |
-
"dist": {
|
1247 |
-
"type": "zip",
|
1248 |
-
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
|
1249 |
-
"reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
|
1250 |
-
"shasum": ""
|
1251 |
-
},
|
1252 |
-
"require": {
|
1253 |
-
"php": "^7.1",
|
1254 |
-
"sebastian/diff": "^3.0",
|
1255 |
-
"sebastian/exporter": "^3.1"
|
1256 |
-
},
|
1257 |
-
"require-dev": {
|
1258 |
-
"phpunit/phpunit": "^7.1"
|
1259 |
-
},
|
1260 |
-
"type": "library",
|
1261 |
-
"extra": {
|
1262 |
-
"branch-alias": {
|
1263 |
-
"dev-master": "3.0-dev"
|
1264 |
-
}
|
1265 |
-
},
|
1266 |
-
"autoload": {
|
1267 |
-
"classmap": [
|
1268 |
-
"src/"
|
1269 |
-
]
|
1270 |
-
},
|
1271 |
-
"notification-url": "https://packagist.org/downloads/",
|
1272 |
-
"license": [
|
1273 |
-
"BSD-3-Clause"
|
1274 |
-
],
|
1275 |
-
"authors": [
|
1276 |
-
{
|
1277 |
-
"name": "Jeff Welch",
|
1278 |
-
"email": "whatthejeff@gmail.com"
|
1279 |
-
},
|
1280 |
-
{
|
1281 |
-
"name": "Volker Dusch",
|
1282 |
-
"email": "github@wallbash.com"
|
1283 |
-
},
|
1284 |
-
{
|
1285 |
-
"name": "Bernhard Schussek",
|
1286 |
-
"email": "bschussek@2bepublished.at"
|
1287 |
-
},
|
1288 |
-
{
|
1289 |
-
"name": "Sebastian Bergmann",
|
1290 |
-
"email": "sebastian@phpunit.de"
|
1291 |
-
}
|
1292 |
-
],
|
1293 |
-
"description": "Provides the functionality to compare PHP values for equality",
|
1294 |
-
"homepage": "https://github.com/sebastianbergmann/comparator",
|
1295 |
-
"keywords": [
|
1296 |
-
"comparator",
|
1297 |
-
"compare",
|
1298 |
-
"equality"
|
1299 |
-
],
|
1300 |
-
"time": "2018-07-12T15:12:46+00:00"
|
1301 |
-
},
|
1302 |
-
{
|
1303 |
-
"name": "sebastian/diff",
|
1304 |
-
"version": "3.0.2",
|
1305 |
-
"source": {
|
1306 |
-
"type": "git",
|
1307 |
-
"url": "https://github.com/sebastianbergmann/diff.git",
|
1308 |
-
"reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
|
1309 |
-
},
|
1310 |
-
"dist": {
|
1311 |
-
"type": "zip",
|
1312 |
-
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
|
1313 |
-
"reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
|
1314 |
-
"shasum": ""
|
1315 |
-
},
|
1316 |
-
"require": {
|
1317 |
-
"php": "^7.1"
|
1318 |
-
},
|
1319 |
-
"require-dev": {
|
1320 |
-
"phpunit/phpunit": "^7.5 || ^8.0",
|
1321 |
-
"symfony/process": "^2 || ^3.3 || ^4"
|
1322 |
-
},
|
1323 |
-
"type": "library",
|
1324 |
-
"extra": {
|
1325 |
-
"branch-alias": {
|
1326 |
-
"dev-master": "3.0-dev"
|
1327 |
-
}
|
1328 |
-
},
|
1329 |
-
"autoload": {
|
1330 |
-
"classmap": [
|
1331 |
-
"src/"
|
1332 |
-
]
|
1333 |
-
},
|
1334 |
-
"notification-url": "https://packagist.org/downloads/",
|
1335 |
-
"license": [
|
1336 |
-
"BSD-3-Clause"
|
1337 |
-
],
|
1338 |
-
"authors": [
|
1339 |
-
{
|
1340 |
-
"name": "Kore Nordmann",
|
1341 |
-
"email": "mail@kore-nordmann.de"
|
1342 |
-
},
|
1343 |
-
{
|
1344 |
-
"name": "Sebastian Bergmann",
|
1345 |
-
"email": "sebastian@phpunit.de"
|
1346 |
-
}
|
1347 |
-
],
|
1348 |
-
"description": "Diff implementation",
|
1349 |
-
"homepage": "https://github.com/sebastianbergmann/diff",
|
1350 |
-
"keywords": [
|
1351 |
-
"diff",
|
1352 |
-
"udiff",
|
1353 |
-
"unidiff",
|
1354 |
-
"unified diff"
|
1355 |
-
],
|
1356 |
-
"time": "2019-02-04T06:01:07+00:00"
|
1357 |
-
},
|
1358 |
-
{
|
1359 |
-
"name": "sebastian/environment",
|
1360 |
-
"version": "4.1.0",
|
1361 |
-
"source": {
|
1362 |
-
"type": "git",
|
1363 |
-
"url": "https://github.com/sebastianbergmann/environment.git",
|
1364 |
-
"reference": "6fda8ce1974b62b14935adc02a9ed38252eca656"
|
1365 |
-
},
|
1366 |
-
"dist": {
|
1367 |
-
"type": "zip",
|
1368 |
-
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656",
|
1369 |
-
"reference": "6fda8ce1974b62b14935adc02a9ed38252eca656",
|
1370 |
-
"shasum": ""
|
1371 |
-
},
|
1372 |
-
"require": {
|
1373 |
-
"php": "^7.1"
|
1374 |
-
},
|
1375 |
-
"require-dev": {
|
1376 |
-
"phpunit/phpunit": "^7.5"
|
1377 |
-
},
|
1378 |
-
"suggest": {
|
1379 |
-
"ext-posix": "*"
|
1380 |
-
},
|
1381 |
-
"type": "library",
|
1382 |
-
"extra": {
|
1383 |
-
"branch-alias": {
|
1384 |
-
"dev-master": "4.1-dev"
|
1385 |
-
}
|
1386 |
-
},
|
1387 |
-
"autoload": {
|
1388 |
-
"classmap": [
|
1389 |
-
"src/"
|
1390 |
-
]
|
1391 |
-
},
|
1392 |
-
"notification-url": "https://packagist.org/downloads/",
|
1393 |
-
"license": [
|
1394 |
-
"BSD-3-Clause"
|
1395 |
-
],
|
1396 |
-
"authors": [
|
1397 |
-
{
|
1398 |
-
"name": "Sebastian Bergmann",
|
1399 |
-
"email": "sebastian@phpunit.de"
|
1400 |
-
}
|
1401 |
-
],
|
1402 |
-
"description": "Provides functionality to handle HHVM/PHP environments",
|
1403 |
-
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
1404 |
-
"keywords": [
|
1405 |
-
"Xdebug",
|
1406 |
-
"environment",
|
1407 |
-
"hhvm"
|
1408 |
-
],
|
1409 |
-
"time": "2019-02-01T05:27:49+00:00"
|
1410 |
-
},
|
1411 |
-
{
|
1412 |
-
"name": "sebastian/exporter",
|
1413 |
-
"version": "3.1.0",
|
1414 |
-
"source": {
|
1415 |
-
"type": "git",
|
1416 |
-
"url": "https://github.com/sebastianbergmann/exporter.git",
|
1417 |
-
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
|
1418 |
-
},
|
1419 |
-
"dist": {
|
1420 |
-
"type": "zip",
|
1421 |
-
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
|
1422 |
-
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
|
1423 |
-
"shasum": ""
|
1424 |
-
},
|
1425 |
-
"require": {
|
1426 |
-
"php": "^7.0",
|
1427 |
-
"sebastian/recursion-context": "^3.0"
|
1428 |
-
},
|
1429 |
-
"require-dev": {
|
1430 |
-
"ext-mbstring": "*",
|
1431 |
-
"phpunit/phpunit": "^6.0"
|
1432 |
-
},
|
1433 |
-
"type": "library",
|
1434 |
-
"extra": {
|
1435 |
-
"branch-alias": {
|
1436 |
-
"dev-master": "3.1.x-dev"
|
1437 |
-
}
|
1438 |
-
},
|
1439 |
-
"autoload": {
|
1440 |
-
"classmap": [
|
1441 |
-
"src/"
|
1442 |
-
]
|
1443 |
-
},
|
1444 |
-
"notification-url": "https://packagist.org/downloads/",
|
1445 |
-
"license": [
|
1446 |
-
"BSD-3-Clause"
|
1447 |
-
],
|
1448 |
-
"authors": [
|
1449 |
-
{
|
1450 |
-
"name": "Jeff Welch",
|
1451 |
-
"email": "whatthejeff@gmail.com"
|
1452 |
-
},
|
1453 |
-
{
|
1454 |
-
"name": "Volker Dusch",
|
1455 |
-
"email": "github@wallbash.com"
|
1456 |
-
},
|
1457 |
-
{
|
1458 |
-
"name": "Bernhard Schussek",
|
1459 |
-
"email": "bschussek@2bepublished.at"
|
1460 |
-
},
|
1461 |
-
{
|
1462 |
-
"name": "Sebastian Bergmann",
|
1463 |
-
"email": "sebastian@phpunit.de"
|
1464 |
-
},
|
1465 |
-
{
|
1466 |
-
"name": "Adam Harvey",
|
1467 |
-
"email": "aharvey@php.net"
|
1468 |
-
}
|
1469 |
-
],
|
1470 |
-
"description": "Provides the functionality to export PHP variables for visualization",
|
1471 |
-
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
1472 |
-
"keywords": [
|
1473 |
-
"export",
|
1474 |
-
"exporter"
|
1475 |
-
],
|
1476 |
-
"time": "2017-04-03T13:19:02+00:00"
|
1477 |
-
},
|
1478 |
-
{
|
1479 |
-
"name": "sebastian/global-state",
|
1480 |
-
"version": "2.0.0",
|
1481 |
-
"source": {
|
1482 |
-
"type": "git",
|
1483 |
-
"url": "https://github.com/sebastianbergmann/global-state.git",
|
1484 |
-
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
|
1485 |
-
},
|
1486 |
-
"dist": {
|
1487 |
-
"type": "zip",
|
1488 |
-
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
|
1489 |
-
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
|
1490 |
-
"shasum": ""
|
1491 |
-
},
|
1492 |
-
"require": {
|
1493 |
-
"php": "^7.0"
|
1494 |
-
},
|
1495 |
-
"require-dev": {
|
1496 |
-
"phpunit/phpunit": "^6.0"
|
1497 |
-
},
|
1498 |
-
"suggest": {
|
1499 |
-
"ext-uopz": "*"
|
1500 |
-
},
|
1501 |
-
"type": "library",
|
1502 |
-
"extra": {
|
1503 |
-
"branch-alias": {
|
1504 |
-
"dev-master": "2.0-dev"
|
1505 |
-
}
|
1506 |
-
},
|
1507 |
-
"autoload": {
|
1508 |
-
"classmap": [
|
1509 |
-
"src/"
|
1510 |
-
]
|
1511 |
-
},
|
1512 |
-
"notification-url": "https://packagist.org/downloads/",
|
1513 |
-
"license": [
|
1514 |
-
"BSD-3-Clause"
|
1515 |
-
],
|
1516 |
-
"authors": [
|
1517 |
-
{
|
1518 |
-
"name": "Sebastian Bergmann",
|
1519 |
-
"email": "sebastian@phpunit.de"
|
1520 |
-
}
|
1521 |
-
],
|
1522 |
-
"description": "Snapshotting of global state",
|
1523 |
-
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
1524 |
-
"keywords": [
|
1525 |
-
"global state"
|
1526 |
-
],
|
1527 |
-
"time": "2017-04-27T15:39:26+00:00"
|
1528 |
-
},
|
1529 |
-
{
|
1530 |
-
"name": "sebastian/object-enumerator",
|
1531 |
-
"version": "3.0.3",
|
1532 |
-
"source": {
|
1533 |
-
"type": "git",
|
1534 |
-
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
|
1535 |
-
"reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
|
1536 |
-
},
|
1537 |
-
"dist": {
|
1538 |
-
"type": "zip",
|
1539 |
-
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
|
1540 |
-
"reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
|
1541 |
-
"shasum": ""
|
1542 |
-
},
|
1543 |
-
"require": {
|
1544 |
-
"php": "^7.0",
|
1545 |
-
"sebastian/object-reflector": "^1.1.1",
|
1546 |
-
"sebastian/recursion-context": "^3.0"
|
1547 |
-
},
|
1548 |
-
"require-dev": {
|
1549 |
-
"phpunit/phpunit": "^6.0"
|
1550 |
-
},
|
1551 |
-
"type": "library",
|
1552 |
-
"extra": {
|
1553 |
-
"branch-alias": {
|
1554 |
-
"dev-master": "3.0.x-dev"
|
1555 |
-
}
|
1556 |
-
},
|
1557 |
-
"autoload": {
|
1558 |
-
"classmap": [
|
1559 |
-
"src/"
|
1560 |
-
]
|
1561 |
-
},
|
1562 |
-
"notification-url": "https://packagist.org/downloads/",
|
1563 |
-
"license": [
|
1564 |
-
"BSD-3-Clause"
|
1565 |
-
],
|
1566 |
-
"authors": [
|
1567 |
-
{
|
1568 |
-
"name": "Sebastian Bergmann",
|
1569 |
-
"email": "sebastian@phpunit.de"
|
1570 |
-
}
|
1571 |
-
],
|
1572 |
-
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
|
1573 |
-
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
|
1574 |
-
"time": "2017-08-03T12:35:26+00:00"
|
1575 |
-
},
|
1576 |
-
{
|
1577 |
-
"name": "sebastian/object-reflector",
|
1578 |
-
"version": "1.1.1",
|
1579 |
-
"source": {
|
1580 |
-
"type": "git",
|
1581 |
-
"url": "https://github.com/sebastianbergmann/object-reflector.git",
|
1582 |
-
"reference": "773f97c67f28de00d397be301821b06708fca0be"
|
1583 |
-
},
|
1584 |
-
"dist": {
|
1585 |
-
"type": "zip",
|
1586 |
-
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
|
1587 |
-
"reference": "773f97c67f28de00d397be301821b06708fca0be",
|
1588 |
-
"shasum": ""
|
1589 |
-
},
|
1590 |
-
"require": {
|
1591 |
-
"php": "^7.0"
|
1592 |
-
},
|
1593 |
-
"require-dev": {
|
1594 |
-
"phpunit/phpunit": "^6.0"
|
1595 |
-
},
|
1596 |
-
"type": "library",
|
1597 |
-
"extra": {
|
1598 |
-
"branch-alias": {
|
1599 |
-
"dev-master": "1.1-dev"
|
1600 |
-
}
|
1601 |
-
},
|
1602 |
-
"autoload": {
|
1603 |
-
"classmap": [
|
1604 |
-
"src/"
|
1605 |
-
]
|
1606 |
-
},
|
1607 |
-
"notification-url": "https://packagist.org/downloads/",
|
1608 |
-
"license": [
|
1609 |
-
"BSD-3-Clause"
|
1610 |
-
],
|
1611 |
-
"authors": [
|
1612 |
-
{
|
1613 |
-
"name": "Sebastian Bergmann",
|
1614 |
-
"email": "sebastian@phpunit.de"
|
1615 |
-
}
|
1616 |
-
],
|
1617 |
-
"description": "Allows reflection of object attributes, including inherited and non-public ones",
|
1618 |
-
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
|
1619 |
-
"time": "2017-03-29T09:07:27+00:00"
|
1620 |
-
},
|
1621 |
-
{
|
1622 |
-
"name": "sebastian/recursion-context",
|
1623 |
-
"version": "3.0.0",
|
1624 |
-
"source": {
|
1625 |
-
"type": "git",
|
1626 |
-
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
1627 |
-
"reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
|
1628 |
-
},
|
1629 |
-
"dist": {
|
1630 |
-
"type": "zip",
|
1631 |
-
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
|
1632 |
-
"reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
|
1633 |
-
"shasum": ""
|
1634 |
-
},
|
1635 |
-
"require": {
|
1636 |
-
"php": "^7.0"
|
1637 |
-
},
|
1638 |
-
"require-dev": {
|
1639 |
-
"phpunit/phpunit": "^6.0"
|
1640 |
-
},
|
1641 |
-
"type": "library",
|
1642 |
-
"extra": {
|
1643 |
-
"branch-alias": {
|
1644 |
-
"dev-master": "3.0.x-dev"
|
1645 |
-
}
|
1646 |
-
},
|
1647 |
-
"autoload": {
|
1648 |
-
"classmap": [
|
1649 |
-
"src/"
|
1650 |
-
]
|
1651 |
-
},
|
1652 |
-
"notification-url": "https://packagist.org/downloads/",
|
1653 |
-
"license": [
|
1654 |
-
"BSD-3-Clause"
|
1655 |
-
],
|
1656 |
-
"authors": [
|
1657 |
-
{
|
1658 |
-
"name": "Jeff Welch",
|
1659 |
-
"email": "whatthejeff@gmail.com"
|
1660 |
-
},
|
1661 |
-
{
|
1662 |
-
"name": "Sebastian Bergmann",
|
1663 |
-
"email": "sebastian@phpunit.de"
|
1664 |
-
},
|
1665 |
-
{
|
1666 |
-
"name": "Adam Harvey",
|
1667 |
-
"email": "aharvey@php.net"
|
1668 |
-
}
|
1669 |
-
],
|
1670 |
-
"description": "Provides functionality to recursively process PHP variables",
|
1671 |
-
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
1672 |
-
"time": "2017-03-03T06:23:57+00:00"
|
1673 |
-
},
|
1674 |
-
{
|
1675 |
-
"name": "sebastian/resource-operations",
|
1676 |
-
"version": "2.0.1",
|
1677 |
-
"source": {
|
1678 |
-
"type": "git",
|
1679 |
-
"url": "https://github.com/sebastianbergmann/resource-operations.git",
|
1680 |
-
"reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
|
1681 |
-
},
|
1682 |
-
"dist": {
|
1683 |
-
"type": "zip",
|
1684 |
-
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
|
1685 |
-
"reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
|
1686 |
-
"shasum": ""
|
1687 |
-
},
|
1688 |
-
"require": {
|
1689 |
-
"php": "^7.1"
|
1690 |
-
},
|
1691 |
-
"type": "library",
|
1692 |
-
"extra": {
|
1693 |
-
"branch-alias": {
|
1694 |
-
"dev-master": "2.0-dev"
|
1695 |
-
}
|
1696 |
-
},
|
1697 |
-
"autoload": {
|
1698 |
-
"classmap": [
|
1699 |
-
"src/"
|
1700 |
-
]
|
1701 |
-
},
|
1702 |
-
"notification-url": "https://packagist.org/downloads/",
|
1703 |
-
"license": [
|
1704 |
-
"BSD-3-Clause"
|
1705 |
-
],
|
1706 |
-
"authors": [
|
1707 |
-
{
|
1708 |
-
"name": "Sebastian Bergmann",
|
1709 |
-
"email": "sebastian@phpunit.de"
|
1710 |
-
}
|
1711 |
-
],
|
1712 |
-
"description": "Provides a list of PHP built-in functions that operate on resources",
|
1713 |
-
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
|
1714 |
-
"time": "2018-10-04T04:07:39+00:00"
|
1715 |
-
},
|
1716 |
-
{
|
1717 |
-
"name": "sebastian/version",
|
1718 |
-
"version": "2.0.1",
|
1719 |
-
"source": {
|
1720 |
-
"type": "git",
|
1721 |
-
"url": "https://github.com/sebastianbergmann/version.git",
|
1722 |
-
"reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
|
1723 |
-
},
|
1724 |
-
"dist": {
|
1725 |
-
"type": "zip",
|
1726 |
-
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
|
1727 |
-
"reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
|
1728 |
-
"shasum": ""
|
1729 |
-
},
|
1730 |
-
"require": {
|
1731 |
-
"php": ">=5.6"
|
1732 |
-
},
|
1733 |
-
"type": "library",
|
1734 |
-
"extra": {
|
1735 |
-
"branch-alias": {
|
1736 |
-
"dev-master": "2.0.x-dev"
|
1737 |
-
}
|
1738 |
-
},
|
1739 |
-
"autoload": {
|
1740 |
-
"classmap": [
|
1741 |
-
"src/"
|
1742 |
-
]
|
1743 |
-
},
|
1744 |
-
"notification-url": "https://packagist.org/downloads/",
|
1745 |
-
"license": [
|
1746 |
-
"BSD-3-Clause"
|
1747 |
-
],
|
1748 |
-
"authors": [
|
1749 |
-
{
|
1750 |
-
"name": "Sebastian Bergmann",
|
1751 |
-
"email": "sebastian@phpunit.de",
|
1752 |
-
"role": "lead"
|
1753 |
-
}
|
1754 |
-
],
|
1755 |
-
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
1756 |
-
"homepage": "https://github.com/sebastianbergmann/version",
|
1757 |
-
"time": "2016-10-03T07:35:21+00:00"
|
1758 |
-
},
|
1759 |
-
{
|
1760 |
-
"name": "symfony/polyfill-ctype",
|
1761 |
-
"version": "v1.10.0",
|
1762 |
-
"source": {
|
1763 |
-
"type": "git",
|
1764 |
-
"url": "https://github.com/symfony/polyfill-ctype.git",
|
1765 |
-
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
|
1766 |
-
},
|
1767 |
-
"dist": {
|
1768 |
-
"type": "zip",
|
1769 |
-
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
|
1770 |
-
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
|
1771 |
-
"shasum": ""
|
1772 |
-
},
|
1773 |
-
"require": {
|
1774 |
-
"php": ">=5.3.3"
|
1775 |
-
},
|
1776 |
-
"suggest": {
|
1777 |
-
"ext-ctype": "For best performance"
|
1778 |
-
},
|
1779 |
-
"type": "library",
|
1780 |
-
"extra": {
|
1781 |
-
"branch-alias": {
|
1782 |
-
"dev-master": "1.9-dev"
|
1783 |
-
}
|
1784 |
-
},
|
1785 |
-
"autoload": {
|
1786 |
-
"psr-4": {
|
1787 |
-
"Symfony\\Polyfill\\Ctype\\": ""
|
1788 |
-
},
|
1789 |
-
"files": [
|
1790 |
-
"bootstrap.php"
|
1791 |
-
]
|
1792 |
-
},
|
1793 |
-
"notification-url": "https://packagist.org/downloads/",
|
1794 |
-
"license": [
|
1795 |
-
"MIT"
|
1796 |
-
],
|
1797 |
-
"authors": [
|
1798 |
-
{
|
1799 |
-
"name": "Symfony Community",
|
1800 |
-
"homepage": "https://symfony.com/contributors"
|
1801 |
-
},
|
1802 |
-
{
|
1803 |
-
"name": "Gert de Pagter",
|
1804 |
-
"email": "backendtea@gmail.com"
|
1805 |
-
}
|
1806 |
-
],
|
1807 |
-
"description": "Symfony polyfill for ctype functions",
|
1808 |
-
"homepage": "https://symfony.com",
|
1809 |
-
"keywords": [
|
1810 |
-
"compatibility",
|
1811 |
-
"ctype",
|
1812 |
-
"polyfill",
|
1813 |
-
"portable"
|
1814 |
-
],
|
1815 |
-
"time": "2018-08-06T14:22:27+00:00"
|
1816 |
-
},
|
1817 |
-
{
|
1818 |
-
"name": "theseer/tokenizer",
|
1819 |
-
"version": "1.1.0",
|
1820 |
-
"source": {
|
1821 |
-
"type": "git",
|
1822 |
-
"url": "https://github.com/theseer/tokenizer.git",
|
1823 |
-
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
|
1824 |
-
},
|
1825 |
-
"dist": {
|
1826 |
-
"type": "zip",
|
1827 |
-
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
|
1828 |
-
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
|
1829 |
-
"shasum": ""
|
1830 |
-
},
|
1831 |
-
"require": {
|
1832 |
-
"ext-dom": "*",
|
1833 |
-
"ext-tokenizer": "*",
|
1834 |
-
"ext-xmlwriter": "*",
|
1835 |
-
"php": "^7.0"
|
1836 |
-
},
|
1837 |
-
"type": "library",
|
1838 |
-
"autoload": {
|
1839 |
-
"classmap": [
|
1840 |
-
"src/"
|
1841 |
-
]
|
1842 |
-
},
|
1843 |
-
"notification-url": "https://packagist.org/downloads/",
|
1844 |
-
"license": [
|
1845 |
-
"BSD-3-Clause"
|
1846 |
-
],
|
1847 |
-
"authors": [
|
1848 |
-
{
|
1849 |
-
"name": "Arne Blankerts",
|
1850 |
-
"email": "arne@blankerts.de",
|
1851 |
-
"role": "Developer"
|
1852 |
-
}
|
1853 |
-
],
|
1854 |
-
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
1855 |
-
"time": "2017-04-07T12:08:54+00:00"
|
1856 |
-
},
|
1857 |
-
{
|
1858 |
-
"name": "webmozart/assert",
|
1859 |
-
"version": "1.4.0",
|
1860 |
-
"source": {
|
1861 |
-
"type": "git",
|
1862 |
-
"url": "https://github.com/webmozart/assert.git",
|
1863 |
-
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
|
1864 |
-
},
|
1865 |
-
"dist": {
|
1866 |
-
"type": "zip",
|
1867 |
-
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
|
1868 |
-
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
|
1869 |
-
"shasum": ""
|
1870 |
-
},
|
1871 |
-
"require": {
|
1872 |
-
"php": "^5.3.3 || ^7.0",
|
1873 |
-
"symfony/polyfill-ctype": "^1.8"
|
1874 |
-
},
|
1875 |
-
"require-dev": {
|
1876 |
-
"phpunit/phpunit": "^4.6",
|
1877 |
-
"sebastian/version": "^1.0.1"
|
1878 |
-
},
|
1879 |
-
"type": "library",
|
1880 |
-
"extra": {
|
1881 |
-
"branch-alias": {
|
1882 |
-
"dev-master": "1.3-dev"
|
1883 |
-
}
|
1884 |
-
},
|
1885 |
-
"autoload": {
|
1886 |
-
"psr-4": {
|
1887 |
-
"Webmozart\\Assert\\": "src/"
|
1888 |
-
}
|
1889 |
-
},
|
1890 |
-
"notification-url": "https://packagist.org/downloads/",
|
1891 |
-
"license": [
|
1892 |
-
"MIT"
|
1893 |
-
],
|
1894 |
-
"authors": [
|
1895 |
-
{
|
1896 |
-
"name": "Bernhard Schussek",
|
1897 |
-
"email": "bschussek@gmail.com"
|
1898 |
-
}
|
1899 |
-
],
|
1900 |
-
"description": "Assertions to validate method input/output with nice error messages.",
|
1901 |
-
"keywords": [
|
1902 |
-
"assert",
|
1903 |
-
"check",
|
1904 |
-
"validate"
|
1905 |
-
],
|
1906 |
-
"time": "2018-12-25T11:19:39+00:00"
|
1907 |
-
}
|
1908 |
-
],
|
1909 |
-
"aliases": [],
|
1910 |
-
"minimum-stability": "stable",
|
1911 |
-
"stability-flags": [],
|
1912 |
-
"prefer-stable": false,
|
1913 |
-
"prefer-lowest": false,
|
1914 |
-
"platform": {
|
1915 |
-
"php": ">=5.6",
|
1916 |
-
"ext-curl": "*",
|
1917 |
-
"ext-json": "*",
|
1918 |
-
"ext-openssl": "*"
|
1919 |
-
},
|
1920 |
-
"platform-dev": []
|
1921 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/captures/get-capture.php
DELETED
@@ -1,27 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/captures/list-captures.php
DELETED
@@ -1,27 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/create-customer-first-payment.php
DELETED
@@ -1,67 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/create-customer-payment.php
DELETED
@@ -1,61 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/create-customer-recurring-payment.php
DELETED
@@ -1,63 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/create-customer.php
DELETED
@@ -1,27 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/delete-customer.php
DELETED
@@ -1,17 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/list-customer-payments.php
DELETED
@@ -1,58 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/customers/update-customer.php
DELETED
@@ -1,31 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/database/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
*.txt
|
|
includes/mollie-api-php/examples/functions.php
DELETED
@@ -1,23 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/initialize.php
DELETED
@@ -1,18 +0,0 @@
|
|
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");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/initialize_with_oauth.php
DELETED
@@ -1,19 +0,0 @@
|
|
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");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/invoices/list-invoices.php
DELETED
@@ -1,37 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/mandates/create-mandate.php
DELETED
@@ -1,30 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/mandates/list-mandates.php
DELETED
@@ -1,28 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/mandates/revoke-mandate.php
DELETED
@@ -1,31 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/cancel-order-lines.php
DELETED
@@ -1,44 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/cancel-order.php
DELETED
@@ -1,26 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/create-order.php
DELETED
@@ -1,118 +0,0 @@
|
|
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" => $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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/list-methods.php
DELETED
@@ -1,28 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/list-orders.php
DELETED
@@ -1,49 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/refund-order-completely.php
DELETED
@@ -1,25 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/refund-order-partially.php
DELETED
@@ -1,33 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/orders/webhook.php
DELETED
@@ -1,50 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/create-ideal-payment.php
DELETED
@@ -1,81 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/create-payment-oauth.php
DELETED
@@ -1,67 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/create-payment.php
DELETED
@@ -1,60 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/list-methods.php
DELETED
@@ -1,27 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/list-payments.php
DELETED
@@ -1,85 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/refund-payment.php
DELETED
@@ -1,71 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/return.php
DELETED
@@ -1,29 +0,0 @@
|
|
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>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/payments/webhook.php
DELETED
@@ -1,65 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/profiles/create-profile.php
DELETED
@@ -1,30 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/profiles/delete-profile.php
DELETED
@@ -1,23 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/profiles/list-profiles.php
DELETED
@@ -1,28 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/profiles/update-profile.php
DELETED
@@ -1,33 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/settlements/list-settlements.php
DELETED
@@ -1,53 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/shipments/create-shipment-all.php
DELETED
@@ -1,27 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/shipments/create-shipment-partial.php
DELETED
@@ -1,42 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/shipments/get-shipment.php
DELETED
@@ -1,27 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/shipments/list-shipments.php
DELETED
@@ -1,30 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/shipments/update-shipment.php
DELETED
@@ -1,40 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/subscriptions/cancel-subscription.php
DELETED
@@ -1,36 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/subscriptions/create-subscription.php
DELETED
@@ -1,61 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/examples/subscriptions/update-subscription.php
DELETED
@@ -1,31 +0,0 @@
|
|
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/mollie-api-php/scoper.inc.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/src/Endpoints/ChargebackEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Chargeback;
|
7 |
use Mollie\Api\Resources\ChargebackCollection;
|
8 |
|
9 |
-
class ChargebackEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "chargebacks";
|
12 |
|
@@ -24,7 +24,7 @@ class ChargebackEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return ChargebackCollection
|
30 |
*/
|
6 |
use Mollie\Api\Resources\Chargeback;
|
7 |
use Mollie\Api\Resources\ChargebackCollection;
|
8 |
|
9 |
+
class ChargebackEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "chargebacks";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return ChargebackCollection
|
30 |
*/
|
includes/mollie-api-php/src/Endpoints/CollectionEndpointAbstract.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Endpoints;
|
4 |
+
|
5 |
+
use Mollie\Api\Resources\BaseCollection;
|
6 |
+
|
7 |
+
abstract class CollectionEndpointAbstract extends EndpointAbstract
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
11 |
+
*
|
12 |
+
* @param int $count
|
13 |
+
* @param \stdClass $_links
|
14 |
+
*
|
15 |
+
* @return BaseCollection
|
16 |
+
*/
|
17 |
+
abstract protected function getResourceCollectionObject($count, $_links);
|
18 |
+
}
|
includes/mollie-api-php/src/Endpoints/CustomerEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Customer;
|
7 |
use Mollie\Api\Resources\CustomerCollection;
|
8 |
|
9 |
-
class CustomerEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "customers";
|
12 |
|
@@ -24,7 +24,7 @@ class CustomerEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return CustomerCollection
|
30 |
*/
|
6 |
use Mollie\Api\Resources\Customer;
|
7 |
use Mollie\Api\Resources\CustomerCollection;
|
8 |
|
9 |
+
class CustomerEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "customers";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return CustomerCollection
|
30 |
*/
|
includes/mollie-api-php/src/Endpoints/CustomerPaymentsEndpoint.php
CHANGED
@@ -2,12 +2,11 @@
|
|
2 |
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
5 |
-
use Mollie\Api\Resources\BaseCollection;
|
6 |
use Mollie\Api\Resources\Customer;
|
7 |
use Mollie\Api\Resources\Payment;
|
8 |
use Mollie\Api\Resources\PaymentCollection;
|
9 |
|
10 |
-
class CustomerPaymentsEndpoint extends
|
11 |
{
|
12 |
protected $resourcePath = "customers_payments";
|
13 |
|
@@ -25,7 +24,7 @@ class CustomerPaymentsEndpoint extends EndpointAbstract
|
|
25 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
26 |
*
|
27 |
* @param int $count
|
28 |
-
* @param
|
29 |
*
|
30 |
* @return PaymentCollection
|
31 |
*/
|
@@ -42,10 +41,26 @@ class CustomerPaymentsEndpoint extends EndpointAbstract
|
|
42 |
* @param array $filters
|
43 |
*
|
44 |
* @return Payment
|
|
|
45 |
*/
|
46 |
public function createFor(Customer $customer, array $options = [], array $filters = [])
|
47 |
{
|
48 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
return parent::rest_create($options, $filters);
|
51 |
}
|
@@ -57,11 +72,26 @@ class CustomerPaymentsEndpoint extends EndpointAbstract
|
|
57 |
* @param array $parameters
|
58 |
*
|
59 |
* @return PaymentCollection
|
|
|
60 |
*/
|
61 |
public function listFor(Customer $customer, $from = null, $limit = null, array $parameters = [])
|
62 |
{
|
63 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
return parent::rest_list($from, $limit, $parameters);
|
66 |
}
|
67 |
-
}
|
2 |
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
|
|
5 |
use Mollie\Api\Resources\Customer;
|
6 |
use Mollie\Api\Resources\Payment;
|
7 |
use Mollie\Api\Resources\PaymentCollection;
|
8 |
|
9 |
+
class CustomerPaymentsEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "customers_payments";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return PaymentCollection
|
30 |
*/
|
41 |
* @param array $filters
|
42 |
*
|
43 |
* @return Payment
|
44 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
45 |
*/
|
46 |
public function createFor(Customer $customer, array $options = [], array $filters = [])
|
47 |
{
|
48 |
+
return $this->createForId($customer->id, $options, $filters);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Create a subscription for a Customer ID
|
53 |
+
*
|
54 |
+
* @param string $customerId
|
55 |
+
* @param array $options
|
56 |
+
* @param array $filters
|
57 |
+
*
|
58 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Payment
|
59 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
60 |
+
*/
|
61 |
+
public function createForId($customerId, array $options = [], array $filters = [])
|
62 |
+
{
|
63 |
+
$this->parentId = $customerId;
|
64 |
|
65 |
return parent::rest_create($options, $filters);
|
66 |
}
|
72 |
* @param array $parameters
|
73 |
*
|
74 |
* @return PaymentCollection
|
75 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
76 |
*/
|
77 |
public function listFor(Customer $customer, $from = null, $limit = null, array $parameters = [])
|
78 |
{
|
79 |
+
return $this->listForId($customer->id, $from, $limit, $parameters);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @param string $customerId
|
84 |
+
* @param string $from The first resource ID you want to include in your list.
|
85 |
+
* @param int $limit
|
86 |
+
* @param array $parameters
|
87 |
+
*
|
88 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\PaymentCollection
|
89 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
90 |
+
*/
|
91 |
+
public function listForId($customerId, $from = null, $limit = null, array $parameters = [])
|
92 |
+
{
|
93 |
+
$this->parentId = $customerId;
|
94 |
|
95 |
return parent::rest_list($from, $limit, $parameters);
|
96 |
}
|
97 |
+
}
|
includes/mollie-api-php/src/Endpoints/EndpointAbstract.php
CHANGED
@@ -43,7 +43,7 @@ abstract class EndpointAbstract
|
|
43 |
* @param array $filters
|
44 |
* @return string
|
45 |
*/
|
46 |
-
|
47 |
{
|
48 |
if (empty($filters)) {
|
49 |
return "";
|
@@ -166,16 +166,6 @@ abstract class EndpointAbstract
|
|
166 |
*/
|
167 |
abstract protected function getResourceObject();
|
168 |
|
169 |
-
/**
|
170 |
-
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
171 |
-
*
|
172 |
-
* @param int $count
|
173 |
-
* @param object[] $_links
|
174 |
-
*
|
175 |
-
* @return BaseCollection
|
176 |
-
*/
|
177 |
-
abstract protected function getResourceCollectionObject($count, $_links);
|
178 |
-
|
179 |
/**
|
180 |
* @param string $resourcePath
|
181 |
*/
|
@@ -217,7 +207,7 @@ abstract class EndpointAbstract
|
|
217 |
try {
|
218 |
$encoded = \GuzzleHttp\json_encode($body);
|
219 |
} catch (\InvalidArgumentException $e) {
|
220 |
-
throw new ApiException("Error encoding parameters into JSON: '"
|
221 |
}
|
222 |
|
223 |
return $encoded;
|
43 |
* @param array $filters
|
44 |
* @return string
|
45 |
*/
|
46 |
+
protected function buildQueryString(array $filters)
|
47 |
{
|
48 |
if (empty($filters)) {
|
49 |
return "";
|
166 |
*/
|
167 |
abstract protected function getResourceObject();
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
/**
|
170 |
* @param string $resourcePath
|
171 |
*/
|
207 |
try {
|
208 |
$encoded = \GuzzleHttp\json_encode($body);
|
209 |
} catch (\InvalidArgumentException $e) {
|
210 |
+
throw new ApiException("Error encoding parameters into JSON: '".$e->getMessage()."'.");
|
211 |
}
|
212 |
|
213 |
return $encoded;
|
includes/mollie-api-php/src/Endpoints/InvoiceEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Invoice;
|
7 |
use Mollie\Api\Resources\InvoiceCollection;
|
8 |
|
9 |
-
class InvoiceEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "invoices";
|
12 |
|
@@ -24,7 +24,7 @@ class InvoiceEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API. Every API uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return \Mollie\Api\Resources\BaseCollection
|
30 |
*/
|
@@ -75,4 +75,4 @@ class InvoiceEndpoint extends EndpointAbstract
|
|
75 |
{
|
76 |
return $this->page( null, null, $parameters);
|
77 |
}
|
78 |
-
}
|
6 |
use Mollie\Api\Resources\Invoice;
|
7 |
use Mollie\Api\Resources\InvoiceCollection;
|
8 |
|
9 |
+
class InvoiceEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "invoices";
|
12 |
|
24 |
* Get the collection object that is used by this API. Every API uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return \Mollie\Api\Resources\BaseCollection
|
30 |
*/
|
75 |
{
|
76 |
return $this->page( null, null, $parameters);
|
77 |
}
|
78 |
+
}
|
includes/mollie-api-php/src/Endpoints/MandateEndpoint.php
CHANGED
@@ -7,7 +7,7 @@ use Mollie\Api\Resources\Customer;
|
|
7 |
use Mollie\Api\Resources\Mandate;
|
8 |
use Mollie\Api\Resources\MandateCollection;
|
9 |
|
10 |
-
class MandateEndpoint extends
|
11 |
{
|
12 |
protected $resourcePath = "customers_mandates";
|
13 |
|
@@ -25,7 +25,7 @@ class MandateEndpoint extends EndpointAbstract
|
|
25 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
26 |
*
|
27 |
* @param int $count
|
28 |
-
* @param
|
29 |
*
|
30 |
* @return MandateCollection
|
31 |
*/
|
@@ -39,11 +39,25 @@ class MandateEndpoint extends EndpointAbstract
|
|
39 |
* @param array $options
|
40 |
* @param array $filters
|
41 |
*
|
42 |
-
* @return Mandate
|
|
|
43 |
*/
|
44 |
public function createFor(Customer $customer, array $options = [], array $filters = [])
|
45 |
{
|
46 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
return parent::rest_create($options, $filters);
|
49 |
}
|
@@ -53,11 +67,25 @@ class MandateEndpoint extends EndpointAbstract
|
|
53 |
* @param string $mandateId
|
54 |
* @param array $parameters
|
55 |
*
|
56 |
-
* @return Mandate
|
|
|
57 |
*/
|
58 |
public function getFor(Customer $customer, $mandateId, array $parameters = [])
|
59 |
{
|
60 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
return parent::rest_read($mandateId, $parameters);
|
63 |
}
|
@@ -68,11 +96,26 @@ class MandateEndpoint extends EndpointAbstract
|
|
68 |
* @param int $limit
|
69 |
* @param array $parameters
|
70 |
*
|
71 |
-
* @return MandateCollection
|
|
|
72 |
*/
|
73 |
public function listFor(Customer $customer, $from = null, $limit = null, array $parameters = [])
|
74 |
{
|
75 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
return parent::rest_list($from, $limit, $parameters);
|
78 |
}
|
@@ -80,15 +123,28 @@ class MandateEndpoint extends EndpointAbstract
|
|
80 |
/**
|
81 |
* @param Customer $customer
|
82 |
* @param string $mandateId
|
83 |
-
*
|
84 |
* @param array $data
|
|
|
85 |
* @return null
|
86 |
* @throws \Mollie\Api\Exceptions\ApiException
|
87 |
*/
|
88 |
public function revokeFor(Customer $customer, $mandateId, $data = [])
|
89 |
{
|
90 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
return parent::rest_delete($mandateId, $data);
|
93 |
}
|
94 |
-
}
|
7 |
use Mollie\Api\Resources\Mandate;
|
8 |
use Mollie\Api\Resources\MandateCollection;
|
9 |
|
10 |
+
class MandateEndpoint extends CollectionEndpointAbstract
|
11 |
{
|
12 |
protected $resourcePath = "customers_mandates";
|
13 |
|
25 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
26 |
*
|
27 |
* @param int $count
|
28 |
+
* @param \stdClass $_links
|
29 |
*
|
30 |
* @return MandateCollection
|
31 |
*/
|
39 |
* @param array $options
|
40 |
* @param array $filters
|
41 |
*
|
42 |
+
* @return \Mollie\Api\Resources\Mandate
|
43 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
44 |
*/
|
45 |
public function createFor(Customer $customer, array $options = [], array $filters = [])
|
46 |
{
|
47 |
+
return $this->createForId($customer->id, $options, $filters);
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @param string $customerId
|
52 |
+
* @param array $options
|
53 |
+
* @param array $filters
|
54 |
+
*
|
55 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Mandate
|
56 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
57 |
+
*/
|
58 |
+
public function createForId($customerId, array $options = [], array $filters = [])
|
59 |
+
{
|
60 |
+
$this->parentId = $customerId;
|
61 |
|
62 |
return parent::rest_create($options, $filters);
|
63 |
}
|
67 |
* @param string $mandateId
|
68 |
* @param array $parameters
|
69 |
*
|
70 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Mandate
|
71 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
72 |
*/
|
73 |
public function getFor(Customer $customer, $mandateId, array $parameters = [])
|
74 |
{
|
75 |
+
return $this->getForId($customer->id, $mandateId, $parameters);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* @param string $customerId
|
80 |
+
* @param string $mandateId
|
81 |
+
* @param array $parameters
|
82 |
+
*
|
83 |
+
* @return \Mollie\Api\Resources\BaseResource
|
84 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
85 |
+
*/
|
86 |
+
public function getForId($customerId, $mandateId, array $parameters = [])
|
87 |
+
{
|
88 |
+
$this->parentId = $customerId;
|
89 |
|
90 |
return parent::rest_read($mandateId, $parameters);
|
91 |
}
|
96 |
* @param int $limit
|
97 |
* @param array $parameters
|
98 |
*
|
99 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MandateCollection
|
100 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
101 |
*/
|
102 |
public function listFor(Customer $customer, $from = null, $limit = null, array $parameters = [])
|
103 |
{
|
104 |
+
return $this->listForId($customer->id, $from, $limit, $parameters);
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @param string $customerId
|
109 |
+
* @param null $from
|
110 |
+
* @param null $limit
|
111 |
+
* @param array $parameters
|
112 |
+
*
|
113 |
+
* @return \Mollie\Api\Resources\BaseCollection
|
114 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
115 |
+
*/
|
116 |
+
public function listForId($customerId, $from = null, $limit = null, array $parameters = [])
|
117 |
+
{
|
118 |
+
$this->parentId = $customerId;
|
119 |
|
120 |
return parent::rest_list($from, $limit, $parameters);
|
121 |
}
|
123 |
/**
|
124 |
* @param Customer $customer
|
125 |
* @param string $mandateId
|
|
|
126 |
* @param array $data
|
127 |
+
*
|
128 |
* @return null
|
129 |
* @throws \Mollie\Api\Exceptions\ApiException
|
130 |
*/
|
131 |
public function revokeFor(Customer $customer, $mandateId, $data = [])
|
132 |
{
|
133 |
+
return $this->revokeForId($customer->id, $mandateId, $data);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* @param string $customerId
|
138 |
+
* @param string $mandateId
|
139 |
+
* @param array $data
|
140 |
+
*
|
141 |
+
* @return null
|
142 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
143 |
+
*/
|
144 |
+
public function revokeForId($customerId, $mandateId, $data = [])
|
145 |
+
{
|
146 |
+
$this->parentId = $customerId;
|
147 |
|
148 |
return parent::rest_delete($mandateId, $data);
|
149 |
}
|
150 |
+
}
|
includes/mollie-api-php/src/Endpoints/MethodEndpoint.php
CHANGED
@@ -5,8 +5,9 @@ namespace Mollie\Api\Endpoints;
|
|
5 |
use Mollie\Api\Exceptions\ApiException;
|
6 |
use Mollie\Api\Resources\Method;
|
7 |
use Mollie\Api\Resources\MethodCollection;
|
|
|
8 |
|
9 |
-
class MethodEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "methods";
|
12 |
|
@@ -18,11 +19,61 @@ class MethodEndpoint extends EndpointAbstract
|
|
18 |
return new Method($this->client);
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
23 |
*
|
24 |
* @param int $count
|
25 |
-
* @param
|
26 |
*
|
27 |
* @return MethodCollection
|
28 |
*/
|
@@ -38,7 +89,7 @@ class MethodEndpoint extends EndpointAbstract
|
|
38 |
*
|
39 |
* @param string $methodId
|
40 |
* @param array $parameters
|
41 |
-
* @return Method
|
42 |
* @throws ApiException
|
43 |
*/
|
44 |
public function get($methodId, array $parameters = [])
|
@@ -49,17 +100,4 @@ class MethodEndpoint extends EndpointAbstract
|
|
49 |
|
50 |
return parent::rest_read($methodId, $parameters);
|
51 |
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Retrieve all methods.
|
55 |
-
*
|
56 |
-
* @param array $parameters
|
57 |
-
*
|
58 |
-
* @return MethodCollection
|
59 |
-
* @throws ApiException
|
60 |
-
*/
|
61 |
-
public function all(array $parameters = [])
|
62 |
-
{
|
63 |
-
return parent::rest_list(null, null, $parameters);
|
64 |
-
}
|
65 |
}
|
5 |
use Mollie\Api\Exceptions\ApiException;
|
6 |
use Mollie\Api\Resources\Method;
|
7 |
use Mollie\Api\Resources\MethodCollection;
|
8 |
+
use Mollie\Api\Resources\ResourceFactory;
|
9 |
|
10 |
+
class MethodEndpoint extends CollectionEndpointAbstract
|
11 |
{
|
12 |
protected $resourcePath = "methods";
|
13 |
|
19 |
return new Method($this->client);
|
20 |
}
|
21 |
|
22 |
+
/**
|
23 |
+
* Retrieve all active methods. In test mode, this includes pending methods. The results are not paginated.
|
24 |
+
*
|
25 |
+
* @deprecated Use allActive() instead
|
26 |
+
* @param array $parameters
|
27 |
+
*
|
28 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MethodCollection
|
29 |
+
* @throws ApiException
|
30 |
+
*/
|
31 |
+
public function all(array $parameters = [])
|
32 |
+
{
|
33 |
+
return $this->allActive($parameters);
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Retrieve all active methods for the organization. In test mode, this includes pending methods.
|
38 |
+
* The results are not paginated.
|
39 |
+
*
|
40 |
+
* @param array $parameters
|
41 |
+
*
|
42 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MethodCollection
|
43 |
+
* @throws ApiException
|
44 |
+
*/
|
45 |
+
public function allActive(array $parameters = [])
|
46 |
+
{
|
47 |
+
return parent::rest_list(null, null, $parameters);
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Retrieve all available methods for the organization, including activated and not yet activated methods. The
|
52 |
+
* results are not paginated. Make sure to include the profileId parameter if using an OAuth Access Token.
|
53 |
+
*
|
54 |
+
* @param array $parameters Query string parameters.
|
55 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MethodCollection
|
56 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
57 |
+
*/
|
58 |
+
public function allAvailable(array $parameters = [])
|
59 |
+
{
|
60 |
+
$url = 'methods/all' . $this->buildQueryString($parameters);
|
61 |
+
|
62 |
+
$result = $this->client->performHttpCall('GET', $url);
|
63 |
+
|
64 |
+
return ResourceFactory::createBaseResourceCollection(
|
65 |
+
$this->client,
|
66 |
+
$result->_embedded->methods,
|
67 |
+
Method::class,
|
68 |
+
$result->_links
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
/**
|
73 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
74 |
*
|
75 |
* @param int $count
|
76 |
+
* @param \stdClass $_links
|
77 |
*
|
78 |
* @return MethodCollection
|
79 |
*/
|
89 |
*
|
90 |
* @param string $methodId
|
91 |
* @param array $parameters
|
92 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Method
|
93 |
* @throws ApiException
|
94 |
*/
|
95 |
public function get($methodId, array $parameters = [])
|
100 |
|
101 |
return parent::rest_read($methodId, $parameters);
|
102 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
includes/mollie-api-php/src/Endpoints/OnboardingEndpoint.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Endpoints;
|
4 |
+
|
5 |
+
use Mollie\Api\Exceptions\ApiException;
|
6 |
+
use Mollie\Api\Resources\BaseResource;
|
7 |
+
use Mollie\Api\Resources\Onboarding;
|
8 |
+
use Mollie\Api\Resources\ResourceFactory;
|
9 |
+
|
10 |
+
class OnboardingEndpoint extends EndpointAbstract
|
11 |
+
{
|
12 |
+
protected $resourcePath = "onboarding/me";
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
|
16 |
+
*
|
17 |
+
* @return BaseResource
|
18 |
+
*/
|
19 |
+
protected function getResourceObject()
|
20 |
+
{
|
21 |
+
return new Onboarding($this->client);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Retrieve the organization's onboarding status from Mollie.
|
26 |
+
*
|
27 |
+
* Will throw a ApiException if the resource cannot be found.
|
28 |
+
*
|
29 |
+
* @return Onboarding
|
30 |
+
* @throws ApiException
|
31 |
+
*/
|
32 |
+
public function get()
|
33 |
+
{
|
34 |
+
return $this->rest_read('', []);
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Submit data that will be prefilled in the merchant’s onboarding.
|
39 |
+
* Please note that the data you submit will only be processed when the onboarding status is needs-data.
|
40 |
+
*
|
41 |
+
* Information that the merchant has entered in their dashboard will not be overwritten.
|
42 |
+
*
|
43 |
+
* Will throw a ApiException if the resource cannot be found.
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
* @throws ApiException
|
47 |
+
*/
|
48 |
+
public function submit(array $parameters = [])
|
49 |
+
{
|
50 |
+
|
51 |
+
return $this->rest_create($parameters, []);
|
52 |
+
}
|
53 |
+
|
54 |
+
protected function rest_read($id, array $filters)
|
55 |
+
{
|
56 |
+
$result = $this->client->performHttpCall(
|
57 |
+
self::REST_READ,
|
58 |
+
$this->getResourcePath() . $this->buildQueryString($filters)
|
59 |
+
);
|
60 |
+
|
61 |
+
return ResourceFactory::createFromApiResult($result, $this->getResourceObject());
|
62 |
+
}
|
63 |
+
|
64 |
+
protected function rest_create(array $body, array $filters)
|
65 |
+
{
|
66 |
+
$this->client->performHttpCall(
|
67 |
+
self::REST_CREATE,
|
68 |
+
$this->getResourcePath() . $this->buildQueryString($filters),
|
69 |
+
$this->parseRequestBody($body)
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
includes/mollie-api-php/src/Endpoints/OrderEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Order;
|
7 |
use Mollie\Api\Resources\OrderCollection;
|
8 |
|
9 |
-
class OrderEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "orders";
|
12 |
|
@@ -31,7 +31,7 @@ class OrderEndpoint extends EndpointAbstract
|
|
31 |
* endpoint uses one type of collection object.
|
32 |
*
|
33 |
* @param int $count
|
34 |
-
* @param
|
35 |
*
|
36 |
* @return OrderCollection
|
37 |
*/
|
@@ -68,7 +68,7 @@ class OrderEndpoint extends EndpointAbstract
|
|
68 |
public function get($orderId, array $parameters = [])
|
69 |
{
|
70 |
if (empty($orderId) || strpos($orderId, self::RESOURCE_ID_PREFIX) !== 0) {
|
71 |
-
throw new ApiException("Invalid order ID: '{$orderId}'. An order ID should start with '"
|
72 |
}
|
73 |
|
74 |
return parent::rest_read($orderId, $parameters);
|
6 |
use Mollie\Api\Resources\Order;
|
7 |
use Mollie\Api\Resources\OrderCollection;
|
8 |
|
9 |
+
class OrderEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "orders";
|
12 |
|
31 |
* endpoint uses one type of collection object.
|
32 |
*
|
33 |
* @param int $count
|
34 |
+
* @param \stdClass $_links
|
35 |
*
|
36 |
* @return OrderCollection
|
37 |
*/
|
68 |
public function get($orderId, array $parameters = [])
|
69 |
{
|
70 |
if (empty($orderId) || strpos($orderId, self::RESOURCE_ID_PREFIX) !== 0) {
|
71 |
+
throw new ApiException("Invalid order ID: '{$orderId}'. An order ID should start with '".self::RESOURCE_ID_PREFIX."'.");
|
72 |
}
|
73 |
|
74 |
return parent::rest_read($orderId, $parameters);
|
includes/mollie-api-php/src/Endpoints/OrderLineEndpoint.php
CHANGED
@@ -8,7 +8,7 @@ use Mollie\Api\Resources\OrderLine;
|
|
8 |
use Mollie\Api\Resources\OrderLineCollection;
|
9 |
use Mollie\Api\Resources\ResourceFactory;
|
10 |
|
11 |
-
class OrderLineEndpoint extends
|
12 |
{
|
13 |
protected $resourcePath = "orders_lines";
|
14 |
|
@@ -33,7 +33,7 @@ class OrderLineEndpoint extends EndpointAbstract
|
|
33 |
* endpoint uses one type of collection object.
|
34 |
*
|
35 |
* @param int $count
|
36 |
-
* @param
|
37 |
*
|
38 |
* @return OrderLineCollection
|
39 |
*/
|
@@ -55,11 +55,28 @@ class OrderLineEndpoint extends EndpointAbstract
|
|
55 |
* @throws ApiException
|
56 |
*/
|
57 |
public function cancelFor(Order $order, array $data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
{
|
59 |
if(! isset($data, $data['lines']) || ! is_array($data['lines'])) {
|
60 |
throw new ApiException("A lines array is required.");
|
61 |
}
|
62 |
-
$this->parentId = $
|
63 |
|
64 |
$this->client->performHttpCall(
|
65 |
self::REST_DELETE,
|
8 |
use Mollie\Api\Resources\OrderLineCollection;
|
9 |
use Mollie\Api\Resources\ResourceFactory;
|
10 |
|
11 |
+
class OrderLineEndpoint extends CollectionEndpointAbstract
|
12 |
{
|
13 |
protected $resourcePath = "orders_lines";
|
14 |
|
33 |
* endpoint uses one type of collection object.
|
34 |
*
|
35 |
* @param int $count
|
36 |
+
* @param \stdClass $_links
|
37 |
*
|
38 |
* @return OrderLineCollection
|
39 |
*/
|
55 |
* @throws ApiException
|
56 |
*/
|
57 |
public function cancelFor(Order $order, array $data)
|
58 |
+
{
|
59 |
+
return $this->cancelForId($order->id, $data);
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Cancel lines for the provided order id.
|
64 |
+
* The data array must contain a lines array.
|
65 |
+
* You can pass an empty lines array if you want to cancel all eligible lines.
|
66 |
+
* Returns null if successful.
|
67 |
+
*
|
68 |
+
* @param string $orderId
|
69 |
+
* @param array $data
|
70 |
+
*
|
71 |
+
* @return null
|
72 |
+
* @throws ApiException
|
73 |
+
*/
|
74 |
+
public function cancelForId($orderId, array $data)
|
75 |
{
|
76 |
if(! isset($data, $data['lines']) || ! is_array($data['lines'])) {
|
77 |
throw new ApiException("A lines array is required.");
|
78 |
}
|
79 |
+
$this->parentId = $orderId;
|
80 |
|
81 |
$this->client->performHttpCall(
|
82 |
self::REST_DELETE,
|
includes/mollie-api-php/src/Endpoints/OrderPaymentEndpoint.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Endpoints;
|
4 |
+
|
5 |
+
use Mollie\Api\Resources\Order;
|
6 |
+
use Mollie\Api\Resources\Payment;
|
7 |
+
use Mollie\Api\Resources\PaymentCollection;
|
8 |
+
|
9 |
+
class OrderPaymentEndpoint extends CollectionEndpointAbstract
|
10 |
+
{
|
11 |
+
protected $resourcePath = "orders_payments";
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var string
|
15 |
+
*/
|
16 |
+
const RESOURCE_ID_PREFIX = 'tr_';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Get the object that is used by this API endpoint. Every API endpoint uses one
|
20 |
+
* type of object.
|
21 |
+
*
|
22 |
+
* @return \Mollie\Api\Resources\Payment
|
23 |
+
*/
|
24 |
+
protected function getResourceObject()
|
25 |
+
{
|
26 |
+
return new Payment($this->client);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Get the collection object that is used by this API endpoint. Every API
|
31 |
+
* endpoint uses one type of collection object.
|
32 |
+
*
|
33 |
+
* @param int $count
|
34 |
+
* @param \stdClass $_links
|
35 |
+
*
|
36 |
+
* @return \Mollie\Api\Resources\PaymentCollection
|
37 |
+
*/
|
38 |
+
protected function getResourceCollectionObject($count, $_links)
|
39 |
+
{
|
40 |
+
return new PaymentCollection($this->client, $count, $_links);
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Creates a payment in Mollie for a specific order.
|
45 |
+
*
|
46 |
+
* @param \Mollie\Api\Resources\Order $order
|
47 |
+
* @param array $data An array containing details on the order payment.
|
48 |
+
* @param array $filters
|
49 |
+
*
|
50 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Payment
|
51 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
52 |
+
*/
|
53 |
+
public function createFor(Order $order, array $data, array $filters = [])
|
54 |
+
{
|
55 |
+
return $this->createForId($order->id, $data, $filters);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Creates a payment in Mollie for a specific order ID.
|
60 |
+
*
|
61 |
+
* @param string $orderId
|
62 |
+
* @param array $data An array containing details on the order payment.
|
63 |
+
* @param array $filters
|
64 |
+
*
|
65 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Payment
|
66 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
67 |
+
*/
|
68 |
+
public function createForId($orderId, array $data, array $filters = [])
|
69 |
+
{
|
70 |
+
$this->parentId = $orderId;
|
71 |
+
|
72 |
+
return $this->rest_create($data, $filters);
|
73 |
+
}
|
74 |
+
}
|
includes/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Resources\Order;
|
|
6 |
use Mollie\Api\Resources\Refund;
|
7 |
use Mollie\Api\Resources\RefundCollection;
|
8 |
|
9 |
-
class OrderRefundEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "orders_refunds";
|
12 |
|
@@ -24,7 +24,7 @@ class OrderRefundEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return RefundCollection
|
30 |
*/
|
@@ -35,17 +35,35 @@ class OrderRefundEndpoint extends EndpointAbstract
|
|
35 |
|
36 |
/**
|
37 |
* Refund some order lines. You can provide an empty array for the
|
38 |
-
* "lines" data to refund all
|
39 |
*
|
40 |
* @param Order $order
|
41 |
* @param array $data
|
42 |
* @param array $filters
|
43 |
*
|
44 |
* @return Refund
|
|
|
45 |
*/
|
46 |
public function createFor(Order $order, array $data, array $filters = [])
|
47 |
{
|
48 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
return parent::rest_create($data, $filters);
|
50 |
}
|
51 |
}
|
6 |
use Mollie\Api\Resources\Refund;
|
7 |
use Mollie\Api\Resources\RefundCollection;
|
8 |
|
9 |
+
class OrderRefundEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "orders_refunds";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return RefundCollection
|
30 |
*/
|
35 |
|
36 |
/**
|
37 |
* Refund some order lines. You can provide an empty array for the
|
38 |
+
* "lines" data to refund all eligible lines for this order.
|
39 |
*
|
40 |
* @param Order $order
|
41 |
* @param array $data
|
42 |
* @param array $filters
|
43 |
*
|
44 |
* @return Refund
|
45 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
46 |
*/
|
47 |
public function createFor(Order $order, array $data, array $filters = [])
|
48 |
{
|
49 |
+
return $this->createForId($order->id, $data, $filters);
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Refund some order lines. You can provide an empty array for the
|
54 |
+
* "lines" data to refund all eligible lines for this order.
|
55 |
+
*
|
56 |
+
* @param string $orderId
|
57 |
+
* @param array $data
|
58 |
+
* @param array $filters
|
59 |
+
*
|
60 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Refund
|
61 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
62 |
+
*/
|
63 |
+
public function createForId($orderId, array $data, array $filters = [])
|
64 |
+
{
|
65 |
+
$this->parentId = $orderId;
|
66 |
+
|
67 |
return parent::rest_create($data, $filters);
|
68 |
}
|
69 |
}
|
includes/mollie-api-php/src/Endpoints/OrganizationEndpoint.php
CHANGED
@@ -7,7 +7,7 @@ use Mollie\Api\Resources\Method;
|
|
7 |
use Mollie\Api\Resources\Organization;
|
8 |
use Mollie\Api\Resources\OrganizationCollection;
|
9 |
|
10 |
-
class OrganizationEndpoint extends
|
11 |
{
|
12 |
protected $resourcePath = "organizations";
|
13 |
|
@@ -23,7 +23,7 @@ class OrganizationEndpoint extends EndpointAbstract
|
|
23 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
24 |
*
|
25 |
* @param int $count
|
26 |
-
* @param
|
27 |
*
|
28 |
* @return OrganizationCollection
|
29 |
*/
|
7 |
use Mollie\Api\Resources\Organization;
|
8 |
use Mollie\Api\Resources\OrganizationCollection;
|
9 |
|
10 |
+
class OrganizationEndpoint extends CollectionEndpointAbstract
|
11 |
{
|
12 |
protected $resourcePath = "organizations";
|
13 |
|
23 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
24 |
*
|
25 |
* @param int $count
|
26 |
+
* @param \stdClass $_links
|
27 |
*
|
28 |
* @return OrganizationCollection
|
29 |
*/
|
includes/mollie-api-php/src/Endpoints/PaymentCaptureEndpoint.php
CHANGED
@@ -3,9 +3,10 @@
|
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
5 |
use Mollie\Api\Resources\Capture;
|
|
|
6 |
use Mollie\Api\Resources\Payment;
|
7 |
|
8 |
-
class PaymentCaptureEndpoint extends
|
9 |
{
|
10 |
protected $resourcePath = "payments_captures";
|
11 |
|
@@ -23,9 +24,9 @@ class PaymentCaptureEndpoint extends EndpointAbstract
|
|
23 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
24 |
*
|
25 |
* @param int $count
|
26 |
-
* @param
|
27 |
*
|
28 |
-
* @return CaptureCollection
|
29 |
*/
|
30 |
protected function getResourceCollectionObject($count, $_links)
|
31 |
{
|
@@ -38,10 +39,24 @@ class PaymentCaptureEndpoint extends EndpointAbstract
|
|
38 |
* @param array $parameters
|
39 |
*
|
40 |
* @return Capture
|
|
|
41 |
*/
|
42 |
public function getFor(Payment $payment, $captureId, array $parameters = [])
|
43 |
{
|
44 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
return parent::rest_read($captureId, $parameters);
|
47 |
}
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
5 |
use Mollie\Api\Resources\Capture;
|
6 |
+
use Mollie\Api\Resources\CaptureCollection;
|
7 |
use Mollie\Api\Resources\Payment;
|
8 |
|
9 |
+
class PaymentCaptureEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "payments_captures";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
+
* @return \Mollie\Api\Resources\CaptureCollection
|
30 |
*/
|
31 |
protected function getResourceCollectionObject($count, $_links)
|
32 |
{
|
39 |
* @param array $parameters
|
40 |
*
|
41 |
* @return Capture
|
42 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
43 |
*/
|
44 |
public function getFor(Payment $payment, $captureId, array $parameters = [])
|
45 |
{
|
46 |
+
return $this->getForId($payment->id, $captureId, $parameters);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param string $paymentId
|
51 |
+
* @param string $captureId
|
52 |
+
* @param array $parameters
|
53 |
+
*
|
54 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Capture
|
55 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
56 |
+
*/
|
57 |
+
public function getForId($paymentId, $captureId, array $parameters = [])
|
58 |
+
{
|
59 |
+
$this->parentId = $paymentId;
|
60 |
|
61 |
return parent::rest_read($captureId, $parameters);
|
62 |
}
|
includes/mollie-api-php/src/Endpoints/PaymentChargebackEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Resources\Chargeback;
|
|
6 |
use Mollie\Api\Resources\ChargebackCollection;
|
7 |
use Mollie\Api\Resources\Payment;
|
8 |
|
9 |
-
class PaymentChargebackEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "payments_chargebacks";
|
12 |
|
@@ -24,7 +24,7 @@ class PaymentChargebackEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return ChargebackCollection
|
30 |
*/
|
@@ -39,10 +39,24 @@ class PaymentChargebackEndpoint extends EndpointAbstract
|
|
39 |
* @param array $parameters
|
40 |
*
|
41 |
* @return Chargeback
|
|
|
42 |
*/
|
43 |
public function getFor(Payment $payment, $chargebackId, array $parameters = [])
|
44 |
{
|
45 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
return parent::rest_read($chargebackId, $parameters);
|
48 |
}
|
6 |
use Mollie\Api\Resources\ChargebackCollection;
|
7 |
use Mollie\Api\Resources\Payment;
|
8 |
|
9 |
+
class PaymentChargebackEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "payments_chargebacks";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return ChargebackCollection
|
30 |
*/
|
39 |
* @param array $parameters
|
40 |
*
|
41 |
* @return Chargeback
|
42 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
43 |
*/
|
44 |
public function getFor(Payment $payment, $chargebackId, array $parameters = [])
|
45 |
{
|
46 |
+
return $this->getForId($payment->id, $chargebackId, $parameters);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param string $paymentId
|
51 |
+
* @param string $chargebackId
|
52 |
+
* @param array $parameters
|
53 |
+
*
|
54 |
+
* @return Chargeback
|
55 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
56 |
+
*/
|
57 |
+
public function getForId($paymentId, $chargebackId, array $parameters = [])
|
58 |
+
{
|
59 |
+
$this->parentId = $paymentId;
|
60 |
|
61 |
return parent::rest_read($chargebackId, $parameters);
|
62 |
}
|
includes/mollie-api-php/src/Endpoints/PaymentEndpoint.php
CHANGED
@@ -8,7 +8,7 @@ use Mollie\Api\Resources\PaymentCollection;
|
|
8 |
use Mollie\Api\Resources\Refund;
|
9 |
use Mollie\Api\Resources\ResourceFactory;
|
10 |
|
11 |
-
class PaymentEndpoint extends
|
12 |
{
|
13 |
protected $resourcePath = "payments";
|
14 |
|
@@ -29,7 +29,7 @@ class PaymentEndpoint extends EndpointAbstract
|
|
29 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
30 |
*
|
31 |
* @param int $count
|
32 |
-
* @param
|
33 |
*
|
34 |
* @return PaymentCollection
|
35 |
*/
|
@@ -65,7 +65,7 @@ class PaymentEndpoint extends EndpointAbstract
|
|
65 |
public function get($paymentId, array $parameters = [])
|
66 |
{
|
67 |
if (empty($paymentId) || strpos($paymentId, self::RESOURCE_ID_PREFIX) !== 0) {
|
68 |
-
throw new ApiException("Invalid payment ID: '{$paymentId}'. A payment ID should start with '"
|
69 |
}
|
70 |
|
71 |
return parent::rest_read($paymentId, $parameters);
|
8 |
use Mollie\Api\Resources\Refund;
|
9 |
use Mollie\Api\Resources\ResourceFactory;
|
10 |
|
11 |
+
class PaymentEndpoint extends CollectionEndpointAbstract
|
12 |
{
|
13 |
protected $resourcePath = "payments";
|
14 |
|
29 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
30 |
*
|
31 |
* @param int $count
|
32 |
+
* @param \stdClass $_links
|
33 |
*
|
34 |
* @return PaymentCollection
|
35 |
*/
|
65 |
public function get($paymentId, array $parameters = [])
|
66 |
{
|
67 |
if (empty($paymentId) || strpos($paymentId, self::RESOURCE_ID_PREFIX) !== 0) {
|
68 |
+
throw new ApiException("Invalid payment ID: '{$paymentId}'. A payment ID should start with '".self::RESOURCE_ID_PREFIX."'.");
|
69 |
}
|
70 |
|
71 |
return parent::rest_read($paymentId, $parameters);
|
includes/mollie-api-php/src/Endpoints/PaymentRefundEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Resources\Payment;
|
|
6 |
use Mollie\Api\Resources\Refund;
|
7 |
use Mollie\Api\Resources\RefundCollection;
|
8 |
|
9 |
-
class PaymentRefundEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "payments_refunds";
|
12 |
|
@@ -24,7 +24,7 @@ class PaymentRefundEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return RefundCollection
|
30 |
*/
|
@@ -39,10 +39,24 @@ class PaymentRefundEndpoint extends EndpointAbstract
|
|
39 |
* @param array $parameters
|
40 |
*
|
41 |
* @return Refund
|
|
|
42 |
*/
|
43 |
public function getFor(Payment $payment, $refundId, array $parameters = [])
|
44 |
{
|
45 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
return parent::rest_read($refundId, $parameters);
|
48 |
}
|
6 |
use Mollie\Api\Resources\Refund;
|
7 |
use Mollie\Api\Resources\RefundCollection;
|
8 |
|
9 |
+
class PaymentRefundEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "payments_refunds";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return RefundCollection
|
30 |
*/
|
39 |
* @param array $parameters
|
40 |
*
|
41 |
* @return Refund
|
42 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
43 |
*/
|
44 |
public function getFor(Payment $payment, $refundId, array $parameters = [])
|
45 |
{
|
46 |
+
return $this->getForId($payment->id, $refundId, $parameters);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param string $paymentId
|
51 |
+
* @param string $refundId
|
52 |
+
* @param array $parameters
|
53 |
+
*
|
54 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Refund
|
55 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
56 |
+
*/
|
57 |
+
public function getForId($paymentId, $refundId, array $parameters = [])
|
58 |
+
{
|
59 |
+
$this->parentId = $paymentId;
|
60 |
|
61 |
return parent::rest_read($refundId, $parameters);
|
62 |
}
|
includes/mollie-api-php/src/Endpoints/PermissionEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Permission;
|
7 |
use Mollie\Api\Resources\PermissionCollection;
|
8 |
|
9 |
-
class PermissionEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "permissions";
|
12 |
|
@@ -26,7 +26,7 @@ class PermissionEndpoint extends EndpointAbstract
|
|
26 |
* endpoint uses one type of collection object.
|
27 |
*
|
28 |
* @param int $count
|
29 |
-
* @param
|
30 |
*
|
31 |
* @return PermissionCollection
|
32 |
*/
|
6 |
use Mollie\Api\Resources\Permission;
|
7 |
use Mollie\Api\Resources\PermissionCollection;
|
8 |
|
9 |
+
class PermissionEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "permissions";
|
12 |
|
26 |
* endpoint uses one type of collection object.
|
27 |
*
|
28 |
* @param int $count
|
29 |
+
* @param \stdClass $_links
|
30 |
*
|
31 |
* @return PermissionCollection
|
32 |
*/
|
includes/mollie-api-php/src/Endpoints/ProfileEndpoint.php
CHANGED
@@ -3,12 +3,14 @@
|
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
5 |
use Mollie\Api\Exceptions\ApiException;
|
|
|
6 |
use Mollie\Api\Resources\Profile;
|
7 |
use Mollie\Api\Resources\ProfileCollection;
|
8 |
|
9 |
-
class ProfileEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "profiles";
|
|
|
12 |
|
13 |
/**
|
14 |
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
|
@@ -17,14 +19,14 @@ class ProfileEndpoint extends EndpointAbstract
|
|
17 |
*/
|
18 |
protected function getResourceObject()
|
19 |
{
|
20 |
-
return new
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return ProfileCollection
|
30 |
*/
|
@@ -39,7 +41,7 @@ class ProfileEndpoint extends EndpointAbstract
|
|
39 |
* @param array $data An array containing details on the profile.
|
40 |
* @param array $filters
|
41 |
*
|
42 |
-
* @return Profile
|
43 |
* @throws ApiException
|
44 |
*/
|
45 |
public function create(array $data = [], array $filters = [])
|
@@ -50,19 +52,38 @@ class ProfileEndpoint extends EndpointAbstract
|
|
50 |
/**
|
51 |
* Retrieve a Profile from Mollie.
|
52 |
*
|
53 |
-
* Will throw
|
54 |
*
|
55 |
* @param string $profileId
|
56 |
* @param array $parameters
|
57 |
*
|
58 |
-
* @return Profile
|
59 |
* @throws ApiException
|
60 |
*/
|
61 |
public function get($profileId, array $parameters = [])
|
62 |
{
|
|
|
|
|
|
|
|
|
63 |
return $this->rest_read($profileId, $parameters);
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
/**
|
67 |
* Delete a Profile from Mollie.
|
68 |
*
|
@@ -72,7 +93,7 @@ class ProfileEndpoint extends EndpointAbstract
|
|
72 |
* @param string $profileId
|
73 |
*
|
74 |
* @param array $data
|
75 |
-
* @return Profile
|
76 |
* @throws ApiException
|
77 |
*/
|
78 |
public function delete($profileId, array $data = [])
|
@@ -87,7 +108,7 @@ class ProfileEndpoint extends EndpointAbstract
|
|
87 |
* @param int $limit
|
88 |
* @param array $parameters
|
89 |
*
|
90 |
-
* @return ProfileCollection
|
91 |
* @throws ApiException
|
92 |
*/
|
93 |
public function page($from = null, $limit = null, array $parameters = [])
|
@@ -96,4 +117,4 @@ class ProfileEndpoint extends EndpointAbstract
|
|
96 |
}
|
97 |
|
98 |
|
99 |
-
}
|
3 |
namespace Mollie\Api\Endpoints;
|
4 |
|
5 |
use Mollie\Api\Exceptions\ApiException;
|
6 |
+
use Mollie\Api\Resources\CurrentProfile;
|
7 |
use Mollie\Api\Resources\Profile;
|
8 |
use Mollie\Api\Resources\ProfileCollection;
|
9 |
|
10 |
+
class ProfileEndpoint extends CollectionEndpointAbstract
|
11 |
{
|
12 |
protected $resourcePath = "profiles";
|
13 |
+
protected $resourceClass = Profile::class;
|
14 |
|
15 |
/**
|
16 |
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
|
19 |
*/
|
20 |
protected function getResourceObject()
|
21 |
{
|
22 |
+
return new $this->resourceClass($this->client);
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
27 |
*
|
28 |
* @param int $count
|
29 |
+
* @param \stdClass $_links
|
30 |
*
|
31 |
* @return ProfileCollection
|
32 |
*/
|
41 |
* @param array $data An array containing details on the profile.
|
42 |
* @param array $filters
|
43 |
*
|
44 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Profile
|
45 |
* @throws ApiException
|
46 |
*/
|
47 |
public function create(array $data = [], array $filters = [])
|
52 |
/**
|
53 |
* Retrieve a Profile from Mollie.
|
54 |
*
|
55 |
+
* Will throw an ApiException if the profile id is invalid or the resource cannot be found.
|
56 |
*
|
57 |
* @param string $profileId
|
58 |
* @param array $parameters
|
59 |
*
|
60 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Profile
|
61 |
* @throws ApiException
|
62 |
*/
|
63 |
public function get($profileId, array $parameters = [])
|
64 |
{
|
65 |
+
if($profileId === 'me') {
|
66 |
+
return $this->getCurrent($parameters);
|
67 |
+
}
|
68 |
+
|
69 |
return $this->rest_read($profileId, $parameters);
|
70 |
}
|
71 |
|
72 |
+
/**
|
73 |
+
* Retrieve the current Profile from Mollie.
|
74 |
+
*
|
75 |
+
* @param array $parameters
|
76 |
+
*
|
77 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\CurrentProfile
|
78 |
+
* @throws ApiException
|
79 |
+
*/
|
80 |
+
public function getCurrent(array $parameters = [])
|
81 |
+
{
|
82 |
+
$this->resourceClass = CurrentProfile::class;
|
83 |
+
|
84 |
+
return $this->rest_read('me', $parameters);
|
85 |
+
}
|
86 |
+
|
87 |
/**
|
88 |
* Delete a Profile from Mollie.
|
89 |
*
|
93 |
* @param string $profileId
|
94 |
*
|
95 |
* @param array $data
|
96 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Profile
|
97 |
* @throws ApiException
|
98 |
*/
|
99 |
public function delete($profileId, array $data = [])
|
108 |
* @param int $limit
|
109 |
* @param array $parameters
|
110 |
*
|
111 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\ProfileCollection
|
112 |
* @throws ApiException
|
113 |
*/
|
114 |
public function page($from = null, $limit = null, array $parameters = [])
|
117 |
}
|
118 |
|
119 |
|
120 |
+
}
|
includes/mollie-api-php/src/Endpoints/ProfileMethodEndpoint.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Endpoints;
|
4 |
+
|
5 |
+
use Mollie\Api\Resources\Method;
|
6 |
+
use Mollie\Api\Resources\MethodCollection;
|
7 |
+
use Mollie\Api\Resources\Profile;
|
8 |
+
use Mollie\Api\Resources\ResourceFactory;
|
9 |
+
|
10 |
+
class ProfileMethodEndpoint extends CollectionEndpointAbstract
|
11 |
+
{
|
12 |
+
protected $resourcePath = "profiles_methods";
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
|
16 |
+
*
|
17 |
+
* @return Method
|
18 |
+
*/
|
19 |
+
protected function getResourceObject()
|
20 |
+
{
|
21 |
+
return new Method($this->client);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
26 |
+
*
|
27 |
+
* @param int $count
|
28 |
+
* @param \stdClass $_links
|
29 |
+
*
|
30 |
+
* @return MethodCollection()
|
31 |
+
*/
|
32 |
+
protected function getResourceCollectionObject($count, $_links)
|
33 |
+
{
|
34 |
+
return new MethodCollection($count, $_links);
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Enable a method for the provided Profile ID.
|
39 |
+
*
|
40 |
+
* @param $profileId
|
41 |
+
* @param $methodId
|
42 |
+
* @param array $data
|
43 |
+
* @return \Mollie\Api\Resources\BaseResource
|
44 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
45 |
+
*/
|
46 |
+
public function createForId($profileId, $methodId, array $data = [])
|
47 |
+
{
|
48 |
+
$this->parentId = $profileId;
|
49 |
+
$resource = $this->getResourcePath() . '/' . urlencode($methodId);
|
50 |
+
|
51 |
+
$body = null;
|
52 |
+
if (count($data) > 0) {
|
53 |
+
$body = json_encode($data);
|
54 |
+
}
|
55 |
+
|
56 |
+
$result = $this->client->performHttpCall(self::REST_CREATE, $resource, $body);
|
57 |
+
|
58 |
+
return ResourceFactory::createFromApiResult($result, new Method($this->client));
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Enable a method for the provided Profile object.
|
63 |
+
*
|
64 |
+
* @param Profile $profile
|
65 |
+
* @param string $methodId
|
66 |
+
* @param array $data
|
67 |
+
* @return Method
|
68 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
69 |
+
*/
|
70 |
+
public function createFor($profile, $methodId, array $data = [])
|
71 |
+
{
|
72 |
+
return $this->createForId($profile->id, $methodId, $data);
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Enable a method for the current profile.
|
77 |
+
*
|
78 |
+
* @param $methodId
|
79 |
+
* @param array $data
|
80 |
+
* @return \Mollie\Api\Resources\BaseResource
|
81 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
82 |
+
*/
|
83 |
+
public function createForCurrentProfile($methodId, array $data = [])
|
84 |
+
{
|
85 |
+
return $this->createForId('me', $methodId, $data);
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Disable a method for the provided Profile ID.
|
90 |
+
*
|
91 |
+
* @param $profileId
|
92 |
+
* @param $methodId
|
93 |
+
* @param array $data
|
94 |
+
* @return \Mollie\Api\Resources\BaseResource
|
95 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
96 |
+
*/
|
97 |
+
public function deleteForId($profileId, $methodId, array $data = [])
|
98 |
+
{
|
99 |
+
$this->parentId = $profileId;
|
100 |
+
|
101 |
+
return $this->rest_delete($methodId, $data);
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Disable a method for the provided Profile object.
|
106 |
+
*
|
107 |
+
* @param $profile
|
108 |
+
* @param $methodId
|
109 |
+
* @param array $data
|
110 |
+
* @return \Mollie\Api\Resources\BaseResource
|
111 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
112 |
+
*/
|
113 |
+
public function deleteFor($profile, $methodId, array $data = [])
|
114 |
+
{
|
115 |
+
return $this->deleteForId($profile->id, $methodId, $data);
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Disable a method for the current profile.
|
120 |
+
*
|
121 |
+
* @param $methodId
|
122 |
+
* @param array $data
|
123 |
+
* @return \Mollie\Api\Resources\BaseResource
|
124 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
125 |
+
*/
|
126 |
+
public function deleteForCurrentProfile($methodId, array $data)
|
127 |
+
{
|
128 |
+
return $this->deleteForId('me', $methodId, $data);
|
129 |
+
}
|
130 |
+
}
|
includes/mollie-api-php/src/Endpoints/RefundEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Refund;
|
7 |
use Mollie\Api\Resources\RefundCollection;
|
8 |
|
9 |
-
class RefundEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "refunds";
|
12 |
|
@@ -24,7 +24,7 @@ class RefundEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return RefundCollection
|
30 |
*/
|
6 |
use Mollie\Api\Resources\Refund;
|
7 |
use Mollie\Api\Resources\RefundCollection;
|
8 |
|
9 |
+
class RefundEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "refunds";
|
12 |
|
24 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return RefundCollection
|
30 |
*/
|
includes/mollie-api-php/src/Endpoints/SettlementsEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Exceptions\ApiException;
|
|
6 |
use Mollie\Api\Resources\Settlement;
|
7 |
use Mollie\Api\Resources\SettlementCollection;
|
8 |
|
9 |
-
class SettlementsEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "settlements";
|
12 |
|
@@ -24,7 +24,7 @@ class SettlementsEndpoint extends EndpointAbstract
|
|
24 |
* Get the collection object that is used by this API. Every API uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
-
* @param
|
28 |
*
|
29 |
* @return \Mollie\Api\Resources\BaseCollection
|
30 |
*/
|
@@ -84,4 +84,4 @@ class SettlementsEndpoint extends EndpointAbstract
|
|
84 |
{
|
85 |
return $this->rest_list($from, $limit, $parameters);
|
86 |
}
|
87 |
-
}
|
6 |
use Mollie\Api\Resources\Settlement;
|
7 |
use Mollie\Api\Resources\SettlementCollection;
|
8 |
|
9 |
+
class SettlementsEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "settlements";
|
12 |
|
24 |
* Get the collection object that is used by this API. Every API uses one type of collection object.
|
25 |
*
|
26 |
* @param int $count
|
27 |
+
* @param \stdClass $_links
|
28 |
*
|
29 |
* @return \Mollie\Api\Resources\BaseCollection
|
30 |
*/
|
84 |
{
|
85 |
return $this->rest_list($from, $limit, $parameters);
|
86 |
}
|
87 |
+
}
|
includes/mollie-api-php/src/Endpoints/ShipmentEndpoint.php
CHANGED
@@ -6,7 +6,7 @@ use Mollie\Api\Resources\Order;
|
|
6 |
use Mollie\Api\Resources\Shipment;
|
7 |
use Mollie\Api\Resources\ShipmentCollection;
|
8 |
|
9 |
-
class ShipmentEndpoint extends
|
10 |
{
|
11 |
protected $resourcePath = "orders_shipments";
|
12 |
|
@@ -30,7 +30,7 @@ class ShipmentEndpoint extends EndpointAbstract
|
|
30 |
* endpoint uses one type of collection object.
|
31 |
*
|
32 |
* @param int $count
|
33 |
-
* @param
|
34 |
*
|
35 |
* @return ShipmentCollection
|
36 |
*/
|
@@ -48,10 +48,28 @@ class ShipmentEndpoint extends EndpointAbstract
|
|
48 |
* @param array $filters
|
49 |
*
|
50 |
* @return Shipment
|
|
|
51 |
*/
|
52 |
public function createFor(Order $order, array $options = [], array $filters = [])
|
53 |
{
|
54 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
return parent::rest_create($options, $filters);
|
56 |
}
|
57 |
|
@@ -63,10 +81,26 @@ class ShipmentEndpoint extends EndpointAbstract
|
|
63 |
* @param array $parameters
|
64 |
*
|
65 |
* @return Shipment
|
|
|
66 |
*/
|
67 |
public function getFor(Order $order, $shipmentId, array $parameters = [])
|
68 |
{
|
69 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
return parent::rest_read($shipmentId, $parameters);
|
72 |
}
|
@@ -78,10 +112,25 @@ class ShipmentEndpoint extends EndpointAbstract
|
|
78 |
* @param array $parameters
|
79 |
*
|
80 |
* @return ShipmentCollection
|
|
|
81 |
*/
|
82 |
public function listFor(Order $order, array $parameters = [])
|
83 |
{
|
84 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
return parent::rest_list(null, null, $parameters);
|
87 |
}
|
6 |
use Mollie\Api\Resources\Shipment;
|
7 |
use Mollie\Api\Resources\ShipmentCollection;
|
8 |
|
9 |
+
class ShipmentEndpoint extends CollectionEndpointAbstract
|
10 |
{
|
11 |
protected $resourcePath = "orders_shipments";
|
12 |
|
30 |
* endpoint uses one type of collection object.
|
31 |
*
|
32 |
* @param int $count
|
33 |
+
* @param \stdClass $_links
|
34 |
*
|
35 |
* @return ShipmentCollection
|
36 |
*/
|
48 |
* @param array $filters
|
49 |
*
|
50 |
* @return Shipment
|
51 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
52 |
*/
|
53 |
public function createFor(Order $order, array $options = [], array $filters = [])
|
54 |
{
|
55 |
+
return $this->createForId($order->id, $options, $filters);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Create a shipment for some order lines. You can provide an empty array for the
|
60 |
+
* "lines" option to include all unshipped lines for this order.
|
61 |
+
*
|
62 |
+
* @param string $orderId
|
63 |
+
* @param array $options
|
64 |
+
* @param array $filters
|
65 |
+
*
|
66 |
+
* @return Shipment
|
67 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
68 |
+
*/
|
69 |
+
public function createForId($orderId, array $options = [], array $filters = [])
|
70 |
+
{
|
71 |
+
$this->parentId = $orderId;
|
72 |
+
|
73 |
return parent::rest_create($options, $filters);
|
74 |
}
|
75 |
|
81 |
* @param array $parameters
|
82 |
*
|
83 |
* @return Shipment
|
84 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
85 |
*/
|
86 |
public function getFor(Order $order, $shipmentId, array $parameters = [])
|
87 |
{
|
88 |
+
return $this->getForId($order->id, $shipmentId, $parameters);
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Retrieve a single shipment and the order lines shipped by a shipment’s ID.
|
93 |
+
*
|
94 |
+
* @param string $orderId
|
95 |
+
* @param string $shipmentId
|
96 |
+
* @param array $parameters
|
97 |
+
*
|
98 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Shipment
|
99 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
100 |
+
*/
|
101 |
+
public function getForId($orderId, $shipmentId, array $parameters = [])
|
102 |
+
{
|
103 |
+
$this->parentId = $orderId;
|
104 |
|
105 |
return parent::rest_read($shipmentId, $parameters);
|
106 |
}
|
112 |
* @param array $parameters
|
113 |
*
|
114 |
* @return ShipmentCollection
|
115 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
116 |
*/
|
117 |
public function listFor(Order $order, array $parameters = [])
|
118 |
{
|
119 |
+
return $this->listForId($order->id, $parameters);
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Return all shipments for the provided Order id.
|
124 |
+
*
|
125 |
+
* @param string $orderId
|
126 |
+
* @param array $parameters
|
127 |
+
*
|
128 |
+
* @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\ShipmentCollection
|
129 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
130 |
+
*/
|
131 |
+
public function listForId($orderId, array $parameters = [])
|
132 |
+
{
|
133 |
+
$this->parentId = $orderId;
|
134 |
|
135 |
return parent::rest_list(null, null, $parameters);
|
136 |
}
|
includes/mollie-api-php/src/Endpoints/SubscriptionEndpoint.php
CHANGED
@@ -8,7 +8,7 @@ use Mollie\Api\Resources\Customer;
|
|
8 |
use Mollie\Api\Resources\Subscription;
|
9 |
use Mollie\Api\Resources\SubscriptionCollection;
|
10 |
|
11 |
-
class SubscriptionEndpoint extends
|
12 |
{
|
13 |
protected $resourcePath = "customers_subscriptions";
|
14 |
|
@@ -26,7 +26,7 @@ class SubscriptionEndpoint extends EndpointAbstract
|
|
26 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
27 |
*
|
28 |
* @param int $count
|
29 |
-
* @param
|
30 |
*
|
31 |
* @return SubscriptionCollection
|
32 |
*/
|
@@ -94,4 +94,4 @@ class SubscriptionEndpoint extends EndpointAbstract
|
|
94 |
|
95 |
return parent::rest_delete($subscriptionId, $data);
|
96 |
}
|
97 |
-
}
|
8 |
use Mollie\Api\Resources\Subscription;
|
9 |
use Mollie\Api\Resources\SubscriptionCollection;
|
10 |
|
11 |
+
class SubscriptionEndpoint extends CollectionEndpointAbstract
|
12 |
{
|
13 |
protected $resourcePath = "customers_subscriptions";
|
14 |
|
26 |
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
|
27 |
*
|
28 |
* @param int $count
|
29 |
+
* @param \stdClass $_links
|
30 |
*
|
31 |
* @return SubscriptionCollection
|
32 |
*/
|
94 |
|
95 |
return parent::rest_delete($subscriptionId, $data);
|
96 |
}
|
97 |
+
}
|
includes/mollie-api-php/src/Exceptions/ApiException.php
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
|
3 |
namespace Mollie\Api\Exceptions;
|
4 |
|
|
|
|
|
|
|
5 |
class ApiException extends \Exception
|
6 |
{
|
7 |
/**
|
@@ -10,36 +13,99 @@ class ApiException extends \Exception
|
|
10 |
protected $field;
|
11 |
|
12 |
/**
|
13 |
-
* @var
|
|
|
|
|
|
|
|
|
|
|
14 |
*/
|
15 |
-
protected $
|
16 |
|
17 |
/**
|
18 |
-
* @param string
|
19 |
-
* @param int
|
20 |
-
* @param string|null
|
21 |
-
* @param
|
22 |
* @param \Throwable|null $previous
|
|
|
23 |
*/
|
24 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
{
|
26 |
if (!empty($field)) {
|
27 |
$this->field = (string)$field;
|
28 |
$message .= ". Field: {$this->field}";
|
29 |
}
|
30 |
|
31 |
-
if (!empty($
|
32 |
-
$this->
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
parent::__construct($message, $code, $previous);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
|
|
|
|
|
|
|
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
42 |
-
* @return string
|
43 |
*/
|
44 |
public function getField()
|
45 |
{
|
@@ -47,10 +113,85 @@ class ApiException extends \Exception
|
|
47 |
}
|
48 |
|
49 |
/**
|
50 |
-
* @return string
|
51 |
*/
|
52 |
public function getDocumentationUrl()
|
53 |
{
|
54 |
-
return $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
}
|
2 |
|
3 |
namespace Mollie\Api\Exceptions;
|
4 |
|
5 |
+
use GuzzleHttp\Psr7\Response;
|
6 |
+
use Throwable;
|
7 |
+
|
8 |
class ApiException extends \Exception
|
9 |
{
|
10 |
/**
|
13 |
protected $field;
|
14 |
|
15 |
/**
|
16 |
+
* @var Response
|
17 |
+
*/
|
18 |
+
protected $response;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var array
|
22 |
*/
|
23 |
+
protected $links = [];
|
24 |
|
25 |
/**
|
26 |
+
* @param string $message
|
27 |
+
* @param int $code
|
28 |
+
* @param string|null $field
|
29 |
+
* @param \GuzzleHttp\Psr7\Response|null $response
|
30 |
* @param \Throwable|null $previous
|
31 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
32 |
*/
|
33 |
+
public function __construct(
|
34 |
+
$message = "",
|
35 |
+
$code = 0,
|
36 |
+
$field = null,
|
37 |
+
Response $response = null,
|
38 |
+
Throwable $previous = null
|
39 |
+
)
|
40 |
{
|
41 |
if (!empty($field)) {
|
42 |
$this->field = (string)$field;
|
43 |
$message .= ". Field: {$this->field}";
|
44 |
}
|
45 |
|
46 |
+
if (!empty($response)) {
|
47 |
+
$this->response = $response;
|
48 |
+
|
49 |
+
$object = static::parseResponseBody($this->response);
|
50 |
+
|
51 |
+
if(isset($object->_links)) {
|
52 |
+
foreach ($object->_links as $key => $value) {
|
53 |
+
$this->links[$key] = $value;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
if ($this->hasLink('documentation')) {
|
59 |
+
$message .= ". Documentation: {$this->getDocumentationUrl()}";
|
60 |
}
|
61 |
|
62 |
parent::__construct($message, $code, $previous);
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @param \GuzzleHttp\Exception\RequestException $guzzleException
|
67 |
+
* @param \Throwable $previous
|
68 |
+
* @return \Mollie\Api\Exceptions\ApiException
|
69 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
70 |
+
*/
|
71 |
+
public static function createFromGuzzleException($guzzleException, Throwable $previous = null)
|
72 |
+
{
|
73 |
+
// Not all Guzzle Exceptions implement hasResponse() / getResponse()
|
74 |
+
if(method_exists($guzzleException, 'hasResponse') && method_exists($guzzleException, 'getResponse')) {
|
75 |
+
if($guzzleException->hasResponse()) {
|
76 |
+
return static::createFromResponse($guzzleException->getResponse());
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
return new static($guzzleException->getMessage(), $guzzleException->getCode(), null, $previous);
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* @param \Psr\Http\Message\ResponseInterface $response
|
85 |
+
* @param \Throwable|null $previous
|
86 |
+
* @return \Mollie\Api\Exceptions\ApiException
|
87 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
88 |
+
*/
|
89 |
+
public static function createFromResponse($response, Throwable $previous = null)
|
90 |
+
{
|
91 |
+
$object = static::parseResponseBody($response);
|
92 |
|
93 |
+
$field = null;
|
94 |
+
if (!empty($object->field)) {
|
95 |
+
$field = $object->field;
|
96 |
+
}
|
97 |
|
98 |
+
return new static(
|
99 |
+
"Error executing API call ({$object->status}: {$object->title}): {$object->detail}",
|
100 |
+
$response->getStatusCode(),
|
101 |
+
$field,
|
102 |
+
$response,
|
103 |
+
$previous
|
104 |
+
);
|
105 |
}
|
106 |
|
107 |
/**
|
108 |
+
* @return string|null
|
109 |
*/
|
110 |
public function getField()
|
111 |
{
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
+
* @return string|null
|
117 |
*/
|
118 |
public function getDocumentationUrl()
|
119 |
{
|
120 |
+
return $this->getUrl('documentation');
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @return string|null
|
125 |
+
*/
|
126 |
+
public function getDashboardUrl()
|
127 |
+
{
|
128 |
+
return $this->getUrl('dashboard');
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* @return Response|null
|
133 |
+
*/
|
134 |
+
public function getResponse()
|
135 |
+
{
|
136 |
+
return $this->response;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @return bool
|
141 |
+
*/
|
142 |
+
public function hasResponse()
|
143 |
+
{
|
144 |
+
return $this->response !== null;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* @param $key
|
149 |
+
* @return bool
|
150 |
+
*/
|
151 |
+
public function hasLink($key)
|
152 |
+
{
|
153 |
+
return array_key_exists($key, $this->links);
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* @param $key
|
158 |
+
* @return mixed|null
|
159 |
+
*/
|
160 |
+
public function getLink($key)
|
161 |
+
{
|
162 |
+
if($this->hasLink($key)) {
|
163 |
+
return $this->links[$key];
|
164 |
+
}
|
165 |
+
return null;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* @param $key
|
170 |
+
* @return null
|
171 |
+
*/
|
172 |
+
public function getUrl($key)
|
173 |
+
{
|
174 |
+
if($this->hasLink($key)) {
|
175 |
+
return $this->getLink($key)->href;
|
176 |
+
}
|
177 |
+
return null;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* @param $response
|
182 |
+
* @return mixed
|
183 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
184 |
+
*/
|
185 |
+
protected static function parseResponseBody($response)
|
186 |
+
{
|
187 |
+
$body = (string) $response->getBody();
|
188 |
+
|
189 |
+
$object = @json_decode($body);
|
190 |
+
|
191 |
+
if (json_last_error() !== JSON_ERROR_NONE) {
|
192 |
+
throw new static("Unable to decode Mollie response: '{$body}'.");
|
193 |
+
}
|
194 |
+
|
195 |
+
return $object;
|
196 |
}
|
197 |
}
|
includes/mollie-api-php/src/MollieApiClient.php
CHANGED
@@ -12,8 +12,10 @@ use Mollie\Api\Endpoints\CustomerPaymentsEndpoint;
|
|
12 |
use Mollie\Api\Endpoints\InvoiceEndpoint;
|
13 |
use Mollie\Api\Endpoints\MandateEndpoint;
|
14 |
use Mollie\Api\Endpoints\MethodEndpoint;
|
|
|
15 |
use Mollie\Api\Endpoints\OrderEndpoint;
|
16 |
use Mollie\Api\Endpoints\OrderLineEndpoint;
|
|
|
17 |
use Mollie\Api\Endpoints\OrderRefundEndpoint;
|
18 |
use Mollie\Api\Endpoints\PaymentCaptureEndpoint;
|
19 |
use Mollie\Api\Endpoints\OrganizationEndpoint;
|
@@ -22,6 +24,7 @@ use Mollie\Api\Endpoints\PaymentEndpoint;
|
|
22 |
use Mollie\Api\Endpoints\PaymentRefundEndpoint;
|
23 |
use Mollie\Api\Endpoints\PermissionEndpoint;
|
24 |
use Mollie\Api\Endpoints\ProfileEndpoint;
|
|
|
25 |
use Mollie\Api\Endpoints\RefundEndpoint;
|
26 |
use Mollie\Api\Endpoints\SettlementsEndpoint;
|
27 |
use Mollie\Api\Endpoints\ShipmentEndpoint;
|
@@ -36,7 +39,7 @@ class MollieApiClient
|
|
36 |
/**
|
37 |
* Version of our client.
|
38 |
*/
|
39 |
-
const CLIENT_VERSION = "2.
|
40 |
|
41 |
/**
|
42 |
* Endpoint of the remote API.
|
@@ -90,6 +93,11 @@ class MollieApiClient
|
|
90 |
*/
|
91 |
public $methods;
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
/**
|
94 |
* RESTful Customers resource.
|
95 |
*
|
@@ -149,6 +157,13 @@ class MollieApiClient
|
|
149 |
*/
|
150 |
public $invoices;
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
/**
|
153 |
* RESTful Order resource.
|
154 |
*
|
@@ -163,6 +178,13 @@ class MollieApiClient
|
|
163 |
*/
|
164 |
public $orderLines;
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
/**
|
167 |
* RESTful Shipment resource.
|
168 |
*
|
@@ -194,14 +216,14 @@ class MollieApiClient
|
|
194 |
/**
|
195 |
* RESTful Chargebacks resource.
|
196 |
*
|
197 |
-
* @var
|
198 |
*/
|
199 |
public $chargebacks;
|
200 |
|
201 |
/**
|
202 |
* RESTful Payment Chargebacks resource.
|
203 |
*
|
204 |
-
* @var
|
205 |
*/
|
206 |
public $paymentChargebacks;
|
207 |
|
@@ -228,7 +250,6 @@ class MollieApiClient
|
|
228 |
* @var array
|
229 |
*/
|
230 |
protected $versionStrings = [];
|
231 |
-
|
232 |
/**
|
233 |
* @var int
|
234 |
*/
|
@@ -262,6 +283,7 @@ class MollieApiClient
|
|
262 |
{
|
263 |
$this->payments = new PaymentEndpoint($this);
|
264 |
$this->methods = new MethodEndpoint($this);
|
|
|
265 |
$this->customers = new CustomerEndpoint($this);
|
266 |
$this->settlements = new SettlementsEndpoint($this);
|
267 |
$this->subscriptions = new SubscriptionEndpoint($this);
|
@@ -270,9 +292,11 @@ class MollieApiClient
|
|
270 |
$this->invoices = new InvoiceEndpoint($this);
|
271 |
$this->permissions = new PermissionEndpoint($this);
|
272 |
$this->profiles = new ProfileEndpoint($this);
|
|
|
273 |
$this->organizations = new OrganizationEndpoint($this);
|
274 |
$this->orders = new OrderEndpoint($this);
|
275 |
$this->orderLines = new OrderLineEndpoint($this);
|
|
|
276 |
$this->orderRefunds = new OrderRefundEndpoint($this);
|
277 |
$this->shipments = new ShipmentEndpoint($this);
|
278 |
$this->refunds = new RefundEndpoint($this);
|
@@ -364,14 +388,11 @@ class MollieApiClient
|
|
364 |
* Perform an http call. This method is used by the resource specific classes. Please use the $payments property to
|
365 |
* perform operations on payments.
|
366 |
*
|
367 |
-
* @see $payments
|
368 |
-
* @see $isuers
|
369 |
-
*
|
370 |
* @param string $httpMethod
|
371 |
* @param string $apiMethod
|
372 |
* @param string|null|resource|StreamInterface $httpBody
|
373 |
*
|
374 |
-
* @return
|
375 |
* @throws ApiException
|
376 |
*
|
377 |
* @codeCoverageIgnore
|
@@ -393,7 +414,7 @@ class MollieApiClient
|
|
393 |
* @param string $url
|
394 |
* @param string|null|resource|StreamInterface $httpBody
|
395 |
*
|
396 |
-
* @return
|
397 |
* @throws ApiException
|
398 |
*
|
399 |
* @codeCoverageIgnore
|
@@ -425,7 +446,7 @@ class MollieApiClient
|
|
425 |
try {
|
426 |
$response = $this->httpClient->send($request, ['http_errors' => false]);
|
427 |
} catch (GuzzleException $e) {
|
428 |
-
throw
|
429 |
}
|
430 |
|
431 |
if (!$response) {
|
@@ -439,7 +460,7 @@ class MollieApiClient
|
|
439 |
* Parse the PSR-7 Response body
|
440 |
*
|
441 |
* @param ResponseInterface $response
|
442 |
-
* @return
|
443 |
* @throws ApiException
|
444 |
*/
|
445 |
private function parseResponseBody(ResponseInterface $response)
|
@@ -460,22 +481,7 @@ class MollieApiClient
|
|
460 |
}
|
461 |
|
462 |
if ($response->getStatusCode() >= 400) {
|
463 |
-
$
|
464 |
-
if (!empty($object->field)) {
|
465 |
-
$field = $object->field;
|
466 |
-
}
|
467 |
-
|
468 |
-
$documentationUrl = null;
|
469 |
-
if (!empty($object->_links) && !empty($object->_links->documentation)) {
|
470 |
-
$documentationUrl = $object->_links->documentation->href;
|
471 |
-
}
|
472 |
-
|
473 |
-
throw new ApiException(
|
474 |
-
"Error executing API call ({$object->status}: {$object->title}): {$object->detail}",
|
475 |
-
$response->getStatusCode(),
|
476 |
-
$field,
|
477 |
-
$documentationUrl
|
478 |
-
);
|
479 |
}
|
480 |
|
481 |
return $object;
|
12 |
use Mollie\Api\Endpoints\InvoiceEndpoint;
|
13 |
use Mollie\Api\Endpoints\MandateEndpoint;
|
14 |
use Mollie\Api\Endpoints\MethodEndpoint;
|
15 |
+
use Mollie\Api\Endpoints\OnboardingEndpoint;
|
16 |
use Mollie\Api\Endpoints\OrderEndpoint;
|
17 |
use Mollie\Api\Endpoints\OrderLineEndpoint;
|
18 |
+
use Mollie\Api\Endpoints\OrderPaymentEndpoint;
|
19 |
use Mollie\Api\Endpoints\OrderRefundEndpoint;
|
20 |
use Mollie\Api\Endpoints\PaymentCaptureEndpoint;
|
21 |
use Mollie\Api\Endpoints\OrganizationEndpoint;
|
24 |
use Mollie\Api\Endpoints\PaymentRefundEndpoint;
|
25 |
use Mollie\Api\Endpoints\PermissionEndpoint;
|
26 |
use Mollie\Api\Endpoints\ProfileEndpoint;
|
27 |
+
use Mollie\Api\Endpoints\ProfileMethodEndpoint;
|
28 |
use Mollie\Api\Endpoints\RefundEndpoint;
|
29 |
use Mollie\Api\Endpoints\SettlementsEndpoint;
|
30 |
use Mollie\Api\Endpoints\ShipmentEndpoint;
|
39 |
/**
|
40 |
* Version of our client.
|
41 |
*/
|
42 |
+
const CLIENT_VERSION = "2.11.0";
|
43 |
|
44 |
/**
|
45 |
* Endpoint of the remote API.
|
93 |
*/
|
94 |
public $methods;
|
95 |
|
96 |
+
/**
|
97 |
+
* @var ProfileMethodEndpoint
|
98 |
+
*/
|
99 |
+
public $profileMethods;
|
100 |
+
|
101 |
/**
|
102 |
* RESTful Customers resource.
|
103 |
*
|
157 |
*/
|
158 |
public $invoices;
|
159 |
|
160 |
+
/**
|
161 |
+
* RESTful Onboarding resource.
|
162 |
+
*
|
163 |
+
* @var OnboardingEndpoint
|
164 |
+
*/
|
165 |
+
public $onboarding;
|
166 |
+
|
167 |
/**
|
168 |
* RESTful Order resource.
|
169 |
*
|
178 |
*/
|
179 |
public $orderLines;
|
180 |
|
181 |
+
/**
|
182 |
+
* RESTful OrderPayment resource.
|
183 |
+
*
|
184 |
+
* @var OrderPaymentEndpoint
|
185 |
+
*/
|
186 |
+
public $orderPayments;
|
187 |
+
|
188 |
/**
|
189 |
* RESTful Shipment resource.
|
190 |
*
|
216 |
/**
|
217 |
* RESTful Chargebacks resource.
|
218 |
*
|
219 |
+
* @var ChargebackEndpoint
|
220 |
*/
|
221 |
public $chargebacks;
|
222 |
|
223 |
/**
|
224 |
* RESTful Payment Chargebacks resource.
|
225 |
*
|
226 |
+
* @var PaymentChargebackEndpoint
|
227 |
*/
|
228 |
public $paymentChargebacks;
|
229 |
|
250 |
* @var array
|
251 |
*/
|
252 |
protected $versionStrings = [];
|
|
|
253 |
/**
|
254 |
* @var int
|
255 |
*/
|
283 |
{
|
284 |
$this->payments = new PaymentEndpoint($this);
|
285 |
$this->methods = new MethodEndpoint($this);
|
286 |
+
$this->profileMethods = new ProfileMethodEndpoint($this);
|
287 |
$this->customers = new CustomerEndpoint($this);
|
288 |
$this->settlements = new SettlementsEndpoint($this);
|
289 |
$this->subscriptions = new SubscriptionEndpoint($this);
|
292 |
$this->invoices = new InvoiceEndpoint($this);
|
293 |
$this->permissions = new PermissionEndpoint($this);
|
294 |
$this->profiles = new ProfileEndpoint($this);
|
295 |
+
$this->onboarding = new OnboardingEndpoint($this);
|
296 |
$this->organizations = new OrganizationEndpoint($this);
|
297 |
$this->orders = new OrderEndpoint($this);
|
298 |
$this->orderLines = new OrderLineEndpoint($this);
|
299 |
+
$this->orderPayments = new OrderPaymentEndpoint($this);
|
300 |
$this->orderRefunds = new OrderRefundEndpoint($this);
|
301 |
$this->shipments = new ShipmentEndpoint($this);
|
302 |
$this->refunds = new RefundEndpoint($this);
|
388 |
* Perform an http call. This method is used by the resource specific classes. Please use the $payments property to
|
389 |
* perform operations on payments.
|
390 |
*
|
|
|
|
|
|
|
391 |
* @param string $httpMethod
|
392 |
* @param string $apiMethod
|
393 |
* @param string|null|resource|StreamInterface $httpBody
|
394 |
*
|
395 |
+
* @return \stdClass
|
396 |
* @throws ApiException
|
397 |
*
|
398 |
* @codeCoverageIgnore
|
414 |
* @param string $url
|
415 |
* @param string|null|resource|StreamInterface $httpBody
|
416 |
*
|
417 |
+
* @return \stdClass|null
|
418 |
* @throws ApiException
|
419 |
*
|
420 |
* @codeCoverageIgnore
|
446 |
try {
|
447 |
$response = $this->httpClient->send($request, ['http_errors' => false]);
|
448 |
} catch (GuzzleException $e) {
|
449 |
+
throw ApiException::createFromGuzzleException($e);
|
450 |
}
|
451 |
|
452 |
if (!$response) {
|
460 |
* Parse the PSR-7 Response body
|
461 |
*
|
462 |
* @param ResponseInterface $response
|
463 |
+
* @return \stdClass|null
|
464 |
* @throws ApiException
|
465 |
*/
|
466 |
private function parseResponseBody(ResponseInterface $response)
|
481 |
}
|
482 |
|
483 |
if ($response->getStatusCode() >= 400) {
|
484 |
+
throw ApiException::createFromResponse($response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
}
|
486 |
|
487 |
return $object;
|
includes/mollie-api-php/src/Resources/BaseCollection.php
CHANGED
@@ -12,13 +12,13 @@ abstract class BaseCollection extends \ArrayObject
|
|
12 |
public $count;
|
13 |
|
14 |
/**
|
15 |
-
* @var
|
16 |
*/
|
17 |
public $_links;
|
18 |
|
19 |
/**
|
20 |
* @param int $count
|
21 |
-
* @param
|
22 |
*/
|
23 |
public function __construct($count, $_links)
|
24 |
{
|
12 |
public $count;
|
13 |
|
14 |
/**
|
15 |
+
* @var \stdClass
|
16 |
*/
|
17 |
public $_links;
|
18 |
|
19 |
/**
|
20 |
* @param int $count
|
21 |
+
* @param \stdClass $_links
|
22 |
*/
|
23 |
public function __construct($count, $_links)
|
24 |
{
|
includes/mollie-api-php/src/Resources/Capture.php
CHANGED
@@ -26,14 +26,14 @@ class Capture extends BaseResource
|
|
26 |
/**
|
27 |
* Amount object containing the value and currency
|
28 |
*
|
29 |
-
* @var
|
30 |
*/
|
31 |
public $amount;
|
32 |
|
33 |
/**
|
34 |
* Amount object containing the settlement value and currency
|
35 |
*
|
36 |
-
* @var
|
37 |
*/
|
38 |
public $settlementAmount;
|
39 |
|
@@ -64,7 +64,7 @@ class Capture extends BaseResource
|
|
64 |
public $createdAt;
|
65 |
|
66 |
/**
|
67 |
-
* @var
|
68 |
*/
|
69 |
public $_links;
|
70 |
}
|
26 |
/**
|
27 |
* Amount object containing the value and currency
|
28 |
*
|
29 |
+
* @var \stdClass
|
30 |
*/
|
31 |
public $amount;
|
32 |
|
33 |
/**
|
34 |
* Amount object containing the settlement value and currency
|
35 |
*
|
36 |
+
* @var \stdClass
|
37 |
*/
|
38 |
public $settlementAmount;
|
39 |
|
64 |
public $createdAt;
|
65 |
|
66 |
/**
|
67 |
+
* @var \stdClass
|
68 |
*/
|
69 |
public $_links;
|
70 |
}
|
includes/mollie-api-php/src/Resources/Chargeback.php
CHANGED
@@ -20,7 +20,7 @@ class Chargeback extends BaseResource
|
|
20 |
/**
|
21 |
* The $amount that was refunded.
|
22 |
*
|
23 |
-
* @var
|
24 |
*/
|
25 |
public $amount;
|
26 |
|
@@ -42,12 +42,12 @@ class Chargeback extends BaseResource
|
|
42 |
/**
|
43 |
* The settlement amount
|
44 |
*
|
45 |
-
* @var
|
46 |
*/
|
47 |
public $settlementAmount;
|
48 |
|
49 |
/**
|
50 |
-
* @var
|
51 |
*/
|
52 |
public $_links;
|
53 |
|
20 |
/**
|
21 |
* The $amount that was refunded.
|
22 |
*
|
23 |
+
* @var \stdClass
|
24 |
*/
|
25 |
public $amount;
|
26 |
|
42 |
/**
|
43 |
* The settlement amount
|
44 |
*
|
45 |
+
* @var \stdClass
|
46 |
*/
|
47 |
public $settlementAmount;
|
48 |
|
49 |
/**
|
50 |
+
* @var \stdClass
|
51 |
*/
|
52 |
public $_links;
|
53 |
|
includes/mollie-api-php/src/Resources/CurrentProfile.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Resources;
|
4 |
+
|
5 |
+
use Mollie\Api\Exceptions\ApiException;
|
6 |
+
|
7 |
+
class CurrentProfile extends Profile
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enable a payment method for this profile.
|
11 |
+
*
|
12 |
+
* @param string $methodId
|
13 |
+
* @param array $data
|
14 |
+
* @return Method
|
15 |
+
* @throws ApiException
|
16 |
+
*/
|
17 |
+
public function enableMethod($methodId, array $data = [])
|
18 |
+
{
|
19 |
+
return $this->client->profileMethods->createForCurrentProfile($methodId, $data);
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Disable a payment method for this profile.
|
24 |
+
*
|
25 |
+
* @param string $methodId
|
26 |
+
* @param array $data
|
27 |
+
* @return Method
|
28 |
+
* @throws ApiException
|
29 |
+
*/
|
30 |
+
public function disableMethod($methodId, array $data = [])
|
31 |
+
{
|
32 |
+
return $this->client->profileMethods->deleteForCurrentProfile($methodId, $data);
|
33 |
+
}
|
34 |
+
}
|
includes/mollie-api-php/src/Resources/CursorCollection.php
CHANGED
@@ -14,7 +14,7 @@ abstract class CursorCollection extends BaseCollection
|
|
14 |
/**
|
15 |
* @param MollieApiClient $client
|
16 |
* @param int $count
|
17 |
-
* @param
|
18 |
*/
|
19 |
final public function __construct(MollieApiClient $client, $count, $_links)
|
20 |
{
|
@@ -36,7 +36,7 @@ abstract class CursorCollection extends BaseCollection
|
|
36 |
*/
|
37 |
final public function next()
|
38 |
{
|
39 |
-
if (
|
40 |
return null;
|
41 |
}
|
42 |
|
14 |
/**
|
15 |
* @param MollieApiClient $client
|
16 |
* @param int $count
|
17 |
+
* @param \stdClass $_links
|
18 |
*/
|
19 |
final public function __construct(MollieApiClient $client, $count, $_links)
|
20 |
{
|
36 |
*/
|
37 |
final public function next()
|
38 |
{
|
39 |
+
if (!$this->hasNext()) {
|
40 |
return null;
|
41 |
}
|
42 |
|
includes/mollie-api-php/src/Resources/Customer.php
CHANGED
@@ -41,7 +41,7 @@ class Customer extends BaseResource
|
|
41 |
public $locale;
|
42 |
|
43 |
/**
|
44 |
-
* @var
|
45 |
*/
|
46 |
public $metadata;
|
47 |
|
@@ -56,7 +56,7 @@ class Customer extends BaseResource
|
|
56 |
public $createdAt;
|
57 |
|
58 |
/**
|
59 |
-
* @var
|
60 |
*/
|
61 |
public $_links;
|
62 |
|
41 |
public $locale;
|
42 |
|
43 |
/**
|
44 |
+
* @var \stdClass|mixed|null
|
45 |
*/
|
46 |
public $metadata;
|
47 |
|
56 |
public $createdAt;
|
57 |
|
58 |
/**
|
59 |
+
* @var \stdClass
|
60 |
*/
|
61 |
public $_links;
|
62 |
|
includes/mollie-api-php/src/Resources/Invoice.php
CHANGED
@@ -55,21 +55,21 @@ class Invoice extends BaseResource
|
|
55 |
/**
|
56 |
* Amount object containing the total amount of the invoice excluding VAT.
|
57 |
*
|
58 |
-
* @var
|
59 |
*/
|
60 |
public $netAmount;
|
61 |
|
62 |
/**
|
63 |
* Amount object containing the VAT amount of the invoice. Only for merchants registered in the Netherlands.
|
64 |
*
|
65 |
-
* @var
|
66 |
*/
|
67 |
public $vatAmount;
|
68 |
|
69 |
/**
|
70 |
* Total amount of the invoice including VAT.
|
71 |
*
|
72 |
-
* @var
|
73 |
*/
|
74 |
public $grossAmount;
|
75 |
|
@@ -77,14 +77,14 @@ class Invoice extends BaseResource
|
|
77 |
* Object containing the invoice lines.
|
78 |
* See https://docs.mollie.com/reference/v2/invoices-api/get-invoice for reference
|
79 |
*
|
80 |
-
* @var
|
81 |
*/
|
82 |
public $lines;
|
83 |
|
84 |
/**
|
85 |
* Contains a PDF to the Invoice
|
86 |
*
|
87 |
-
* @var
|
88 |
*/
|
89 |
public $_links;
|
90 |
|
55 |
/**
|
56 |
* Amount object containing the total amount of the invoice excluding VAT.
|
57 |
*
|
58 |
+
* @var \stdClass
|
59 |
*/
|
60 |
public $netAmount;
|
61 |
|
62 |
/**
|
63 |
* Amount object containing the VAT amount of the invoice. Only for merchants registered in the Netherlands.
|
64 |
*
|
65 |
+
* @var \stdClass
|
66 |
*/
|
67 |
public $vatAmount;
|
68 |
|
69 |
/**
|
70 |
* Total amount of the invoice including VAT.
|
71 |
*
|
72 |
+
* @var \stdClass
|
73 |
*/
|
74 |
public $grossAmount;
|
75 |
|
77 |
* Object containing the invoice lines.
|
78 |
* See https://docs.mollie.com/reference/v2/invoices-api/get-invoice for reference
|
79 |
*
|
80 |
+
* @var \stdClass
|
81 |
*/
|
82 |
public $lines;
|
83 |
|
84 |
/**
|
85 |
* Contains a PDF to the Invoice
|
86 |
*
|
87 |
+
* @var \stdClass
|
88 |
*/
|
89 |
public $_links;
|
90 |
|
includes/mollie-api-php/src/Resources/Issuer.php
CHANGED
@@ -29,7 +29,7 @@ class Issuer extends BaseResource
|
|
29 |
/**
|
30 |
* Object containing a size1x or size2x image
|
31 |
*
|
32 |
-
* @var
|
33 |
*/
|
34 |
public $image;
|
35 |
}
|
29 |
/**
|
30 |
* Object containing a size1x or size2x image
|
31 |
*
|
32 |
+
* @var \stdClass
|
33 |
*/
|
34 |
public $image;
|
35 |
}
|
includes/mollie-api-php/src/Resources/Mandate.php
CHANGED
@@ -33,7 +33,7 @@ class Mandate extends BaseResource
|
|
33 |
public $method;
|
34 |
|
35 |
/**
|
36 |
-
* @var
|
37 |
*/
|
38 |
public $details;
|
39 |
|
@@ -60,7 +60,7 @@ class Mandate extends BaseResource
|
|
60 |
public $signatureDate;
|
61 |
|
62 |
/**
|
63 |
-
* @var
|
64 |
*/
|
65 |
public $_links;
|
66 |
|
33 |
public $method;
|
34 |
|
35 |
/**
|
36 |
+
* @var \stdClass|null
|
37 |
*/
|
38 |
public $details;
|
39 |
|
60 |
public $signatureDate;
|
61 |
|
62 |
/**
|
63 |
+
* @var \stdClass
|
64 |
*/
|
65 |
public $_links;
|
66 |
|
includes/mollie-api-php/src/Resources/Method.php
CHANGED
@@ -18,10 +18,26 @@ class Method extends BaseResource
|
|
18 |
*/
|
19 |
public $description;
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* The $image->size1x and $image->size2x to display the payment method logo.
|
23 |
*
|
24 |
-
* @var
|
25 |
*/
|
26 |
public $image;
|
27 |
|
@@ -34,7 +50,15 @@ class Method extends BaseResource
|
|
34 |
public $issuers;
|
35 |
|
36 |
/**
|
37 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
*/
|
39 |
public $_links;
|
40 |
|
@@ -45,11 +69,24 @@ class Method extends BaseResource
|
|
45 |
*/
|
46 |
public function issuers()
|
47 |
{
|
48 |
-
|
49 |
-
|
50 |
-
$issuers
|
51 |
-
|
|
|
|
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
}
|
18 |
*/
|
19 |
public $description;
|
20 |
|
21 |
+
/**
|
22 |
+
* An object containing value and currency. It represents the minimum payment amount required to use this
|
23 |
+
* payment method.
|
24 |
+
*
|
25 |
+
* @var \stdClass
|
26 |
+
*/
|
27 |
+
public $minimumAmount;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* An object containing value and currency. It represents the maximum payment amount allowed when using this
|
31 |
+
* payment method.
|
32 |
+
*
|
33 |
+
* @var \stdClass
|
34 |
+
*/
|
35 |
+
public $maximumAmount;
|
36 |
+
|
37 |
/**
|
38 |
* The $image->size1x and $image->size2x to display the payment method logo.
|
39 |
*
|
40 |
+
* @var \stdClass
|
41 |
*/
|
42 |
public $image;
|
43 |
|
50 |
public $issuers;
|
51 |
|
52 |
/**
|
53 |
+
* The pricing for this payment method. Will only be filled when explicitly requested using the query string
|
54 |
+
* `include` parameter.
|
55 |
+
*
|
56 |
+
* @var array|object[]
|
57 |
+
*/
|
58 |
+
public $pricing;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @var \stdClass
|
62 |
*/
|
63 |
public $_links;
|
64 |
|
69 |
*/
|
70 |
public function issuers()
|
71 |
{
|
72 |
+
return ResourceFactory::createBaseResourceCollection(
|
73 |
+
$this->client,
|
74 |
+
$this->issuers,
|
75 |
+
Issuer::class
|
76 |
+
);
|
77 |
+
}
|
78 |
|
79 |
+
/**
|
80 |
+
* Get the method price value objects.
|
81 |
+
*
|
82 |
+
* @return MethodPriceCollection
|
83 |
+
*/
|
84 |
+
public function pricing()
|
85 |
+
{
|
86 |
+
return ResourceFactory::createBaseResourceCollection(
|
87 |
+
$this->client,
|
88 |
+
$this->pricing,
|
89 |
+
MethodPrice::class
|
90 |
+
);
|
91 |
}
|
92 |
}
|
includes/mollie-api-php/src/Resources/MethodPrice.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Resources;
|
4 |
+
|
5 |
+
class MethodPrice extends BaseResource
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* The area or product-type where the pricing is applied for, translated in the optional locale passed.
|
9 |
+
*
|
10 |
+
* @example "The Netherlands"
|
11 |
+
* @var \stdClass
|
12 |
+
*/
|
13 |
+
public $description;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The fixed price per transaction. This excludes the variable amount.
|
17 |
+
*
|
18 |
+
* @var \stdClass An amount object consisting of `value` and `currency`
|
19 |
+
*/
|
20 |
+
public $fixed;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* A string containing the percentage being charged over the payment amount besides the fixed price.
|
24 |
+
*
|
25 |
+
* @var \stdClass An amount object consisting of `value` and `currency`
|
26 |
+
*/
|
27 |
+
public $variable;
|
28 |
+
}
|
includes/mollie-api-php/src/Resources/MethodPriceCollection.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Resources;
|
4 |
+
|
5 |
+
class MethodPriceCollection extends BaseCollection
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* @return string|null
|
9 |
+
*/
|
10 |
+
public function getCollectionResourceName()
|
11 |
+
{
|
12 |
+
return null;
|
13 |
+
}
|
14 |
+
}
|
includes/mollie-api-php/src/Resources/Onboarding.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Resources;
|
4 |
+
|
5 |
+
use Mollie\Api\Types\OnboardingStatus;
|
6 |
+
|
7 |
+
class Onboarding extends BaseResource
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
public $resource;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
public $name;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
public $signedUpAt;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Either "needs-data", "in-review" or "completed".
|
26 |
+
* Indicates this current status of the organization’s onboarding process.
|
27 |
+
*
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
public $status;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @var bool
|
34 |
+
*/
|
35 |
+
public $canReceivePayments;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var bool
|
39 |
+
*/
|
40 |
+
public $canReceiveSettlements;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @var \stdClass
|
44 |
+
*/
|
45 |
+
public $_links;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
public function needsData()
|
51 |
+
{
|
52 |
+
return $this->status === OnboardingStatus::NEEDS_DATA;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @return bool
|
57 |
+
*/
|
58 |
+
public function isInReview()
|
59 |
+
{
|
60 |
+
return $this->status === OnboardingStatus::IN_REVIEW;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @return bool
|
65 |
+
*/
|
66 |
+
public function isCompleted()
|
67 |
+
{
|
68 |
+
return $this->status === OnboardingStatus::COMPLETED;
|
69 |
+
}
|
70 |
+
}
|
includes/mollie-api-php/src/Resources/Order.php
CHANGED
@@ -38,21 +38,21 @@ class Order extends BaseResource
|
|
38 |
/**
|
39 |
* Amount object containing the value and currency
|
40 |
*
|
41 |
-
* @var
|
42 |
*/
|
43 |
public $amount;
|
44 |
|
45 |
/**
|
46 |
* The total amount captured, thus far.
|
47 |
*
|
48 |
-
* @var
|
49 |
*/
|
50 |
public $amountCaptured;
|
51 |
|
52 |
/**
|
53 |
* The total amount refunded, thus far.
|
54 |
*
|
55 |
-
* @var
|
56 |
*/
|
57 |
public $amountRefunded;
|
58 |
|
@@ -66,7 +66,7 @@ class Order extends BaseResource
|
|
66 |
/**
|
67 |
* The person and the address the order is billed to.
|
68 |
*
|
69 |
-
* @var
|
70 |
*/
|
71 |
public $billingAddress;
|
72 |
|
@@ -87,7 +87,7 @@ class Order extends BaseResource
|
|
87 |
/**
|
88 |
* The person and the address the order is billed to.
|
89 |
*
|
90 |
-
* @var
|
91 |
*/
|
92 |
public $shippingAddress;
|
93 |
|
@@ -111,7 +111,7 @@ class Order extends BaseResource
|
|
111 |
* During creation of the order you can set custom metadata that is stored with
|
112 |
* the order, and given back whenever you retrieve that order.
|
113 |
*
|
114 |
-
* @var
|
115 |
*/
|
116 |
public $metadata;
|
117 |
|
@@ -154,7 +154,7 @@ class Order extends BaseResource
|
|
154 |
/**
|
155 |
* An object with several URL objects relevant to the customer. Every URL object will contain an href and a type field.
|
156 |
*
|
157 |
-
* @var
|
158 |
*/
|
159 |
public $_links;
|
160 |
|
@@ -249,7 +249,6 @@ class Order extends BaseResource
|
|
249 |
return $this->status === OrderStatus::STATUS_PENDING;
|
250 |
}
|
251 |
|
252 |
-
|
253 |
/**
|
254 |
* Cancels this order.
|
255 |
* If the order was partially shipped, the status will be "completed" instead of
|
@@ -258,7 +257,7 @@ class Order extends BaseResource
|
|
258 |
* be found.
|
259 |
*
|
260 |
* @return Order
|
261 |
-
* @throws ApiException
|
262 |
*/
|
263 |
public function cancel()
|
264 |
{
|
@@ -273,6 +272,7 @@ class Order extends BaseResource
|
|
273 |
*
|
274 |
* @param array|null $data
|
275 |
* @return null
|
|
|
276 |
*/
|
277 |
public function cancelLines(array $data)
|
278 |
{
|
@@ -285,6 +285,7 @@ class Order extends BaseResource
|
|
285 |
*
|
286 |
* @param array|null $data
|
287 |
* @return null
|
|
|
288 |
*/
|
289 |
public function cancelAllLines($data = [])
|
290 |
{
|
@@ -299,12 +300,7 @@ class Order extends BaseResource
|
|
299 |
*/
|
300 |
public function lines()
|
301 |
{
|
302 |
-
|
303 |
-
foreach ($this->lines as $line) {
|
304 |
-
$lines->append(ResourceFactory::createFromApiResult($line, new OrderLine($this->client)));
|
305 |
-
}
|
306 |
-
|
307 |
-
return $lines;
|
308 |
}
|
309 |
|
310 |
/**
|
@@ -395,12 +391,11 @@ class Order extends BaseResource
|
|
395 |
return $this->refund($data);
|
396 |
}
|
397 |
|
398 |
-
|
399 |
/**
|
400 |
* Retrieves all refunds associated with this order
|
401 |
*
|
402 |
* @return RefundCollection
|
403 |
-
* @throws ApiException
|
404 |
*/
|
405 |
public function refunds()
|
406 |
{
|
@@ -410,18 +405,19 @@ class Order extends BaseResource
|
|
410 |
|
411 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
|
412 |
|
413 |
-
|
414 |
-
|
415 |
-
$
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
}
|
420 |
|
421 |
/**
|
422 |
* Saves the order's updated billingAddress and/or shippingAddress.
|
423 |
*
|
424 |
-
* @return Order
|
|
|
425 |
*/
|
426 |
public function update()
|
427 |
{
|
@@ -432,10 +428,43 @@ class Order extends BaseResource
|
|
432 |
$body = json_encode(array(
|
433 |
"billingAddress" => $this->billingAddress,
|
434 |
"shippingAddress" => $this->shippingAddress,
|
|
|
435 |
));
|
436 |
|
437 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body);
|
438 |
|
439 |
return ResourceFactory::createFromApiResult($result, new Order($this->client));
|
440 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
}
|
38 |
/**
|
39 |
* Amount object containing the value and currency
|
40 |
*
|
41 |
+
* @var \stdClass
|
42 |
*/
|
43 |
public $amount;
|
44 |
|
45 |
/**
|
46 |
* The total amount captured, thus far.
|
47 |
*
|
48 |
+
* @var \stdClass
|
49 |
*/
|
50 |
public $amountCaptured;
|
51 |
|
52 |
/**
|
53 |
* The total amount refunded, thus far.
|
54 |
*
|
55 |
+
* @var \stdClass
|
56 |
*/
|
57 |
public $amountRefunded;
|
58 |
|
66 |
/**
|
67 |
* The person and the address the order is billed to.
|
68 |
*
|
69 |
+
* @var \stdClass
|
70 |
*/
|
71 |
public $billingAddress;
|
72 |
|
87 |
/**
|
88 |
* The person and the address the order is billed to.
|
89 |
*
|
90 |
+
* @var \stdClass
|
91 |
*/
|
92 |
public $shippingAddress;
|
93 |
|
111 |
* During creation of the order you can set custom metadata that is stored with
|
112 |
* the order, and given back whenever you retrieve that order.
|
113 |
*
|
114 |
+
* @var \stdClass|mixed|null
|
115 |
*/
|
116 |
public $metadata;
|
117 |
|
154 |
/**
|
155 |
* An object with several URL objects relevant to the customer. Every URL object will contain an href and a type field.
|
156 |
*
|
157 |
+
* @var \stdClass
|
158 |
*/
|
159 |
public $_links;
|
160 |
|
249 |
return $this->status === OrderStatus::STATUS_PENDING;
|
250 |
}
|
251 |
|
|
|
252 |
/**
|
253 |
* Cancels this order.
|
254 |
* If the order was partially shipped, the status will be "completed" instead of
|
257 |
* be found.
|
258 |
*
|
259 |
* @return Order
|
260 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
261 |
*/
|
262 |
public function cancel()
|
263 |
{
|
272 |
*
|
273 |
* @param array|null $data
|
274 |
* @return null
|
275 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
276 |
*/
|
277 |
public function cancelLines(array $data)
|
278 |
{
|
285 |
*
|
286 |
* @param array|null $data
|
287 |
* @return null
|
288 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
289 |
*/
|
290 |
public function cancelAllLines($data = [])
|
291 |
{
|
300 |
*/
|
301 |
public function lines()
|
302 |
{
|
303 |
+
return ResourceFactory::createBaseResourceCollection($this->client, $this->lines, OrderLine::class);
|
|
|
|
|
|
|
|
|
|
|
304 |
}
|
305 |
|
306 |
/**
|
391 |
return $this->refund($data);
|
392 |
}
|
393 |
|
|
|
394 |
/**
|
395 |
* Retrieves all refunds associated with this order
|
396 |
*
|
397 |
* @return RefundCollection
|
398 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
399 |
*/
|
400 |
public function refunds()
|
401 |
{
|
405 |
|
406 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
|
407 |
|
408 |
+
return ResourceFactory::createCursorResourceCollection(
|
409 |
+
$this->client,
|
410 |
+
$result->_embedded->refunds,
|
411 |
+
Refund::class,
|
412 |
+
$result->_links
|
413 |
+
);
|
414 |
}
|
415 |
|
416 |
/**
|
417 |
* Saves the order's updated billingAddress and/or shippingAddress.
|
418 |
*
|
419 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Order
|
420 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
421 |
*/
|
422 |
public function update()
|
423 |
{
|
428 |
$body = json_encode(array(
|
429 |
"billingAddress" => $this->billingAddress,
|
430 |
"shippingAddress" => $this->shippingAddress,
|
431 |
+
"orderNumber" => $this->orderNumber,
|
432 |
));
|
433 |
|
434 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body);
|
435 |
|
436 |
return ResourceFactory::createFromApiResult($result, new Order($this->client));
|
437 |
}
|
438 |
+
|
439 |
+
/**
|
440 |
+
* Create a new payment for this Order.
|
441 |
+
*
|
442 |
+
* @param $data
|
443 |
+
* @param array $filters
|
444 |
+
* @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Payment
|
445 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
446 |
+
*/
|
447 |
+
public function createPayment($data, $filters = [])
|
448 |
+
{
|
449 |
+
return $this->client->orderPayments->createFor($this, $data, $filters);
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Retrieve the payments for this order.
|
454 |
+
* Requires the order to be retrieved using the embed payments parameter.
|
455 |
+
*
|
456 |
+
* @return null|\Mollie\Api\Resources\PaymentCollection
|
457 |
+
*/
|
458 |
+
public function payments()
|
459 |
+
{
|
460 |
+
if(! isset($this->_embedded, $this->_embedded->payments) ) {
|
461 |
+
return null;
|
462 |
+
}
|
463 |
+
|
464 |
+
return ResourceFactory::createCursorResourceCollection(
|
465 |
+
$this->client,
|
466 |
+
$this->_embedded->payments,
|
467 |
+
Payment::class
|
468 |
+
);
|
469 |
+
}
|
470 |
}
|
includes/mollie-api-php/src/Resources/OrderLine.php
CHANGED
@@ -70,21 +70,21 @@ class OrderLine extends BaseResource
|
|
70 |
/**
|
71 |
* The price of a single item in the order line.
|
72 |
*
|
73 |
-
* @var
|
74 |
*/
|
75 |
public $unitPrice;
|
76 |
|
77 |
/**
|
78 |
* Any discounts applied to the order line.
|
79 |
*
|
80 |
-
* @var
|
81 |
*/
|
82 |
public $discountAmount;
|
83 |
|
84 |
/**
|
85 |
* The total amount of the line, including VAT and discounts.
|
86 |
*
|
87 |
-
* @var
|
88 |
*/
|
89 |
public $totalAmount;
|
90 |
|
@@ -101,7 +101,7 @@ class OrderLine extends BaseResource
|
|
101 |
/**
|
102 |
* The amount of value-added tax on the line.
|
103 |
*
|
104 |
-
* @var
|
105 |
*/
|
106 |
public $vatAmount;
|
107 |
|
70 |
/**
|
71 |
* The price of a single item in the order line.
|
72 |
*
|
73 |
+
* @var \stdClass
|
74 |
*/
|
75 |
public $unitPrice;
|
76 |
|
77 |
/**
|
78 |
* Any discounts applied to the order line.
|
79 |
*
|
80 |
+
* @var \stdClass|null
|
81 |
*/
|
82 |
public $discountAmount;
|
83 |
|
84 |
/**
|
85 |
* The total amount of the line, including VAT and discounts.
|
86 |
*
|
87 |
+
* @var \stdClass
|
88 |
*/
|
89 |
public $totalAmount;
|
90 |
|
101 |
/**
|
102 |
* The amount of value-added tax on the line.
|
103 |
*
|
104 |
+
* @var \stdClass
|
105 |
*/
|
106 |
public $vatAmount;
|
107 |
|
includes/mollie-api-php/src/Resources/Organization.php
CHANGED
@@ -18,10 +18,24 @@ class Organization extends BaseResource
|
|
18 |
*/
|
19 |
public $name;
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* The address of the organization.
|
23 |
*
|
24 |
-
* @var
|
25 |
*/
|
26 |
public $address;
|
27 |
|
@@ -42,7 +56,7 @@ class Organization extends BaseResource
|
|
42 |
public $vatNumber;
|
43 |
|
44 |
/**
|
45 |
-
* @var
|
46 |
*/
|
47 |
public $_links;
|
48 |
}
|
18 |
*/
|
19 |
public $name;
|
20 |
|
21 |
+
/**
|
22 |
+
* The email address of the organization.
|
23 |
+
*
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
public $email;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The preferred locale of the merchant which has been set in Mollie Dashboard.
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $locale;
|
34 |
+
|
35 |
/**
|
36 |
* The address of the organization.
|
37 |
*
|
38 |
+
* @var \stdClass
|
39 |
*/
|
40 |
public $address;
|
41 |
|
56 |
public $vatNumber;
|
57 |
|
58 |
/**
|
59 |
+
* @var \stdClass
|
60 |
*/
|
61 |
public $_links;
|
62 |
}
|
includes/mollie-api-php/src/Resources/Payment.php
CHANGED
@@ -32,14 +32,14 @@ class Payment extends BaseResource
|
|
32 |
/**
|
33 |
* Amount object containing the value and currency
|
34 |
*
|
35 |
-
* @var
|
36 |
*/
|
37 |
public $amount;
|
38 |
|
39 |
/**
|
40 |
* The amount that has been settled containing the value and currency
|
41 |
*
|
42 |
-
* @var
|
43 |
*/
|
44 |
public $settlementAmount;
|
45 |
|
@@ -47,7 +47,7 @@ class Payment extends BaseResource
|
|
47 |
* The amount of the payment that has been refunded to the consumer, in EURO with
|
48 |
* 2 decimals. This field will be null if the payment can not be refunded.
|
49 |
*
|
50 |
-
* @var
|
51 |
*/
|
52 |
public $amountRefunded;
|
53 |
|
@@ -59,7 +59,7 @@ class Payment extends BaseResource
|
|
59 |
* This is possible to reimburse the costs for a return shipment to your customer
|
60 |
* for example.
|
61 |
*
|
62 |
-
* @var
|
63 |
*/
|
64 |
public $amountRemaining;
|
65 |
|
@@ -197,7 +197,7 @@ class Payment extends BaseResource
|
|
197 |
* During creation of the payment you can set custom metadata that is stored with
|
198 |
* the payment, and given back whenever you retrieve that payment.
|
199 |
*
|
200 |
-
* @var
|
201 |
*/
|
202 |
public $metadata;
|
203 |
|
@@ -205,15 +205,20 @@ class Payment extends BaseResource
|
|
205 |
* Details of a successfully paid payment are set here. For example, the iDEAL
|
206 |
* payment method will set $details->consumerName and $details->consumerAccount.
|
207 |
*
|
208 |
-
* @var
|
209 |
*/
|
210 |
public $details;
|
211 |
|
212 |
/**
|
213 |
-
* @var
|
214 |
*/
|
215 |
public $_links;
|
216 |
|
|
|
|
|
|
|
|
|
|
|
217 |
/**
|
218 |
* Whether or not this payment can be canceled.
|
219 |
*
|
@@ -412,20 +417,12 @@ class Payment extends BaseResource
|
|
412 |
$this->_links->refunds->href
|
413 |
);
|
414 |
|
415 |
-
|
416 |
$this->client,
|
417 |
-
$result->
|
|
|
418 |
$result->_links
|
419 |
);
|
420 |
-
|
421 |
-
foreach ($result->_embedded->refunds as $dataResult) {
|
422 |
-
$resourceCollection[] = ResourceFactory::createFromApiResult(
|
423 |
-
$dataResult,
|
424 |
-
new Refund($this->client)
|
425 |
-
);
|
426 |
-
}
|
427 |
-
|
428 |
-
return $resourceCollection;
|
429 |
}
|
430 |
|
431 |
/**
|
@@ -456,20 +453,12 @@ class Payment extends BaseResource
|
|
456 |
$this->_links->captures->href
|
457 |
);
|
458 |
|
459 |
-
|
460 |
$this->client,
|
461 |
-
$result->
|
|
|
462 |
$result->_links
|
463 |
);
|
464 |
-
|
465 |
-
foreach ($result->_embedded->captures as $dataResult) {
|
466 |
-
$resourceCollection[] = ResourceFactory::createFromApiResult(
|
467 |
-
$dataResult,
|
468 |
-
new Capture($this->client)
|
469 |
-
);
|
470 |
-
}
|
471 |
-
|
472 |
-
return $resourceCollection;
|
473 |
}
|
474 |
|
475 |
/**
|
@@ -496,7 +485,7 @@ class Payment extends BaseResource
|
|
496 |
public function chargebacks()
|
497 |
{
|
498 |
if (!isset($this->_links->chargebacks->href)) {
|
499 |
-
return new ChargebackCollection(0, null);
|
500 |
}
|
501 |
|
502 |
$result = $this->client->performHttpCallToFullUrl(
|
@@ -504,20 +493,12 @@ class Payment extends BaseResource
|
|
504 |
$this->_links->chargebacks->href
|
505 |
);
|
506 |
|
507 |
-
|
508 |
$this->client,
|
509 |
-
$result->
|
|
|
510 |
$result->_links
|
511 |
);
|
512 |
-
|
513 |
-
foreach ($result->_embedded->chargebacks as $dataResult) {
|
514 |
-
$resourceCollection[] = ResourceFactory::createFromApiResult(
|
515 |
-
$dataResult,
|
516 |
-
new Chargeback($this->client)
|
517 |
-
);
|
518 |
-
}
|
519 |
-
|
520 |
-
return $resourceCollection;
|
521 |
}
|
522 |
|
523 |
/**
|
32 |
/**
|
33 |
* Amount object containing the value and currency
|
34 |
*
|
35 |
+
* @var \stdClass
|
36 |
*/
|
37 |
public $amount;
|
38 |
|
39 |
/**
|
40 |
* The amount that has been settled containing the value and currency
|
41 |
*
|
42 |
+
* @var \stdClass
|
43 |
*/
|
44 |
public $settlementAmount;
|
45 |
|
47 |
* The amount of the payment that has been refunded to the consumer, in EURO with
|
48 |
* 2 decimals. This field will be null if the payment can not be refunded.
|
49 |
*
|
50 |
+
* @var \stdClass|null
|
51 |
*/
|
52 |
public $amountRefunded;
|
53 |
|
59 |
* This is possible to reimburse the costs for a return shipment to your customer
|
60 |
* for example.
|
61 |
*
|
62 |
+
* @var \stdClass|null
|
63 |
*/
|
64 |
public $amountRemaining;
|
65 |
|
197 |
* During creation of the payment you can set custom metadata that is stored with
|
198 |
* the payment, and given back whenever you retrieve that payment.
|
199 |
*
|
200 |
+
* @var \stdClass|mixed|null
|
201 |
*/
|
202 |
public $metadata;
|
203 |
|
205 |
* Details of a successfully paid payment are set here. For example, the iDEAL
|
206 |
* payment method will set $details->consumerName and $details->consumerAccount.
|
207 |
*
|
208 |
+
* @var \stdClass
|
209 |
*/
|
210 |
public $details;
|
211 |
|
212 |
/**
|
213 |
+
* @var \stdClass
|
214 |
*/
|
215 |
public $_links;
|
216 |
|
217 |
+
/**
|
218 |
+
* @var \stdClass[]
|
219 |
+
*/
|
220 |
+
public $_embedded;
|
221 |
+
|
222 |
/**
|
223 |
* Whether or not this payment can be canceled.
|
224 |
*
|
417 |
$this->_links->refunds->href
|
418 |
);
|
419 |
|
420 |
+
return ResourceFactory::createCursorResourceCollection(
|
421 |
$this->client,
|
422 |
+
$result->_embedded->refunds,
|
423 |
+
Refund::class,
|
424 |
$result->_links
|
425 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
}
|
427 |
|
428 |
/**
|
453 |
$this->_links->captures->href
|
454 |
);
|
455 |
|
456 |
+
return ResourceFactory::createCursorResourceCollection(
|
457 |
$this->client,
|
458 |
+
$result->_embedded->captures,
|
459 |
+
Capture::class,
|
460 |
$result->_links
|
461 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
}
|
463 |
|
464 |
/**
|
485 |
public function chargebacks()
|
486 |
{
|
487 |
if (!isset($this->_links->chargebacks->href)) {
|
488 |
+
return new ChargebackCollection($this->client, 0, null);
|
489 |
}
|
490 |
|
491 |
$result = $this->client->performHttpCallToFullUrl(
|
493 |
$this->_links->chargebacks->href
|
494 |
);
|
495 |
|
496 |
+
return ResourceFactory::createCursorResourceCollection(
|
497 |
$this->client,
|
498 |
+
$result->_embedded->chargebacks,
|
499 |
+
Chargeback::class,
|
500 |
$result->_links
|
501 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
}
|
503 |
|
504 |
/**
|
includes/mollie-api-php/src/Resources/Permission.php
CHANGED
@@ -26,7 +26,7 @@ class Permission extends BaseResource
|
|
26 |
public $granted;
|
27 |
|
28 |
/**
|
29 |
-
* @var
|
30 |
*/
|
31 |
public $_links;
|
32 |
}
|
26 |
public $granted;
|
27 |
|
28 |
/**
|
29 |
+
* @var \stdClass
|
30 |
*/
|
31 |
public $_links;
|
32 |
}
|
includes/mollie-api-php/src/Resources/Profile.php
CHANGED
@@ -58,7 +58,7 @@ class Profile extends BaseResource
|
|
58 |
public $status;
|
59 |
|
60 |
/**
|
61 |
-
* @var
|
62 |
*/
|
63 |
public $review;
|
64 |
|
@@ -71,7 +71,7 @@ class Profile extends BaseResource
|
|
71 |
public $createdAt;
|
72 |
|
73 |
/**
|
74 |
-
* @var
|
75 |
*/
|
76 |
public $_links;
|
77 |
|
@@ -101,6 +101,7 @@ class Profile extends BaseResource
|
|
101 |
|
102 |
/**
|
103 |
* @return Profile
|
|
|
104 |
*/
|
105 |
public function update()
|
106 |
{
|
@@ -136,12 +137,12 @@ class Profile extends BaseResource
|
|
136 |
|
137 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href);
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
$
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
}
|
146 |
|
147 |
/**
|
@@ -158,12 +159,38 @@ class Profile extends BaseResource
|
|
158 |
|
159 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->methods->href);
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
$
|
164 |
-
|
|
|
|
|
|
|
165 |
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
|
169 |
/**
|
@@ -180,12 +207,12 @@ class Profile extends BaseResource
|
|
180 |
|
181 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->payments->href);
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
$
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
}
|
190 |
|
191 |
/**
|
@@ -202,11 +229,11 @@ class Profile extends BaseResource
|
|
202 |
|
203 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
$
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
}
|
212 |
}
|
58 |
public $status;
|
59 |
|
60 |
/**
|
61 |
+
* @var \stdClass
|
62 |
*/
|
63 |
public $review;
|
64 |
|
71 |
public $createdAt;
|
72 |
|
73 |
/**
|
74 |
+
* @var \stdClass
|
75 |
*/
|
76 |
public $_links;
|
77 |
|
101 |
|
102 |
/**
|
103 |
* @return Profile
|
104 |
+
* @throws ApiException
|
105 |
*/
|
106 |
public function update()
|
107 |
{
|
137 |
|
138 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href);
|
139 |
|
140 |
+
return ResourceFactory::createCursorResourceCollection(
|
141 |
+
$this->client,
|
142 |
+
$result->_embedded->chargebacks,
|
143 |
+
Chargeback::class,
|
144 |
+
$result->_links
|
145 |
+
);
|
146 |
}
|
147 |
|
148 |
/**
|
159 |
|
160 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->methods->href);
|
161 |
|
162 |
+
return ResourceFactory::createCursorResourceCollection(
|
163 |
+
$this->client,
|
164 |
+
$result->_embedded->methods,
|
165 |
+
Method::class,
|
166 |
+
$result->_links
|
167 |
+
);
|
168 |
+
}
|
169 |
|
170 |
+
/**
|
171 |
+
* Enable a payment method for this profile.
|
172 |
+
*
|
173 |
+
* @param string $methodId
|
174 |
+
* @param array $data
|
175 |
+
* @return Method
|
176 |
+
* @throws ApiException
|
177 |
+
*/
|
178 |
+
public function enableMethod($methodId, array $data = [])
|
179 |
+
{
|
180 |
+
return $this->client->profileMethods->createFor($this, $methodId, $data);
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Disable a payment method for this profile.
|
185 |
+
*
|
186 |
+
* @param string $methodId
|
187 |
+
* @param array $data
|
188 |
+
* @return Method
|
189 |
+
* @throws ApiException
|
190 |
+
*/
|
191 |
+
public function disableMethod($methodId, array $data = [])
|
192 |
+
{
|
193 |
+
return $this->client->profileMethods->deleteFor($this, $methodId, $data);
|
194 |
}
|
195 |
|
196 |
/**
|
207 |
|
208 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->payments->href);
|
209 |
|
210 |
+
return ResourceFactory::createCursorResourceCollection(
|
211 |
+
$this->client,
|
212 |
+
$result->_embedded->methods,
|
213 |
+
Method::class,
|
214 |
+
$result->_links
|
215 |
+
);
|
216 |
}
|
217 |
|
218 |
/**
|
229 |
|
230 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
|
231 |
|
232 |
+
return ResourceFactory::createCursorResourceCollection(
|
233 |
+
$this->client,
|
234 |
+
$result->_embedded->refunds,
|
235 |
+
Refund::class,
|
236 |
+
$result->_links
|
237 |
+
);
|
238 |
}
|
239 |
}
|
includes/mollie-api-php/src/Resources/Refund.php
CHANGED
@@ -22,7 +22,7 @@ class Refund extends BaseResource
|
|
22 |
/**
|
23 |
* The $amount that was refunded.
|
24 |
*
|
25 |
-
* @var
|
26 |
*/
|
27 |
public $amount;
|
28 |
|
@@ -67,7 +67,7 @@ class Refund extends BaseResource
|
|
67 |
/**
|
68 |
* The settlement amount
|
69 |
*
|
70 |
-
* @var
|
71 |
*/
|
72 |
public $settlementAmount;
|
73 |
|
@@ -79,7 +79,7 @@ class Refund extends BaseResource
|
|
79 |
public $status;
|
80 |
|
81 |
/**
|
82 |
-
* @var
|
83 |
*/
|
84 |
public $_links;
|
85 |
|
@@ -128,7 +128,7 @@ class Refund extends BaseResource
|
|
128 |
* Returns null if successful.
|
129 |
*
|
130 |
* @return null
|
131 |
-
* @throws ApiException
|
132 |
*/
|
133 |
public function cancel()
|
134 |
{
|
22 |
/**
|
23 |
* The $amount that was refunded.
|
24 |
*
|
25 |
+
* @var \stdClass
|
26 |
*/
|
27 |
public $amount;
|
28 |
|
67 |
/**
|
68 |
* The settlement amount
|
69 |
*
|
70 |
+
* @var \stdClass
|
71 |
*/
|
72 |
public $settlementAmount;
|
73 |
|
79 |
public $status;
|
80 |
|
81 |
/**
|
82 |
+
* @var \stdClass
|
83 |
*/
|
84 |
public $_links;
|
85 |
|
128 |
* Returns null if successful.
|
129 |
*
|
130 |
* @return null
|
131 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
132 |
*/
|
133 |
public function cancel()
|
134 |
{
|
includes/mollie-api-php/src/Resources/ResourceFactory.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace Mollie\Api\Resources;
|
4 |
|
|
|
|
|
5 |
class ResourceFactory
|
6 |
{
|
7 |
/**
|
@@ -21,4 +23,58 @@ class ResourceFactory
|
|
21 |
return $resource;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
2 |
|
3 |
namespace Mollie\Api\Resources;
|
4 |
|
5 |
+
use Mollie\Api\MollieApiClient;
|
6 |
+
|
7 |
class ResourceFactory
|
8 |
{
|
9 |
/**
|
23 |
return $resource;
|
24 |
}
|
25 |
|
26 |
+
/**
|
27 |
+
* @param MollieApiClient $client
|
28 |
+
* @param array $input
|
29 |
+
* @param string $resourceClass
|
30 |
+
* @param null $_links
|
31 |
+
* @param null $resourceCollectionClass
|
32 |
+
* @return mixed
|
33 |
+
*/
|
34 |
+
public static function createBaseResourceCollection(
|
35 |
+
MollieApiClient $client,
|
36 |
+
array $input,
|
37 |
+
$resourceClass,
|
38 |
+
$_links = null,
|
39 |
+
$resourceCollectionClass = null
|
40 |
+
) {
|
41 |
+
if (null === $resourceCollectionClass) {
|
42 |
+
$resourceCollectionClass = $resourceClass.'Collection';
|
43 |
+
}
|
44 |
+
|
45 |
+
$data = new $resourceCollectionClass(count($input), $_links);
|
46 |
+
foreach ($input as $item) {
|
47 |
+
$data[] = static::createFromApiResult($item, new $resourceClass($client));
|
48 |
+
}
|
49 |
+
|
50 |
+
return $data;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @param MollieApiClient $client
|
55 |
+
* @param array $input
|
56 |
+
* @param string $resourceClass
|
57 |
+
* @param null $_links
|
58 |
+
* @param null $resourceCollectionClass
|
59 |
+
* @return mixed
|
60 |
+
*/
|
61 |
+
public static function createCursorResourceCollection(
|
62 |
+
$client,
|
63 |
+
array $input,
|
64 |
+
$resourceClass,
|
65 |
+
$_links = null,
|
66 |
+
$resourceCollectionClass = null
|
67 |
+
)
|
68 |
+
{
|
69 |
+
if (null === $resourceCollectionClass) {
|
70 |
+
$resourceCollectionClass = $resourceClass.'Collection';
|
71 |
+
}
|
72 |
+
|
73 |
+
$data = new $resourceCollectionClass($client, count($input), $_links);
|
74 |
+
foreach ($input as $item) {
|
75 |
+
$data[] = static::createFromApiResult($item, new $resourceClass($client));
|
76 |
+
}
|
77 |
+
|
78 |
+
return $data;
|
79 |
+
}
|
80 |
}
|
includes/mollie-api-php/src/Resources/Settlement.php
CHANGED
@@ -53,14 +53,14 @@ class Settlement extends BaseResource
|
|
53 |
/**
|
54 |
* Total settlement amount in euros.
|
55 |
*
|
56 |
-
* @var
|
57 |
*/
|
58 |
public $amount;
|
59 |
|
60 |
/**
|
61 |
* Revenues and costs nested per year, per month, and per payment method.
|
62 |
*
|
63 |
-
* @var
|
64 |
*/
|
65 |
public $periods;
|
66 |
|
@@ -72,7 +72,7 @@ class Settlement extends BaseResource
|
|
72 |
public $invoiceId;
|
73 |
|
74 |
/**
|
75 |
-
* @var
|
76 |
*/
|
77 |
public $_links;
|
78 |
|
@@ -130,12 +130,12 @@ class Settlement extends BaseResource
|
|
130 |
|
131 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->payments->href);
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
$
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
|
141 |
/**
|
@@ -152,12 +152,12 @@ class Settlement extends BaseResource
|
|
152 |
|
153 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
$
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
}
|
162 |
|
163 |
/**
|
@@ -174,12 +174,12 @@ class Settlement extends BaseResource
|
|
174 |
|
175 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href);
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
$
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
}
|
184 |
|
185 |
/**
|
@@ -196,11 +196,11 @@ class Settlement extends BaseResource
|
|
196 |
|
197 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->captures->href);
|
198 |
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
}
|
206 |
}
|
53 |
/**
|
54 |
* Total settlement amount in euros.
|
55 |
*
|
56 |
+
* @var \stdClass
|
57 |
*/
|
58 |
public $amount;
|
59 |
|
60 |
/**
|
61 |
* Revenues and costs nested per year, per month, and per payment method.
|
62 |
*
|
63 |
+
* @var \stdClass
|
64 |
*/
|
65 |
public $periods;
|
66 |
|
72 |
public $invoiceId;
|
73 |
|
74 |
/**
|
75 |
+
* @var \stdClass
|
76 |
*/
|
77 |
public $_links;
|
78 |
|
130 |
|
131 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->payments->href);
|
132 |
|
133 |
+
return ResourceFactory::createCursorResourceCollection(
|
134 |
+
$this->client,
|
135 |
+
$result->_embedded->payments,
|
136 |
+
Payment::class,
|
137 |
+
$result->_links
|
138 |
+
);
|
139 |
}
|
140 |
|
141 |
/**
|
152 |
|
153 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
|
154 |
|
155 |
+
return ResourceFactory::createCursorResourceCollection(
|
156 |
+
$this->client,
|
157 |
+
$result->_embedded->refunds,
|
158 |
+
Refund::class,
|
159 |
+
$result->_links
|
160 |
+
);
|
161 |
}
|
162 |
|
163 |
/**
|
174 |
|
175 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href);
|
176 |
|
177 |
+
return ResourceFactory::createCursorResourceCollection(
|
178 |
+
$this->client,
|
179 |
+
$result->_embedded->chargebacks,
|
180 |
+
Chargeback::class,
|
181 |
+
$result->_links
|
182 |
+
);
|
183 |
}
|
184 |
|
185 |
/**
|
196 |
|
197 |
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->captures->href);
|
198 |
|
199 |
+
return ResourceFactory::createCursorResourceCollection(
|
200 |
+
$this->client,
|
201 |
+
$result->_embedded->captures,
|
202 |
+
Capture::class,
|
203 |
+
$result->_links
|
204 |
+
);
|
205 |
}
|
206 |
}
|
includes/mollie-api-php/src/Resources/Shipment.php
CHANGED
@@ -44,13 +44,13 @@ class Shipment extends BaseResource
|
|
44 |
|
45 |
/**
|
46 |
* An object containing tracking details for the shipment, if available.
|
47 |
-
* @var
|
48 |
*/
|
49 |
public $tracking;
|
50 |
|
51 |
/**
|
52 |
* An object with several URL objects relevant to the customer. Every URL object will contain an href and a type field.
|
53 |
-
* @var
|
54 |
*/
|
55 |
public $_links;
|
56 |
|
@@ -94,18 +94,14 @@ class Shipment extends BaseResource
|
|
94 |
*/
|
95 |
public function lines()
|
96 |
{
|
97 |
-
|
98 |
-
foreach ($this->lines as $line) {
|
99 |
-
$lines->append(ResourceFactory::createFromApiResult($line, new OrderLine($this->client)));
|
100 |
-
}
|
101 |
-
|
102 |
-
return $lines;
|
103 |
}
|
104 |
|
105 |
/**
|
106 |
* Get the Order object for this shipment
|
107 |
*
|
108 |
* @return Order
|
|
|
109 |
*/
|
110 |
public function order()
|
111 |
{
|
44 |
|
45 |
/**
|
46 |
* An object containing tracking details for the shipment, if available.
|
47 |
+
* @var \stdClass|null
|
48 |
*/
|
49 |
public $tracking;
|
50 |
|
51 |
/**
|
52 |
* An object with several URL objects relevant to the customer. Every URL object will contain an href and a type field.
|
53 |
+
* @var \stdClass
|
54 |
*/
|
55 |
public $_links;
|
56 |
|
94 |
*/
|
95 |
public function lines()
|
96 |
{
|
97 |
+
return ResourceFactory::createBaseResourceCollection($this->client, $this->lines, OrderLine::class);
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
/**
|
101 |
* Get the Order object for this shipment
|
102 |
*
|
103 |
* @return Order
|
104 |
+
* @throws \Mollie\Api\Exceptions\ApiException
|
105 |
*/
|
106 |
public function order()
|
107 |
{
|
includes/mollie-api-php/src/Resources/Subscription.php
CHANGED
@@ -42,7 +42,7 @@ class Subscription extends BaseResource
|
|
42 |
public $status;
|
43 |
|
44 |
/**
|
45 |
-
* @var
|
46 |
*/
|
47 |
public $amount;
|
48 |
|
@@ -88,12 +88,12 @@ class Subscription extends BaseResource
|
|
88 |
/**
|
89 |
* Contains an optional 'webhookUrl'.
|
90 |
*
|
91 |
-
* @var
|
92 |
*/
|
93 |
public $webhookUrl;
|
94 |
|
95 |
/**
|
96 |
-
* @var
|
97 |
*/
|
98 |
public $_links;
|
99 |
|
42 |
public $status;
|
43 |
|
44 |
/**
|
45 |
+
* @var \stdClass
|
46 |
*/
|
47 |
public $amount;
|
48 |
|
88 |
/**
|
89 |
* Contains an optional 'webhookUrl'.
|
90 |
*
|
91 |
+
* @var \stdClass|null
|
92 |
*/
|
93 |
public $webhookUrl;
|
94 |
|
95 |
/**
|
96 |
+
* @var \stdClass
|
97 |
*/
|
98 |
public $_links;
|
99 |
|
includes/mollie-api-php/src/Types/MandateMethod.php
CHANGED
@@ -5,4 +5,17 @@ namespace Mollie\Api\Types;
|
|
5 |
class MandateMethod
|
6 |
{
|
7 |
const DIRECTDEBIT = "directdebit";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
}
|
5 |
class MandateMethod
|
6 |
{
|
7 |
const DIRECTDEBIT = "directdebit";
|
8 |
+
const CREDITCARD = "creditcard";
|
9 |
+
|
10 |
+
public static function getForFirstPaymentMethod($firstPaymentMethod)
|
11 |
+
{
|
12 |
+
if(in_array($firstPaymentMethod, [
|
13 |
+
PaymentMethod::APPLEPAY,
|
14 |
+
PaymentMethod::CREDITCARD,
|
15 |
+
])) {
|
16 |
+
return static::CREDITCARD;
|
17 |
+
}
|
18 |
+
|
19 |
+
return static::DIRECTDEBIT;
|
20 |
+
}
|
21 |
}
|
includes/mollie-api-php/src/Types/OnboardingStatus.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Mollie\Api\Types;
|
4 |
+
|
5 |
+
class OnboardingStatus
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* The onboarding is not completed and the merchant needs to provide (more) information
|
9 |
+
*/
|
10 |
+
const NEEDS_DATA = 'needs-data';
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The merchant provided all information and Mollie needs to check this
|
14 |
+
*/
|
15 |
+
const IN_REVIEW = 'in-review';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The onboarding is completed
|
19 |
+
*/
|
20 |
+
const COMPLETED = 'completed';
|
21 |
+
}
|
includes/mollie-api-php/src/Types/PaymentMethod.php
CHANGED
@@ -2,99 +2,106 @@
|
|
2 |
|
3 |
namespace Mollie\Api\Types;
|
4 |
|
5 |
-
class PaymentMethod
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
2 |
|
3 |
namespace Mollie\Api\Types;
|
4 |
|
5 |
+
class PaymentMethod
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* @link https://www.mollie.com/en/payments/applepay
|
9 |
+
*/
|
10 |
+
const APPLEPAY = "applepay";
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @link https://www.mollie.com/en/payments/bancontact
|
14 |
+
*/
|
15 |
+
const BANCONTACT = "bancontact";
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @link https://www.mollie.com/en/payments/bank-transfer
|
19 |
+
*/
|
20 |
+
const BANKTRANSFER = "banktransfer";
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @link https://www.mollie.com/en/payments/belfius
|
24 |
+
*/
|
25 |
+
const BELFIUS = "belfius";
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @deprecated 2019-05-01
|
29 |
+
*/
|
30 |
+
const BITCOIN = "bitcoin";
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @link https://www.mollie.com/en/payments/credit-card
|
34 |
+
*/
|
35 |
+
const CREDITCARD = "creditcard";
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @link https://www.mollie.com/en/payments/direct-debit
|
39 |
+
*/
|
40 |
+
const DIRECTDEBIT = "directdebit";
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @link https://www.mollie.com/en/payments/eps
|
44 |
+
*/
|
45 |
+
const EPS = "eps";
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @link https://www.mollie.com/en/payments/gift-cards
|
49 |
+
*/
|
50 |
+
const GIFTCARD = "giftcard";
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @link https://www.mollie.com/en/payments/giropay
|
54 |
+
*/
|
55 |
+
const GIROPAY = "giropay";
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @link https://www.mollie.com/en/payments/ideal
|
59 |
+
*/
|
60 |
+
const IDEAL = "ideal";
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @link https://www.mollie.com/en/payments/ing-homepay
|
64 |
+
*/
|
65 |
+
const INGHOMEPAY = "inghomepay";
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @link https://www.mollie.com/en/payments/kbc-cbc
|
69 |
+
*/
|
70 |
+
const KBC = "kbc";
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @link https://www.mollie.com/en/payments/klarna-pay-later
|
74 |
+
*/
|
75 |
+
const KLARNA_PAY_LATER = "klarnapaylater";
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @link https://www.mollie.com/en/payments/klarna-slice-it
|
79 |
+
*/
|
80 |
+
const KLARNA_SLICE_IT = "klarnasliceit";
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @link https://www.mollie.com/en/payments/paypal
|
84 |
+
*/
|
85 |
+
const PAYPAL = "paypal";
|
86 |
+
|
87 |
+
/**
|
88 |
+
* @link https://www.mollie.com/en/payments/paysafecard
|
89 |
+
*/
|
90 |
+
const PAYSAFECARD = "paysafecard";
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @link https://www.mollie.com/en/payments/przelewy24
|
94 |
+
*/
|
95 |
+
const PRZELEWY24 = 'przelewy24';
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @deprecated
|
99 |
+
* @link https://www.mollie.com/en/payments/gift-cards
|
100 |
+
*/
|
101 |
+
const PODIUMCADEAUKAART = "podiumcadeaukaart";
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @link https://www.mollie.com/en/payments/sofort
|
105 |
+
*/
|
106 |
+
const SOFORT = "sofort";
|
107 |
}
|
includes/mollie-api-php/vendor/autoload.php
CHANGED
@@ -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 ComposerAutoloaderInitf833268ed2646da8e853833e738212e8::getLoader();
|
includes/mollie-api-php/vendor/composer/ClassLoader.php
CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
@@ -377,7 +377,7 @@ class ClassLoader
|
|
377 |
$subPath = $class;
|
378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
$subPath = substr($subPath, 0, $lastPos);
|
380 |
-
$search = $subPath.'\\';
|
381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
383 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
377 |
$subPath = $class;
|
378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
$subPath = substr($subPath, 0, $lastPos);
|
380 |
+
$search = $subPath . '\\';
|
381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
383 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
includes/mollie-api-php/vendor/composer/autoload_classmap.php
CHANGED
@@ -6,4 +6,166 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
);
|
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\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
22 |
+
'GuzzleHttp\\Exception\\SeekException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
|
23 |
+
'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
24 |
+
'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
|
25 |
+
'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
|
26 |
+
'GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php',
|
27 |
+
'GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php',
|
28 |
+
'GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php',
|
29 |
+
'GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php',
|
30 |
+
'GuzzleHttp\\Handler\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php',
|
31 |
+
'GuzzleHttp\\Handler\\EasyHandle' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php',
|
32 |
+
'GuzzleHttp\\Handler\\MockHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/MockHandler.php',
|
33 |
+
'GuzzleHttp\\Handler\\Proxy' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/Proxy.php',
|
34 |
+
'GuzzleHttp\\Handler\\StreamHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php',
|
35 |
+
'GuzzleHttp\\MessageFormatter' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatter.php',
|
36 |
+
'GuzzleHttp\\Middleware' => $vendorDir . '/guzzlehttp/guzzle/src/Middleware.php',
|
37 |
+
'GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php',
|
38 |
+
'GuzzleHttp\\PrepareBodyMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php',
|
39 |
+
'GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php',
|
40 |
+
'GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php',
|
41 |
+
'GuzzleHttp\\Promise\\Coroutine' => $vendorDir . '/guzzlehttp/promises/src/Coroutine.php',
|
42 |
+
'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php',
|
43 |
+
'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php',
|
44 |
+
'GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php',
|
45 |
+
'GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php',
|
46 |
+
'GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php',
|
47 |
+
'GuzzleHttp\\Promise\\RejectedPromise' => $vendorDir . '/guzzlehttp/promises/src/RejectedPromise.php',
|
48 |
+
'GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php',
|
49 |
+
'GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php',
|
50 |
+
'GuzzleHttp\\Promise\\TaskQueueInterface' => $vendorDir . '/guzzlehttp/promises/src/TaskQueueInterface.php',
|
51 |
+
'GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php',
|
52 |
+
'GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php',
|
53 |
+
'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php',
|
54 |
+
'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php',
|
55 |
+
'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php',
|
56 |
+
'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php',
|
57 |
+
'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php',
|
58 |
+
'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php',
|
59 |
+
'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php',
|
60 |
+
'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php',
|
61 |
+
'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php',
|
62 |
+
'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php',
|
63 |
+
'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php',
|
64 |
+
'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php',
|
65 |
+
'GuzzleHttp\\Psr7\\Rfc7230' => $vendorDir . '/guzzlehttp/psr7/src/Rfc7230.php',
|
66 |
+
'GuzzleHttp\\Psr7\\ServerRequest' => $vendorDir . '/guzzlehttp/psr7/src/ServerRequest.php',
|
67 |
+
'GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php',
|
68 |
+
'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
|
69 |
+
'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php',
|
70 |
+
'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php',
|
71 |
+
'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php',
|
72 |
+
'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php',
|
73 |
+
'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php',
|
74 |
+
'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
|
75 |
+
'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php',
|
76 |
+
'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
|
77 |
+
'GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php',
|
78 |
+
'GuzzleHttp\\UriTemplate' => $vendorDir . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
79 |
+
'Mollie\\Api\\CompatibilityChecker' => $baseDir . '/src/CompatibilityChecker.php',
|
80 |
+
'Mollie\\Api\\Endpoints\\ChargebackEndpoint' => $baseDir . '/src/Endpoints/ChargebackEndpoint.php',
|
81 |
+
'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' => $baseDir . '/src/Endpoints/CollectionEndpointAbstract.php',
|
82 |
+
'Mollie\\Api\\Endpoints\\CustomerEndpoint' => $baseDir . '/src/Endpoints/CustomerEndpoint.php',
|
83 |
+
'Mollie\\Api\\Endpoints\\CustomerPaymentsEndpoint' => $baseDir . '/src/Endpoints/CustomerPaymentsEndpoint.php',
|
84 |
+
'Mollie\\Api\\Endpoints\\EndpointAbstract' => $baseDir . '/src/Endpoints/EndpointAbstract.php',
|
85 |
+
'Mollie\\Api\\Endpoints\\InvoiceEndpoint' => $baseDir . '/src/Endpoints/InvoiceEndpoint.php',
|
86 |
+
'Mollie\\Api\\Endpoints\\MandateEndpoint' => $baseDir . '/src/Endpoints/MandateEndpoint.php',
|
87 |
+
'Mollie\\Api\\Endpoints\\MethodEndpoint' => $baseDir . '/src/Endpoints/MethodEndpoint.php',
|
88 |
+
'Mollie\\Api\\Endpoints\\OnboardingEndpoint' => $baseDir . '/src/Endpoints/OnboardingEndpoint.php',
|
89 |
+
'Mollie\\Api\\Endpoints\\OrderEndpoint' => $baseDir . '/src/Endpoints/OrderEndpoint.php',
|
90 |
+
'Mollie\\Api\\Endpoints\\OrderLineEndpoint' => $baseDir . '/src/Endpoints/OrderLineEndpoint.php',
|
91 |
+
'Mollie\\Api\\Endpoints\\OrderPaymentEndpoint' => $baseDir . '/src/Endpoints/OrderPaymentEndpoint.php',
|
92 |
+
'Mollie\\Api\\Endpoints\\OrderRefundEndpoint' => $baseDir . '/src/Endpoints/OrderRefundEndpoint.php',
|
93 |
+
'Mollie\\Api\\Endpoints\\OrganizationEndpoint' => $baseDir . '/src/Endpoints/OrganizationEndpoint.php',
|
94 |
+
'Mollie\\Api\\Endpoints\\PaymentCaptureEndpoint' => $baseDir . '/src/Endpoints/PaymentCaptureEndpoint.php',
|
95 |
+
'Mollie\\Api\\Endpoints\\PaymentChargebackEndpoint' => $baseDir . '/src/Endpoints/PaymentChargebackEndpoint.php',
|
96 |
+
'Mollie\\Api\\Endpoints\\PaymentEndpoint' => $baseDir . '/src/Endpoints/PaymentEndpoint.php',
|
97 |
+
'Mollie\\Api\\Endpoints\\PaymentRefundEndpoint' => $baseDir . '/src/Endpoints/PaymentRefundEndpoint.php',
|
98 |
+
'Mollie\\Api\\Endpoints\\PermissionEndpoint' => $baseDir . '/src/Endpoints/PermissionEndpoint.php',
|
99 |
+
'Mollie\\Api\\Endpoints\\ProfileEndpoint' => $baseDir . '/src/Endpoints/ProfileEndpoint.php',
|
100 |
+
'Mollie\\Api\\Endpoints\\ProfileMethodEndpoint' => $baseDir . '/src/Endpoints/ProfileMethodEndpoint.php',
|
101 |
+
'Mollie\\Api\\Endpoints\\RefundEndpoint' => $baseDir . '/src/Endpoints/RefundEndpoint.php',
|
102 |
+
'Mollie\\Api\\Endpoints\\SettlementsEndpoint' => $baseDir . '/src/Endpoints/SettlementsEndpoint.php',
|
103 |
+
'Mollie\\Api\\Endpoints\\ShipmentEndpoint' => $baseDir . '/src/Endpoints/ShipmentEndpoint.php',
|
104 |
+
'Mollie\\Api\\Endpoints\\SubscriptionEndpoint' => $baseDir . '/src/Endpoints/SubscriptionEndpoint.php',
|
105 |
+
'Mollie\\Api\\Exceptions\\ApiException' => $baseDir . '/src/Exceptions/ApiException.php',
|
106 |
+
'Mollie\\Api\\Exceptions\\IncompatiblePlatform' => $baseDir . '/src/Exceptions/IncompatiblePlatform.php',
|
107 |
+
'Mollie\\Api\\MollieApiClient' => $baseDir . '/src/MollieApiClient.php',
|
108 |
+
'Mollie\\Api\\Resources\\BaseCollection' => $baseDir . '/src/Resources/BaseCollection.php',
|
109 |
+
'Mollie\\Api\\Resources\\BaseResource' => $baseDir . '/src/Resources/BaseResource.php',
|
110 |
+
'Mollie\\Api\\Resources\\Capture' => $baseDir . '/src/Resources/Capture.php',
|
111 |
+
'Mollie\\Api\\Resources\\CaptureCollection' => $baseDir . '/src/Resources/CaptureCollection.php',
|
112 |
+
'Mollie\\Api\\Resources\\Chargeback' => $baseDir . '/src/Resources/Chargeback.php',
|
113 |
+
'Mollie\\Api\\Resources\\ChargebackCollection' => $baseDir . '/src/Resources/ChargebackCollection.php',
|
114 |
+
'Mollie\\Api\\Resources\\CurrentProfile' => $baseDir . '/src/Resources/CurrentProfile.php',
|
115 |
+
'Mollie\\Api\\Resources\\CursorCollection' => $baseDir . '/src/Resources/CursorCollection.php',
|
116 |
+
'Mollie\\Api\\Resources\\Customer' => $baseDir . '/src/Resources/Customer.php',
|
117 |
+
'Mollie\\Api\\Resources\\CustomerCollection' => $baseDir . '/src/Resources/CustomerCollection.php',
|
118 |
+
'Mollie\\Api\\Resources\\Invoice' => $baseDir . '/src/Resources/Invoice.php',
|
119 |
+
'Mollie\\Api\\Resources\\InvoiceCollection' => $baseDir . '/src/Resources/InvoiceCollection.php',
|
120 |
+
'Mollie\\Api\\Resources\\Issuer' => $baseDir . '/src/Resources/Issuer.php',
|
121 |
+
'Mollie\\Api\\Resources\\IssuerCollection' => $baseDir . '/src/Resources/IssuerCollection.php',
|
122 |
+
'Mollie\\Api\\Resources\\Mandate' => $baseDir . '/src/Resources/Mandate.php',
|
123 |
+
'Mollie\\Api\\Resources\\MandateCollection' => $baseDir . '/src/Resources/MandateCollection.php',
|
124 |
+
'Mollie\\Api\\Resources\\Method' => $baseDir . '/src/Resources/Method.php',
|
125 |
+
'Mollie\\Api\\Resources\\MethodCollection' => $baseDir . '/src/Resources/MethodCollection.php',
|
126 |
+
'Mollie\\Api\\Resources\\MethodPrice' => $baseDir . '/src/Resources/MethodPrice.php',
|
127 |
+
'Mollie\\Api\\Resources\\MethodPriceCollection' => $baseDir . '/src/Resources/MethodPriceCollection.php',
|
128 |
+
'Mollie\\Api\\Resources\\Onboarding' => $baseDir . '/src/Resources/Onboarding.php',
|
129 |
+
'Mollie\\Api\\Resources\\Order' => $baseDir . '/src/Resources/Order.php',
|
130 |
+
'Mollie\\Api\\Resources\\OrderCollection' => $baseDir . '/src/Resources/OrderCollection.php',
|
131 |
+
'Mollie\\Api\\Resources\\OrderLine' => $baseDir . '/src/Resources/OrderLine.php',
|
132 |
+
'Mollie\\Api\\Resources\\OrderLineCollection' => $baseDir . '/src/Resources/OrderLineCollection.php',
|
133 |
+
'Mollie\\Api\\Resources\\Organization' => $baseDir . '/src/Resources/Organization.php',
|
134 |
+
'Mollie\\Api\\Resources\\OrganizationCollection' => $baseDir . '/src/Resources/OrganizationCollection.php',
|
135 |
+
'Mollie\\Api\\Resources\\Payment' => $baseDir . '/src/Resources/Payment.php',
|
136 |
+
'Mollie\\Api\\Resources\\PaymentCollection' => $baseDir . '/src/Resources/PaymentCollection.php',
|
137 |
+
'Mollie\\Api\\Resources\\Permission' => $baseDir . '/src/Resources/Permission.php',
|
138 |
+
'Mollie\\Api\\Resources\\PermissionCollection' => $baseDir . '/src/Resources/PermissionCollection.php',
|
139 |
+
'Mollie\\Api\\Resources\\Profile' => $baseDir . '/src/Resources/Profile.php',
|
140 |
+
'Mollie\\Api\\Resources\\ProfileCollection' => $baseDir . '/src/Resources/ProfileCollection.php',
|
141 |
+
'Mollie\\Api\\Resources\\Refund' => $baseDir . '/src/Resources/Refund.php',
|
142 |
+
'Mollie\\Api\\Resources\\RefundCollection' => $baseDir . '/src/Resources/RefundCollection.php',
|
143 |
+
'Mollie\\Api\\Resources\\ResourceFactory' => $baseDir . '/src/Resources/ResourceFactory.php',
|
144 |
+
'Mollie\\Api\\Resources\\Settlement' => $baseDir . '/src/Resources/Settlement.php',
|
145 |
+
'Mollie\\Api\\Resources\\SettlementCollection' => $baseDir . '/src/Resources/SettlementCollection.php',
|
146 |
+
'Mollie\\Api\\Resources\\Shipment' => $baseDir . '/src/Resources/Shipment.php',
|
147 |
+
'Mollie\\Api\\Resources\\ShipmentCollection' => $baseDir . '/src/Resources/ShipmentCollection.php',
|
148 |
+
'Mollie\\Api\\Resources\\Subscription' => $baseDir . '/src/Resources/Subscription.php',
|
149 |
+
'Mollie\\Api\\Resources\\SubscriptionCollection' => $baseDir . '/src/Resources/SubscriptionCollection.php',
|
150 |
+
'Mollie\\Api\\Types\\InvoiceStatus' => $baseDir . '/src/Types/InvoiceStatus.php',
|
151 |
+
'Mollie\\Api\\Types\\MandateMethod' => $baseDir . '/src/Types/MandateMethod.php',
|
152 |
+
'Mollie\\Api\\Types\\MandateStatus' => $baseDir . '/src/Types/MandateStatus.php',
|
153 |
+
'Mollie\\Api\\Types\\OnboardingStatus' => $baseDir . '/src/Types/OnboardingStatus.php',
|
154 |
+
'Mollie\\Api\\Types\\OrderLineStatus' => $baseDir . '/src/Types/OrderLineStatus.php',
|
155 |
+
'Mollie\\Api\\Types\\OrderLineType' => $baseDir . '/src/Types/OrderLineType.php',
|
156 |
+
'Mollie\\Api\\Types\\OrderStatus' => $baseDir . '/src/Types/OrderStatus.php',
|
157 |
+
'Mollie\\Api\\Types\\PaymentMethod' => $baseDir . '/src/Types/PaymentMethod.php',
|
158 |
+
'Mollie\\Api\\Types\\PaymentStatus' => $baseDir . '/src/Types/PaymentStatus.php',
|
159 |
+
'Mollie\\Api\\Types\\ProfileStatus' => $baseDir . '/src/Types/ProfileStatus.php',
|
160 |
+
'Mollie\\Api\\Types\\RefundStatus' => $baseDir . '/src/Types/RefundStatus.php',
|
161 |
+
'Mollie\\Api\\Types\\SequenceType' => $baseDir . '/src/Types/SequenceType.php',
|
162 |
+
'Mollie\\Api\\Types\\SettlementStatus' => $baseDir . '/src/Types/SettlementStatus.php',
|
163 |
+
'Mollie\\Api\\Types\\SubscriptionStatus' => $baseDir . '/src/Types/SubscriptionStatus.php',
|
164 |
+
'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php',
|
165 |
+
'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php',
|
166 |
+
'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php',
|
167 |
+
'Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php',
|
168 |
+
'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php',
|
169 |
+
'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php',
|
170 |
+
'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php',
|
171 |
);
|
includes/mollie-api-php/vendor/composer/autoload_real.php
CHANGED
@@ -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 ComposerAutoloaderInitdeb3904dfced6b71023154877c51be97
|
|
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 ComposerAutoloaderInitdeb3904dfced6b71023154877c51be97
|
|
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 ComposerAutoloaderInitf833268ed2646da8e853833e738212e8
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitf833268ed2646da8e853833e738212e8', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf833268ed2646da8e853833e738212e8', '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\ComposerStaticInitf833268ed2646da8e853833e738212e8::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\ComposerStaticInitf833268ed2646da8e853833e738212e8::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequiref833268ed2646da8e853833e738212e8($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequiref833268ed2646da8e853833e738212e8($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
includes/mollie-api-php/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
@@ -61,11 +61,177 @@ class ComposerStaticInitdeb3904dfced6b71023154877c51be97
|
|
61 |
),
|
62 |
);
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
public static function getInitializer(ClassLoader $loader)
|
65 |
{
|
66 |
return \Closure::bind(function () use ($loader) {
|
67 |
-
$loader->prefixLengthsPsr4 =
|
68 |
-
$loader->prefixDirsPsr4 =
|
|
|
69 |
|
70 |
}, null, ClassLoader::class);
|
71 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitf833268ed2646da8e853833e738212e8
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
61 |
),
|
62 |
);
|
63 |
|
64 |
+
public static $classMap = array (
|
65 |
+
'Composer\\CaBundle\\CaBundle' => __DIR__ . '/..' . '/composer/ca-bundle/src/CaBundle.php',
|
66 |
+
'GuzzleHttp\\Client' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Client.php',
|
67 |
+
'GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php',
|
68 |
+
'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
|
69 |
+
'GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
|
70 |
+
'GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
|
71 |
+
'GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
|
72 |
+
'GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php',
|
73 |
+
'GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php',
|
74 |
+
'GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
75 |
+
'GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
76 |
+
'GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php',
|
77 |
+
'GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
78 |
+
'GuzzleHttp\\Exception\\SeekException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
|
79 |
+
'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
80 |
+
'GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
|
81 |
+
'GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
|
82 |
+
'GuzzleHttp\\HandlerStack' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HandlerStack.php',
|
83 |
+
'GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php',
|
84 |
+
'GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php',
|
85 |
+
'GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php',
|
86 |
+
'GuzzleHttp\\Handler\\CurlMultiHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php',
|
87 |
+
'GuzzleHttp\\Handler\\EasyHandle' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php',
|
88 |
+
'GuzzleHttp\\Handler\\MockHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/MockHandler.php',
|
89 |
+
'GuzzleHttp\\Handler\\Proxy' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/Proxy.php',
|
90 |
+
'GuzzleHttp\\Handler\\StreamHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php',
|
91 |
+
'GuzzleHttp\\MessageFormatter' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatter.php',
|
92 |
+
'GuzzleHttp\\Middleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Middleware.php',
|
93 |
+
'GuzzleHttp\\Pool' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Pool.php',
|
94 |
+
'GuzzleHttp\\PrepareBodyMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php',
|
95 |
+
'GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/AggregateException.php',
|
96 |
+
'GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/CancellationException.php',
|
97 |
+
'GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Coroutine.php',
|
98 |
+
'GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php',
|
99 |
+
'GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php',
|
100 |
+
'GuzzleHttp\\Promise\\Promise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Promise.php',
|
101 |
+
'GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromiseInterface.php',
|
102 |
+
'GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromisorInterface.php',
|
103 |
+
'GuzzleHttp\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectedPromise.php',
|
104 |
+
'GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectionException.php',
|
105 |
+
'GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueue.php',
|
106 |
+
'GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueueInterface.php',
|
107 |
+
'GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/AppendStream.php',
|
108 |
+
'GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/BufferStream.php',
|
109 |
+
'GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php',
|
110 |
+
'GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php',
|
111 |
+
'GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php',
|
112 |
+
'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php',
|
113 |
+
'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php',
|
114 |
+
'GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php',
|
115 |
+
'GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php',
|
116 |
+
'GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php',
|
117 |
+
'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php',
|
118 |
+
'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php',
|
119 |
+
'GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php',
|
120 |
+
'GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php',
|
121 |
+
'GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Rfc7230.php',
|
122 |
+
'GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/ServerRequest.php',
|
123 |
+
'GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Stream.php',
|
124 |
+
'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
|
125 |
+
'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php',
|
126 |
+
'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php',
|
127 |
+
'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php',
|
128 |
+
'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php',
|
129 |
+
'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php',
|
130 |
+
'GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
|
131 |
+
'GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php',
|
132 |
+
'GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
|
133 |
+
'GuzzleHttp\\TransferStats' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/TransferStats.php',
|
134 |
+
'GuzzleHttp\\UriTemplate' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
135 |
+
'Mollie\\Api\\CompatibilityChecker' => __DIR__ . '/../..' . '/src/CompatibilityChecker.php',
|
136 |
+
'Mollie\\Api\\Endpoints\\ChargebackEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/ChargebackEndpoint.php',
|
137 |
+
'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' => __DIR__ . '/../..' . '/src/Endpoints/CollectionEndpointAbstract.php',
|
138 |
+
'Mollie\\Api\\Endpoints\\CustomerEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/CustomerEndpoint.php',
|
139 |
+
'Mollie\\Api\\Endpoints\\CustomerPaymentsEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/CustomerPaymentsEndpoint.php',
|
140 |
+
'Mollie\\Api\\Endpoints\\EndpointAbstract' => __DIR__ . '/../..' . '/src/Endpoints/EndpointAbstract.php',
|
141 |
+
'Mollie\\Api\\Endpoints\\InvoiceEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/InvoiceEndpoint.php',
|
142 |
+
'Mollie\\Api\\Endpoints\\MandateEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/MandateEndpoint.php',
|
143 |
+
'Mollie\\Api\\Endpoints\\MethodEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/MethodEndpoint.php',
|
144 |
+
'Mollie\\Api\\Endpoints\\OnboardingEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OnboardingEndpoint.php',
|
145 |
+
'Mollie\\Api\\Endpoints\\OrderEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderEndpoint.php',
|
146 |
+
'Mollie\\Api\\Endpoints\\OrderLineEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderLineEndpoint.php',
|
147 |
+
'Mollie\\Api\\Endpoints\\OrderPaymentEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderPaymentEndpoint.php',
|
148 |
+
'Mollie\\Api\\Endpoints\\OrderRefundEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderRefundEndpoint.php',
|
149 |
+
'Mollie\\Api\\Endpoints\\OrganizationEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrganizationEndpoint.php',
|
150 |
+
'Mollie\\Api\\Endpoints\\PaymentCaptureEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentCaptureEndpoint.php',
|
151 |
+
'Mollie\\Api\\Endpoints\\PaymentChargebackEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentChargebackEndpoint.php',
|
152 |
+
'Mollie\\Api\\Endpoints\\PaymentEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentEndpoint.php',
|
153 |
+
'Mollie\\Api\\Endpoints\\PaymentRefundEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentRefundEndpoint.php',
|
154 |
+
'Mollie\\Api\\Endpoints\\PermissionEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PermissionEndpoint.php',
|
155 |
+
'Mollie\\Api\\Endpoints\\ProfileEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/ProfileEndpoint.php',
|
156 |
+
'Mollie\\Api\\Endpoints\\ProfileMethodEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/ProfileMethodEndpoint.php',
|
157 |
+
'Mollie\\Api\\Endpoints\\RefundEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/RefundEndpoint.php',
|
158 |
+
'Mollie\\Api\\Endpoints\\SettlementsEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/SettlementsEndpoint.php',
|
159 |
+
'Mollie\\Api\\Endpoints\\ShipmentEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/ShipmentEndpoint.php',
|
160 |
+
'Mollie\\Api\\Endpoints\\SubscriptionEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/SubscriptionEndpoint.php',
|
161 |
+
'Mollie\\Api\\Exceptions\\ApiException' => __DIR__ . '/../..' . '/src/Exceptions/ApiException.php',
|
162 |
+
'Mollie\\Api\\Exceptions\\IncompatiblePlatform' => __DIR__ . '/../..' . '/src/Exceptions/IncompatiblePlatform.php',
|
163 |
+
'Mollie\\Api\\MollieApiClient' => __DIR__ . '/../..' . '/src/MollieApiClient.php',
|
164 |
+
'Mollie\\Api\\Resources\\BaseCollection' => __DIR__ . '/../..' . '/src/Resources/BaseCollection.php',
|
165 |
+
'Mollie\\Api\\Resources\\BaseResource' => __DIR__ . '/../..' . '/src/Resources/BaseResource.php',
|
166 |
+
'Mollie\\Api\\Resources\\Capture' => __DIR__ . '/../..' . '/src/Resources/Capture.php',
|
167 |
+
'Mollie\\Api\\Resources\\CaptureCollection' => __DIR__ . '/../..' . '/src/Resources/CaptureCollection.php',
|
168 |
+
'Mollie\\Api\\Resources\\Chargeback' => __DIR__ . '/../..' . '/src/Resources/Chargeback.php',
|
169 |
+
'Mollie\\Api\\Resources\\ChargebackCollection' => __DIR__ . '/../..' . '/src/Resources/ChargebackCollection.php',
|
170 |
+
'Mollie\\Api\\Resources\\CurrentProfile' => __DIR__ . '/../..' . '/src/Resources/CurrentProfile.php',
|
171 |
+
'Mollie\\Api\\Resources\\CursorCollection' => __DIR__ . '/../..' . '/src/Resources/CursorCollection.php',
|
172 |
+
'Mollie\\Api\\Resources\\Customer' => __DIR__ . '/../..' . '/src/Resources/Customer.php',
|
173 |
+
'Mollie\\Api\\Resources\\CustomerCollection' => __DIR__ . '/../..' . '/src/Resources/CustomerCollection.php',
|
174 |
+
'Mollie\\Api\\Resources\\Invoice' => __DIR__ . '/../..' . '/src/Resources/Invoice.php',
|
175 |
+
'Mollie\\Api\\Resources\\InvoiceCollection' => __DIR__ . '/../..' . '/src/Resources/InvoiceCollection.php',
|
176 |
+
'Mollie\\Api\\Resources\\Issuer' => __DIR__ . '/../..' . '/src/Resources/Issuer.php',
|
177 |
+
'Mollie\\Api\\Resources\\IssuerCollection' => __DIR__ . '/../..' . '/src/Resources/IssuerCollection.php',
|
178 |
+
'Mollie\\Api\\Resources\\Mandate' => __DIR__ . '/../..' . '/src/Resources/Mandate.php',
|
179 |
+
'Mollie\\Api\\Resources\\MandateCollection' => __DIR__ . '/../..' . '/src/Resources/MandateCollection.php',
|
180 |
+
'Mollie\\Api\\Resources\\Method' => __DIR__ . '/../..' . '/src/Resources/Method.php',
|
181 |
+
'Mollie\\Api\\Resources\\MethodCollection' => __DIR__ . '/../..' . '/src/Resources/MethodCollection.php',
|
182 |
+
'Mollie\\Api\\Resources\\MethodPrice' => __DIR__ . '/../..' . '/src/Resources/MethodPrice.php',
|
183 |
+
'Mollie\\Api\\Resources\\MethodPriceCollection' => __DIR__ . '/../..' . '/src/Resources/MethodPriceCollection.php',
|
184 |
+
'Mollie\\Api\\Resources\\Onboarding' => __DIR__ . '/../..' . '/src/Resources/Onboarding.php',
|
185 |
+
'Mollie\\Api\\Resources\\Order' => __DIR__ . '/../..' . '/src/Resources/Order.php',
|
186 |
+
'Mollie\\Api\\Resources\\OrderCollection' => __DIR__ . '/../..' . '/src/Resources/OrderCollection.php',
|
187 |
+
'Mollie\\Api\\Resources\\OrderLine' => __DIR__ . '/../..' . '/src/Resources/OrderLine.php',
|
188 |
+
'Mollie\\Api\\Resources\\OrderLineCollection' => __DIR__ . '/../..' . '/src/Resources/OrderLineCollection.php',
|
189 |
+
'Mollie\\Api\\Resources\\Organization' => __DIR__ . '/../..' . '/src/Resources/Organization.php',
|
190 |
+
'Mollie\\Api\\Resources\\OrganizationCollection' => __DIR__ . '/../..' . '/src/Resources/OrganizationCollection.php',
|
191 |
+
'Mollie\\Api\\Resources\\Payment' => __DIR__ . '/../..' . '/src/Resources/Payment.php',
|
192 |
+
'Mollie\\Api\\Resources\\PaymentCollection' => __DIR__ . '/../..' . '/src/Resources/PaymentCollection.php',
|
193 |
+
'Mollie\\Api\\Resources\\Permission' => __DIR__ . '/../..' . '/src/Resources/Permission.php',
|
194 |
+
'Mollie\\Api\\Resources\\PermissionCollection' => __DIR__ . '/../..' . '/src/Resources/PermissionCollection.php',
|
195 |
+
'Mollie\\Api\\Resources\\Profile' => __DIR__ . '/../..' . '/src/Resources/Profile.php',
|
196 |
+
'Mollie\\Api\\Resources\\ProfileCollection' => __DIR__ . '/../..' . '/src/Resources/ProfileCollection.php',
|
197 |
+
'Mollie\\Api\\Resources\\Refund' => __DIR__ . '/../..' . '/src/Resources/Refund.php',
|
198 |
+
'Mollie\\Api\\Resources\\RefundCollection' => __DIR__ . '/../..' . '/src/Resources/RefundCollection.php',
|
199 |
+
'Mollie\\Api\\Resources\\ResourceFactory' => __DIR__ . '/../..' . '/src/Resources/ResourceFactory.php',
|
200 |
+
'Mollie\\Api\\Resources\\Settlement' => __DIR__ . '/../..' . '/src/Resources/Settlement.php',
|
201 |
+
'Mollie\\Api\\Resources\\SettlementCollection' => __DIR__ . '/../..' . '/src/Resources/SettlementCollection.php',
|
202 |
+
'Mollie\\Api\\Resources\\Shipment' => __DIR__ . '/../..' . '/src/Resources/Shipment.php',
|
203 |
+
'Mollie\\Api\\Resources\\ShipmentCollection' => __DIR__ . '/../..' . '/src/Resources/ShipmentCollection.php',
|
204 |
+
'Mollie\\Api\\Resources\\Subscription' => __DIR__ . '/../..' . '/src/Resources/Subscription.php',
|
205 |
+
'Mollie\\Api\\Resources\\SubscriptionCollection' => __DIR__ . '/../..' . '/src/Resources/SubscriptionCollection.php',
|
206 |
+
'Mollie\\Api\\Types\\InvoiceStatus' => __DIR__ . '/../..' . '/src/Types/InvoiceStatus.php',
|
207 |
+
'Mollie\\Api\\Types\\MandateMethod' => __DIR__ . '/../..' . '/src/Types/MandateMethod.php',
|
208 |
+
'Mollie\\Api\\Types\\MandateStatus' => __DIR__ . '/../..' . '/src/Types/MandateStatus.php',
|
209 |
+
'Mollie\\Api\\Types\\OnboardingStatus' => __DIR__ . '/../..' . '/src/Types/OnboardingStatus.php',
|
210 |
+
'Mollie\\Api\\Types\\OrderLineStatus' => __DIR__ . '/../..' . '/src/Types/OrderLineStatus.php',
|
211 |
+
'Mollie\\Api\\Types\\OrderLineType' => __DIR__ . '/../..' . '/src/Types/OrderLineType.php',
|
212 |
+
'Mollie\\Api\\Types\\OrderStatus' => __DIR__ . '/../..' . '/src/Types/OrderStatus.php',
|
213 |
+
'Mollie\\Api\\Types\\PaymentMethod' => __DIR__ . '/../..' . '/src/Types/PaymentMethod.php',
|
214 |
+
'Mollie\\Api\\Types\\PaymentStatus' => __DIR__ . '/../..' . '/src/Types/PaymentStatus.php',
|
215 |
+
'Mollie\\Api\\Types\\ProfileStatus' => __DIR__ . '/../..' . '/src/Types/ProfileStatus.php',
|
216 |
+
'Mollie\\Api\\Types\\RefundStatus' => __DIR__ . '/../..' . '/src/Types/RefundStatus.php',
|
217 |
+
'Mollie\\Api\\Types\\SequenceType' => __DIR__ . '/../..' . '/src/Types/SequenceType.php',
|
218 |
+
'Mollie\\Api\\Types\\SettlementStatus' => __DIR__ . '/../..' . '/src/Types/SettlementStatus.php',
|
219 |
+
'Mollie\\Api\\Types\\SubscriptionStatus' => __DIR__ . '/../..' . '/src/Types/SubscriptionStatus.php',
|
220 |
+
'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php',
|
221 |
+
'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php',
|
222 |
+
'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php',
|
223 |
+
'Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php',
|
224 |
+
'Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php',
|
225 |
+
'Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php',
|
226 |
+
'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php',
|
227 |
+
);
|
228 |
+
|
229 |
public static function getInitializer(ClassLoader $loader)
|
230 |
{
|
231 |
return \Closure::bind(function () use ($loader) {
|
232 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitf833268ed2646da8e853833e738212e8::$prefixLengthsPsr4;
|
233 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitf833268ed2646da8e853833e738212e8::$prefixDirsPsr4;
|
234 |
+
$loader->classMap = ComposerStaticInitf833268ed2646da8e853833e738212e8::$classMap;
|
235 |
|
236 |
}, null, ClassLoader::class);
|
237 |
}
|
includes/mollie-api-php/vendor/composer/installed.json
CHANGED
@@ -179,35 +179,39 @@
|
|
179 |
},
|
180 |
{
|
181 |
"name": "guzzlehttp/psr7",
|
182 |
-
"version": "1.
|
183 |
-
"version_normalized": "1.
|
184 |
"source": {
|
185 |
"type": "git",
|
186 |
"url": "https://github.com/guzzle/psr7.git",
|
187 |
-
"reference": "
|
188 |
},
|
189 |
"dist": {
|
190 |
"type": "zip",
|
191 |
-
"url": "https://api.github.com/repos/guzzle/psr7/zipball/
|
192 |
-
"reference": "
|
193 |
"shasum": ""
|
194 |
},
|
195 |
"require": {
|
196 |
"php": ">=5.4.0",
|
197 |
"psr/http-message": "~1.0",
|
198 |
-
"ralouphie/getallheaders": "^2.0.5"
|
199 |
},
|
200 |
"provide": {
|
201 |
"psr/http-message-implementation": "1.0"
|
202 |
},
|
203 |
"require-dev": {
|
|
|
204 |
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
205 |
},
|
206 |
-
"
|
|
|
|
|
|
|
207 |
"type": "library",
|
208 |
"extra": {
|
209 |
"branch-alias": {
|
210 |
-
"dev-master": "1.
|
211 |
}
|
212 |
},
|
213 |
"installation-source": "dist",
|
@@ -300,27 +304,27 @@
|
|
300 |
},
|
301 |
{
|
302 |
"name": "ralouphie/getallheaders",
|
303 |
-
"version": "
|
304 |
-
"version_normalized": "
|
305 |
"source": {
|
306 |
"type": "git",
|
307 |
"url": "https://github.com/ralouphie/getallheaders.git",
|
308 |
-
"reference": "
|
309 |
},
|
310 |
"dist": {
|
311 |
"type": "zip",
|
312 |
-
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/
|
313 |
-
"reference": "
|
314 |
"shasum": ""
|
315 |
},
|
316 |
"require": {
|
317 |
-
"php": ">=5.
|
318 |
},
|
319 |
"require-dev": {
|
320 |
-
"
|
321 |
-
"
|
322 |
},
|
323 |
-
"time": "
|
324 |
"type": "library",
|
325 |
"installation-source": "dist",
|
326 |
"autoload": {
|
179 |
},
|
180 |
{
|
181 |
"name": "guzzlehttp/psr7",
|
182 |
+
"version": "1.6.1",
|
183 |
+
"version_normalized": "1.6.1.0",
|
184 |
"source": {
|
185 |
"type": "git",
|
186 |
"url": "https://github.com/guzzle/psr7.git",
|
187 |
+
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
188 |
},
|
189 |
"dist": {
|
190 |
"type": "zip",
|
191 |
+
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
192 |
+
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
193 |
"shasum": ""
|
194 |
},
|
195 |
"require": {
|
196 |
"php": ">=5.4.0",
|
197 |
"psr/http-message": "~1.0",
|
198 |
+
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
199 |
},
|
200 |
"provide": {
|
201 |
"psr/http-message-implementation": "1.0"
|
202 |
},
|
203 |
"require-dev": {
|
204 |
+
"ext-zlib": "*",
|
205 |
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
206 |
},
|
207 |
+
"suggest": {
|
208 |
+
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
209 |
+
},
|
210 |
+
"time": "2019-07-01T23:21:34+00:00",
|
211 |
"type": "library",
|
212 |
"extra": {
|
213 |
"branch-alias": {
|
214 |
+
"dev-master": "1.6-dev"
|
215 |
}
|
216 |
},
|
217 |
"installation-source": "dist",
|
304 |
},
|
305 |
{
|
306 |
"name": "ralouphie/getallheaders",
|
307 |
+
"version": "3.0.3",
|
308 |
+
"version_normalized": "3.0.3.0",
|
309 |
"source": {
|
310 |
"type": "git",
|
311 |
"url": "https://github.com/ralouphie/getallheaders.git",
|
312 |
+
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
313 |
},
|
314 |
"dist": {
|
315 |
"type": "zip",
|
316 |
+
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
317 |
+
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
318 |
"shasum": ""
|
319 |
},
|
320 |
"require": {
|
321 |
+
"php": ">=5.6"
|
322 |
},
|
323 |
"require-dev": {
|
324 |
+
"php-coveralls/php-coveralls": "^2.1",
|
325 |
+
"phpunit/phpunit": "^5 || ^6.5"
|
326 |
},
|
327 |
+
"time": "2019-03-08T08:55:37+00:00",
|
328 |
"type": "library",
|
329 |
"installation-source": "dist",
|
330 |
"autoload": {
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/.editorconfig
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
root = true
|
2 |
-
|
3 |
-
[*]
|
4 |
-
charset = utf-8
|
5 |
-
end_of_line = lf
|
6 |
-
indent_size = 4
|
7 |
-
indent_style = space
|
8 |
-
insert_final_newline = true
|
9 |
-
trim_trailing_whitespace = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/CHANGELOG.md
CHANGED
@@ -10,6 +10,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
10 |
## [Unreleased]
|
11 |
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
## [1.5.2] - 2018-12-04
|
14 |
|
15 |
### Fixed
|
@@ -209,7 +229,8 @@ Currently unsupported:
|
|
209 |
|
210 |
|
211 |
|
212 |
-
[Unreleased]: https://github.com/guzzle/psr7/compare/1.
|
|
|
213 |
[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
|
214 |
[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
|
215 |
[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
|
10 |
## [Unreleased]
|
11 |
|
12 |
|
13 |
+
## [1.6.0]
|
14 |
+
|
15 |
+
### Added
|
16 |
+
|
17 |
+
- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
|
18 |
+
- Added MIME type for WEBP image format (#246)
|
19 |
+
- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
|
20 |
+
|
21 |
+
### Changed
|
22 |
+
|
23 |
+
- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
|
24 |
+
- Accept port number 0 to be valid (#270)
|
25 |
+
|
26 |
+
### Fixed
|
27 |
+
|
28 |
+
- Fixed subsequent reads from `php://input` in ServerRequest (#247)
|
29 |
+
- Fixed readable/writable detection for certain stream modes (#248)
|
30 |
+
- Fixed encoding of special characters in the `userInfo` component of an URI (#253)
|
31 |
+
|
32 |
+
|
33 |
## [1.5.2] - 2018-12-04
|
34 |
|
35 |
### Fixed
|
229 |
|
230 |
|
231 |
|
232 |
+
[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD
|
233 |
+
[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
|
234 |
[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
|
235 |
[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
|
236 |
[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/composer.json
CHANGED
@@ -18,14 +18,18 @@
|
|
18 |
"require": {
|
19 |
"php": ">=5.4.0",
|
20 |
"psr/http-message": "~1.0",
|
21 |
-
"ralouphie/getallheaders": "^2.0.5"
|
22 |
},
|
23 |
"require-dev": {
|
24 |
-
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
|
|
25 |
},
|
26 |
"provide": {
|
27 |
"psr/http-message-implementation": "1.0"
|
28 |
},
|
|
|
|
|
|
|
29 |
"autoload": {
|
30 |
"psr-4": {
|
31 |
"GuzzleHttp\\Psr7\\": "src/"
|
@@ -39,7 +43,7 @@
|
|
39 |
},
|
40 |
"extra": {
|
41 |
"branch-alias": {
|
42 |
-
"dev-master": "1.
|
43 |
}
|
44 |
}
|
45 |
}
|
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/"
|
43 |
},
|
44 |
"extra": {
|
45 |
"branch-alias": {
|
46 |
+
"dev-master": "1.6-dev"
|
47 |
}
|
48 |
}
|
49 |
}
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/LimitStream.php
CHANGED
@@ -72,7 +72,7 @@ class LimitStream implements StreamInterface
|
|
72 |
{
|
73 |
if ($whence !== SEEK_SET || $offset < 0) {
|
74 |
throw new \RuntimeException(sprintf(
|
75 |
-
'Cannot seek to offset % with whence %s',
|
76 |
$offset,
|
77 |
$whence
|
78 |
));
|
72 |
{
|
73 |
if ($whence !== SEEK_SET || $offset < 0) {
|
74 |
throw new \RuntimeException(sprintf(
|
75 |
+
'Cannot seek to offset %s with whence %s',
|
76 |
$offset,
|
77 |
$whence
|
78 |
));
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/MessageTrait.php
CHANGED
@@ -66,11 +66,8 @@ trait MessageTrait
|
|
66 |
|
67 |
public function withHeader($header, $value)
|
68 |
{
|
69 |
-
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
$value = $this->trimHeaderValues($value);
|
74 |
$normalized = strtolower($header);
|
75 |
|
76 |
$new = clone $this;
|
@@ -85,11 +82,8 @@ trait MessageTrait
|
|
85 |
|
86 |
public function withAddedHeader($header, $value)
|
87 |
{
|
88 |
-
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
$value = $this->trimHeaderValues($value);
|
93 |
$normalized = strtolower($header);
|
94 |
|
95 |
$new = clone $this;
|
@@ -144,11 +138,13 @@ trait MessageTrait
|
|
144 |
{
|
145 |
$this->headerNames = $this->headers = [];
|
146 |
foreach ($headers as $header => $value) {
|
147 |
-
if (
|
148 |
-
|
|
|
|
|
149 |
}
|
150 |
-
|
151 |
-
$value = $this->
|
152 |
$normalized = strtolower($header);
|
153 |
if (isset($this->headerNames[$normalized])) {
|
154 |
$header = $this->headerNames[$normalized];
|
@@ -160,6 +156,19 @@ trait MessageTrait
|
|
160 |
}
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
/**
|
164 |
* Trims whitespace from the header values.
|
165 |
*
|
@@ -177,7 +186,28 @@ trait MessageTrait
|
|
177 |
private function trimHeaderValues(array $values)
|
178 |
{
|
179 |
return array_map(function ($value) {
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}, $values);
|
182 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
}
|
66 |
|
67 |
public function withHeader($header, $value)
|
68 |
{
|
69 |
+
$this->assertHeader($header);
|
70 |
+
$value = $this->normalizeHeaderValue($value);
|
|
|
|
|
|
|
71 |
$normalized = strtolower($header);
|
72 |
|
73 |
$new = clone $this;
|
82 |
|
83 |
public function withAddedHeader($header, $value)
|
84 |
{
|
85 |
+
$this->assertHeader($header);
|
86 |
+
$value = $this->normalizeHeaderValue($value);
|
|
|
|
|
|
|
87 |
$normalized = strtolower($header);
|
88 |
|
89 |
$new = clone $this;
|
138 |
{
|
139 |
$this->headerNames = $this->headers = [];
|
140 |
foreach ($headers as $header => $value) {
|
141 |
+
if (is_int($header)) {
|
142 |
+
// Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
|
143 |
+
// and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
|
144 |
+
$header = (string) $header;
|
145 |
}
|
146 |
+
$this->assertHeader($header);
|
147 |
+
$value = $this->normalizeHeaderValue($value);
|
148 |
$normalized = strtolower($header);
|
149 |
if (isset($this->headerNames[$normalized])) {
|
150 |
$header = $this->headerNames[$normalized];
|
156 |
}
|
157 |
}
|
158 |
|
159 |
+
private function normalizeHeaderValue($value)
|
160 |
+
{
|
161 |
+
if (!is_array($value)) {
|
162 |
+
return $this->trimHeaderValues([$value]);
|
163 |
+
}
|
164 |
+
|
165 |
+
if (count($value) === 0) {
|
166 |
+
throw new \InvalidArgumentException('Header value can not be an empty array.');
|
167 |
+
}
|
168 |
+
|
169 |
+
return $this->trimHeaderValues($value);
|
170 |
+
}
|
171 |
+
|
172 |
/**
|
173 |
* Trims whitespace from the header values.
|
174 |
*
|
186 |
private function trimHeaderValues(array $values)
|
187 |
{
|
188 |
return array_map(function ($value) {
|
189 |
+
if (!is_scalar($value) && null !== $value) {
|
190 |
+
throw new \InvalidArgumentException(sprintf(
|
191 |
+
'Header value must be scalar or null but %s provided.',
|
192 |
+
is_object($value) ? get_class($value) : gettype($value)
|
193 |
+
));
|
194 |
+
}
|
195 |
+
|
196 |
+
return trim((string) $value, " \t");
|
197 |
}, $values);
|
198 |
}
|
199 |
+
|
200 |
+
private function assertHeader($header)
|
201 |
+
{
|
202 |
+
if (!is_string($header)) {
|
203 |
+
throw new \InvalidArgumentException(sprintf(
|
204 |
+
'Header name must be a string but %s provided.',
|
205 |
+
is_object($header) ? get_class($header) : gettype($header)
|
206 |
+
));
|
207 |
+
}
|
208 |
+
|
209 |
+
if ($header === '') {
|
210 |
+
throw new \InvalidArgumentException('Header name can not be empty.');
|
211 |
+
}
|
212 |
+
}
|
213 |
}
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Request.php
CHANGED
@@ -36,6 +36,7 @@ class Request implements RequestInterface
|
|
36 |
$body = null,
|
37 |
$version = '1.1'
|
38 |
) {
|
|
|
39 |
if (!($uri instanceof UriInterface)) {
|
40 |
$uri = new Uri($uri);
|
41 |
}
|
@@ -91,6 +92,7 @@ class Request implements RequestInterface
|
|
91 |
|
92 |
public function withMethod($method)
|
93 |
{
|
|
|
94 |
$new = clone $this;
|
95 |
$new->method = strtoupper($method);
|
96 |
return $new;
|
@@ -139,4 +141,11 @@ class Request implements RequestInterface
|
|
139 |
// See: http://tools.ietf.org/html/rfc7230#section-5.4
|
140 |
$this->headers = [$header => [$host]] + $this->headers;
|
141 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
36 |
$body = null,
|
37 |
$version = '1.1'
|
38 |
) {
|
39 |
+
$this->assertMethod($method);
|
40 |
if (!($uri instanceof UriInterface)) {
|
41 |
$uri = new Uri($uri);
|
42 |
}
|
92 |
|
93 |
public function withMethod($method)
|
94 |
{
|
95 |
+
$this->assertMethod($method);
|
96 |
$new = clone $this;
|
97 |
$new->method = strtoupper($method);
|
98 |
return $new;
|
141 |
// See: http://tools.ietf.org/html/rfc7230#section-5.4
|
142 |
$this->headers = [$header => [$host]] + $this->headers;
|
143 |
}
|
144 |
+
|
145 |
+
private function assertMethod($method)
|
146 |
+
{
|
147 |
+
if (!is_string($method) || $method === '') {
|
148 |
+
throw new \InvalidArgumentException('Method must be a non-empty string.');
|
149 |
+
}
|
150 |
+
}
|
151 |
}
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Response.php
CHANGED
@@ -93,11 +93,11 @@ class Response implements ResponseInterface
|
|
93 |
$version = '1.1',
|
94 |
$reason = null
|
95 |
) {
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
|
100 |
-
$this->statusCode =
|
101 |
|
102 |
if ($body !== '' && $body !== null) {
|
103 |
$this->stream = stream_for($body);
|
@@ -125,12 +125,30 @@ class Response implements ResponseInterface
|
|
125 |
|
126 |
public function withStatus($code, $reasonPhrase = '')
|
127 |
{
|
|
|
|
|
|
|
|
|
128 |
$new = clone $this;
|
129 |
-
$new->statusCode =
|
130 |
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
131 |
$reasonPhrase = self::$phrases[$new->statusCode];
|
132 |
}
|
133 |
$new->reasonPhrase = $reasonPhrase;
|
134 |
return $new;
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
93 |
$version = '1.1',
|
94 |
$reason = null
|
95 |
) {
|
96 |
+
$this->assertStatusCodeIsInteger($status);
|
97 |
+
$status = (int) $status;
|
98 |
+
$this->assertStatusCodeRange($status);
|
99 |
|
100 |
+
$this->statusCode = $status;
|
101 |
|
102 |
if ($body !== '' && $body !== null) {
|
103 |
$this->stream = stream_for($body);
|
125 |
|
126 |
public function withStatus($code, $reasonPhrase = '')
|
127 |
{
|
128 |
+
$this->assertStatusCodeIsInteger($code);
|
129 |
+
$code = (int) $code;
|
130 |
+
$this->assertStatusCodeRange($code);
|
131 |
+
|
132 |
$new = clone $this;
|
133 |
+
$new->statusCode = $code;
|
134 |
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
135 |
$reasonPhrase = self::$phrases[$new->statusCode];
|
136 |
}
|
137 |
$new->reasonPhrase = $reasonPhrase;
|
138 |
return $new;
|
139 |
}
|
140 |
+
|
141 |
+
private function assertStatusCodeIsInteger($statusCode)
|
142 |
+
{
|
143 |
+
if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
|
144 |
+
throw new \InvalidArgumentException('Status code must be an integer value.');
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
private function assertStatusCodeRange($statusCode)
|
149 |
+
{
|
150 |
+
if ($statusCode < 100 || $statusCode >= 600) {
|
151 |
+
throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
|
152 |
+
}
|
153 |
+
}
|
154 |
}
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/ServerRequest.php
CHANGED
@@ -168,7 +168,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
|
168 |
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
169 |
$headers = getallheaders();
|
170 |
$uri = self::getUriFromGlobals();
|
171 |
-
$body = new LazyOpenStream('php://input', 'r+');
|
172 |
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
|
173 |
|
174 |
$serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
|
168 |
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
169 |
$headers = getallheaders();
|
170 |
$uri = self::getUriFromGlobals();
|
171 |
+
$body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
|
172 |
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
|
173 |
|
174 |
$serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Stream.php
CHANGED
@@ -10,6 +10,17 @@ use Psr\Http\Message\StreamInterface;
|
|
10 |
*/
|
11 |
class Stream implements StreamInterface
|
12 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
private $stream;
|
14 |
private $size;
|
15 |
private $seekable;
|
@@ -18,22 +29,6 @@ class Stream implements StreamInterface
|
|
18 |
private $uri;
|
19 |
private $customMetadata;
|
20 |
|
21 |
-
/** @var array Hash of readable and writable stream types */
|
22 |
-
private static $readWriteHash = [
|
23 |
-
'read' => [
|
24 |
-
'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
|
25 |
-
'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
|
26 |
-
'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
|
27 |
-
'x+t' => true, 'c+t' => true, 'a+' => true, 'rb+' => true,
|
28 |
-
],
|
29 |
-
'write' => [
|
30 |
-
'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
|
31 |
-
'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, 'rb+' => true,
|
32 |
-
'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
|
33 |
-
'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true
|
34 |
-
]
|
35 |
-
];
|
36 |
-
|
37 |
/**
|
38 |
* This constructor accepts an associative array of options.
|
39 |
*
|
@@ -65,8 +60,8 @@ class Stream implements StreamInterface
|
|
65 |
$this->stream = $stream;
|
66 |
$meta = stream_get_meta_data($this->stream);
|
67 |
$this->seekable = $meta['seekable'];
|
68 |
-
$this->readable =
|
69 |
-
$this->writable =
|
70 |
$this->uri = $this->getMetadata('uri');
|
71 |
}
|
72 |
|
@@ -197,6 +192,8 @@ class Stream implements StreamInterface
|
|
197 |
|
198 |
public function seek($offset, $whence = SEEK_SET)
|
199 |
{
|
|
|
|
|
200 |
if (!isset($this->stream)) {
|
201 |
throw new \RuntimeException('Stream is detached');
|
202 |
}
|
10 |
*/
|
11 |
class Stream implements StreamInterface
|
12 |
{
|
13 |
+
/**
|
14 |
+
* Resource modes.
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*
|
18 |
+
* @see http://php.net/manual/function.fopen.php
|
19 |
+
* @see http://php.net/manual/en/function.gzopen.php
|
20 |
+
*/
|
21 |
+
const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
|
22 |
+
const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
|
23 |
+
|
24 |
private $stream;
|
25 |
private $size;
|
26 |
private $seekable;
|
29 |
private $uri;
|
30 |
private $customMetadata;
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* This constructor accepts an associative array of options.
|
34 |
*
|
60 |
$this->stream = $stream;
|
61 |
$meta = stream_get_meta_data($this->stream);
|
62 |
$this->seekable = $meta['seekable'];
|
63 |
+
$this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
|
64 |
+
$this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
|
65 |
$this->uri = $this->getMetadata('uri');
|
66 |
}
|
67 |
|
192 |
|
193 |
public function seek($offset, $whence = SEEK_SET)
|
194 |
{
|
195 |
+
$whence = (int) $whence;
|
196 |
+
|
197 |
if (!isset($this->stream)) {
|
198 |
throw new \RuntimeException('Stream is detached');
|
199 |
}
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/Uri.php
CHANGED
@@ -437,9 +437,9 @@ class Uri implements UriInterface
|
|
437 |
|
438 |
public function withUserInfo($user, $password = null)
|
439 |
{
|
440 |
-
$info = $user;
|
441 |
-
if ($password
|
442 |
-
$info .= ':' . $password;
|
443 |
}
|
444 |
|
445 |
if ($this->userInfo === $info) {
|
@@ -537,7 +537,9 @@ class Uri implements UriInterface
|
|
537 |
$this->scheme = isset($parts['scheme'])
|
538 |
? $this->filterScheme($parts['scheme'])
|
539 |
: '';
|
540 |
-
$this->userInfo = isset($parts['user'])
|
|
|
|
|
541 |
$this->host = isset($parts['host'])
|
542 |
? $this->filterHost($parts['host'])
|
543 |
: '';
|
@@ -554,7 +556,7 @@ class Uri implements UriInterface
|
|
554 |
? $this->filterQueryAndFragment($parts['fragment'])
|
555 |
: '';
|
556 |
if (isset($parts['pass'])) {
|
557 |
-
$this->userInfo .= ':' . $parts['pass'];
|
558 |
}
|
559 |
|
560 |
$this->removeDefaultPort();
|
@@ -576,6 +578,26 @@ class Uri implements UriInterface
|
|
576 |
return strtolower($scheme);
|
577 |
}
|
578 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
579 |
/**
|
580 |
* @param string $host
|
581 |
*
|
@@ -606,9 +628,9 @@ class Uri implements UriInterface
|
|
606 |
}
|
607 |
|
608 |
$port = (int) $port;
|
609 |
-
if (
|
610 |
throw new \InvalidArgumentException(
|
611 |
-
sprintf('Invalid port: %d. Must be between
|
612 |
);
|
613 |
}
|
614 |
|
437 |
|
438 |
public function withUserInfo($user, $password = null)
|
439 |
{
|
440 |
+
$info = $this->filterUserInfoComponent($user);
|
441 |
+
if ($password !== null) {
|
442 |
+
$info .= ':' . $this->filterUserInfoComponent($password);
|
443 |
}
|
444 |
|
445 |
if ($this->userInfo === $info) {
|
537 |
$this->scheme = isset($parts['scheme'])
|
538 |
? $this->filterScheme($parts['scheme'])
|
539 |
: '';
|
540 |
+
$this->userInfo = isset($parts['user'])
|
541 |
+
? $this->filterUserInfoComponent($parts['user'])
|
542 |
+
: '';
|
543 |
$this->host = isset($parts['host'])
|
544 |
? $this->filterHost($parts['host'])
|
545 |
: '';
|
556 |
? $this->filterQueryAndFragment($parts['fragment'])
|
557 |
: '';
|
558 |
if (isset($parts['pass'])) {
|
559 |
+
$this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
|
560 |
}
|
561 |
|
562 |
$this->removeDefaultPort();
|
578 |
return strtolower($scheme);
|
579 |
}
|
580 |
|
581 |
+
/**
|
582 |
+
* @param string $component
|
583 |
+
*
|
584 |
+
* @return string
|
585 |
+
*
|
586 |
+
* @throws \InvalidArgumentException If the user info is invalid.
|
587 |
+
*/
|
588 |
+
private function filterUserInfoComponent($component)
|
589 |
+
{
|
590 |
+
if (!is_string($component)) {
|
591 |
+
throw new \InvalidArgumentException('User info must be a string');
|
592 |
+
}
|
593 |
+
|
594 |
+
return preg_replace_callback(
|
595 |
+
'/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
|
596 |
+
[$this, 'rawurlencodeMatchZero'],
|
597 |
+
$component
|
598 |
+
);
|
599 |
+
}
|
600 |
+
|
601 |
/**
|
602 |
* @param string $host
|
603 |
*
|
628 |
}
|
629 |
|
630 |
$port = (int) $port;
|
631 |
+
if (0 > $port || 0xffff < $port) {
|
632 |
throw new \InvalidArgumentException(
|
633 |
+
sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
|
634 |
);
|
635 |
}
|
636 |
|
includes/mollie-api-php/vendor/guzzlehttp/psr7/src/functions.php
CHANGED
@@ -724,6 +724,7 @@ function mimetype_from_extension($extension)
|
|
724 |
'txt' => 'text/plain',
|
725 |
'wav' => 'audio/x-wav',
|
726 |
'webm' => 'video/webm',
|
|
|
727 |
'wma' => 'audio/x-ms-wma',
|
728 |
'wmv' => 'video/x-ms-wmv',
|
729 |
'woff' => 'application/x-font-woff',
|
724 |
'txt' => 'text/plain',
|
725 |
'wav' => 'audio/x-wav',
|
726 |
'webm' => 'video/webm',
|
727 |
+
'webp' => 'image/webp',
|
728 |
'wma' => 'audio/x-ms-wma',
|
729 |
'wmv' => 'video/x-ms-wmv',
|
730 |
'woff' => 'application/x-font-woff',
|
includes/mollie-api-php/vendor/ralouphie/getallheaders/.gitignore
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
.idea
|
2 |
-
.DS_store
|
3 |
-
/vendor/
|
4 |
-
composer.phar
|
5 |
-
composer.lock
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/ralouphie/getallheaders/.travis.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
language: php
|
2 |
-
|
3 |
-
php:
|
4 |
-
- 5.3
|
5 |
-
- 5.4
|
6 |
-
- 5.5
|
7 |
-
- 5.6
|
8 |
-
- 7.0
|
9 |
-
|
10 |
-
before_script:
|
11 |
-
- composer install
|
12 |
-
|
13 |
-
script:
|
14 |
-
- mkdir -p build/logs
|
15 |
-
- php vendor/bin/phpunit -c phpunit.xml
|
16 |
-
|
17 |
-
after_script:
|
18 |
-
- php vendor/bin/coveralls -v
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/ralouphie/getallheaders/README.md
CHANGED
@@ -14,6 +14,14 @@ This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/f
|
|
14 |
|
15 |
## Install
|
16 |
|
|
|
|
|
17 |
```
|
18 |
composer require ralouphie/getallheaders
|
19 |
```
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
## Install
|
16 |
|
17 |
+
For PHP version **`>= 5.6`**:
|
18 |
+
|
19 |
```
|
20 |
composer require ralouphie/getallheaders
|
21 |
```
|
22 |
+
|
23 |
+
For PHP version **`< 5.6`**:
|
24 |
+
|
25 |
+
```
|
26 |
+
composer require ralouphie/getallheaders "^2"
|
27 |
+
```
|
includes/mollie-api-php/vendor/ralouphie/getallheaders/composer.json
CHANGED
@@ -9,13 +9,18 @@
|
|
9 |
}
|
10 |
],
|
11 |
"require": {
|
12 |
-
"php": ">=5.
|
13 |
},
|
14 |
"require-dev": {
|
15 |
-
"phpunit/phpunit": "
|
16 |
-
"
|
17 |
},
|
18 |
"autoload": {
|
19 |
"files": ["src/getallheaders.php"]
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
-
}
|
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-api-php/vendor/ralouphie/getallheaders/phpunit.xml
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<phpunit
|
2 |
-
bootstrap="vendor/autoload.php"
|
3 |
-
convertErrorsToExceptions="true"
|
4 |
-
convertNoticesToExceptions="true"
|
5 |
-
convertWarningsToExceptions="true"
|
6 |
-
strict="true">
|
7 |
-
|
8 |
-
<testsuite>
|
9 |
-
<directory>./tests</directory>
|
10 |
-
</testsuite>
|
11 |
-
|
12 |
-
<filter>
|
13 |
-
<whitelist>
|
14 |
-
<directory suffix=".php">src</directory>
|
15 |
-
</whitelist>
|
16 |
-
</filter>
|
17 |
-
|
18 |
-
<logging>
|
19 |
-
<log type="coverage-clover" target="build/logs/clover.xml"/>
|
20 |
-
</logging>
|
21 |
-
|
22 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie-api-php/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php
DELETED
@@ -1,121 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class GetAllHeadersTest extends \PHPUnit_Framework_TestCase
|
4 |
-
{
|
5 |
-
|
6 |
-
/**
|
7 |
-
* @dataProvider testWorksData
|
8 |
-
*/
|
9 |
-
public function testWorks($test_type, $expected, $server)
|
10 |
-
{
|
11 |
-
foreach ($server as $key => $val) {
|
12 |
-
$_SERVER[$key] = $val;
|
13 |
-
}
|
14 |
-
$result = getallheaders();
|
15 |
-
$this->assertEquals($expected, $result, "Error testing $test_type works.");
|
16 |
-
}
|
17 |
-
|
18 |
-
public function testWorksData()
|
19 |
-
{
|
20 |
-
return array(
|
21 |
-
array(
|
22 |
-
'normal case',
|
23 |
-
array(
|
24 |
-
'Key-One' => 'foo',
|
25 |
-
'Key-Two' => 'bar',
|
26 |
-
'Another-Key-For-Testing' => 'baz'
|
27 |
-
),
|
28 |
-
array(
|
29 |
-
'HTTP_KEY_ONE' => 'foo',
|
30 |
-
'HTTP_KEY_TWO' => 'bar',
|
31 |
-
'HTTP_ANOTHER_KEY_FOR_TESTING' => 'baz'
|
32 |
-
)
|
33 |
-
),
|
34 |
-
array(
|
35 |
-
'Content-Type',
|
36 |
-
array(
|
37 |
-
'Content-Type' => 'two'
|
38 |
-
),
|
39 |
-
array(
|
40 |
-
'HTTP_CONTENT_TYPE' => 'one',
|
41 |
-
'CONTENT_TYPE' => 'two'
|
42 |
-
)
|
43 |
-
),
|
44 |
-
array(
|
45 |
-
'Content-Length',
|
46 |
-
array(
|
47 |
-
'Content-Length' => '222'
|
48 |
-
),
|
49 |
-
array(
|
50 |
-
'CONTENT_LENGTH' => '222',
|
51 |
-
'HTTP_CONTENT_LENGTH' => '111'
|
52 |
-
)
|
53 |
-
),
|
54 |
-
array(
|
55 |
-
'Content-Length (HTTP_CONTENT_LENGTH only)',
|
56 |
-
array(
|
57 |
-
'Content-Length' => '111'
|
58 |
-
),
|
59 |
-
array(
|
60 |
-
'HTTP_CONTENT_LENGTH' => '111'
|
61 |
-
)
|
62 |
-
),
|
63 |
-
array(
|
64 |
-
'Content-MD5',
|
65 |
-
array(
|
66 |
-
'Content-Md5' => 'aef123'
|
67 |
-
),
|
68 |
-
array(
|
69 |
-
'CONTENT_MD5' => 'aef123',
|
70 |
-
'HTTP_CONTENT_MD5' => 'fea321'
|
71 |
-
)
|
72 |
-
),
|
73 |
-
array(
|
74 |
-
'Content-MD5 (HTTP_CONTENT_MD5 only)',
|
75 |
-
array(
|
76 |
-
'Content-Md5' => 'f123'
|
77 |
-
),
|
78 |
-
array(
|
79 |
-
'HTTP_CONTENT_MD5' => 'f123'
|
80 |
-
)
|
81 |
-
),
|
82 |
-
array(
|
83 |
-
'Authorization (normal)',
|
84 |
-
array(
|
85 |
-
'Authorization' => 'testing'
|
86 |
-
),
|
87 |
-
array(
|
88 |
-
'HTTP_AUTHORIZATION' => 'testing',
|
89 |
-
)
|
90 |
-
),
|
91 |
-
array(
|
92 |
-
'Authorization (redirect)',
|
93 |
-
array(
|
94 |
-
'Authorization' => 'testing redirect'
|
95 |
-
),
|
96 |
-
array(
|
97 |
-
'REDIRECT_HTTP_AUTHORIZATION' => 'testing redirect',
|
98 |
-
)
|
99 |
-
),
|
100 |
-
array(
|
101 |
-
'Authorization (PHP_AUTH_USER + PHP_AUTH_PW)',
|
102 |
-
array(
|
103 |
-
'Authorization' => 'Basic ' . base64_encode('foo:bar')
|
104 |
-
),
|
105 |
-
array(
|
106 |
-
'PHP_AUTH_USER' => 'foo',
|
107 |
-
'PHP_AUTH_PW' => 'bar'
|
108 |
-
)
|
109 |
-
),
|
110 |
-
array(
|
111 |
-
'Authorization (PHP_AUTH_DIGEST)',
|
112 |
-
array(
|
113 |
-
'Authorization' => 'example-digest'
|
114 |
-
),
|
115 |
-
array(
|
116 |
-
'PHP_AUTH_DIGEST' => 'example-digest'
|
117 |
-
)
|
118 |
-
)
|
119 |
-
);
|
120 |
-
}
|
121 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mollie/wc/gateway/abstract.php
CHANGED
@@ -311,8 +311,8 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
311 |
'value' => Mollie_WC_Plugin::getDataHelper()->formatCurrencyValue( $order_total, $currency )
|
312 |
),
|
313 |
'resource' => 'orders',
|
314 |
-
'billingCountry' => $billing_country,
|
315 |
'locale' => $payment_locale,
|
|
|
316 |
'sequenceType' => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_ONEOFF
|
317 |
);
|
318 |
|
@@ -342,10 +342,11 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
342 |
),
|
343 |
'resource' => 'orders',
|
344 |
'billingCountry' => $billing_country,
|
345 |
-
'locale' => $payment_locale,
|
346 |
'sequenceType' => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_RECURRING
|
347 |
);
|
348 |
|
|
|
|
|
349 |
$status = $this->isAvailableMethodInCheckout( $filters );
|
350 |
|
351 |
}
|
@@ -358,8 +359,8 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
358 |
'value' => Mollie_WC_Plugin::getDataHelper()->formatCurrencyValue( $order_total, $currency )
|
359 |
),
|
360 |
'resource' => 'orders',
|
|
|
361 |
'billingCountry' => $billing_country,
|
362 |
-
'locale' => $payment_locale,
|
363 |
'sequenceType' => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_FIRST
|
364 |
);
|
365 |
|
@@ -1288,7 +1289,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
1288 |
}
|
1289 |
|
1290 |
}
|
1291 |
-
|
1292 |
do_action( Mollie_WC_Plugin::PLUGIN_ID . '_customer_return_payment_success', $order );
|
1293 |
/*
|
1294 |
* Return to order received page
|
311 |
'value' => Mollie_WC_Plugin::getDataHelper()->formatCurrencyValue( $order_total, $currency )
|
312 |
),
|
313 |
'resource' => 'orders',
|
|
|
314 |
'locale' => $payment_locale,
|
315 |
+
'billingCountry' => $billing_country,
|
316 |
'sequenceType' => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_ONEOFF
|
317 |
);
|
318 |
|
342 |
),
|
343 |
'resource' => 'orders',
|
344 |
'billingCountry' => $billing_country,
|
|
|
345 |
'sequenceType' => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_RECURRING
|
346 |
);
|
347 |
|
348 |
+
$payment_locale and $filters['locale'] = $payment_locale;
|
349 |
+
|
350 |
$status = $this->isAvailableMethodInCheckout( $filters );
|
351 |
|
352 |
}
|
359 |
'value' => Mollie_WC_Plugin::getDataHelper()->formatCurrencyValue( $order_total, $currency )
|
360 |
),
|
361 |
'resource' => 'orders',
|
362 |
+
'locale' => $payment_locale,
|
363 |
'billingCountry' => $billing_country,
|
|
|
364 |
'sequenceType' => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_FIRST
|
365 |
);
|
366 |
|
1289 |
}
|
1290 |
|
1291 |
}
|
1292 |
+
|
1293 |
do_action( Mollie_WC_Plugin::PLUGIN_ID . '_customer_return_payment_success', $order );
|
1294 |
/*
|
1295 |
* Return to order received page
|
includes/mollie/wc/gateway/applepay.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Mollie\Api\Resources\Payment;
|
4 |
+
use Mollie\Api\Types\PaymentMethod;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Class applepay
|
8 |
+
*/
|
9 |
+
class Mollie_WC_Gateway_Applepay extends Mollie_WC_Gateway_Abstract
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Mollie_WC_Gateway_Applepay constructor.
|
13 |
+
*/
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
// TODO Check if its support refund?
|
17 |
+
$this->supports = [
|
18 |
+
'products',
|
19 |
+
'refunds',
|
20 |
+
];
|
21 |
+
|
22 |
+
parent::__construct();
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function getMollieMethodId()
|
29 |
+
{
|
30 |
+
return PaymentMethod::APPLEPAY;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getDefaultTitle()
|
37 |
+
{
|
38 |
+
return __('Apple Pay', 'mollie-payments-for-woocommerce');
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
protected function getSettingsDescription()
|
45 |
+
{
|
46 |
+
return __('To accept payments via Apple Pay', 'mollie-payments-for-woocommerce');
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
protected function getDefaultDescription()
|
53 |
+
{
|
54 |
+
return '';
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get Order Instructions
|
59 |
+
*
|
60 |
+
* @param WC_Order $order
|
61 |
+
* @param Payment $payment
|
62 |
+
* @param bool $admin_instructions
|
63 |
+
* @param bool $plain_text
|
64 |
+
* @return string|null
|
65 |
+
*/
|
66 |
+
protected function getInstructions(
|
67 |
+
WC_Order $order,
|
68 |
+
Mollie\Api\Resources\Payment $payment,
|
69 |
+
$admin_instructions,
|
70 |
+
$plain_text
|
71 |
+
) {
|
72 |
+
if ($payment->isPaid() && $payment->details) {
|
73 |
+
return sprintf(
|
74 |
+
__(
|
75 |
+
/* translators: Placeholder 1: PayPal consumer name, placeholder 2: PayPal email, placeholder 3: PayPal transaction ID */
|
76 |
+
"Payment completed by <strong>%1$s</strong> - %2$s (Apple Pay transaction ID: %3$s)",
|
77 |
+
'mollie-payments-for-woocommerce'
|
78 |
+
),
|
79 |
+
$payment->details->consumerName,
|
80 |
+
$payment->details->consumerAccount,
|
81 |
+
$payment->details->paypalReference
|
82 |
+
);
|
83 |
+
}
|
84 |
+
|
85 |
+
return parent::getInstructions($order, $payment, $admin_instructions, $plain_text);
|
86 |
+
}
|
87 |
+
}
|
includes/mollie/wc/helper/data.php
CHANGED
@@ -332,6 +332,7 @@ class Mollie_WC_Helper_Data
|
|
332 |
delete_transient( $transient_id );
|
333 |
|
334 |
$filters['resource'] = 'orders';
|
|
|
335 |
|
336 |
$methods = $this->api_helper->getApiClient( $test_mode )->methods->all( $filters );
|
337 |
|
332 |
delete_transient( $transient_id );
|
333 |
|
334 |
$filters['resource'] = 'orders';
|
335 |
+
$filters['includeWallets'] = 'applepay';
|
336 |
|
337 |
$methods = $this->api_helper->getApiClient( $test_mode )->methods->all( $filters );
|
338 |
|
includes/mollie/wc/helper/settings.php
CHANGED
@@ -1,11 +1,44 @@
|
|
1 |
<?php
|
2 |
class Mollie_WC_Helper_Settings
|
3 |
{
|
|
|
|
|
|
|
4 |
const DEFAULT_TIME_PAYMENT_CONFIRMATION_CHECK = '3:00';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
/**
|
6 |
* @return bool
|
7 |
*/
|
8 |
-
public function isTestModeEnabled
|
9 |
{
|
10 |
return trim(get_option($this->getSettingId('test_mode_enabled'))) === 'yes';
|
11 |
}
|
@@ -14,114 +47,62 @@ class Mollie_WC_Helper_Settings
|
|
14 |
* @param bool $test_mode
|
15 |
* @return null|string
|
16 |
*/
|
17 |
-
public function getApiKey
|
18 |
{
|
19 |
$setting_id = $test_mode ? 'test_api_key' : 'live_api_key';
|
20 |
|
21 |
return trim(get_option($this->getSettingId($setting_id)));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* Order status for cancelled payments
|
26 |
-
*
|
27 |
-
* @return string|null
|
28 |
-
*/
|
29 |
-
public function getOrderStatusCancelledPayments ()
|
30 |
-
{
|
31 |
-
return trim(get_option($this->getSettingId('order_status_cancelled_payments')));
|
32 |
-
}
|
33 |
-
|
34 |
/**
|
35 |
-
*
|
|
|
|
|
36 |
*/
|
37 |
-
|
38 |
{
|
39 |
-
$
|
40 |
-
|
41 |
-
return trim(get_option($this->getSettingId('payment_locale'), $default_value));
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
-
*
|
|
|
|
|
46 |
*/
|
47 |
-
|
48 |
{
|
49 |
-
$
|
|
|
|
|
|
|
50 |
|
51 |
-
|
52 |
-
{
|
53 |
-
if ($setting == 'wp_locale')
|
54 |
-
{
|
55 |
-
// Send current locale to Mollie
|
56 |
-
return $this->getCurrentLocale();
|
57 |
-
}
|
58 |
-
else
|
59 |
-
{
|
60 |
-
// Send specific locale to Mollie
|
61 |
-
return $setting;
|
62 |
-
}
|
63 |
-
}
|
64 |
|
65 |
-
|
66 |
-
// Locale is now required for Orders API, so that's useless
|
67 |
-
// Fall back to en_US if we have no other options
|
68 |
-
return 'en_US';
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
-
*
|
73 |
*
|
74 |
* @return string
|
75 |
*/
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
// Convert known exceptions
|
80 |
-
( $locale == 'nl_NL_formal' ? $locale = 'nl_NL': '');
|
81 |
-
( $locale == 'de_DE_formal' ? $locale = 'de_DE': '');
|
82 |
-
( $locale == 'no_NO' ? $locale = 'nb_NO': '');
|
83 |
-
|
84 |
-
// TODO: Once in a while, check API changelog to make sure there haven't been changes to this list.
|
85 |
-
$valid_locales = array (
|
86 |
-
'en_US',
|
87 |
-
'nl_NL',
|
88 |
-
'nl_BE',
|
89 |
-
'fr_FR',
|
90 |
-
'fr_BE',
|
91 |
-
'de_DE',
|
92 |
-
'de_AT',
|
93 |
-
'de_CH',
|
94 |
-
'es_ES',
|
95 |
-
'ca_ES',
|
96 |
-
'pt_PT',
|
97 |
-
'it_IT',
|
98 |
-
'nb_NO',
|
99 |
-
'sv_SE',
|
100 |
-
'fi_FI',
|
101 |
-
'da_DK',
|
102 |
-
'is_IS',
|
103 |
-
'hu_HU',
|
104 |
-
'pl_PL',
|
105 |
-
'lv_LV',
|
106 |
-
'lt_LT'
|
107 |
-
);
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
}
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
if (false !== stripos($value, $locale)) {
|
118 |
-
return $value;
|
119 |
-
}
|
120 |
-
}
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
125 |
|
126 |
/**
|
127 |
* Store customer details at Mollie
|
@@ -399,11 +380,18 @@ class Mollie_WC_Helper_Settings
|
|
399 |
'default' => 'pending',
|
400 |
),
|
401 |
array(
|
402 |
-
'id'
|
403 |
'title' => __('Payment screen language', 'mollie-payments-for-woocommerce'),
|
404 |
'type' => 'select',
|
405 |
'options' => array(
|
406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
'en_US' => __('English', 'mollie-payments-for-woocommerce'),
|
408 |
'nl_NL' => __('Dutch', 'mollie-payments-for-woocommerce'),
|
409 |
'nl_BE' => __('Flemish (Belgium)', 'mollie-payments-for-woocommerce'),
|
@@ -431,7 +419,7 @@ class Mollie_WC_Helper_Settings
|
|
431 |
'<a href="https://www.mollie.com/nl/docs/reference/payments/create" target="_blank">',
|
432 |
'</a>'
|
433 |
),
|
434 |
-
'default' =>
|
435 |
),
|
436 |
array(
|
437 |
'id' => $this->getSettingId('customer_details'),
|
@@ -630,4 +618,104 @@ class Mollie_WC_Helper_Settings
|
|
630 |
return $content;
|
631 |
}
|
632 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
}
|
1 |
<?php
|
2 |
class Mollie_WC_Helper_Settings
|
3 |
{
|
4 |
+
const FILTER_ALLOWED_LANGUAGE_CODE_SETTING = 'mollie.allowed_language_code_setting';
|
5 |
+
const FILTER_WPML_CURRENT_LOCALE = 'wpml_current_language';
|
6 |
+
|
7 |
const DEFAULT_TIME_PAYMENT_CONFIRMATION_CHECK = '3:00';
|
8 |
+
|
9 |
+
const SETTING_NAME_PAYMENT_LOCALE = 'payment_locale';
|
10 |
+
const SETTING_LOCALE_DEFAULT_LANGUAGE = 'en_US';
|
11 |
+
const SETTING_LOCALE_DETECT_BY_BROWSER = 'detect_by_browser';
|
12 |
+
const SETTING_LOCALE_WP_LANGUAGE = 'wp_locale';
|
13 |
+
|
14 |
+
const ALLOWED_LANGUAGE_CODES = [
|
15 |
+
'en_US',
|
16 |
+
'nl_NL',
|
17 |
+
'nl_BE',
|
18 |
+
'fr_FR',
|
19 |
+
'fr_BE',
|
20 |
+
'de_DE',
|
21 |
+
'de_AT',
|
22 |
+
'de_CH',
|
23 |
+
'es_ES',
|
24 |
+
'ca_ES',
|
25 |
+
'pt_PT',
|
26 |
+
'it_IT',
|
27 |
+
'nb_NO',
|
28 |
+
'sv_SE',
|
29 |
+
'fi_FI',
|
30 |
+
'da_DK',
|
31 |
+
'is_IS',
|
32 |
+
'hu_HU',
|
33 |
+
'pl_PL',
|
34 |
+
'lv_LV',
|
35 |
+
'lt_LT',
|
36 |
+
];
|
37 |
+
|
38 |
/**
|
39 |
* @return bool
|
40 |
*/
|
41 |
+
public function isTestModeEnabled()
|
42 |
{
|
43 |
return trim(get_option($this->getSettingId('test_mode_enabled'))) === 'yes';
|
44 |
}
|
47 |
* @param bool $test_mode
|
48 |
* @return null|string
|
49 |
*/
|
50 |
+
public function getApiKey($test_mode = false)
|
51 |
{
|
52 |
$setting_id = $test_mode ? 'test_api_key' : 'live_api_key';
|
53 |
|
54 |
return trim(get_option($this->getSettingId($setting_id)));
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
+
* Order status for cancelled payments
|
59 |
+
*
|
60 |
+
* @return string|null
|
61 |
*/
|
62 |
+
public function getOrderStatusCancelledPayments()
|
63 |
{
|
64 |
+
return trim(get_option($this->getSettingId('order_status_cancelled_payments')));
|
|
|
|
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
+
* Retrieve the Payment Locale Setting from Database
|
69 |
+
*
|
70 |
+
* @return string
|
71 |
*/
|
72 |
+
protected function getPaymentLocaleSetting()
|
73 |
{
|
74 |
+
$option = (string)get_option(
|
75 |
+
$this->getSettingId(self::SETTING_NAME_PAYMENT_LOCALE),
|
76 |
+
self::SETTING_LOCALE_WP_LANGUAGE
|
77 |
+
);
|
78 |
|
79 |
+
$option = $option ?: self::SETTING_LOCALE_WP_LANGUAGE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
return trim($option);
|
|
|
|
|
|
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
+
* Retrieve the Payment Locale
|
86 |
*
|
87 |
* @return string
|
88 |
*/
|
89 |
+
public function getPaymentLocale()
|
90 |
+
{
|
91 |
+
$setting = $this->getPaymentLocaleSetting();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
if ($setting === self::SETTING_LOCALE_DETECT_BY_BROWSER) {
|
94 |
+
return $this->browserLanguage();
|
95 |
+
}
|
|
|
96 |
|
97 |
+
$setting === self::SETTING_LOCALE_WP_LANGUAGE
|
98 |
+
? $languageCode = $this->getCurrentLocale()
|
99 |
+
: $languageCode = $setting;
|
|
|
|
|
|
|
|
|
100 |
|
101 |
+
// TODO Missing Post condition, $languageCode has to be check for a valid
|
102 |
+
// language code.
|
103 |
+
|
104 |
+
return $languageCode ?: self::SETTING_LOCALE_DEFAULT_LANGUAGE;
|
105 |
+
}
|
106 |
|
107 |
/**
|
108 |
* Store customer details at Mollie
|
380 |
'default' => 'pending',
|
381 |
),
|
382 |
array(
|
383 |
+
'id' => $this->getSettingId(self::SETTING_NAME_PAYMENT_LOCALE),
|
384 |
'title' => __('Payment screen language', 'mollie-payments-for-woocommerce'),
|
385 |
'type' => 'select',
|
386 |
'options' => array(
|
387 |
+
self::SETTING_LOCALE_WP_LANGUAGE => __(
|
388 |
+
'Automatically send WordPress language',
|
389 |
+
'mollie-payments-for-woocommerce'
|
390 |
+
) . ' (' . __('default', 'mollie-payments-for-woocommerce') . ')',
|
391 |
+
self::SETTING_LOCALE_DETECT_BY_BROWSER => __(
|
392 |
+
'Detect using browser language',
|
393 |
+
'mollie-payments-for-woocommerce'
|
394 |
+
),
|
395 |
'en_US' => __('English', 'mollie-payments-for-woocommerce'),
|
396 |
'nl_NL' => __('Dutch', 'mollie-payments-for-woocommerce'),
|
397 |
'nl_BE' => __('Flemish (Belgium)', 'mollie-payments-for-woocommerce'),
|
419 |
'<a href="https://www.mollie.com/nl/docs/reference/payments/create" target="_blank">',
|
420 |
'</a>'
|
421 |
),
|
422 |
+
'default' => self::SETTING_LOCALE_WP_LANGUAGE,
|
423 |
),
|
424 |
array(
|
425 |
'id' => $this->getSettingId('customer_details'),
|
618 |
return $content;
|
619 |
}
|
620 |
|
621 |
+
/**
|
622 |
+
* Get current locale by WordPress
|
623 |
+
*
|
624 |
+
* Default to self::SETTING_LOCALE_DEFAULT_LANGUAGE
|
625 |
+
*
|
626 |
+
* @return string
|
627 |
+
*/
|
628 |
+
protected function getCurrentLocale()
|
629 |
+
{
|
630 |
+
$locale = apply_filters(self::FILTER_WPML_CURRENT_LOCALE, get_locale());
|
631 |
+
|
632 |
+
// Convert known exceptions
|
633 |
+
$locale = $locale === 'nl_NL_formal' ? 'nl_NL' : $locale;
|
634 |
+
$locale = $locale === 'de_DE_formal' ? 'de_DE' : $locale;
|
635 |
+
$locale = $locale === 'no_NO' ? 'nb_NO' : $locale;
|
636 |
+
|
637 |
+
return $this->extractValidLanguageCode([$locale]);
|
638 |
+
}
|
639 |
+
|
640 |
+
/**
|
641 |
+
* Retrieve the browser language
|
642 |
+
*
|
643 |
+
* @return string
|
644 |
+
*/
|
645 |
+
protected function browserLanguage()
|
646 |
+
{
|
647 |
+
if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
648 |
+
return self::SETTING_LOCALE_DEFAULT_LANGUAGE;
|
649 |
+
}
|
650 |
+
|
651 |
+
$httpAcceptedLanguages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
652 |
+
foreach ($httpAcceptedLanguages as $index => $languageCode) {
|
653 |
+
$languageCode = explode(';', $languageCode)[0];
|
654 |
+
if (strpos($languageCode, '-') !== false) {
|
655 |
+
$languageCode = str_replace('-', '_', $languageCode);
|
656 |
+
}
|
657 |
+
|
658 |
+
$httpAcceptedLanguages[$index] = $languageCode;
|
659 |
+
}
|
660 |
+
$httpAcceptedLanguages = array_filter($httpAcceptedLanguages);
|
661 |
+
|
662 |
+
if (!$httpAcceptedLanguages) {
|
663 |
+
return self::SETTING_LOCALE_DEFAULT_LANGUAGE;
|
664 |
+
}
|
665 |
+
|
666 |
+
return $this->extractValidLanguageCode($httpAcceptedLanguages);
|
667 |
+
}
|
668 |
+
|
669 |
+
/**
|
670 |
+
* Extract a valid code Language from the given arguments
|
671 |
+
*
|
672 |
+
* The language Code could contains valid language codes that are not supported such as
|
673 |
+
* country codes.
|
674 |
+
*
|
675 |
+
* Since the Browser can send both country and region codes we need to map the country code
|
676 |
+
* to a region code on the fly.
|
677 |
+
*
|
678 |
+
* The method does that, it try to retrieve the language code if it's exists within the
|
679 |
+
* allowed language codes dictionary, if not it will try to retrieve the first one that
|
680 |
+
* contains the country code.
|
681 |
+
*
|
682 |
+
* @param array $languageCodes
|
683 |
+
* @return string
|
684 |
+
*/
|
685 |
+
protected function extractValidLanguageCode(array $languageCodes)
|
686 |
+
{
|
687 |
+
// TODO Need Assertion to ensure $languageCodes is not empty and contains only strings
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Filter Allowed Language Codes
|
691 |
+
*
|
692 |
+
* @param array $allowedLanguageCodes
|
693 |
+
*/
|
694 |
+
$allowedLanguageCodes = apply_filters(
|
695 |
+
self::FILTER_ALLOWED_LANGUAGE_CODE_SETTING,
|
696 |
+
self::ALLOWED_LANGUAGE_CODES
|
697 |
+
);
|
698 |
+
|
699 |
+
if (empty($allowedLanguageCodes)) {
|
700 |
+
// TODO Need validation for Language Code
|
701 |
+
return (string)$languageCodes[0];
|
702 |
+
}
|
703 |
+
|
704 |
+
foreach ($languageCodes as $index => $languageCode) {
|
705 |
+
if (in_array($languageCode, $allowedLanguageCodes, true)) {
|
706 |
+
return $languageCode;
|
707 |
+
}
|
708 |
+
}
|
709 |
+
|
710 |
+
foreach ($languageCodes as $languageCode) {
|
711 |
+
foreach ($allowedLanguageCodes as $currentAllowedLanguageCode) {
|
712 |
+
$countryCode = substr($currentAllowedLanguageCode, 0, 2);
|
713 |
+
if ($countryCode === $languageCode) {
|
714 |
+
return $currentAllowedLanguageCode;
|
715 |
+
}
|
716 |
+
}
|
717 |
+
}
|
718 |
+
|
719 |
+
return self::SETTING_LOCALE_DEFAULT_LANGUAGE;
|
720 |
+
}
|
721 |
}
|
includes/mollie/wc/plugin.php
CHANGED
@@ -7,7 +7,7 @@ class Mollie_WC_Plugin
|
|
7 |
{
|
8 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
9 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
10 |
-
const PLUGIN_VERSION = '5.
|
11 |
|
12 |
const DB_VERSION = '1.0';
|
13 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
@@ -42,6 +42,7 @@ class Mollie_WC_Plugin
|
|
42 |
'Mollie_WC_Gateway_Przelewy24',
|
43 |
'Mollie_WC_Gateway_Sofort',
|
44 |
'Mollie_WC_Gateway_Giftcard',
|
|
|
45 |
);
|
46 |
|
47 |
private function __construct () {}
|
@@ -189,6 +190,8 @@ class Mollie_WC_Plugin
|
|
189 |
// Add Mollie gateways
|
190 |
add_filter( 'woocommerce_payment_gateways', array ( __CLASS__, 'addGateways' ) );
|
191 |
|
|
|
|
|
192 |
// Add settings link to plugins page
|
193 |
add_filter( 'plugin_action_links_' . $plugin_basename, array ( __CLASS__, 'addPluginActionLinks' ) );
|
194 |
|
@@ -216,12 +219,51 @@ class Mollie_WC_Plugin
|
|
216 |
// Capture order at Mollie (for Orders API/Klarna)
|
217 |
add_action( 'woocommerce_order_status_completed', array( __CLASS__, 'shipAndCaptureOrderAtMollie' ) );
|
218 |
|
|
|
|
|
|
|
219 |
self::initDb();
|
220 |
self::schedulePendingPaymentOrdersExpirationCheck();
|
|
|
|
|
221 |
// Mark plugin initiated
|
222 |
self::$initiated = true;
|
223 |
}
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
/**
|
226 |
* Payment return url callback
|
227 |
*/
|
@@ -335,9 +377,7 @@ class Mollie_WC_Plugin
|
|
335 |
*/
|
336 |
public static function addGateways( array $gateways ) {
|
337 |
|
338 |
-
|
339 |
-
|
340 |
-
// Return if function get_current_screen() is not defined
|
341 |
if ( ! function_exists( 'get_current_screen' ) ) {
|
342 |
return $gateways;
|
343 |
}
|
@@ -372,6 +412,29 @@ class Mollie_WC_Plugin
|
|
372 |
return $gateways;
|
373 |
}
|
374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
/**
|
376 |
* Add a WooCommerce notification message
|
377 |
*
|
@@ -467,6 +530,11 @@ class Mollie_WC_Plugin
|
|
467 |
return M4W_PLUGIN_URL . $path;
|
468 |
}
|
469 |
|
|
|
|
|
|
|
|
|
|
|
470 |
/**
|
471 |
* Add plugin action links
|
472 |
* @param array $links
|
7 |
{
|
8 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
9 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
10 |
+
const PLUGIN_VERSION = '5.2.0';
|
11 |
|
12 |
const DB_VERSION = '1.0';
|
13 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
42 |
'Mollie_WC_Gateway_Przelewy24',
|
43 |
'Mollie_WC_Gateway_Sofort',
|
44 |
'Mollie_WC_Gateway_Giftcard',
|
45 |
+
'Mollie_WC_Gateway_Applepay',
|
46 |
);
|
47 |
|
48 |
private function __construct () {}
|
190 |
// Add Mollie gateways
|
191 |
add_filter( 'woocommerce_payment_gateways', array ( __CLASS__, 'addGateways' ) );
|
192 |
|
193 |
+
add_filter('woocommerce_payment_gateways', [__CLASS__, 'maybeDisableApplePayGateway'], 20);
|
194 |
+
|
195 |
// Add settings link to plugins page
|
196 |
add_filter( 'plugin_action_links_' . $plugin_basename, array ( __CLASS__, 'addPluginActionLinks' ) );
|
197 |
|
219 |
// Capture order at Mollie (for Orders API/Klarna)
|
220 |
add_action( 'woocommerce_order_status_completed', array( __CLASS__, 'shipAndCaptureOrderAtMollie' ) );
|
221 |
|
222 |
+
// Enqueue Scripts
|
223 |
+
add_action('wp_enqueue_scripts', [__CLASS__, 'enqueueFrontendScripts']);
|
224 |
+
|
225 |
self::initDb();
|
226 |
self::schedulePendingPaymentOrdersExpirationCheck();
|
227 |
+
self::registerFrontendScripts();
|
228 |
+
|
229 |
// Mark plugin initiated
|
230 |
self::$initiated = true;
|
231 |
}
|
232 |
|
233 |
+
/**
|
234 |
+
* Register Scripts
|
235 |
+
*
|
236 |
+
* @return void
|
237 |
+
*/
|
238 |
+
public static function registerFrontendScripts()
|
239 |
+
{
|
240 |
+
if (is_admin()) {
|
241 |
+
return;
|
242 |
+
}
|
243 |
+
|
244 |
+
wp_register_script(
|
245 |
+
'mollie_wc_gateway_applepay',
|
246 |
+
Mollie_WC_Plugin::getPluginUrl('assets/js/applepay.js'),
|
247 |
+
[],
|
248 |
+
filemtime(Mollie_WC_Plugin::getPluginPath('/assets/js/applepay.js')),
|
249 |
+
true
|
250 |
+
);
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Enqueue Frontend only scripts
|
255 |
+
*
|
256 |
+
* @return void
|
257 |
+
*/
|
258 |
+
public static function enqueueFrontendScripts()
|
259 |
+
{
|
260 |
+
if (is_admin()) {
|
261 |
+
return;
|
262 |
+
}
|
263 |
+
|
264 |
+
is_checkout() and wp_enqueue_script('mollie_wc_gateway_applepay');
|
265 |
+
}
|
266 |
+
|
267 |
/**
|
268 |
* Payment return url callback
|
269 |
*/
|
377 |
*/
|
378 |
public static function addGateways( array $gateways ) {
|
379 |
|
380 |
+
// Return if function get_current_screen() is not defined
|
|
|
|
|
381 |
if ( ! function_exists( 'get_current_screen' ) ) {
|
382 |
return $gateways;
|
383 |
}
|
412 |
return $gateways;
|
413 |
}
|
414 |
|
415 |
+
/**
|
416 |
+
* Disable Apple Pay Gateway
|
417 |
+
*
|
418 |
+
* @param array $gateways
|
419 |
+
* @return array
|
420 |
+
*/
|
421 |
+
public static function maybeDisableApplePayGateway(array $gateways)
|
422 |
+
{
|
423 |
+
$gateways = array_merge($gateways, self::$GATEWAYS);
|
424 |
+
$postData = (string)filter_input(INPUT_POST, 'post_data', FILTER_SANITIZE_STRING) ?: '';
|
425 |
+
|
426 |
+
if (!$postData) {
|
427 |
+
return $gateways;
|
428 |
+
}
|
429 |
+
|
430 |
+
parse_str($postData, $postData);
|
431 |
+
if (isset($postData['mollie_apple_pay_method_not_allowed']) && !is_admin()) {
|
432 |
+
$gateways = array_diff($gateways, ['Mollie_WC_Gateway_Applepay']);
|
433 |
+
}
|
434 |
+
|
435 |
+
return $gateways;
|
436 |
+
}
|
437 |
+
|
438 |
/**
|
439 |
* Add a WooCommerce notification message
|
440 |
*
|
530 |
return M4W_PLUGIN_URL . $path;
|
531 |
}
|
532 |
|
533 |
+
public static function getPluginPath($path = '')
|
534 |
+
{
|
535 |
+
return M4W_PLUGIN_DIR . $path;
|
536 |
+
}
|
537 |
+
|
538 |
/**
|
539 |
* Add plugin action links
|
540 |
* @param array $links
|
mollie-payments-for-woocommerce.php
CHANGED
@@ -3,11 +3,11 @@
|
|
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
|
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.2.0
|
7 |
* Author: Mollie
|
8 |
* Author URI: https://www.mollie.com
|
9 |
* Requires at least: 3.8
|
10 |
+
* Tested up to: 5.2
|
11 |
* Text Domain: mollie-payments-for-woocommerce
|
12 |
* Domain Path: /i18n/languages/
|
13 |
* License: GPLv2 or later
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, n
|
|
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.2
|
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
|
@@ -128,7 +128,7 @@ Yes, you can with a separate plugin. At the moment we have tested and can recomm
|
|
128 |
|
129 |
= Why do orders with payment method BankTransfer and Direct Debit get the status 'on-hold'? =
|
130 |
|
131 |
-
These payment methods take longer than a few hours to complete. The order status is set to 'on-hold' to prevent the WooCommerce setting 'Hold stock (minutes)' (https://docs.woothemes.com/document/configuring-woocommerce-settings/#inventory-options) will
|
132 |
cancel the order. The order stock is also reduced to reserve stock for these orders. The stock is restored if the payment fails or is cancelled. You can change the initial order status for these payment methods on their setting page.
|
133 |
|
134 |
= I have a different question about this plugin =
|
@@ -181,6 +181,11 @@ Automatic updates should work like a charm; as always though, ensure you backup
|
|
181 |
|
182 |
== Changelog ==
|
183 |
|
|
|
|
|
|
|
|
|
|
|
184 |
= 5.1.8 - 24-05-2019 =
|
185 |
|
186 |
* Fix - Re-add "_orderlines_process_items_after_processing_item" hook
|
@@ -526,13 +531,13 @@ Starting with version 4.0, this plugin will require PHP 5.6. If you are using an
|
|
526 |
= 2.3.0 - 27/07/2016 =
|
527 |
* Update payment method icons.
|
528 |
* Send the refund description to Mollie. The refund description will be visible for your customer on their bank statement.
|
529 |
-
* Add new filters `mollie-payments-for-woocommerce_order_status_cancelled` and `mollie-payments-for-woocommerce_order_status_expired` to be able
|
530 |
to overwrite the order status for cancelled and expired Mollie payments. You can find all available filters on https://github.com/mollie/WooCommerce/tree/master/development.
|
531 |
* Update Mollie API client to v1.6.5.
|
532 |
|
533 |
= 2.2.1 - 18/04/2016 =
|
534 |
-
* Add option for the Bank Transfer gateway to skip redirecting your users to the Mollie payment screen. Instead directly redirect to the WooCommerce order
|
535 |
-
received page where payment instruction will be displayed. You can turn on this option on the Mollie Bank Transfer setting page:
|
536 |
WooCommerce -> Settings -> Payments -> Mollie - Bank Transfer.
|
537 |
|
538 |
= 2.2.0 - 29/03/2016 =
|
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.2
|
6 |
+
Stable tag: 5.2.0
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
128 |
|
129 |
= Why do orders with payment method BankTransfer and Direct Debit get the status 'on-hold'? =
|
130 |
|
131 |
+
These payment methods take longer than a few hours to complete. The order status is set to 'on-hold' to prevent the WooCommerce setting 'Hold stock (minutes)' (https://docs.woothemes.com/document/configuring-woocommerce-settings/#inventory-options) will
|
132 |
cancel the order. The order stock is also reduced to reserve stock for these orders. The stock is restored if the payment fails or is cancelled. You can change the initial order status for these payment methods on their setting page.
|
133 |
|
134 |
= I have a different question about this plugin =
|
181 |
|
182 |
== Changelog ==
|
183 |
|
184 |
+
= 5.2.0 - 23-07-2019 =
|
185 |
+
|
186 |
+
* Fix - Missing browser language detect in payment settings
|
187 |
+
* Add - Apple Pay payment method
|
188 |
+
|
189 |
= 5.1.8 - 24-05-2019 =
|
190 |
|
191 |
* Fix - Re-add "_orderlines_process_items_after_processing_item" hook
|
531 |
= 2.3.0 - 27/07/2016 =
|
532 |
* Update payment method icons.
|
533 |
* Send the refund description to Mollie. The refund description will be visible for your customer on their bank statement.
|
534 |
+
* Add new filters `mollie-payments-for-woocommerce_order_status_cancelled` and `mollie-payments-for-woocommerce_order_status_expired` to be able
|
535 |
to overwrite the order status for cancelled and expired Mollie payments. You can find all available filters on https://github.com/mollie/WooCommerce/tree/master/development.
|
536 |
* Update Mollie API client to v1.6.5.
|
537 |
|
538 |
= 2.2.1 - 18/04/2016 =
|
539 |
+
* Add option for the Bank Transfer gateway to skip redirecting your users to the Mollie payment screen. Instead directly redirect to the WooCommerce order
|
540 |
+
received page where payment instruction will be displayed. You can turn on this option on the Mollie Bank Transfer setting page:
|
541 |
WooCommerce -> Settings -> Payments -> Mollie - Bank Transfer.
|
542 |
|
543 |
= 2.2.0 - 29/03/2016 =
|