Version Description
- Add - Venmo update #169
- Add - Pay Later Button Global Expansion #182
- Add - Add Canada to advanced credit and debit card #180
- Add - Add button height setting for mini cart #181
- Add - Add BN Code to Pay Later Messaging #183
- Add - Add 30 seconds timeout by default to all API requests #184
- Fix - ACDC checkout error: "Card Details not valid"; but payment completes #193
- Fix - Incorrect API credentials cause fatal error #187
- Fix - PayPal payment fails if a new user account is created during the checkout process #177
- Fix - Disabled PayPal button appears when another button is loaded on the same page #192
- Fix - [UNPROCESSABLE_ENTITY] error during checkout #172
- Fix - Do not send customer email when order status is on hold #173
- Fix - Remove merchant-id query parameter in JSSDK #179
- Fix - Error on Plugin activation with Zettle POS Integration for WooCommerce #195
Download this release
Release Info
Developer | woothemes |
Plugin | WooCommerce PayPal Payments |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.4.0
- changelog.txt +16 -0
- modules/ppcp-admin-notices/src/class-adminnotices.php +1 -1
- modules/ppcp-api-client/src/Authentication/class-paypalbearer.php +5 -1
- modules/ppcp-api-client/src/Endpoint/class-orderendpoint.php +9 -1
- modules/ppcp-api-client/src/Endpoint/class-requesttrait.php +2 -0
- modules/ppcp-api-client/src/Helper/class-dccapplies.php +24 -0
- modules/ppcp-api-client/src/class-apimodule.php +1 -1
- modules/ppcp-button/assets/js/button.js +1 -1
- modules/ppcp-button/assets/js/button.js.map +1 -1
- modules/ppcp-button/resources/js/button.js +8 -6
- modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js +4 -1
- modules/ppcp-button/resources/js/modules/ContextBootstrap/CartBootstap.js +1 -1
- modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js +9 -5
- modules/ppcp-button/services.php +3 -3
- modules/ppcp-button/src/Assets/class-smartbutton.php +56 -32
- modules/ppcp-button/src/Endpoint/class-createorderendpoint.php +70 -28
- modules/ppcp-button/src/class-buttonmodule.php +1 -1
- modules/ppcp-compat/extensions.php +12 -0
- modules/ppcp-compat/module.php +16 -0
- modules/ppcp-compat/services.php +12 -0
- modules/ppcp-compat/src/class-compatmodule.php +49 -0
- modules/ppcp-onboarding/src/class-onboardingmodule.php +2 -1
- modules/ppcp-session/src/class-sessionmodule.php +1 -1
- modules/ppcp-subscription/src/class-subscriptionmodule.php +1 -1
- modules/ppcp-wc-gateway/services.php +25 -5
- modules/ppcp-wc-gateway/src/Assets/class-settingspageassets.php +13 -8
- modules/ppcp-wc-gateway/src/Helper/class-settingsstatus.php +55 -0
- modules/ppcp-wc-gateway/src/Settings/class-settingslistener.php +19 -5
- modules/ppcp-wc-gateway/src/Settings/class-settingsrenderer.php +14 -23
- modules/ppcp-wc-gateway/src/class-wcgatewaymodule.php +13 -1
- modules/ppcp-webhooks/src/class-webhookmodule.php +1 -1
- modules/woocommerce-logging/src/class-woocommerceloggingmodule.php +1 -1
- readme.txt +18 -2
- src/class-pluginmodule.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +14 -2
- vendor/composer/autoload_classmap.php +2 -0
- vendor/composer/autoload_psr4.php +0 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +6 -9
- vendor/composer/installed.json +14 -67
- vendor/composer/installed.php +5 -14
- vendor/dhii/data-key-value-aware-interface/.codeclimate.yml +0 -17
- vendor/dhii/data-key-value-aware-interface/.php_cs +0 -27
- vendor/dhii/data-key-value-aware-interface/CHANGELOG.md +0 -12
- vendor/dhii/data-key-value-aware-interface/README.md +0 -6
- vendor/dhii/data-key-value-aware-interface/composer.json +0 -27
- vendor/dhii/data-key-value-aware-interface/composer.lock +0 -2016
- vendor/dhii/data-key-value-aware-interface/nbproject/project.properties +0 -25
- vendor/dhii/data-key-value-aware-interface/nbproject/project.xml +0 -9
- vendor/dhii/data-key-value-aware-interface/phpunit.xml +0 -35
- vendor/dhii/data-key-value-aware-interface/src/KeyAwareInterface.php +0 -22
- vendor/dhii/data-key-value-aware-interface/src/KeyValueAwareInterface.php +0 -16
- vendor/dhii/data-key-value-aware-interface/src/ValueAwareInterface.php +0 -20
- vendor/dhii/data-key-value-aware-interface/test/bootstrap.php +0 -5
- vendor/dhii/data-key-value-aware-interface/test/functional/KeyAwareInterfaceTest.php +0 -41
- vendor/dhii/data-key-value-aware-interface/test/functional/KeyValueAwareInterfaceTest.php +0 -42
- vendor/dhii/data-key-value-aware-interface/test/functional/ValueAwareInterfaceTest.php +0 -41
- vendor/dhii/module-interface/.env.example +6 -0
- vendor/dhii/module-interface/CHANGELOG.md +21 -0
- vendor/dhii/module-interface/README.md +274 -14
- vendor/dhii/module-interface/composer.json +10 -15
- vendor/dhii/module-interface/docker-compose.yml +29 -0
- vendor/dhii/module-interface/docker/Dockerfile +39 -0
- vendor/dhii/module-interface/phpcs.xml.dist +50 -0
- vendor/dhii/module-interface/phpmd.xml +0 -25
- vendor/dhii/module-interface/phpunit.xml.dist +20 -0
- vendor/dhii/module-interface/psalm.xml.dist +152 -0
- vendor/dhii/module-interface/src/DependenciesAwareInterface.php +0 -24
- vendor/dhii/module-interface/src/Exception/ModuleExceptionInterface.php +5 -3
- vendor/dhii/module-interface/src/ModuleAwareInterface.php +5 -3
- vendor/dhii/module-interface/src/ModuleFactoryInterface.php +0 -22
- vendor/dhii/module-interface/src/ModuleInterface.php +31 -21
- vendor/dhii/module-interface/src/ModuleKeyAwareInterface.php +0 -22
- vendor/dhii/module-interface/tests/bootstrap.php +5 -0
- vendor/dhii/module-interface/tests/stubs/GetImplementingMockBuilderCapableTrait.php +48 -0
- vendor/dhii/module-interface/tests/unit/Exception/ModuleExceptionInterfaceTest.php +64 -0
- vendor/dhii/module-interface/tests/unit/ModuleAwareInterfaceTest.php +46 -0
- vendor/dhii/module-interface/tests/unit/ModuleInterfaceTest.php +46 -0
- vendor/dhii/module-interface/travis.php.ini +0 -1
- woocommerce-paypal-payments.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,21 @@
|
|
1 |
*** Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.3.2 - 2021-06-08 =
|
4 |
* Fix - Improve Subscription plugin support. #161
|
5 |
* Fix - Disable vault setting if vaulting feature is not available. #150
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 1.4.0 - 2021-07-27 =
|
4 |
+
* Add - Venmo update #169
|
5 |
+
* Add - Pay Later Button –Global Expansion #182
|
6 |
+
* Add - Add Canada to advanced credit and debit card #180
|
7 |
+
* Add - Add button height setting for mini cart #181
|
8 |
+
* Add - Add BN Code to Pay Later Messaging #183
|
9 |
+
* Add - Add 30 seconds timeout by default to all API requests #184
|
10 |
+
* Fix - ACDC checkout error: "Card Details not valid"; but payment completes #193
|
11 |
+
* Fix - Incorrect API credentials cause fatal error #187
|
12 |
+
* Fix - PayPal payment fails if a new user account is created during the checkout process #177
|
13 |
+
* Fix - Disabled PayPal button appears when another button is loaded on the same page #192
|
14 |
+
* Fix - [UNPROCESSABLE_ENTITY] error during checkout #172
|
15 |
+
* Fix - Do not send customer email when order status is on hold #173
|
16 |
+
* Fix - Remove merchant-id query parameter in JSSDK #179
|
17 |
+
* Fix - Error on Plugin activation with Zettle POS Integration for WooCommerce #195
|
18 |
+
|
19 |
= 1.3.2 - 2021-06-08 =
|
20 |
* Fix - Improve Subscription plugin support. #161
|
21 |
* Fix - Disable vault setting if vaulting feature is not available. #150
|
modules/ppcp-admin-notices/src/class-adminnotices.php
CHANGED
@@ -36,7 +36,7 @@ class AdminNotices implements ModuleInterface {
|
|
36 |
*
|
37 |
* @param ContainerInterface $container The container.
|
38 |
*/
|
39 |
-
public function run( ContainerInterface $container
|
40 |
add_action(
|
41 |
'admin_notices',
|
42 |
function() use ( $container ) {
|
36 |
*
|
37 |
* @param ContainerInterface $container The container.
|
38 |
*/
|
39 |
+
public function run( ContainerInterface $container ): void {
|
40 |
add_action(
|
41 |
'admin_notices',
|
42 |
function() use ( $container ) {
|
modules/ppcp-api-client/src/Authentication/class-paypalbearer.php
CHANGED
@@ -120,7 +120,11 @@ class PayPalBearer implements Bearer {
|
|
120 |
|
121 |
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
122 |
$error = new RuntimeException(
|
123 |
-
|
|
|
|
|
|
|
|
|
124 |
);
|
125 |
$this->logger->log(
|
126 |
'warning',
|
120 |
|
121 |
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
|
122 |
$error = new RuntimeException(
|
123 |
+
sprintf(
|
124 |
+
// translators: %s is the error description.
|
125 |
+
__( 'Could not create token. %s', 'woocommerce-paypal-payments' ),
|
126 |
+
isset( json_decode( $response['body'] )->error_description ) ? json_decode( $response['body'] )->error_description : ''
|
127 |
+
)
|
128 |
);
|
129 |
$this->logger->log(
|
130 |
'warning',
|
modules/ppcp-api-client/src/Endpoint/class-orderendpoint.php
CHANGED
@@ -502,6 +502,14 @@ class OrderEndpoint {
|
|
502 |
return $order_to_update;
|
503 |
}
|
504 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
$bearer = $this->bearer->bearer();
|
506 |
$url = trailingslashit( $this->host ) . 'v2/checkout/orders/' . $order_to_update->id();
|
507 |
$args = array(
|
@@ -514,7 +522,7 @@ class OrderEndpoint {
|
|
514 |
$order_to_update
|
515 |
),
|
516 |
),
|
517 |
-
'body' => wp_json_encode( $
|
518 |
);
|
519 |
if ( $this->bn_code ) {
|
520 |
$args['headers']['PayPal-Partner-Attribution-Id'] = $this->bn_code;
|
502 |
return $order_to_update;
|
503 |
}
|
504 |
|
505 |
+
$patches_array = $patches->to_array();
|
506 |
+
if ( ! isset( $patches_array[0]['value']['shipping'] ) ) {
|
507 |
+
$shipping = isset( $order_to_update->purchase_units()[0] ) && null !== $order_to_update->purchase_units()[0]->shipping() ? $order_to_update->purchase_units()[0]->shipping() : null;
|
508 |
+
if ( $shipping ) {
|
509 |
+
$patches_array[0]['value']['shipping'] = $shipping->to_array();
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
$bearer = $this->bearer->bearer();
|
514 |
$url = trailingslashit( $this->host ) . 'v2/checkout/orders/' . $order_to_update->id();
|
515 |
$args = array(
|
522 |
$order_to_update
|
523 |
),
|
524 |
),
|
525 |
+
'body' => wp_json_encode( $patches_array ),
|
526 |
);
|
527 |
if ( $this->bn_code ) {
|
528 |
$args['headers']['PayPal-Partner-Attribution-Id'] = $this->bn_code;
|
modules/ppcp-api-client/src/Endpoint/class-requesttrait.php
CHANGED
@@ -24,6 +24,8 @@ trait RequestTrait {
|
|
24 |
*/
|
25 |
private function request( string $url, array $args ) {
|
26 |
|
|
|
|
|
27 |
/**
|
28 |
* This filter can be used to alter the request args.
|
29 |
* For example, during testing, the PayPal-Mock-Response header could be
|
24 |
*/
|
25 |
private function request( string $url, array $args ) {
|
26 |
|
27 |
+
$args['timeout'] = 30;
|
28 |
+
|
29 |
/**
|
30 |
* This filter can be used to alter the request args.
|
31 |
* For example, during testing, the PayPal-Mock-Response header could be
|
modules/ppcp-api-client/src/Helper/class-dccapplies.php
CHANGED
@@ -118,6 +118,24 @@ class DccApplies {
|
|
118 |
'JPY',
|
119 |
'USD',
|
120 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
);
|
122 |
|
123 |
/**
|
@@ -157,6 +175,12 @@ class DccApplies {
|
|
157 |
'amex' => array( 'USD' ),
|
158 |
'discover' => array( 'USD' ),
|
159 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
);
|
161 |
|
162 |
/**
|
118 |
'JPY',
|
119 |
'USD',
|
120 |
),
|
121 |
+
'CA' => array(
|
122 |
+
'AUD',
|
123 |
+
'CAD',
|
124 |
+
'CHF',
|
125 |
+
'CZK',
|
126 |
+
'DKK',
|
127 |
+
'EUR',
|
128 |
+
'GBP',
|
129 |
+
'HKD',
|
130 |
+
'HUF',
|
131 |
+
'JPY',
|
132 |
+
'NOK',
|
133 |
+
'NZD',
|
134 |
+
'PLN',
|
135 |
+
'SEK',
|
136 |
+
'SGD',
|
137 |
+
'USD',
|
138 |
+
),
|
139 |
);
|
140 |
|
141 |
/**
|
175 |
'amex' => array( 'USD' ),
|
176 |
'discover' => array( 'USD' ),
|
177 |
),
|
178 |
+
'CA' => array(
|
179 |
+
'mastercard' => array(),
|
180 |
+
'visa' => array(),
|
181 |
+
'amex' => array( 'CAD' ),
|
182 |
+
'jcb' => array( 'CAD' ),
|
183 |
+
),
|
184 |
);
|
185 |
|
186 |
/**
|
modules/ppcp-api-client/src/class-apimodule.php
CHANGED
@@ -37,7 +37,7 @@ class ApiModule implements ModuleInterface {
|
|
37 |
*
|
38 |
* @param ContainerInterface $container The container.
|
39 |
*/
|
40 |
-
public function run( ContainerInterface $container
|
41 |
}
|
42 |
|
43 |
/**
|
37 |
*
|
38 |
* @param ContainerInterface $container The container.
|
39 |
*/
|
40 |
+
public function run( ContainerInterface $container ): void {
|
41 |
}
|
42 |
|
43 |
/**
|
modules/ppcp-button/assets/js/button.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([,function(e,t,r){"use strict";r.r(t);var n=class{constructor(e){this.genericErrorText=e,this.wrapper=document.querySelector(".woocommerce-notices-wrapper"),this.messagesList=document.querySelector("ul.woocommerce-error")}genericError(){this.wrapper.classList.contains("ppcp-persist")||(this.clear(),this.message(this.genericErrorText))}appendPreparedErrorMessageElement(e){null===this.messagesList&&this.prepareMessagesList(),this.messagesList.replaceWith(e)}message(e,t=!1){if(0===e.length)throw new Error("A new message text must be a non-empty string.");null===this.messagesList&&this.prepareMessagesList(),t?this.wrapper.classList.add("ppcp-persist"):this.wrapper.classList.remove("ppcp-persist");let r=this.prepareMessagesListItem(e);this.messagesList.appendChild(r),jQuery.scroll_to_notices(jQuery(".woocommerce-notices-wrapper"))}prepareMessagesList(){null===this.messagesList&&(this.messagesList=document.createElement("ul"),this.messagesList.setAttribute("class","woocommerce-error"),this.messagesList.setAttribute("role","alert"),this.wrapper.appendChild(this.messagesList))}prepareMessagesListItem(e){const t=document.createElement("li");return t.innerHTML=e,t}sanitize(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value.replace("Error: ","")}clear(){this.wrapper.classList.contains("woocommerce-error")&&(this.wrapper.classList.remove("woocommerce-error"),this.wrapper.innerText="")}};var a=(e,t)=>(r,n)=>fetch(e.config.ajax.approve_order.endpoint,{method:"POST",body:JSON.stringify({nonce:e.config.ajax.approve_order.nonce,order_id:r.orderID})}).then(e=>e.json()).then(r=>{if(!r.success)return t.genericError(),n.restart().catch(e=>{t.genericError()});location.href=e.config.redirect});const s=()=>{const e=PayPalCommerceGateway.payer;if(!e)return null;const t=document.querySelector("#billing_phone")||void 0!==e.phone?{phone_type:"HOME",phone_number:{national_number:document.querySelector("#billing_phone")?document.querySelector("#billing_phone").value:e.phone.phone_number.national_number}}:null,r={email_address:document.querySelector("#billing_email")?document.querySelector("#billing_email").value:e.email_address,name:{surname:document.querySelector("#billing_last_name")?document.querySelector("#billing_last_name").value:e.name.surname,given_name:document.querySelector("#billing_first_name")?document.querySelector("#billing_first_name").value:e.name.given_name},address:{country_code:document.querySelector("#billing_country")?document.querySelector("#billing_country").value:e.address.country_code,address_line_1:document.querySelector("#billing_address_1")?document.querySelector("#billing_address_1").value:e.address.address_line_1,address_line_2:document.querySelector("#billing_address_2")?document.querySelector("#billing_address_2").value:e.address.address_line_2,admin_area_1:document.querySelector("#billing_state")?document.querySelector("#billing_state").value:e.address.admin_area_1,admin_area_2:document.querySelector("#billing_city")?document.querySelector("#billing_city").value:e.address.admin_area_2,postal_code:document.querySelector("#billing_postcode")?document.querySelector("#billing_postcode").value:e.address.postal_code}};return t&&(r.phone=t),r};var o=class{constructor(e,t){this.config=e,this.errorHandler=t}configuration(){return{createOrder:(e,t)=>{const r=s(),n=void 0!==this.config.bn_codes[this.config.context]?this.config.bn_codes[this.config.context]:"";return fetch(this.config.ajax.create_order.endpoint,{method:"POST",body:JSON.stringify({nonce:this.config.ajax.create_order.nonce,purchase_units:[],bn_code:n,payer:r,context:this.config.context})}).then((function(e){return e.json()})).then((function(e){if(!e.success)throw console.error(e),Error(e.data.message);return e.data.id}))},onApprove:a(this,this.errorHandler),onError:e=>{this.errorHandler.genericError()}}}};var i=class{constructor(e,t){this.gateway=e,this.renderer=t,this.actionHandler=null}init(){this.actionHandler=new o(PayPalCommerceGateway,new n(this.gateway.labels.error.generic)),this.render(),jQuery(document.body).on("wc_fragments_loaded wc_fragments_refreshed",()=>{this.render()})}shouldRender(){return null!==document.querySelector(this.gateway.button.mini_cart_wrapper)||null!==document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper)}render(){this.shouldRender()&&this.renderer.render(this.gateway.button.mini_cart_wrapper,this.gateway.hosted_fields.mini_cart_wrapper,this.actionHandler.configuration())}};var c=class{constructor(e,t,r){this.id=e,this.quantity=t,this.variations=r}data(){return{id:this.id,quantity:this.quantity,variations:this.variations}}};var d=class{constructor(e,t){this.endpoint=e,this.nonce=t}update(e,t){return new Promise((r,n)=>{fetch(this.endpoint,{method:"POST",body:JSON.stringify({nonce:this.nonce,products:t})}).then(e=>e.json()).then(t=>{if(!t.success)return void n(t.data);const a=e(t.data);r(a)})})}};var u=class{constructor(e,t,r){this.element=e,this.showCallback=t,this.hideCallback=r,this.observer=null}init(){const e=()=>{this.element.classList.contains("disabled")?this.hideCallback():this.showCallback()};this.observer=new MutationObserver(e),this.observer.observe(this.element,{attributes:!0}),e()}disconnect(){this.observer.disconnect()}};var l=class{constructor(e,t,r,n,a,s){this.config=e,this.updateCart=t,this.showButtonCallback=r,this.hideButtonCallback=n,this.formElement=a,this.errorHandler=s}configuration(){if(this.hasVariations()){new u(this.formElement.querySelector(".single_add_to_cart_button"),this.showButtonCallback,this.hideButtonCallback).init()}return{createOrder:this.createOrder(),onApprove:a(this,this.errorHandler),onError:e=>{this.errorHandler.genericError()}}}createOrder(){var e=null;e=this.isGroupedProduct()?()=>{const e=[];return this.formElement.querySelectorAll('input[type="number"]').forEach(t=>{if(!t.value)return;const r=t.getAttribute("name").match(/quantity\[([\d]*)\]/);if(2!==r.length)return;const n=parseInt(r[1]),a=parseInt(t.value);e.push(new c(n,a,null))}),e}:()=>{const e=document.querySelector('[name="add-to-cart"]').value,t=document.querySelector('[name="quantity"]').value,r=this.variations();return[new c(e,t,r)]};return(t,r)=>{this.errorHandler.clear();return this.updateCart.update(e=>{const t=s(),r=void 0!==this.config.bn_codes[this.config.context]?this.config.bn_codes[this.config.context]:"";return fetch(this.config.ajax.create_order.endpoint,{method:"POST",body:JSON.stringify({nonce:this.config.ajax.create_order.nonce,purchase_units:e,payer:t,bn_code:r,context:this.config.context})}).then((function(e){return e.json()})).then((function(e){if(!e.success)throw console.error(e),Error(e.data.message);return e.data.id}))},e())}}variations(){if(!this.hasVariations())return null;return[...this.formElement.querySelectorAll("[name^='attribute_']")].map(e=>({value:e.value,name:e.name}))}hasVariations(){return this.formElement.classList.contains("variations_form")}isGroupedProduct(){return this.formElement.classList.contains("grouped_form")}};var h=class{constructor(e,t,r){this.gateway=e,this.renderer=t,this.messages=r}init(){this.shouldRender()?this.render():this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)}shouldRender(){return null!==document.querySelector("form.cart")}render(){const e=new l(this.gateway,new d(this.gateway.ajax.change_cart.endpoint,this.gateway.ajax.change_cart.nonce),()=>{this.renderer.showButtons(this.gateway.button.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper);let e="0";document.querySelector("form.cart ins .woocommerce-Price-amount")?e=document.querySelector("form.cart ins .woocommerce-Price-amount").innerText:document.querySelector("form.cart .woocommerce-Price-amount")&&(e=document.querySelector("form.cart .woocommerce-Price-amount").innerText);const t=parseInt(e.replace(/([^\d,\.\s]*)/g,""));this.messages.renderWithAmount(t)},()=>{this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)},document.querySelector("form.cart"),new n(this.gateway.labels.error.generic));this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}};var p=class{constructor(e,t){this.gateway=e,this.renderer=t}init(){this.shouldRender()&&(this.render(),jQuery(document.body).on("updated_cart_totals updated_checkout",()=>{this.render()}))}shouldRender(){return null!==document.querySelector(this.gateway.button.wrapper)||null!==document.querySelector(this.gateway.hosted_fields.wrapper)}render(){const e=new o(PayPalCommerceGateway,new n(this.gateway.labels.error.generic));this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}};var m=(e,t,r)=>(n,a)=>(r.block(),fetch(e.config.ajax.approve_order.endpoint,{method:"POST",body:JSON.stringify({nonce:e.config.ajax.approve_order.nonce,order_id:n.orderID})}).then(e=>e.json()).then(e=>{if(r.unblock(),!e.success){if(100===e.data.code?t.message(e.data.message):t.genericError(),void 0!==a&&void 0!==a.restart)return a.restart();throw new Error(e.data.message)}document.querySelector("#place_order").click()}));var y=class{constructor(e,t,r){this.config=e,this.errorHandler=t,this.spinner=r}configuration(){const e=this.spinner;return{createOrder:(t,r)=>{const n=s(),a=void 0!==this.config.bn_codes[this.config.context]?this.config.bn_codes[this.config.context]:"",o=this.errorHandler,i="checkout"===this.config.context?"form.checkout":"form#order_review",c=jQuery(i).serialize();return fetch(this.config.ajax.create_order.endpoint,{method:"POST",body:JSON.stringify({nonce:this.config.ajax.create_order.nonce,payer:n,bn_code:a,context:this.config.context,order_id:this.config.order_id,form:c})}).then((function(e){return e.json()})).then((function(t){if(!t.success){if(e.unblock(),void 0!==t.messages){const e=new DOMParser;o.appendPreparedErrorMessageElement(e.parseFromString(t.messages,"text/html").querySelector("ul"))}else o.message(t.data.message,!0);return}const r=document.createElement("input");return r.setAttribute("type","hidden"),r.setAttribute("name","ppcp-resume-order"),r.setAttribute("value",t.data.purchase_units[0].custom_id),document.querySelector(i).append(r),t.data.id}))},onApprove:m(this,this.errorHandler,this.spinner),onCancel:()=>{e.unblock()},onError:()=>{this.errorHandler.genericError(),e.unblock()}}}};var g=class{constructor(e,t,r,n){this.gateway=e,this.renderer=t,this.messages=r,this.spinner=n}init(){this.render(),jQuery(document.body).on("updated_checkout",()=>{this.render()}),jQuery(document.body).on("updated_checkout payment_method_selected",()=>{this.switchBetweenPayPalandOrderButton(),this.displayPlaceOrderButtonForSavedCreditCards()}),jQuery("#saved-credit-card").on("change",()=>{this.displayPlaceOrderButtonForSavedCreditCards()}),this.switchBetweenPayPalandOrderButton(),this.displayPlaceOrderButtonForSavedCreditCards()}shouldRender(){return!document.querySelector(this.gateway.button.cancel_wrapper)&&(null!==document.querySelector(this.gateway.button.wrapper)||null!==document.querySelector(this.gateway.hosted_fields.wrapper))}render(){if(!this.shouldRender())return;document.querySelector(this.gateway.hosted_fields.wrapper+">div")&&document.querySelector(this.gateway.hosted_fields.wrapper+">div").setAttribute("style","");const e=new y(PayPalCommerceGateway,new n(this.gateway.labels.error.generic),this.spinner);this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}switchBetweenPayPalandOrderButton(){jQuery("#saved-credit-card").val(jQuery("#saved-credit-card option:first").val());const e=jQuery('input[name="payment_method"]:checked').val();"ppcp-gateway"!==e&&"ppcp-credit-card-gateway"!==e?(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper),jQuery("#place_order").show()):(jQuery("#place_order").hide(),"ppcp-gateway"===e&&(this.renderer.showButtons(this.gateway.button.wrapper),this.renderer.showButtons(this.gateway.messages.wrapper),this.messages.render(),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)),"ppcp-credit-card-gateway"===e&&(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper)))}displayPlaceOrderButtonForSavedCreditCards(){"ppcp-credit-card-gateway"===jQuery('input[name="payment_method"]:checked').val()&&(jQuery("#saved-credit-card").length&&""!==jQuery("#saved-credit-card").val()?(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper),jQuery("#place_order").show()):(jQuery("#place_order").hide(),this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper)))}};var w=class{constructor(e,t,r,n){this.gateway=e,this.renderer=t,this.messages=r,this.spinner=n}init(){this.render(),jQuery(document.body).on("updated_checkout",()=>{this.render()}),jQuery(document.body).on("updated_checkout payment_method_selected",()=>{this.switchBetweenPayPalandOrderButton()}),this.switchBetweenPayPalandOrderButton()}shouldRender(){return!document.querySelector(this.gateway.button.cancel_wrapper)&&(null!==document.querySelector(this.gateway.button.wrapper)||null!==document.querySelector(this.gateway.hosted_fields.wrapper))}render(){if(!this.shouldRender())return;document.querySelector(this.gateway.hosted_fields.wrapper+">div")&&document.querySelector(this.gateway.hosted_fields.wrapper+">div").setAttribute("style","");const e=new y(PayPalCommerceGateway,new n(this.gateway.labels.error.generic),this.spinner);this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}switchBetweenPayPalandOrderButton(){if(new URLSearchParams(window.location.search).has("change_payment_method"))return;const e=jQuery('input[name="payment_method"]:checked').val();"ppcp-gateway"!==e&&"ppcp-credit-card-gateway"!==e?(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper),jQuery("#place_order").show()):(jQuery("#place_order").hide(),"ppcp-gateway"===e&&(this.renderer.showButtons(this.gateway.button.wrapper),this.renderer.showButtons(this.gateway.messages.wrapper),this.messages.render(),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)),"ppcp-credit-card-gateway"===e&&(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper)))}};var f=class{constructor(e,t){this.defaultConfig=t,this.creditCardRenderer=e}render(e,t,r){this.renderButtons(e,r),this.creditCardRenderer.render(t,r)}renderButtons(e,t){if(!document.querySelector(e)||this.isAlreadyRendered(e)||void 0===paypal.Buttons)return;const r=e===this.defaultConfig.button.wrapper?this.defaultConfig.button.style:this.defaultConfig.button.mini_cart_style;paypal.Buttons({style:r,...t}).render(e)}isAlreadyRendered(e){return document.querySelector(e).hasChildNodes()}hideButtons(e){const t=document.querySelector(e);return!!t&&(t.style.display="none",!0)}showButtons(e){const t=document.querySelector(e);return!!t&&(t.style.display="block",!0)}};var _=e=>{const t=window.getComputedStyle(e),r=document.createElement("span");return r.setAttribute("id",e.id),Object.values(t).forEach(e=>{t[e]&&isNaN(e)&&r.style.setProperty(e,""+t[e])}),r};var b=class{constructor(e,t,r){this.defaultConfig=e,this.errorHandler=t,this.spinner=r,this.cardValid=!1}render(e,t){if("checkout"!==this.defaultConfig.context&&"pay-now"!==this.defaultConfig.context||null===e||null===document.querySelector(e))return;if(void 0===paypal.HostedFields||!paypal.HostedFields.isEligible()){const t=document.querySelector(e);return void t.parentNode.removeChild(t)}const r=document.querySelector(".payment_box.payment_method_ppcp-credit-card-gateway"),n=r.style.display;r.style.display="block";const a=document.querySelector("#ppcp-hide-dcc");a&&a.parentNode.removeChild(a);const s=document.querySelector("#ppcp-credit-card-gateway-card-number"),o=window.getComputedStyle(s);let i={};Object.values(o).forEach(e=>{o[e]&&(i[e]=""+o[e])});const c=_(s);s.parentNode.replaceChild(c,s);const d=document.querySelector("#ppcp-credit-card-gateway-card-expiry"),u=_(d);d.parentNode.replaceChild(u,d);const l=document.querySelector("#ppcp-credit-card-gateway-card-cvc"),h=_(l);l.parentNode.replaceChild(h,l),r.style.display=n;const p=".payment_box payment_method_ppcp-credit-card-gateway";this.defaultConfig.enforce_vault&&document.querySelector(p+" .ppcp-credit-card-vault")&&(document.querySelector(p+" .ppcp-credit-card-vault").checked=!0,document.querySelector(p+" .ppcp-credit-card-vault").setAttribute("disabled",!0)),paypal.HostedFields.render({createOrder:t.createOrder,styles:{input:i},fields:{number:{selector:"#ppcp-credit-card-gateway-card-number",placeholder:this.defaultConfig.hosted_fields.labels.credit_card_number},cvv:{selector:"#ppcp-credit-card-gateway-card-cvc",placeholder:this.defaultConfig.hosted_fields.labels.cvv},expirationDate:{selector:"#ppcp-credit-card-gateway-card-expiry",placeholder:this.defaultConfig.hosted_fields.labels.mm_yy}}}).then(r=>{const n=e=>{this.spinner.block(),e&&e.preventDefault(),this.errorHandler.clear();const n=r.getState();if(Object.keys(n.fields).every((function(e){return n.fields[e].isValid}))&&this.cardValid){const e=!!this.defaultConfig.save_card,n=document.getElementById("ppcp-credit-card-vault")?document.getElementById("ppcp-credit-card-vault").checked:e;r.submit({contingencies:["3D_SECURE"],vault:n}).then(e=>(e.orderID=e.orderId,this.spinner.unblock(),t.onApprove(e))).catch(()=>{this.errorHandler.genericError(),this.spinner.unblock()})}else{this.spinner.unblock();const e=this.cardValid?this.defaultConfig.hosted_fields.labels.fields_not_valid:this.defaultConfig.hosted_fields.labels.card_not_supported;this.errorHandler.message(e)}};r.on("inputSubmitRequest",(function(){n(null)})),r.on("cardTypeChange",e=>{if(!e.cards.length)return void(this.cardValid=!1);const t=this.defaultConfig.hosted_fields.valid_cards;this.cardValid=-1!==t.indexOf(e.cards[0].type)}),document.querySelector(e+" button").addEventListener("click",n)}),document.querySelector("#payment_method_ppcp-credit-card-gateway").addEventListener("click",()=>{document.querySelector("label[for=ppcp-credit-card-gateway-card-number]").click()})}};const v=(e,t)=>{if(!e)return!1;if(e.user!==t)return!1;return!((new Date).getTime()>=1e3*e.expiration)};var S=(e,t)=>{fetch(t.endpoint,{method:"POST",body:JSON.stringify({nonce:t.nonce})}).then(e=>e.json()).then(r=>{var n;v(r,t.user)&&(n=r,sessionStorage.setItem("ppcp-data-client-id",JSON.stringify(n)),e.setAttribute("data-client-token",r.token),document.body.append(e))})};var q=class{constructor(e){this.config=e}render(){this.shouldRender()&&paypal.Messages({amount:this.config.amount,placement:this.config.placement,style:this.config.style}).render(this.config.wrapper)}renderWithAmount(e){if(!this.shouldRender())return;const t=document.createElement("div");t.setAttribute("id",this.config.wrapper.replace("#",""));const r=document.querySelector(this.config.wrapper).nextSibling;document.querySelector(this.config.wrapper).parentElement.removeChild(document.querySelector(this.config.wrapper)),r.parentElement.insertBefore(t,r),paypal.Messages({amount:e,placement:this.config.placement,style:this.config.style}).render(this.config.wrapper)}shouldRender(){return void 0!==paypal.Messages&&void 0!==this.config.wrapper&&!!document.querySelector(this.config.wrapper)}};var P=class{constructor(){this.target="form.woocommerce-checkout"}setTarget(e){this.target=e}block(){jQuery(this.target).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}unblock(){jQuery(this.target).unblock()}};document.addEventListener("DOMContentLoaded",()=>{const e=document.createElement("script");e.addEventListener("load",e=>{(()=>{const e=new n(PayPalCommerceGateway.labels.error.generic),t=new P,r=new b(PayPalCommerceGateway,e,t),a=new f(r,PayPalCommerceGateway),s=new q(PayPalCommerceGateway.messages),o=PayPalCommerceGateway.context;if("mini-cart"===o||"product"===o){new i(PayPalCommerceGateway,a).init()}if("product"===o){new h(PayPalCommerceGateway,a,s).init()}if("cart"===o){new p(PayPalCommerceGateway,a).init()}if("checkout"===o){new g(PayPalCommerceGateway,a,s,t).init()}if("pay-now"===o){new w(PayPalCommerceGateway,a,s,t).init()}"checkout"!==o&&s.render()})()}),e.setAttribute("src",PayPalCommerceGateway.button.url),Object.entries(PayPalCommerceGateway.script_attributes).forEach(t=>{e.setAttribute(t[0],t[1])}),PayPalCommerceGateway.data_client_id.set_attribute?S(e,PayPalCommerceGateway.data_client_id):document.body.append(e)})}]);
|
2 |
//# sourceMappingURL=button.js.map
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([,function(e,t,r){"use strict";r.r(t);var n=class{constructor(e){this.genericErrorText=e,this.wrapper=document.querySelector(".woocommerce-notices-wrapper"),this.messagesList=document.querySelector("ul.woocommerce-error")}genericError(){this.wrapper.classList.contains("ppcp-persist")||(this.clear(),this.message(this.genericErrorText))}appendPreparedErrorMessageElement(e){null===this.messagesList&&this.prepareMessagesList(),this.messagesList.replaceWith(e)}message(e,t=!1){if(0===e.length)throw new Error("A new message text must be a non-empty string.");null===this.messagesList&&this.prepareMessagesList(),t?this.wrapper.classList.add("ppcp-persist"):this.wrapper.classList.remove("ppcp-persist");let r=this.prepareMessagesListItem(e);this.messagesList.appendChild(r),jQuery.scroll_to_notices(jQuery(".woocommerce-notices-wrapper"))}prepareMessagesList(){null===this.messagesList&&(this.messagesList=document.createElement("ul"),this.messagesList.setAttribute("class","woocommerce-error"),this.messagesList.setAttribute("role","alert"),this.wrapper.appendChild(this.messagesList))}prepareMessagesListItem(e){const t=document.createElement("li");return t.innerHTML=e,t}sanitize(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value.replace("Error: ","")}clear(){this.wrapper.classList.contains("woocommerce-error")&&(this.wrapper.classList.remove("woocommerce-error"),this.wrapper.innerText="")}};var a=(e,t)=>(r,n)=>fetch(e.config.ajax.approve_order.endpoint,{method:"POST",body:JSON.stringify({nonce:e.config.ajax.approve_order.nonce,order_id:r.orderID})}).then(e=>e.json()).then(r=>{if(!r.success)return t.genericError(),n.restart().catch(e=>{t.genericError()});location.href=e.config.redirect});const s=()=>{const e=PayPalCommerceGateway.payer;if(!e)return null;const t=document.querySelector("#billing_phone")||void 0!==e.phone?{phone_type:"HOME",phone_number:{national_number:document.querySelector("#billing_phone")?document.querySelector("#billing_phone").value:e.phone.phone_number.national_number}}:null,r={email_address:document.querySelector("#billing_email")?document.querySelector("#billing_email").value:e.email_address,name:{surname:document.querySelector("#billing_last_name")?document.querySelector("#billing_last_name").value:e.name.surname,given_name:document.querySelector("#billing_first_name")?document.querySelector("#billing_first_name").value:e.name.given_name},address:{country_code:document.querySelector("#billing_country")?document.querySelector("#billing_country").value:e.address.country_code,address_line_1:document.querySelector("#billing_address_1")?document.querySelector("#billing_address_1").value:e.address.address_line_1,address_line_2:document.querySelector("#billing_address_2")?document.querySelector("#billing_address_2").value:e.address.address_line_2,admin_area_1:document.querySelector("#billing_state")?document.querySelector("#billing_state").value:e.address.admin_area_1,admin_area_2:document.querySelector("#billing_city")?document.querySelector("#billing_city").value:e.address.admin_area_2,postal_code:document.querySelector("#billing_postcode")?document.querySelector("#billing_postcode").value:e.address.postal_code}};return t&&(r.phone=t),r};var o=class{constructor(e,t){this.config=e,this.errorHandler=t}configuration(){return{createOrder:(e,t)=>{const r=s(),n=void 0!==this.config.bn_codes[this.config.context]?this.config.bn_codes[this.config.context]:"";return fetch(this.config.ajax.create_order.endpoint,{method:"POST",body:JSON.stringify({nonce:this.config.ajax.create_order.nonce,purchase_units:[],bn_code:n,payer:r,context:this.config.context})}).then((function(e){return e.json()})).then((function(e){if(!e.success)throw console.error(e),Error(e.data.message);return e.data.id}))},onApprove:a(this,this.errorHandler),onError:e=>{this.errorHandler.genericError()}}}};var i=class{constructor(e,t){this.gateway=e,this.renderer=t,this.actionHandler=null}init(){this.actionHandler=new o(PayPalCommerceGateway,new n(this.gateway.labels.error.generic)),this.render(),jQuery(document.body).on("wc_fragments_loaded wc_fragments_refreshed",()=>{this.render()})}shouldRender(){return null!==document.querySelector(this.gateway.button.mini_cart_wrapper)||null!==document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper)}render(){this.shouldRender()&&this.renderer.render(this.gateway.button.mini_cart_wrapper,this.gateway.hosted_fields.mini_cart_wrapper,this.actionHandler.configuration())}};var c=class{constructor(e,t,r){this.id=e,this.quantity=t,this.variations=r}data(){return{id:this.id,quantity:this.quantity,variations:this.variations}}};var d=class{constructor(e,t){this.endpoint=e,this.nonce=t}update(e,t){return new Promise((r,n)=>{fetch(this.endpoint,{method:"POST",body:JSON.stringify({nonce:this.nonce,products:t})}).then(e=>e.json()).then(t=>{if(!t.success)return void n(t.data);const a=e(t.data);r(a)})})}};var l=class{constructor(e,t,r){this.element=e,this.showCallback=t,this.hideCallback=r,this.observer=null}init(){const e=()=>{this.element.classList.contains("disabled")?this.hideCallback():this.showCallback()};this.observer=new MutationObserver(e),this.observer.observe(this.element,{attributes:!0}),e()}disconnect(){this.observer.disconnect()}};var u=class{constructor(e,t,r,n,a,s){this.config=e,this.updateCart=t,this.showButtonCallback=r,this.hideButtonCallback=n,this.formElement=a,this.errorHandler=s}configuration(){if(this.hasVariations()){new l(this.formElement.querySelector(".single_add_to_cart_button"),this.showButtonCallback,this.hideButtonCallback).init()}return{createOrder:this.createOrder(),onApprove:a(this,this.errorHandler),onError:e=>{this.errorHandler.genericError()}}}createOrder(){var e=null;e=this.isGroupedProduct()?()=>{const e=[];return this.formElement.querySelectorAll('input[type="number"]').forEach(t=>{if(!t.value)return;const r=t.getAttribute("name").match(/quantity\[([\d]*)\]/);if(2!==r.length)return;const n=parseInt(r[1]),a=parseInt(t.value);e.push(new c(n,a,null))}),e}:()=>{const e=document.querySelector('[name="add-to-cart"]').value,t=document.querySelector('[name="quantity"]').value,r=this.variations();return[new c(e,t,r)]};return(t,r)=>{this.errorHandler.clear();return this.updateCart.update(e=>{const t=s(),r=void 0!==this.config.bn_codes[this.config.context]?this.config.bn_codes[this.config.context]:"";return fetch(this.config.ajax.create_order.endpoint,{method:"POST",body:JSON.stringify({nonce:this.config.ajax.create_order.nonce,purchase_units:e,payer:t,bn_code:r,context:this.config.context})}).then((function(e){return e.json()})).then((function(e){if(!e.success)throw console.error(e),Error(e.data.message);return e.data.id}))},e())}}variations(){if(!this.hasVariations())return null;return[...this.formElement.querySelectorAll("[name^='attribute_']")].map(e=>({value:e.value,name:e.name}))}hasVariations(){return this.formElement.classList.contains("variations_form")}isGroupedProduct(){return this.formElement.classList.contains("grouped_form")}};var h=class{constructor(e,t,r){this.gateway=e,this.renderer=t,this.messages=r}init(){this.shouldRender()?this.render():this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)}shouldRender(){return null!==document.querySelector("form.cart")}render(){const e=new u(this.gateway,new d(this.gateway.ajax.change_cart.endpoint,this.gateway.ajax.change_cart.nonce),()=>{this.renderer.showButtons(this.gateway.button.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper);let e="0";document.querySelector("form.cart ins .woocommerce-Price-amount")?e=document.querySelector("form.cart ins .woocommerce-Price-amount").innerText:document.querySelector("form.cart .woocommerce-Price-amount")&&(e=document.querySelector("form.cart .woocommerce-Price-amount").innerText);const t=parseInt(e.replace(/([^\d,\.\s]*)/g,""));this.messages.renderWithAmount(t)},()=>{this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)},document.querySelector("form.cart"),new n(this.gateway.labels.error.generic));this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}};var p=class{constructor(e,t){this.gateway=e,this.renderer=t}init(){this.shouldRender()&&(this.render(),jQuery(document.body).on("updated_cart_totals updated_checkout",()=>{this.render()}))}shouldRender(){return null!==document.querySelector(this.gateway.button.wrapper)||null!==document.querySelector(this.gateway.hosted_fields.wrapper)}render(){const e=new o(PayPalCommerceGateway,new n(this.gateway.labels.error.generic));this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}};var m=(e,t,r)=>(n,a)=>(r.block(),fetch(e.config.ajax.approve_order.endpoint,{method:"POST",body:JSON.stringify({nonce:e.config.ajax.approve_order.nonce,order_id:n.orderID})}).then(e=>e.json()).then(e=>{if(r.unblock(),!e.success){if(100===e.data.code?t.message(e.data.message):t.genericError(),void 0!==a&&void 0!==a.restart)return a.restart();throw new Error(e.data.message)}document.querySelector("#place_order").click()}));var y=class{constructor(e,t,r){this.config=e,this.errorHandler=t,this.spinner=r}configuration(){const e=this.spinner;return{createOrder:(t,r)=>{const n=s(),a=void 0!==this.config.bn_codes[this.config.context]?this.config.bn_codes[this.config.context]:"",o=this.errorHandler,i="checkout"===this.config.context?"form.checkout":"form#order_review",c=jQuery(i).serialize(),d=!!jQuery("#createaccount").is(":checked");return fetch(this.config.ajax.create_order.endpoint,{method:"POST",body:JSON.stringify({nonce:this.config.ajax.create_order.nonce,payer:n,bn_code:a,context:this.config.context,order_id:this.config.order_id,form:c,createaccount:d})}).then((function(e){return e.json()})).then((function(t){if(!t.success){if(e.unblock(),void 0!==t.messages){const e=new DOMParser;o.appendPreparedErrorMessageElement(e.parseFromString(t.messages,"text/html").querySelector("ul"))}else o.message(t.data.message,!0);return}const r=document.createElement("input");return r.setAttribute("type","hidden"),r.setAttribute("name","ppcp-resume-order"),r.setAttribute("value",t.data.purchase_units[0].custom_id),document.querySelector(i).append(r),t.data.id}))},onApprove:m(this,this.errorHandler,this.spinner),onCancel:()=>{e.unblock()},onError:()=>{this.errorHandler.genericError(),e.unblock()}}}};var g=class{constructor(e,t,r,n){this.gateway=e,this.renderer=t,this.messages=r,this.spinner=n}init(){this.render(),jQuery(document.body).on("updated_checkout",()=>{this.render()}),jQuery(document.body).on("updated_checkout payment_method_selected",()=>{this.switchBetweenPayPalandOrderButton(),this.displayPlaceOrderButtonForSavedCreditCards()}),jQuery("#saved-credit-card").on("change",()=>{this.displayPlaceOrderButtonForSavedCreditCards()}),this.switchBetweenPayPalandOrderButton(),this.displayPlaceOrderButtonForSavedCreditCards()}shouldRender(){return!document.querySelector(this.gateway.button.cancel_wrapper)&&(null!==document.querySelector(this.gateway.button.wrapper)||null!==document.querySelector(this.gateway.hosted_fields.wrapper))}render(){if(!this.shouldRender())return;document.querySelector(this.gateway.hosted_fields.wrapper+">div")&&document.querySelector(this.gateway.hosted_fields.wrapper+">div").setAttribute("style","");const e=new y(PayPalCommerceGateway,new n(this.gateway.labels.error.generic),this.spinner);this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}switchBetweenPayPalandOrderButton(){jQuery("#saved-credit-card").val(jQuery("#saved-credit-card option:first").val());const e=jQuery('input[name="payment_method"]:checked').val();"ppcp-gateway"!==e&&"ppcp-credit-card-gateway"!==e?(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper),jQuery("#place_order").show()):(jQuery("#place_order").hide(),"ppcp-gateway"===e&&(this.renderer.showButtons(this.gateway.button.wrapper),this.renderer.showButtons(this.gateway.messages.wrapper),this.messages.render(),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)),"ppcp-credit-card-gateway"===e&&(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper)))}displayPlaceOrderButtonForSavedCreditCards(){"ppcp-credit-card-gateway"===jQuery('input[name="payment_method"]:checked').val()&&(jQuery("#saved-credit-card").length&&""!==jQuery("#saved-credit-card").val()?(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper),jQuery("#place_order").show()):(jQuery("#place_order").hide(),this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper)))}};var w=class{constructor(e,t,r,n){this.gateway=e,this.renderer=t,this.messages=r,this.spinner=n}init(){this.render(),jQuery(document.body).on("updated_checkout",()=>{this.render()}),jQuery(document.body).on("updated_checkout payment_method_selected",()=>{this.switchBetweenPayPalandOrderButton()}),this.switchBetweenPayPalandOrderButton()}shouldRender(){return!document.querySelector(this.gateway.button.cancel_wrapper)&&(null!==document.querySelector(this.gateway.button.wrapper)||null!==document.querySelector(this.gateway.hosted_fields.wrapper))}render(){if(!this.shouldRender())return;document.querySelector(this.gateway.hosted_fields.wrapper+">div")&&document.querySelector(this.gateway.hosted_fields.wrapper+">div").setAttribute("style","");const e=new y(PayPalCommerceGateway,new n(this.gateway.labels.error.generic),this.spinner);this.renderer.render(this.gateway.button.wrapper,this.gateway.hosted_fields.wrapper,e.configuration())}switchBetweenPayPalandOrderButton(){if(new URLSearchParams(window.location.search).has("change_payment_method"))return;const e=jQuery('input[name="payment_method"]:checked').val();"ppcp-gateway"!==e&&"ppcp-credit-card-gateway"!==e?(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper),jQuery("#place_order").show()):(jQuery("#place_order").hide(),"ppcp-gateway"===e&&(this.renderer.showButtons(this.gateway.button.wrapper),this.renderer.showButtons(this.gateway.messages.wrapper),this.messages.render(),this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)),"ppcp-credit-card-gateway"===e&&(this.renderer.hideButtons(this.gateway.button.wrapper),this.renderer.hideButtons(this.gateway.messages.wrapper),this.renderer.showButtons(this.gateway.hosted_fields.wrapper)))}};var f=class{constructor(e,t){this.defaultConfig=t,this.creditCardRenderer=e}render(e,t,r){this.renderButtons(e,r),this.creditCardRenderer.render(t,r)}renderButtons(e,t){if(!document.querySelector(e)||this.isAlreadyRendered(e)||void 0===paypal.Buttons)return;const r=e===this.defaultConfig.button.wrapper?this.defaultConfig.button.style:this.defaultConfig.button.mini_cart_style;paypal.Buttons({style:r,...t}).render(e)}isAlreadyRendered(e){return document.querySelector(e).hasChildNodes()}hideButtons(e){const t=document.querySelector(e);return!!t&&(t.style.display="none",!0)}showButtons(e){const t=document.querySelector(e);return!!t&&(t.style.display="block",!0)}};var _=e=>{const t=window.getComputedStyle(e),r=document.createElement("span");return r.setAttribute("id",e.id),Object.values(t).forEach(e=>{t[e]&&isNaN(e)&&r.style.setProperty(e,""+t[e])}),r};var b=class{constructor(e,t,r){this.defaultConfig=e,this.errorHandler=t,this.spinner=r,this.cardValid=!1,this.formValid=!1}render(e,t){if("checkout"!==this.defaultConfig.context&&"pay-now"!==this.defaultConfig.context||null===e||null===document.querySelector(e))return;if(void 0===paypal.HostedFields||!paypal.HostedFields.isEligible()){const t=document.querySelector(e);return void t.parentNode.removeChild(t)}const r=document.querySelector(".payment_box.payment_method_ppcp-credit-card-gateway"),n=r.style.display;r.style.display="block";const a=document.querySelector("#ppcp-hide-dcc");a&&a.parentNode.removeChild(a);const s=document.querySelector("#ppcp-credit-card-gateway-card-number"),o=window.getComputedStyle(s);let i={};Object.values(o).forEach(e=>{o[e]&&(i[e]=""+o[e])});const c=_(s);s.parentNode.replaceChild(c,s);const d=document.querySelector("#ppcp-credit-card-gateway-card-expiry"),l=_(d);d.parentNode.replaceChild(l,d);const u=document.querySelector("#ppcp-credit-card-gateway-card-cvc"),h=_(u);u.parentNode.replaceChild(h,u),r.style.display=n;const p=".payment_box payment_method_ppcp-credit-card-gateway";this.defaultConfig.enforce_vault&&document.querySelector(p+" .ppcp-credit-card-vault")&&(document.querySelector(p+" .ppcp-credit-card-vault").checked=!0,document.querySelector(p+" .ppcp-credit-card-vault").setAttribute("disabled",!0)),paypal.HostedFields.render({createOrder:t.createOrder,styles:{input:i},fields:{number:{selector:"#ppcp-credit-card-gateway-card-number",placeholder:this.defaultConfig.hosted_fields.labels.credit_card_number},cvv:{selector:"#ppcp-credit-card-gateway-card-cvc",placeholder:this.defaultConfig.hosted_fields.labels.cvv},expirationDate:{selector:"#ppcp-credit-card-gateway-card-expiry",placeholder:this.defaultConfig.hosted_fields.labels.mm_yy}}}).then(r=>{const n=e=>{if(this.spinner.block(),e&&e.preventDefault(),this.errorHandler.clear(),this.formValid&&this.cardValid){const e=!!this.defaultConfig.save_card,n=document.getElementById("ppcp-credit-card-vault")?document.getElementById("ppcp-credit-card-vault").checked:e;r.submit({contingencies:["3D_SECURE"],vault:n}).then(e=>(e.orderID=e.orderId,this.spinner.unblock(),t.onApprove(e))).catch(()=>{this.errorHandler.genericError(),this.spinner.unblock()})}else{this.spinner.unblock();const e=this.cardValid?this.defaultConfig.hosted_fields.labels.fields_not_valid:this.defaultConfig.hosted_fields.labels.card_not_supported;this.errorHandler.message(e)}};r.on("inputSubmitRequest",(function(){n(null)})),r.on("cardTypeChange",e=>{if(!e.cards.length)return void(this.cardValid=!1);const t=this.defaultConfig.hosted_fields.valid_cards;this.cardValid=-1!==t.indexOf(e.cards[0].type)}),r.on("validityChange",e=>{const t=Object.keys(e.fields).every((function(t){return e.fields[t].isValid}));this.formValid=t}),document.querySelector(e+" button").addEventListener("click",n)}),document.querySelector("#payment_method_ppcp-credit-card-gateway").addEventListener("click",()=>{document.querySelector("label[for=ppcp-credit-card-gateway-card-number]").click()})}};const v=(e,t)=>{if(!e)return!1;if(e.user!==t)return!1;return!((new Date).getTime()>=1e3*e.expiration)};var S=(e,t)=>{fetch(t.endpoint,{method:"POST",body:JSON.stringify({nonce:t.nonce})}).then(e=>e.json()).then(r=>{var n;v(r,t.user)&&(n=r,sessionStorage.setItem("ppcp-data-client-id",JSON.stringify(n)),e.setAttribute("data-client-token",r.token),document.body.append(e))})};var P=class{constructor(e){this.config=e}render(){this.shouldRender()&&paypal.Messages({amount:this.config.amount,placement:this.config.placement,style:this.config.style}).render(this.config.wrapper)}renderWithAmount(e){if(!this.shouldRender())return;const t=document.createElement("div");t.setAttribute("id",this.config.wrapper.replace("#",""));const r=document.querySelector(this.config.wrapper).nextSibling;document.querySelector(this.config.wrapper).parentElement.removeChild(document.querySelector(this.config.wrapper)),r.parentElement.insertBefore(t,r),paypal.Messages({amount:e,placement:this.config.placement,style:this.config.style}).render(this.config.wrapper)}shouldRender(){return void 0!==paypal.Messages&&void 0!==this.config.wrapper&&!!document.querySelector(this.config.wrapper)}};var q=class{constructor(){this.target="form.woocommerce-checkout"}setTarget(e){this.target=e}block(){jQuery(this.target).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}unblock(){jQuery(this.target).unblock()}};document.addEventListener("DOMContentLoaded",()=>{const e=document.createElement("script");e.addEventListener("load",e=>{(()=>{const e=new n(PayPalCommerceGateway.labels.error.generic),t=new q,r=new b(PayPalCommerceGateway,e,t),a=new f(r,PayPalCommerceGateway),s=new P(PayPalCommerceGateway.messages),o=PayPalCommerceGateway.context;if(("mini-cart"===o||"product"===o)&&"1"===PayPalCommerceGateway.mini_cart_buttons_enabled){new i(PayPalCommerceGateway,a).init()}if("product"===o&&"1"===PayPalCommerceGateway.single_product_buttons_enabled){new h(PayPalCommerceGateway,a,s).init()}if("cart"===o){new p(PayPalCommerceGateway,a).init()}if("checkout"===o){new g(PayPalCommerceGateway,a,s,t).init()}if("pay-now"===o){new w(PayPalCommerceGateway,a,s,t).init()}"checkout"!==o&&s.render()})()}),e.setAttribute("src",PayPalCommerceGateway.button.url),Object.entries(PayPalCommerceGateway.script_attributes).forEach(t=>{e.setAttribute(t[0],t[1])}),PayPalCommerceGateway.data_client_id.set_attribute?S(e,PayPalCommerceGateway.data_client_id):document.body.append(e)})}]);
|
2 |
//# sourceMappingURL=button.js.map
|
modules/ppcp-button/assets/js/button.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./resources/js/modules/ErrorHandler.js","webpack:///./resources/js/modules/OnApproveHandler/onApproveForContinue.js","webpack:///./resources/js/modules/Helper/PayerData.js","webpack:///./resources/js/modules/ActionHandler/CartActionHandler.js","webpack:///./resources/js/modules/ContextBootstrap/MiniCartBootstap.js","webpack:///./resources/js/modules/Entity/Product.js","webpack:///./resources/js/modules/Helper/UpdateCart.js","webpack:///./resources/js/modules/Helper/ButtonsToggleListener.js","webpack:///./resources/js/modules/ActionHandler/SingleProductActionHandler.js","webpack:///./resources/js/modules/ContextBootstrap/SingleProductBootstap.js","webpack:///./resources/js/modules/ContextBootstrap/CartBootstap.js","webpack:///./resources/js/modules/OnApproveHandler/onApproveForPayNow.js","webpack:///./resources/js/modules/ActionHandler/CheckoutActionHandler.js","webpack:///./resources/js/modules/ContextBootstrap/CheckoutBootstap.js","webpack:///./resources/js/modules/ContextBootstrap/PayNowBootstrap.js","webpack:///./resources/js/modules/Renderer/Renderer.js","webpack:///./resources/js/modules/Helper/DccInputFactory.js","webpack:///./resources/js/modules/Renderer/CreditCardRenderer.js","webpack:///./resources/js/modules/DataClientIdAttributeHandler.js","webpack:///./resources/js/modules/Renderer/MessageRenderer.js","webpack:///./resources/js/modules/Helper/Spinner.js","webpack:///./resources/js/button.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","ErrorHandler","constructor","genericErrorText","this","wrapper","document","querySelector","messagesList","genericError","classList","contains","clear","message","appendPreparedErrorMessageElement","errorMessageElement","prepareMessagesList","replaceWith","text","persist","length","Error","add","remove","messageNode","prepareMessagesListItem","appendChild","jQuery","scroll_to_notices","createElement","setAttribute","li","innerHTML","sanitize","textarea","replace","innerText","onApprove","context","errorHandler","data","actions","fetch","config","ajax","approve_order","endpoint","method","body","JSON","stringify","nonce","order_id","orderID","then","res","json","success","restart","catch","err","location","href","redirect","payerData","payer","PayPalCommerceGateway","phone","phone_type","phone_number","national_number","email_address","surname","given_name","address","country_code","address_line_1","address_line_2","admin_area_1","admin_area_2","postal_code","CartActionHandler","configuration","createOrder","bnCode","bn_codes","create_order","purchase_units","bn_code","console","error","id","onError","MiniCartBootstap","gateway","renderer","actionHandler","init","labels","generic","render","on","shouldRender","button","mini_cart_wrapper","hosted_fields","Product","quantity","variations","UpdateCart","update","onResolve","products","Promise","resolve","reject","result","resolved","ButtonsToggleListener","element","showCallback","hideCallback","observer","callback","MutationObserver","observe","attributes","disconnect","SingleProductActionHandler","updateCart","showButtonCallback","hideButtonCallback","formElement","hasVariations","getProducts","isGroupedProduct","querySelectorAll","forEach","elementName","getAttribute","match","parseInt","push","qty","map","SingleProductBootstap","messages","hideButtons","change_cart","showButtons","priceText","amount","renderWithAmount","CartBootstrap","spinner","block","unblock","code","click","CheckoutActionHandler","formSelector","formValues","serialize","form","domParser","DOMParser","parseFromString","input","custom_id","append","onCancel","CheckoutBootstap","switchBetweenPayPalandOrderButton","displayPlaceOrderButtonForSavedCreditCards","cancel_wrapper","val","currentPaymentMethod","show","hide","PayNowBootstrap","URLSearchParams","window","search","has","Renderer","creditCardRenderer","defaultConfig","hostedFieldsWrapper","contextConfig","renderButtons","isAlreadyRendered","paypal","Buttons","style","mini_cart_style","hasChildNodes","domElement","display","dccInputFactory","original","styles","getComputedStyle","newElement","values","prop","isNaN","setProperty","CreditCardRenderer","cardValid","HostedFields","isEligible","wrapperElement","parentNode","removeChild","gateWayBox","oldDisplayStyle","hideDccGateway","cardNumberField","stylesRaw","cardNumber","replaceChild","cardExpiryField","cardExpiry","cardCodeField","cardCode","formWrapper","enforce_vault","checked","fields","number","selector","placeholder","credit_card_number","cvv","expirationDate","mm_yy","hostedFields","submitEvent","event","preventDefault","state","getState","keys","every","isValid","save_card","vault","getElementById","submit","contingencies","payload","orderId","fields_not_valid","card_not_supported","cards","validCards","valid_cards","indexOf","type","addEventListener","validateToken","token","user","Date","getTime","expiration","dataClientIdAttributeHandler","script","sessionStorage","setItem","MessageRenderer","Messages","placement","newWrapper","sibling","nextSibling","parentElement","insertBefore","Spinner","target","setTarget","overlayCSS","background","opacity","messageRenderer","bootstrap","url","entries","script_attributes","keyValue","data_client_id","set_attribute"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OA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BzG,sBACA6B,EACA6L,EACAlI,GAGazD,OAGrB,GAAgB,YAAZ3D,EAAwB,CACA,IAAI6I,EACxBjH,sBACA6B,EACA6L,EACAlI,GAEYzD,OAGJ,aAAZ3D,GACAsP,EAAgBxL,UAaZyL,KAEJlB,EAAO7O,aAAa,MAAOoC,sBAAsBqC,OAAOuL,KACxDnT,OAAOoT,QAAQ7N,sBAAsB8N,mBAAmBvJ,QACnDwJ,IACGtB,EAAO7O,aAAamQ,EAAS,GAAIA,EAAS,MAI9C/N,sBAAsBgO,eAAeC,cACrCzB,EAA6BC,EAAQzM,sBAAsBgO,gBAI/D5R,SAAS0C,KAAKyH,OAAOkG","file":"js/button.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","class ErrorHandler {\n\n constructor(genericErrorText)\n {\n this.genericErrorText = genericErrorText;\n this.wrapper = document.querySelector('.woocommerce-notices-wrapper');\n this.messagesList = document.querySelector('ul.woocommerce-error');\n }\n\n genericError() {\n if (this.wrapper.classList.contains('ppcp-persist')) {\n return;\n }\n this.clear();\n this.message(this.genericErrorText)\n }\n\n appendPreparedErrorMessageElement(errorMessageElement)\n {\n if(this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n this.messagesList.replaceWith(errorMessageElement);\n }\n\n message(text, persist = false)\n {\n if(! typeof String || text.length === 0){\n throw new Error('A new message text must be a non-empty string.');\n }\n\n if(this.messagesList === null){\n this.prepareMessagesList();\n }\n\n if (persist) {\n this.wrapper.classList.add('ppcp-persist');\n } else {\n this.wrapper.classList.remove('ppcp-persist');\n }\n\n let messageNode = this.prepareMessagesListItem(text);\n this.messagesList.appendChild(messageNode);\n\n jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'))\n }\n\n prepareMessagesList()\n {\n if(this.messagesList === null){\n this.messagesList = document.createElement('ul');\n this.messagesList.setAttribute('class', 'woocommerce-error');\n this.messagesList.setAttribute('role', 'alert');\n this.wrapper.appendChild(this.messagesList);\n }\n }\n\n prepareMessagesListItem(message)\n {\n const li = document.createElement('li');\n li.innerHTML = message;\n\n return li;\n }\n\n sanitize(text)\n {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = text;\n return textarea.value.replace('Error: ', '');\n }\n\n clear()\n {\n if (! this.wrapper.classList.contains('woocommerce-error')) {\n return;\n }\n this.wrapper.classList.remove('woocommerce-error');\n this.wrapper.innerText = '';\n }\n}\n\nexport default ErrorHandler;\n","const onApprove = (context, errorHandler) => {\n return (data, actions) => {\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id:data.orderID\n })\n }).then((res)=>{\n return res.json();\n }).then((data)=>{\n if (!data.success) {\n errorHandler.genericError();\n return actions.restart().catch(err => {\n errorHandler.genericError();\n });;\n }\n location.href = context.config.redirect;\n });\n\n }\n}\n\nexport default onApprove;\n","export const payerData = () => {\n const payer = PayPalCommerceGateway.payer;\n if (! payer) {\n return null;\n }\n\n const phone = (document.querySelector('#billing_phone') || typeof payer.phone !== 'undefined') ?\n {\n phone_type:\"HOME\",\n phone_number:{\n national_number : (document.querySelector('#billing_phone')) ? document.querySelector('#billing_phone').value : payer.phone.phone_number.national_number\n }\n } : null;\n const payerData = {\n email_address:(document.querySelector('#billing_email')) ? document.querySelector('#billing_email').value : payer.email_address,\n name : {\n surname: (document.querySelector('#billing_last_name')) ? document.querySelector('#billing_last_name').value : payer.name.surname,\n given_name: (document.querySelector('#billing_first_name')) ? document.querySelector('#billing_first_name').value : payer.name.given_name\n },\n address : {\n country_code : (document.querySelector('#billing_country')) ? document.querySelector('#billing_country').value : payer.address.country_code,\n address_line_1 : (document.querySelector('#billing_address_1')) ? document.querySelector('#billing_address_1').value : payer.address.address_line_1,\n address_line_2 : (document.querySelector('#billing_address_2')) ? document.querySelector('#billing_address_2').value : payer.address.address_line_2,\n admin_area_1 : (document.querySelector('#billing_state')) ? document.querySelector('#billing_state').value : payer.address.admin_area_1,\n admin_area_2 : (document.querySelector('#billing_city')) ? document.querySelector('#billing_city').value : payer.address.admin_area_2,\n postal_code : (document.querySelector('#billing_postcode')) ? document.querySelector('#billing_postcode').value : payer.address.postal_code\n }\n };\n\n if (phone) {\n payerData.phone = phone;\n }\n return payerData;\n}\n","import onApprove from '../OnApproveHandler/onApproveForContinue.js';\nimport {payerData} from \"../Helper/PayerData\";\n\nclass CartActionHandler {\n\n constructor(config, errorHandler) {\n this.config = config;\n this.errorHandler = errorHandler;\n }\n\n configuration() {\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ?\n this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units: [],\n bn_code:bnCode,\n payer,\n context:this.config.context\n }),\n }).then(function(res) {\n return res.json();\n }).then(function(data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApprove(this, this.errorHandler),\n onError: (error) => {\n this.errorHandler.genericError();\n }\n };\n }\n}\n\nexport default CartActionHandler;\n","import ErrorHandler from '../ErrorHandler';\nimport CartActionHandler from '../ActionHandler/CartActionHandler';\n\nclass MiniCartBootstap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.actionHandler = null;\n }\n\n init() {\n\n this.actionHandler = new CartActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n );\n this.render();\n\n jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.mini_cart_wrapper) !==\n null || document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !==\n null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.renderer.render(\n this.gateway.button.mini_cart_wrapper,\n this.gateway.hosted_fields.mini_cart_wrapper,\n this.actionHandler.configuration()\n );\n }\n}\n\nexport default MiniCartBootstap;","class Product {\n\n constructor(id, quantity, variations) {\n this.id = id;\n this.quantity = quantity;\n this.variations = variations;\n }\n\n data() {\n return {\n id:this.id,\n quantity:this.quantity,\n variations:this.variations\n }\n }\n}\n\nexport default Product;","import Product from \"../Entity/Product\";\nclass UpdateCart {\n\n constructor(endpoint, nonce)\n {\n this.endpoint = endpoint;\n this.nonce = nonce;\n }\n\n /**\n *\n * @param onResolve\n * @param {Product[]} products\n * @returns {Promise<unknown>}\n */\n update(onResolve, products)\n {\n return new Promise((resolve, reject) => {\n fetch(\n this.endpoint,\n {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.nonce,\n products,\n })\n }\n ).then(\n (result) => {\n return result.json();\n }\n ).then((result) => {\n if (! result.success) {\n reject(result.data);\n return;\n }\n\n const resolved = onResolve(result.data);\n resolve(resolved);\n })\n });\n }\n}\n\nexport default UpdateCart;","/**\n * When you can't add something to the cart, the PayPal buttons should not show.\n * Therefore we listen for changes on the add to cart button and show/hide the buttons accordingly.\n */\n\nclass ButtonsToggleListener {\n constructor(element, showCallback, hideCallback)\n {\n this.element = element;\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.observer = null;\n }\n\n init()\n {\n const config = { attributes : true };\n const callback = () => {\n if (this.element.classList.contains('disabled')) {\n this.hideCallback();\n return;\n }\n this.showCallback();\n }\n this.observer = new MutationObserver(callback);\n this.observer.observe(this.element, config);\n callback();\n }\n\n disconnect()\n {\n this.observer.disconnect();\n }\n}\n\nexport default ButtonsToggleListener;","import ButtonsToggleListener from '../Helper/ButtonsToggleListener';\nimport Product from '../Entity/Product';\nimport onApprove from '../OnApproveHandler/onApproveForContinue';\nimport {payerData} from \"../Helper/PayerData\";\n\nclass SingleProductActionHandler {\n\n constructor(\n config,\n updateCart,\n showButtonCallback,\n hideButtonCallback,\n formElement,\n errorHandler\n ) {\n this.config = config;\n this.updateCart = updateCart;\n this.showButtonCallback = showButtonCallback;\n this.hideButtonCallback = hideButtonCallback;\n this.formElement = formElement;\n this.errorHandler = errorHandler;\n }\n\n configuration()\n {\n\n if ( this.hasVariations() ) {\n const observer = new ButtonsToggleListener(\n this.formElement.querySelector('.single_add_to_cart_button'),\n this.showButtonCallback,\n this.hideButtonCallback\n );\n observer.init();\n }\n\n return {\n createOrder: this.createOrder(),\n onApprove: onApprove(this, this.errorHandler),\n onError: (error) => {\n this.errorHandler.genericError();\n }\n }\n }\n\n createOrder()\n {\n var getProducts = null;\n if (! this.isGroupedProduct() ) {\n getProducts = () => {\n const id = document.querySelector('[name=\"add-to-cart\"]').value;\n const qty = document.querySelector('[name=\"quantity\"]').value;\n const variations = this.variations();\n return [new Product(id, qty, variations)];\n }\n } else {\n getProducts = () => {\n const products = [];\n this.formElement.querySelectorAll('input[type=\"number\"]').forEach((element) => {\n if (! element.value) {\n return;\n }\n const elementName = element.getAttribute('name').match(/quantity\\[([\\d]*)\\]/);\n if (elementName.length !== 2) {\n return;\n }\n const id = parseInt(elementName[1]);\n const quantity = parseInt(element.value);\n products.push(new Product(id, quantity, null));\n })\n return products;\n }\n }\n const createOrder = (data, actions) => {\n this.errorHandler.clear();\n\n const onResolve = (purchase_units) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ?\n this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units,\n payer,\n bn_code:bnCode,\n context:this.config.context\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n return data.data.id;\n });\n };\n\n const promise = this.updateCart.update(onResolve, getProducts());\n return promise;\n };\n return createOrder;\n }\n\n variations()\n {\n\n if (! this.hasVariations()) {\n return null;\n }\n const attributes = [...this.formElement.querySelectorAll(\"[name^='attribute_']\")].map(\n (element) => {\n return {\n value:element.value,\n name:element.name\n }\n }\n );\n return attributes;\n }\n\n hasVariations()\n {\n return this.formElement.classList.contains('variations_form');\n }\n\n isGroupedProduct()\n {\n return this.formElement.classList.contains('grouped_form');\n }\n}\nexport default SingleProductActionHandler;\n","import ErrorHandler from '../ErrorHandler';\nimport UpdateCart from \"../Helper/UpdateCart\";\nimport SingleProductActionHandler from \"../ActionHandler/SingleProductActionHandler\";\n\nclass SingleProductBootstap {\n constructor(gateway, renderer, messages) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n }\n\n init() {\n if (!this.shouldRender()) {\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n return;\n }\n\n this.render();\n }\n\n shouldRender() {\n if (document.querySelector('form.cart') === null) {\n return false;\n }\n\n return true;\n }\n\n render() {\n const actionHandler = new SingleProductActionHandler(\n this.gateway,\n new UpdateCart(\n this.gateway.ajax.change_cart.endpoint,\n this.gateway.ajax.change_cart.nonce,\n ),\n () => {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n let priceText = \"0\";\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n }\n else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n }\n const amount = parseInt(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n this.messages.renderWithAmount(amount)\n },\n () => {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n },\n document.querySelector('form.cart'),\n new ErrorHandler(this.gateway.labels.error.generic),\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n}\n\nexport default SingleProductBootstap;","import CartActionHandler from '../ActionHandler/CartActionHandler';\nimport ErrorHandler from '../ErrorHandler';\n\nclass CartBootstrap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n }\n\n init() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.render();\n\n jQuery(document.body).on('updated_cart_totals updated_checkout', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.wrapper) !==\n null || document.querySelector(this.gateway.hosted_fields.wrapper) !==\n null;\n }\n\n render() {\n const actionHandler = new CartActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n}\n\nexport default CartBootstrap;","const onApprove = (context, errorHandler, spinner) => {\n return (data, actions) => {\n spinner.block();\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id:data.orderID\n })\n }).then((res)=>{\n return res.json();\n }).then((data)=>{\n spinner.unblock();\n if (!data.success) {\n if (data.data.code === 100) {\n errorHandler.message(data.data.message);\n } else {\n errorHandler.genericError();\n }\n if (typeof actions !== 'undefined' && typeof actions.restart !== 'undefined') {\n return actions.restart();\n }\n throw new Error(data.data.message);\n }\n document.querySelector('#place_order').click()\n });\n\n }\n}\n\nexport default onApprove;\n","import onApprove from '../OnApproveHandler/onApproveForPayNow.js';\nimport {payerData} from \"../Helper/PayerData\";\n\nclass CheckoutActionHandler {\n\n constructor(config, errorHandler, spinner) {\n this.config = config;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n }\n\n configuration() {\n const spinner = this.spinner;\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ?\n this.config.bn_codes[this.config.context] : '';\n\n const errorHandler = this.errorHandler;\n\n const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';\n const formValues = jQuery(formSelector).serialize();\n\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n payer,\n bn_code:bnCode,\n context:this.config.context,\n order_id:this.config.order_id,\n form:formValues\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n spinner.unblock();\n //handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)\n if (typeof(data.messages) !== 'undefined' )\n {\n const domParser = new DOMParser();\n errorHandler.appendPreparedErrorMessageElement(\n domParser.parseFromString(data.messages, 'text/html')\n .querySelector('ul')\n );\n } else {\n errorHandler.message(data.data.message, true);\n }\n\n return;\n }\n const input = document.createElement('input');\n input.setAttribute('type', 'hidden');\n input.setAttribute('name', 'ppcp-resume-order');\n input.setAttribute('value', data.data.purchase_units[0].custom_id);\n document.querySelector(formSelector).append(input);\n return data.data.id;\n });\n }\n return {\n createOrder,\n onApprove:onApprove(this, this.errorHandler, this.spinner),\n onCancel: () => {\n spinner.unblock();\n },\n onError: () => {\n this.errorHandler.genericError();\n spinner.unblock();\n }\n }\n }\n}\n\nexport default CheckoutActionHandler;\n","import ErrorHandler from '../ErrorHandler';\nimport CheckoutActionHandler from '../ActionHandler/CheckoutActionHandler';\n\nclass CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n this.spinner = spinner;\n }\n\n init() {\n\n this.render();\n\n jQuery(document.body).on('updated_checkout', () => {\n this.render()\n });\n\n jQuery(document.body).\n on('updated_checkout payment_method_selected', () => {\n this.switchBetweenPayPalandOrderButton()\n this.displayPlaceOrderButtonForSavedCreditCards()\n\n })\n\n jQuery('#saved-credit-card').on('change', () => {\n this.displayPlaceOrderButtonForSavedCreditCards()\n })\n\n this.switchBetweenPayPalandOrderButton()\n this.displayPlaceOrderButtonForSavedCreditCards()\n }\n\n shouldRender() {\n if (document.querySelector(this.gateway.button.cancel_wrapper)) {\n return false;\n }\n\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n const actionHandler = new CheckoutActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n this.spinner\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n\n switchBetweenPayPalandOrderButton() {\n jQuery('#saved-credit-card').val(jQuery('#saved-credit-card option:first').val());\n\n const currentPaymentMethod = jQuery(\n 'input[name=\"payment_method\"]:checked').val();\n\n if (currentPaymentMethod !== 'ppcp-gateway' && currentPaymentMethod !== 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.messages.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n jQuery('#place_order').show();\n }\n else {\n jQuery('#place_order').hide();\n if (currentPaymentMethod === 'ppcp-gateway') {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.messages.wrapper);\n this.messages.render()\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)\n }\n if (currentPaymentMethod === 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper)\n this.renderer.hideButtons(this.gateway.messages.wrapper)\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper)\n }\n }\n }\n\n displayPlaceOrderButtonForSavedCreditCards() {\n const currentPaymentMethod = jQuery(\n 'input[name=\"payment_method\"]:checked').val();\n if (currentPaymentMethod !== 'ppcp-credit-card-gateway') {\n return;\n }\n\n if (jQuery('#saved-credit-card').length && jQuery('#saved-credit-card').val() !== '') {\n this.renderer.hideButtons(this.gateway.button.wrapper)\n this.renderer.hideButtons(this.gateway.messages.wrapper)\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)\n jQuery('#place_order').show()\n } else {\n jQuery('#place_order').hide()\n this.renderer.hideButtons(this.gateway.button.wrapper)\n this.renderer.hideButtons(this.gateway.messages.wrapper)\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper)\n }\n }\n}\n\nexport default CheckoutBootstap\n","import ErrorHandler from '../ErrorHandler';\nimport CheckoutActionHandler from '../ActionHandler/CheckoutActionHandler';\n\nclass PayNowBootstrap {\n constructor(gateway, renderer, messages, spinner) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n this.spinner = spinner;\n }\n\n init() {\n\n this.render();\n\n jQuery(document.body).on('updated_checkout', () => {\n this.render();\n });\n\n jQuery(document.body).\n on('updated_checkout payment_method_selected', () => {\n this.switchBetweenPayPalandOrderButton();\n });\n this.switchBetweenPayPalandOrderButton();\n }\n\n shouldRender() {\n if (document.querySelector(this.gateway.button.cancel_wrapper)) {\n return false;\n }\n\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n const actionHandler = new CheckoutActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n this.spinner\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n\n switchBetweenPayPalandOrderButton() {\n const urlParams = new URLSearchParams(window.location.search)\n if (urlParams.has('change_payment_method')) {\n return\n }\n\n const currentPaymentMethod = jQuery(\n 'input[name=\"payment_method\"]:checked').val();\n\n if (currentPaymentMethod !== 'ppcp-gateway' && currentPaymentMethod !== 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.messages.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n jQuery('#place_order').show();\n }\n else {\n jQuery('#place_order').hide();\n if (currentPaymentMethod === 'ppcp-gateway') {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.messages.wrapper);\n this.messages.render();\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n }\n if (currentPaymentMethod === 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.messages.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n }\n }\n }\n}\n\nexport default PayNowBootstrap;\n","class Renderer {\n constructor(creditCardRenderer, defaultConfig) {\n this.defaultConfig = defaultConfig;\n this.creditCardRenderer = creditCardRenderer;\n }\n\n render(wrapper, hostedFieldsWrapper, contextConfig) {\n\n this.renderButtons(wrapper, contextConfig);\n this.creditCardRenderer.render(hostedFieldsWrapper, contextConfig);\n }\n\n renderButtons(wrapper, contextConfig) {\n if (! document.querySelector(wrapper) || this.isAlreadyRendered(wrapper) || 'undefined' === typeof paypal.Buttons ) {\n return;\n }\n\n const style = wrapper === this.defaultConfig.button.wrapper ? this.defaultConfig.button.style : this.defaultConfig.button.mini_cart_style;\n paypal.Buttons({\n style,\n ...contextConfig,\n }).render(wrapper);\n }\n\n isAlreadyRendered(wrapper) {\n return document.querySelector(wrapper).hasChildNodes();\n }\n\n hideButtons(element) {\n const domElement = document.querySelector(element);\n if (! domElement ) {\n return false;\n }\n domElement.style.display = 'none';\n return true;\n }\n\n showButtons(element) {\n const domElement = document.querySelector(element);\n if (! domElement ) {\n return false;\n }\n domElement.style.display = 'block';\n return true;\n }\n}\n\nexport default Renderer;","const dccInputFactory = (original) => {\n const styles = window.getComputedStyle(original);\n const newElement = document.createElement('span');\n newElement.setAttribute('id', original.id);\n Object.values(styles).forEach( (prop) => {\n if (! styles[prop] || ! isNaN(prop) ) {\n return;\n }\n newElement.style.setProperty(prop,'' + styles[prop]);\n });\n return newElement;\n}\n\nexport default dccInputFactory;","import dccInputFactory from \"../Helper/DccInputFactory\";\n\nclass CreditCardRenderer {\n\n constructor(defaultConfig, errorHandler, spinner) {\n this.defaultConfig = defaultConfig;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n this.cardValid = false;\n }\n\n render(wrapper, contextConfig) {\n\n if (\n (\n this.defaultConfig.context !== 'checkout'\n && this.defaultConfig.context !== 'pay-now'\n )\n || wrapper === null\n || document.querySelector(wrapper) === null\n ) {\n return;\n }\n if (\n typeof paypal.HostedFields === 'undefined'\n || ! paypal.HostedFields.isEligible()\n ) {\n const wrapperElement = document.querySelector(wrapper);\n wrapperElement.parentNode.removeChild(wrapperElement);\n return;\n }\n\n const gateWayBox = document.querySelector('.payment_box.payment_method_ppcp-credit-card-gateway');\n const oldDisplayStyle = gateWayBox.style.display;\n gateWayBox.style.display = 'block';\n\n const hideDccGateway = document.querySelector('#ppcp-hide-dcc');\n if (hideDccGateway) {\n hideDccGateway.parentNode.removeChild(hideDccGateway);\n }\n\n const cardNumberField = document.querySelector('#ppcp-credit-card-gateway-card-number');\n\n const stylesRaw = window.getComputedStyle(cardNumberField);\n let styles = {};\n Object.values(stylesRaw).forEach( (prop) => {\n if (! stylesRaw[prop]) {\n return;\n }\n styles[prop] = '' + stylesRaw[prop];\n });\n\n const cardNumber = dccInputFactory(cardNumberField);\n cardNumberField.parentNode.replaceChild(cardNumber, cardNumberField);\n\n const cardExpiryField = document.querySelector('#ppcp-credit-card-gateway-card-expiry');\n const cardExpiry = dccInputFactory(cardExpiryField);\n cardExpiryField.parentNode.replaceChild(cardExpiry, cardExpiryField);\n\n const cardCodeField = document.querySelector('#ppcp-credit-card-gateway-card-cvc');\n const cardCode = dccInputFactory(cardCodeField);\n cardCodeField.parentNode.replaceChild(cardCode, cardCodeField);\n\n gateWayBox.style.display = oldDisplayStyle;\n\n const formWrapper = '.payment_box payment_method_ppcp-credit-card-gateway';\n if (\n this.defaultConfig.enforce_vault\n && document.querySelector(formWrapper + ' .ppcp-credit-card-vault')\n ) {\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').checked = true;\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').setAttribute('disabled', true);\n }\n paypal.HostedFields.render({\n createOrder: contextConfig.createOrder,\n styles: {\n 'input': styles\n },\n fields: {\n number: {\n selector: '#ppcp-credit-card-gateway-card-number',\n placeholder: this.defaultConfig.hosted_fields.labels.credit_card_number,\n },\n cvv: {\n selector: '#ppcp-credit-card-gateway-card-cvc',\n placeholder: this.defaultConfig.hosted_fields.labels.cvv,\n },\n expirationDate: {\n selector: '#ppcp-credit-card-gateway-card-expiry',\n placeholder: this.defaultConfig.hosted_fields.labels.mm_yy,\n }\n }\n }).then(hostedFields => {\n const submitEvent = (event) => {\n this.spinner.block();\n if (event) {\n event.preventDefault();\n }\n this.errorHandler.clear();\n const state = hostedFields.getState();\n const formValid = Object.keys(state.fields).every(function (key) {\n return state.fields[key].isValid;\n });\n\n if (formValid && this.cardValid) {\n const save_card = this.defaultConfig.save_card ? true : false;\n const vault = document.getElementById('ppcp-credit-card-vault') ?\n document.getElementById('ppcp-credit-card-vault').checked : save_card;\n hostedFields.submit({\n contingencies: ['3D_SECURE'],\n vault: vault\n }).then((payload) => {\n payload.orderID = payload.orderId;\n this.spinner.unblock();\n return contextConfig.onApprove(payload);\n }).catch(() => {\n this.errorHandler.genericError();\n this.spinner.unblock();\n });\n } else {\n this.spinner.unblock();\n const message = ! this.cardValid ? this.defaultConfig.hosted_fields.labels.card_not_supported : this.defaultConfig.hosted_fields.labels.fields_not_valid;\n this.errorHandler.message(message);\n }\n }\n hostedFields.on('inputSubmitRequest', function () {\n submitEvent(null);\n });\n hostedFields.on('cardTypeChange', (event) => {\n if ( ! event.cards.length ) {\n this.cardValid = false;\n return;\n }\n const validCards = this.defaultConfig.hosted_fields.valid_cards;\n this.cardValid = validCards.indexOf(event.cards[0].type) !== -1;\n })\n document.querySelector(wrapper + ' button').addEventListener(\n 'click',\n submitEvent\n );\n });\n\n document.querySelector('#payment_method_ppcp-credit-card-gateway').addEventListener(\n 'click',\n () => {\n document.querySelector('label[for=ppcp-credit-card-gateway-card-number]').click();\n }\n )\n }\n}\nexport default CreditCardRenderer;\n","const storageKey = 'ppcp-data-client-id';\n\nconst validateToken = (token, user) => {\n if (! token) {\n return false;\n }\n if (token.user !== user) {\n return false;\n }\n const currentTime = new Date().getTime();\n const isExpired = currentTime >= token.expiration * 1000;\n return ! isExpired;\n}\n\nconst storedTokenForUser = (user) => {\n const token = JSON.parse(sessionStorage.getItem(storageKey));\n if (validateToken(token, user)) {\n return token.token;\n }\n return null;\n}\n\nconst storeToken = (token) => {\n sessionStorage.setItem(storageKey, JSON.stringify(token));\n}\n\nconst dataClientIdAttributeHandler = (script, config) => {\n fetch(config.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: config.nonce\n })\n }).then((res)=>{\n return res.json();\n }).then((data)=>{\n const isValid = validateToken(data, config.user);\n if (!isValid) {\n return;\n }\n storeToken(data);\n script.setAttribute('data-client-token', data.token);\n document.body.append(script);\n });\n}\n\nexport default dataClientIdAttributeHandler;\n","class MessageRenderer {\n\n constructor(config) {\n this.config = config;\n }\n\n render() {\n if (! this.shouldRender()) {\n return;\n }\n\n paypal.Messages({\n amount: this.config.amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n renderWithAmount(amount) {\n\n if (! this.shouldRender()) {\n return;\n }\n\n const newWrapper = document.createElement('div');\n newWrapper.setAttribute('id', this.config.wrapper.replace('#', ''));\n\n const sibling = document.querySelector(this.config.wrapper).nextSibling;\n document.querySelector(this.config.wrapper).parentElement.removeChild(document.querySelector(this.config.wrapper));\n sibling.parentElement.insertBefore(newWrapper, sibling);\n paypal.Messages({\n amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n shouldRender() {\n\n if (typeof paypal.Messages === 'undefined' || typeof this.config.wrapper === 'undefined' ) {\n return false;\n }\n if (! document.querySelector(this.config.wrapper)) {\n return false;\n }\n return true;\n }\n}\nexport default MessageRenderer;","class Spinner {\n\n constructor() {\n this.target = 'form.woocommerce-checkout';\n }\n\n setTarget(target) {\n this.target = target;\n }\n\n block() {\n\n jQuery( this.target ).block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n unblock() {\n\n jQuery( this.target ).unblock();\n }\n}\n\nexport default Spinner;\n","import MiniCartBootstap from './modules/ContextBootstrap/MiniCartBootstap';\nimport SingleProductBootstap from './modules/ContextBootstrap/SingleProductBootstap';\nimport CartBootstrap from './modules/ContextBootstrap/CartBootstap';\nimport CheckoutBootstap from './modules/ContextBootstrap/CheckoutBootstap';\nimport PayNowBootstrap from \"./modules/ContextBootstrap/PayNowBootstrap\";\nimport Renderer from './modules/Renderer/Renderer';\nimport ErrorHandler from './modules/ErrorHandler';\nimport CreditCardRenderer from \"./modules/Renderer/CreditCardRenderer\";\nimport dataClientIdAttributeHandler from \"./modules/DataClientIdAttributeHandler\";\nimport MessageRenderer from \"./modules/Renderer/MessageRenderer\";\nimport Spinner from \"./modules/Helper/Spinner\";\n\nconst bootstrap = () => {\n const errorHandler = new ErrorHandler(PayPalCommerceGateway.labels.error.generic);\n const spinner = new Spinner();\n const creditCardRenderer = new CreditCardRenderer(PayPalCommerceGateway, errorHandler, spinner);\n const renderer = new Renderer(creditCardRenderer, PayPalCommerceGateway);\n const messageRenderer = new MessageRenderer(PayPalCommerceGateway.messages);\n const context = PayPalCommerceGateway.context;\n if (context === 'mini-cart' || context === 'product') {\n const miniCartBootstrap = new MiniCartBootstap(\n PayPalCommerceGateway,\n renderer\n );\n\n miniCartBootstrap.init();\n }\n\n if (context === 'product') {\n const singleProductBootstrap = new SingleProductBootstap(\n PayPalCommerceGateway,\n renderer,\n messageRenderer,\n );\n\n singleProductBootstrap.init();\n }\n\n if (context === 'cart') {\n const cartBootstrap = new CartBootstrap(\n PayPalCommerceGateway,\n renderer,\n );\n\n cartBootstrap.init();\n }\n\n if (context === 'checkout') {\n const checkoutBootstap = new CheckoutBootstap(\n PayPalCommerceGateway,\n renderer,\n messageRenderer,\n spinner\n );\n\n checkoutBootstap.init();\n }\n\n if (context === 'pay-now' ) {\n const payNowBootstrap = new PayNowBootstrap(\n PayPalCommerceGateway,\n renderer,\n messageRenderer,\n spinner\n );\n payNowBootstrap.init();\n }\n\n if (context !== 'checkout') {\n messageRenderer.render();\n }\n};\ndocument.addEventListener(\n 'DOMContentLoaded',\n () => {\n if (!typeof (PayPalCommerceGateway)) {\n console.error('PayPal button could not be configured.');\n return;\n }\n const script = document.createElement('script');\n\n script.addEventListener('load', (event) => {\n bootstrap();\n });\n script.setAttribute('src', PayPalCommerceGateway.button.url);\n Object.entries(PayPalCommerceGateway.script_attributes).forEach(\n (keyValue) => {\n script.setAttribute(keyValue[0], keyValue[1]);\n }\n );\n\n if (PayPalCommerceGateway.data_client_id.set_attribute) {\n dataClientIdAttributeHandler(script, PayPalCommerceGateway.data_client_id);\n return;\n }\n\n document.body.append(script);\n },\n);\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./resources/js/modules/ErrorHandler.js","webpack:///./resources/js/modules/OnApproveHandler/onApproveForContinue.js","webpack:///./resources/js/modules/Helper/PayerData.js","webpack:///./resources/js/modules/ActionHandler/CartActionHandler.js","webpack:///./resources/js/modules/ContextBootstrap/MiniCartBootstap.js","webpack:///./resources/js/modules/Entity/Product.js","webpack:///./resources/js/modules/Helper/UpdateCart.js","webpack:///./resources/js/modules/Helper/ButtonsToggleListener.js","webpack:///./resources/js/modules/ActionHandler/SingleProductActionHandler.js","webpack:///./resources/js/modules/ContextBootstrap/SingleProductBootstap.js","webpack:///./resources/js/modules/ContextBootstrap/CartBootstap.js","webpack:///./resources/js/modules/OnApproveHandler/onApproveForPayNow.js","webpack:///./resources/js/modules/ActionHandler/CheckoutActionHandler.js","webpack:///./resources/js/modules/ContextBootstrap/CheckoutBootstap.js","webpack:///./resources/js/modules/ContextBootstrap/PayNowBootstrap.js","webpack:///./resources/js/modules/Renderer/Renderer.js","webpack:///./resources/js/modules/Helper/DccInputFactory.js","webpack:///./resources/js/modules/Renderer/CreditCardRenderer.js","webpack:///./resources/js/modules/DataClientIdAttributeHandler.js","webpack:///./resources/js/modules/Renderer/MessageRenderer.js","webpack:///./resources/js/modules/Helper/Spinner.js","webpack:///./resources/js/button.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","ErrorHandler","constructor","genericErrorText","this","wrapper","document","querySelector","messagesList","genericError","classList","contains","clear","message","appendPreparedErrorMessageElement","errorMessageElement","prepareMessagesList","replaceWith","text","persist","length","Error","add","remove","messageNode","prepareMessagesListItem","appendChild","jQuery","scroll_to_notices","createElement","setAttribute","li","innerHTML","sanitize","textarea","replace","innerText","onApprove","context","errorHandler","data","actions","fetch","config","ajax","approve_order","endpoint","method","body","JSON","stringify","nonce","order_id","orderID","then","res","json","success","restart","catch","err","location","href","redirect","payerData","payer","PayPalCommerceGateway","phone","phone_type","phone_number","national_number","email_address","surname","given_name","address","country_code","address_line_1","address_line_2","admin_area_1","admin_area_2","postal_code","CartActionHandler","configuration","createOrder","bnCode","bn_codes","create_order","purchase_units","bn_code","console","error","id","onError","MiniCartBootstap","gateway","renderer","actionHandler","init","labels","generic","render","on","shouldRender","button","mini_cart_wrapper","hosted_fields","Product","quantity","variations","UpdateCart","update","onResolve","products","Promise","resolve","reject","result","resolved","ButtonsToggleListener","element","showCallback","hideCallback","observer","callback","MutationObserver","observe","attributes","disconnect","SingleProductActionHandler","updateCart","showButtonCallback","hideButtonCallback","formElement","hasVariations","getProducts","isGroupedProduct","querySelectorAll","forEach","elementName","getAttribute","match","parseInt","push","qty","map","SingleProductBootstap","messages","hideButtons","change_cart","showButtons","priceText","amount","renderWithAmount","CartBootstrap","spinner","block","unblock","code","click","CheckoutActionHandler","formSelector","formValues","serialize","createaccount","is","form","domParser","DOMParser","parseFromString","input","custom_id","append","onCancel","CheckoutBootstap","switchBetweenPayPalandOrderButton","displayPlaceOrderButtonForSavedCreditCards","cancel_wrapper","val","currentPaymentMethod","show","hide","PayNowBootstrap","URLSearchParams","window","search","has","Renderer","creditCardRenderer","defaultConfig","hostedFieldsWrapper","contextConfig","renderButtons","isAlreadyRendered","paypal","Buttons","style","mini_cart_style","hasChildNodes","domElement","display","dccInputFactory","original","styles","getComputedStyle","newElement","values","prop","isNaN","setProperty","CreditCardRenderer","cardValid","formValid","HostedFields","isEligible","wrapperElement","parentNode","removeChild","gateWayBox","oldDisplayStyle","hideDccGateway","cardNumberField","stylesRaw","cardNumber","replaceChild","cardExpiryField","cardExpiry","cardCodeField","cardCode","formWrapper","enforce_vault","checked","fields","number","selector","placeholder","credit_card_number","cvv","expirationDate","mm_yy","hostedFields","submitEvent","event","preventDefault","save_card","vault","getElementById","submit","contingencies","payload","orderId","fields_not_valid","card_not_supported","cards","validCards","valid_cards","indexOf","type","keys","every","isValid","addEventListener","validateToken","token","user","Date","getTime","expiration","dataClientIdAttributeHandler","script","sessionStorage","setItem","MessageRenderer","Messages","placement","newWrapper","sibling","nextSibling","parentElement","insertBefore","Spinner","target","setTarget","overlayCSS","background","opacity","messageRenderer","mini_cart_buttons_enabled","single_product_buttons_enabled","bootstrap","url","entries","script_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","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","class ErrorHandler {\n\n constructor(genericErrorText)\n {\n this.genericErrorText = genericErrorText;\n this.wrapper = document.querySelector('.woocommerce-notices-wrapper');\n this.messagesList = document.querySelector('ul.woocommerce-error');\n }\n\n genericError() {\n if (this.wrapper.classList.contains('ppcp-persist')) {\n return;\n }\n this.clear();\n this.message(this.genericErrorText)\n }\n\n appendPreparedErrorMessageElement(errorMessageElement)\n {\n if(this.messagesList === null) {\n this.prepareMessagesList();\n }\n\n this.messagesList.replaceWith(errorMessageElement);\n }\n\n message(text, persist = false)\n {\n if(! typeof String || text.length === 0){\n throw new Error('A new message text must be a non-empty string.');\n }\n\n if(this.messagesList === null){\n this.prepareMessagesList();\n }\n\n if (persist) {\n this.wrapper.classList.add('ppcp-persist');\n } else {\n this.wrapper.classList.remove('ppcp-persist');\n }\n\n let messageNode = this.prepareMessagesListItem(text);\n this.messagesList.appendChild(messageNode);\n\n jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'))\n }\n\n prepareMessagesList()\n {\n if(this.messagesList === null){\n this.messagesList = document.createElement('ul');\n this.messagesList.setAttribute('class', 'woocommerce-error');\n this.messagesList.setAttribute('role', 'alert');\n this.wrapper.appendChild(this.messagesList);\n }\n }\n\n prepareMessagesListItem(message)\n {\n const li = document.createElement('li');\n li.innerHTML = message;\n\n return li;\n }\n\n sanitize(text)\n {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = text;\n return textarea.value.replace('Error: ', '');\n }\n\n clear()\n {\n if (! this.wrapper.classList.contains('woocommerce-error')) {\n return;\n }\n this.wrapper.classList.remove('woocommerce-error');\n this.wrapper.innerText = '';\n }\n}\n\nexport default ErrorHandler;\n","const onApprove = (context, errorHandler) => {\n return (data, actions) => {\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id:data.orderID\n })\n }).then((res)=>{\n return res.json();\n }).then((data)=>{\n if (!data.success) {\n errorHandler.genericError();\n return actions.restart().catch(err => {\n errorHandler.genericError();\n });;\n }\n location.href = context.config.redirect;\n });\n\n }\n}\n\nexport default onApprove;\n","export const payerData = () => {\n const payer = PayPalCommerceGateway.payer;\n if (! payer) {\n return null;\n }\n\n const phone = (document.querySelector('#billing_phone') || typeof payer.phone !== 'undefined') ?\n {\n phone_type:\"HOME\",\n phone_number:{\n national_number : (document.querySelector('#billing_phone')) ? document.querySelector('#billing_phone').value : payer.phone.phone_number.national_number\n }\n } : null;\n const payerData = {\n email_address:(document.querySelector('#billing_email')) ? document.querySelector('#billing_email').value : payer.email_address,\n name : {\n surname: (document.querySelector('#billing_last_name')) ? document.querySelector('#billing_last_name').value : payer.name.surname,\n given_name: (document.querySelector('#billing_first_name')) ? document.querySelector('#billing_first_name').value : payer.name.given_name\n },\n address : {\n country_code : (document.querySelector('#billing_country')) ? document.querySelector('#billing_country').value : payer.address.country_code,\n address_line_1 : (document.querySelector('#billing_address_1')) ? document.querySelector('#billing_address_1').value : payer.address.address_line_1,\n address_line_2 : (document.querySelector('#billing_address_2')) ? document.querySelector('#billing_address_2').value : payer.address.address_line_2,\n admin_area_1 : (document.querySelector('#billing_state')) ? document.querySelector('#billing_state').value : payer.address.admin_area_1,\n admin_area_2 : (document.querySelector('#billing_city')) ? document.querySelector('#billing_city').value : payer.address.admin_area_2,\n postal_code : (document.querySelector('#billing_postcode')) ? document.querySelector('#billing_postcode').value : payer.address.postal_code\n }\n };\n\n if (phone) {\n payerData.phone = phone;\n }\n return payerData;\n}\n","import onApprove from '../OnApproveHandler/onApproveForContinue.js';\nimport {payerData} from \"../Helper/PayerData\";\n\nclass CartActionHandler {\n\n constructor(config, errorHandler) {\n this.config = config;\n this.errorHandler = errorHandler;\n }\n\n configuration() {\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ?\n this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units: [],\n bn_code:bnCode,\n payer,\n context:this.config.context\n }),\n }).then(function(res) {\n return res.json();\n }).then(function(data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n return data.data.id;\n });\n };\n\n return {\n createOrder,\n onApprove: onApprove(this, this.errorHandler),\n onError: (error) => {\n this.errorHandler.genericError();\n }\n };\n }\n}\n\nexport default CartActionHandler;\n","import ErrorHandler from '../ErrorHandler';\nimport CartActionHandler from '../ActionHandler/CartActionHandler';\n\nclass MiniCartBootstap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.actionHandler = null;\n }\n\n init() {\n\n this.actionHandler = new CartActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n );\n this.render();\n\n jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.mini_cart_wrapper) !==\n null || document.querySelector(this.gateway.hosted_fields.mini_cart_wrapper) !==\n null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.renderer.render(\n this.gateway.button.mini_cart_wrapper,\n this.gateway.hosted_fields.mini_cart_wrapper,\n this.actionHandler.configuration()\n );\n }\n}\n\nexport default MiniCartBootstap;","class Product {\n\n constructor(id, quantity, variations) {\n this.id = id;\n this.quantity = quantity;\n this.variations = variations;\n }\n\n data() {\n return {\n id:this.id,\n quantity:this.quantity,\n variations:this.variations\n }\n }\n}\n\nexport default Product;","import Product from \"../Entity/Product\";\nclass UpdateCart {\n\n constructor(endpoint, nonce)\n {\n this.endpoint = endpoint;\n this.nonce = nonce;\n }\n\n /**\n *\n * @param onResolve\n * @param {Product[]} products\n * @returns {Promise<unknown>}\n */\n update(onResolve, products)\n {\n return new Promise((resolve, reject) => {\n fetch(\n this.endpoint,\n {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.nonce,\n products,\n })\n }\n ).then(\n (result) => {\n return result.json();\n }\n ).then((result) => {\n if (! result.success) {\n reject(result.data);\n return;\n }\n\n const resolved = onResolve(result.data);\n resolve(resolved);\n })\n });\n }\n}\n\nexport default UpdateCart;","/**\n * When you can't add something to the cart, the PayPal buttons should not show.\n * Therefore we listen for changes on the add to cart button and show/hide the buttons accordingly.\n */\n\nclass ButtonsToggleListener {\n constructor(element, showCallback, hideCallback)\n {\n this.element = element;\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.observer = null;\n }\n\n init()\n {\n const config = { attributes : true };\n const callback = () => {\n if (this.element.classList.contains('disabled')) {\n this.hideCallback();\n return;\n }\n this.showCallback();\n }\n this.observer = new MutationObserver(callback);\n this.observer.observe(this.element, config);\n callback();\n }\n\n disconnect()\n {\n this.observer.disconnect();\n }\n}\n\nexport default ButtonsToggleListener;","import ButtonsToggleListener from '../Helper/ButtonsToggleListener';\nimport Product from '../Entity/Product';\nimport onApprove from '../OnApproveHandler/onApproveForContinue';\nimport {payerData} from \"../Helper/PayerData\";\n\nclass SingleProductActionHandler {\n\n constructor(\n config,\n updateCart,\n showButtonCallback,\n hideButtonCallback,\n formElement,\n errorHandler\n ) {\n this.config = config;\n this.updateCart = updateCart;\n this.showButtonCallback = showButtonCallback;\n this.hideButtonCallback = hideButtonCallback;\n this.formElement = formElement;\n this.errorHandler = errorHandler;\n }\n\n configuration()\n {\n\n if ( this.hasVariations() ) {\n const observer = new ButtonsToggleListener(\n this.formElement.querySelector('.single_add_to_cart_button'),\n this.showButtonCallback,\n this.hideButtonCallback\n );\n observer.init();\n }\n\n return {\n createOrder: this.createOrder(),\n onApprove: onApprove(this, this.errorHandler),\n onError: (error) => {\n this.errorHandler.genericError();\n }\n }\n }\n\n createOrder()\n {\n var getProducts = null;\n if (! this.isGroupedProduct() ) {\n getProducts = () => {\n const id = document.querySelector('[name=\"add-to-cart\"]').value;\n const qty = document.querySelector('[name=\"quantity\"]').value;\n const variations = this.variations();\n return [new Product(id, qty, variations)];\n }\n } else {\n getProducts = () => {\n const products = [];\n this.formElement.querySelectorAll('input[type=\"number\"]').forEach((element) => {\n if (! element.value) {\n return;\n }\n const elementName = element.getAttribute('name').match(/quantity\\[([\\d]*)\\]/);\n if (elementName.length !== 2) {\n return;\n }\n const id = parseInt(elementName[1]);\n const quantity = parseInt(element.value);\n products.push(new Product(id, quantity, null));\n })\n return products;\n }\n }\n const createOrder = (data, actions) => {\n this.errorHandler.clear();\n\n const onResolve = (purchase_units) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ?\n this.config.bn_codes[this.config.context] : '';\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n purchase_units,\n payer,\n bn_code:bnCode,\n context:this.config.context\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n console.error(data);\n throw Error(data.data.message);\n }\n return data.data.id;\n });\n };\n\n const promise = this.updateCart.update(onResolve, getProducts());\n return promise;\n };\n return createOrder;\n }\n\n variations()\n {\n\n if (! this.hasVariations()) {\n return null;\n }\n const attributes = [...this.formElement.querySelectorAll(\"[name^='attribute_']\")].map(\n (element) => {\n return {\n value:element.value,\n name:element.name\n }\n }\n );\n return attributes;\n }\n\n hasVariations()\n {\n return this.formElement.classList.contains('variations_form');\n }\n\n isGroupedProduct()\n {\n return this.formElement.classList.contains('grouped_form');\n }\n}\nexport default SingleProductActionHandler;\n","import ErrorHandler from '../ErrorHandler';\nimport UpdateCart from \"../Helper/UpdateCart\";\nimport SingleProductActionHandler from \"../ActionHandler/SingleProductActionHandler\";\n\nclass SingleProductBootstap {\n constructor(gateway, renderer, messages) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n }\n\n init() {\n if (!this.shouldRender()) {\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n return;\n }\n\n this.render();\n }\n\n shouldRender() {\n if (document.querySelector('form.cart') === null) {\n return false;\n }\n\n return true;\n }\n\n render() {\n const actionHandler = new SingleProductActionHandler(\n this.gateway,\n new UpdateCart(\n this.gateway.ajax.change_cart.endpoint,\n this.gateway.ajax.change_cart.nonce,\n ),\n () => {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n let priceText = \"0\";\n if (document.querySelector('form.cart ins .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart ins .woocommerce-Price-amount').innerText;\n }\n else if (document.querySelector('form.cart .woocommerce-Price-amount')) {\n priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;\n }\n const amount = parseInt(priceText.replace(/([^\\d,\\.\\s]*)/g, ''));\n this.messages.renderWithAmount(amount)\n },\n () => {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n },\n document.querySelector('form.cart'),\n new ErrorHandler(this.gateway.labels.error.generic),\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n}\n\nexport default SingleProductBootstap;","import CartActionHandler from '../ActionHandler/CartActionHandler';\nimport ErrorHandler from '../ErrorHandler';\n\nclass CartBootstrap {\n constructor(gateway, renderer) {\n this.gateway = gateway;\n this.renderer = renderer;\n }\n\n init() {\n if (!this.shouldRender()) {\n return;\n }\n\n this.render();\n\n jQuery(document.body).on('updated_cart_totals updated_checkout', () => {\n this.render();\n });\n }\n\n shouldRender() {\n return document.querySelector(this.gateway.button.wrapper) !==\n null || document.querySelector(this.gateway.hosted_fields.wrapper) !==\n null;\n }\n\n render() {\n const actionHandler = new CartActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n}\n\nexport default CartBootstrap;\n","const onApprove = (context, errorHandler, spinner) => {\n return (data, actions) => {\n spinner.block();\n return fetch(context.config.ajax.approve_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: context.config.ajax.approve_order.nonce,\n order_id:data.orderID\n })\n }).then((res)=>{\n return res.json();\n }).then((data)=>{\n spinner.unblock();\n if (!data.success) {\n if (data.data.code === 100) {\n errorHandler.message(data.data.message);\n } else {\n errorHandler.genericError();\n }\n if (typeof actions !== 'undefined' && typeof actions.restart !== 'undefined') {\n return actions.restart();\n }\n throw new Error(data.data.message);\n }\n document.querySelector('#place_order').click()\n });\n\n }\n}\n\nexport default onApprove;\n","import onApprove from '../OnApproveHandler/onApproveForPayNow.js';\nimport {payerData} from \"../Helper/PayerData\";\n\nclass CheckoutActionHandler {\n\n constructor(config, errorHandler, spinner) {\n this.config = config;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n }\n\n configuration() {\n const spinner = this.spinner;\n const createOrder = (data, actions) => {\n const payer = payerData();\n const bnCode = typeof this.config.bn_codes[this.config.context] !== 'undefined' ?\n this.config.bn_codes[this.config.context] : '';\n\n const errorHandler = this.errorHandler;\n\n const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';\n const formValues = jQuery(formSelector).serialize();\n\n const createaccount = jQuery('#createaccount').is(\":checked\") ? true : false;\n\n return fetch(this.config.ajax.create_order.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: this.config.ajax.create_order.nonce,\n payer,\n bn_code:bnCode,\n context:this.config.context,\n order_id:this.config.order_id,\n form:formValues,\n createaccount: createaccount\n })\n }).then(function (res) {\n return res.json();\n }).then(function (data) {\n if (!data.success) {\n spinner.unblock();\n //handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)\n if (typeof(data.messages) !== 'undefined' )\n {\n const domParser = new DOMParser();\n errorHandler.appendPreparedErrorMessageElement(\n domParser.parseFromString(data.messages, 'text/html')\n .querySelector('ul')\n );\n } else {\n errorHandler.message(data.data.message, true);\n }\n\n return;\n }\n const input = document.createElement('input');\n input.setAttribute('type', 'hidden');\n input.setAttribute('name', 'ppcp-resume-order');\n input.setAttribute('value', data.data.purchase_units[0].custom_id);\n document.querySelector(formSelector).append(input);\n return data.data.id;\n });\n }\n return {\n createOrder,\n onApprove:onApprove(this, this.errorHandler, this.spinner),\n onCancel: () => {\n spinner.unblock();\n },\n onError: () => {\n this.errorHandler.genericError();\n spinner.unblock();\n }\n }\n }\n}\n\nexport default CheckoutActionHandler;\n","import ErrorHandler from '../ErrorHandler';\nimport CheckoutActionHandler from '../ActionHandler/CheckoutActionHandler';\n\nclass CheckoutBootstap {\n constructor(gateway, renderer, messages, spinner) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n this.spinner = spinner;\n }\n\n init() {\n\n this.render();\n\n jQuery(document.body).on('updated_checkout', () => {\n this.render()\n });\n\n jQuery(document.body).\n on('updated_checkout payment_method_selected', () => {\n this.switchBetweenPayPalandOrderButton()\n this.displayPlaceOrderButtonForSavedCreditCards()\n\n })\n\n jQuery('#saved-credit-card').on('change', () => {\n this.displayPlaceOrderButtonForSavedCreditCards()\n })\n\n this.switchBetweenPayPalandOrderButton()\n this.displayPlaceOrderButtonForSavedCreditCards()\n }\n\n shouldRender() {\n if (document.querySelector(this.gateway.button.cancel_wrapper)) {\n return false;\n }\n\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n const actionHandler = new CheckoutActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n this.spinner\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n\n switchBetweenPayPalandOrderButton() {\n jQuery('#saved-credit-card').val(jQuery('#saved-credit-card option:first').val());\n\n const currentPaymentMethod = jQuery(\n 'input[name=\"payment_method\"]:checked').val();\n\n if (currentPaymentMethod !== 'ppcp-gateway' && currentPaymentMethod !== 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.messages.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n jQuery('#place_order').show();\n }\n else {\n jQuery('#place_order').hide();\n if (currentPaymentMethod === 'ppcp-gateway') {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.messages.wrapper);\n this.messages.render()\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)\n }\n if (currentPaymentMethod === 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper)\n this.renderer.hideButtons(this.gateway.messages.wrapper)\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper)\n }\n }\n }\n\n displayPlaceOrderButtonForSavedCreditCards() {\n const currentPaymentMethod = jQuery(\n 'input[name=\"payment_method\"]:checked').val();\n if (currentPaymentMethod !== 'ppcp-credit-card-gateway') {\n return;\n }\n\n if (jQuery('#saved-credit-card').length && jQuery('#saved-credit-card').val() !== '') {\n this.renderer.hideButtons(this.gateway.button.wrapper)\n this.renderer.hideButtons(this.gateway.messages.wrapper)\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper)\n jQuery('#place_order').show()\n } else {\n jQuery('#place_order').hide()\n this.renderer.hideButtons(this.gateway.button.wrapper)\n this.renderer.hideButtons(this.gateway.messages.wrapper)\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper)\n }\n }\n}\n\nexport default CheckoutBootstap\n","import ErrorHandler from '../ErrorHandler';\nimport CheckoutActionHandler from '../ActionHandler/CheckoutActionHandler';\n\nclass PayNowBootstrap {\n constructor(gateway, renderer, messages, spinner) {\n this.gateway = gateway;\n this.renderer = renderer;\n this.messages = messages;\n this.spinner = spinner;\n }\n\n init() {\n\n this.render();\n\n jQuery(document.body).on('updated_checkout', () => {\n this.render();\n });\n\n jQuery(document.body).\n on('updated_checkout payment_method_selected', () => {\n this.switchBetweenPayPalandOrderButton();\n });\n this.switchBetweenPayPalandOrderButton();\n }\n\n shouldRender() {\n if (document.querySelector(this.gateway.button.cancel_wrapper)) {\n return false;\n }\n\n return document.querySelector(this.gateway.button.wrapper) !== null || document.querySelector(this.gateway.hosted_fields.wrapper) !== null;\n }\n\n render() {\n if (!this.shouldRender()) {\n return;\n }\n if (document.querySelector(this.gateway.hosted_fields.wrapper + '>div')) {\n document.querySelector(this.gateway.hosted_fields.wrapper + '>div').setAttribute('style', '');\n }\n const actionHandler = new CheckoutActionHandler(\n PayPalCommerceGateway,\n new ErrorHandler(this.gateway.labels.error.generic),\n this.spinner\n );\n\n this.renderer.render(\n this.gateway.button.wrapper,\n this.gateway.hosted_fields.wrapper,\n actionHandler.configuration(),\n );\n }\n\n switchBetweenPayPalandOrderButton() {\n const urlParams = new URLSearchParams(window.location.search)\n if (urlParams.has('change_payment_method')) {\n return\n }\n\n const currentPaymentMethod = jQuery(\n 'input[name=\"payment_method\"]:checked').val();\n\n if (currentPaymentMethod !== 'ppcp-gateway' && currentPaymentMethod !== 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.messages.wrapper);\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n jQuery('#place_order').show();\n }\n else {\n jQuery('#place_order').hide();\n if (currentPaymentMethod === 'ppcp-gateway') {\n this.renderer.showButtons(this.gateway.button.wrapper);\n this.renderer.showButtons(this.gateway.messages.wrapper);\n this.messages.render();\n this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);\n }\n if (currentPaymentMethod === 'ppcp-credit-card-gateway') {\n this.renderer.hideButtons(this.gateway.button.wrapper);\n this.renderer.hideButtons(this.gateway.messages.wrapper);\n this.renderer.showButtons(this.gateway.hosted_fields.wrapper);\n }\n }\n }\n}\n\nexport default PayNowBootstrap;\n","class Renderer {\n constructor(creditCardRenderer, defaultConfig) {\n this.defaultConfig = defaultConfig;\n this.creditCardRenderer = creditCardRenderer;\n }\n\n render(wrapper, hostedFieldsWrapper, contextConfig) {\n\n this.renderButtons(wrapper, contextConfig);\n this.creditCardRenderer.render(hostedFieldsWrapper, contextConfig);\n }\n\n renderButtons(wrapper, contextConfig) {\n if (! document.querySelector(wrapper) || this.isAlreadyRendered(wrapper) || 'undefined' === typeof paypal.Buttons ) {\n return;\n }\n\n const style = wrapper === this.defaultConfig.button.wrapper ? this.defaultConfig.button.style : this.defaultConfig.button.mini_cart_style;\n paypal.Buttons({\n style,\n ...contextConfig,\n }).render(wrapper);\n }\n\n isAlreadyRendered(wrapper) {\n return document.querySelector(wrapper).hasChildNodes();\n }\n\n hideButtons(element) {\n const domElement = document.querySelector(element);\n if (! domElement ) {\n return false;\n }\n domElement.style.display = 'none';\n return true;\n }\n\n showButtons(element) {\n const domElement = document.querySelector(element);\n if (! domElement ) {\n return false;\n }\n domElement.style.display = 'block';\n return true;\n }\n}\n\nexport default Renderer;","const dccInputFactory = (original) => {\n const styles = window.getComputedStyle(original);\n const newElement = document.createElement('span');\n newElement.setAttribute('id', original.id);\n Object.values(styles).forEach( (prop) => {\n if (! styles[prop] || ! isNaN(prop) ) {\n return;\n }\n newElement.style.setProperty(prop,'' + styles[prop]);\n });\n return newElement;\n}\n\nexport default dccInputFactory;","import dccInputFactory from \"../Helper/DccInputFactory\";\n\nclass CreditCardRenderer {\n\n constructor(defaultConfig, errorHandler, spinner) {\n this.defaultConfig = defaultConfig;\n this.errorHandler = errorHandler;\n this.spinner = spinner;\n this.cardValid = false;\n this.formValid = false;\n }\n\n render(wrapper, contextConfig) {\n\n if (\n (\n this.defaultConfig.context !== 'checkout'\n && this.defaultConfig.context !== 'pay-now'\n )\n || wrapper === null\n || document.querySelector(wrapper) === null\n ) {\n return;\n }\n if (\n typeof paypal.HostedFields === 'undefined'\n || ! paypal.HostedFields.isEligible()\n ) {\n const wrapperElement = document.querySelector(wrapper);\n wrapperElement.parentNode.removeChild(wrapperElement);\n return;\n }\n\n const gateWayBox = document.querySelector('.payment_box.payment_method_ppcp-credit-card-gateway');\n const oldDisplayStyle = gateWayBox.style.display;\n gateWayBox.style.display = 'block';\n\n const hideDccGateway = document.querySelector('#ppcp-hide-dcc');\n if (hideDccGateway) {\n hideDccGateway.parentNode.removeChild(hideDccGateway);\n }\n\n const cardNumberField = document.querySelector('#ppcp-credit-card-gateway-card-number');\n\n const stylesRaw = window.getComputedStyle(cardNumberField);\n let styles = {};\n Object.values(stylesRaw).forEach( (prop) => {\n if (! stylesRaw[prop]) {\n return;\n }\n styles[prop] = '' + stylesRaw[prop];\n });\n\n const cardNumber = dccInputFactory(cardNumberField);\n cardNumberField.parentNode.replaceChild(cardNumber, cardNumberField);\n\n const cardExpiryField = document.querySelector('#ppcp-credit-card-gateway-card-expiry');\n const cardExpiry = dccInputFactory(cardExpiryField);\n cardExpiryField.parentNode.replaceChild(cardExpiry, cardExpiryField);\n\n const cardCodeField = document.querySelector('#ppcp-credit-card-gateway-card-cvc');\n const cardCode = dccInputFactory(cardCodeField);\n cardCodeField.parentNode.replaceChild(cardCode, cardCodeField);\n\n gateWayBox.style.display = oldDisplayStyle;\n\n const formWrapper = '.payment_box payment_method_ppcp-credit-card-gateway';\n if (\n this.defaultConfig.enforce_vault\n && document.querySelector(formWrapper + ' .ppcp-credit-card-vault')\n ) {\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').checked = true;\n document.querySelector(formWrapper + ' .ppcp-credit-card-vault').setAttribute('disabled', true);\n }\n paypal.HostedFields.render({\n createOrder: contextConfig.createOrder,\n styles: {\n 'input': styles\n },\n fields: {\n number: {\n selector: '#ppcp-credit-card-gateway-card-number',\n placeholder: this.defaultConfig.hosted_fields.labels.credit_card_number,\n },\n cvv: {\n selector: '#ppcp-credit-card-gateway-card-cvc',\n placeholder: this.defaultConfig.hosted_fields.labels.cvv,\n },\n expirationDate: {\n selector: '#ppcp-credit-card-gateway-card-expiry',\n placeholder: this.defaultConfig.hosted_fields.labels.mm_yy,\n }\n }\n }).then(hostedFields => {\n const submitEvent = (event) => {\n this.spinner.block();\n if (event) {\n event.preventDefault();\n }\n this.errorHandler.clear();\n\n if (this.formValid && this.cardValid) {\n const save_card = this.defaultConfig.save_card ? true : false;\n const vault = document.getElementById('ppcp-credit-card-vault') ?\n document.getElementById('ppcp-credit-card-vault').checked : save_card;\n hostedFields.submit({\n contingencies: ['3D_SECURE'],\n vault: vault\n }).then((payload) => {\n payload.orderID = payload.orderId;\n this.spinner.unblock();\n return contextConfig.onApprove(payload);\n }).catch(() => {\n this.errorHandler.genericError();\n this.spinner.unblock();\n });\n } else {\n this.spinner.unblock();\n const message = ! this.cardValid ? this.defaultConfig.hosted_fields.labels.card_not_supported : this.defaultConfig.hosted_fields.labels.fields_not_valid;\n this.errorHandler.message(message);\n }\n }\n hostedFields.on('inputSubmitRequest', function () {\n submitEvent(null);\n });\n hostedFields.on('cardTypeChange', (event) => {\n if ( ! event.cards.length ) {\n this.cardValid = false;\n return;\n }\n const validCards = this.defaultConfig.hosted_fields.valid_cards;\n this.cardValid = validCards.indexOf(event.cards[0].type) !== -1;\n })\n hostedFields.on('validityChange', (event) => {\n const formValid = Object.keys(event.fields).every(function (key) {\n return event.fields[key].isValid;\n });\n this.formValid = formValid;\n\n })\n document.querySelector(wrapper + ' button').addEventListener(\n 'click',\n submitEvent\n );\n });\n\n document.querySelector('#payment_method_ppcp-credit-card-gateway').addEventListener(\n 'click',\n () => {\n document.querySelector('label[for=ppcp-credit-card-gateway-card-number]').click();\n }\n )\n }\n}\nexport default CreditCardRenderer;\n","const storageKey = 'ppcp-data-client-id';\n\nconst validateToken = (token, user) => {\n if (! token) {\n return false;\n }\n if (token.user !== user) {\n return false;\n }\n const currentTime = new Date().getTime();\n const isExpired = currentTime >= token.expiration * 1000;\n return ! isExpired;\n}\n\nconst storedTokenForUser = (user) => {\n const token = JSON.parse(sessionStorage.getItem(storageKey));\n if (validateToken(token, user)) {\n return token.token;\n }\n return null;\n}\n\nconst storeToken = (token) => {\n sessionStorage.setItem(storageKey, JSON.stringify(token));\n}\n\nconst dataClientIdAttributeHandler = (script, config) => {\n fetch(config.endpoint, {\n method: 'POST',\n body: JSON.stringify({\n nonce: config.nonce\n })\n }).then((res)=>{\n return res.json();\n }).then((data)=>{\n const isValid = validateToken(data, config.user);\n if (!isValid) {\n return;\n }\n storeToken(data);\n script.setAttribute('data-client-token', data.token);\n document.body.append(script);\n });\n}\n\nexport default dataClientIdAttributeHandler;\n","class MessageRenderer {\n\n constructor(config) {\n this.config = config;\n }\n\n render() {\n if (! this.shouldRender()) {\n return;\n }\n\n paypal.Messages({\n amount: this.config.amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n renderWithAmount(amount) {\n\n if (! this.shouldRender()) {\n return;\n }\n\n const newWrapper = document.createElement('div');\n newWrapper.setAttribute('id', this.config.wrapper.replace('#', ''));\n\n const sibling = document.querySelector(this.config.wrapper).nextSibling;\n document.querySelector(this.config.wrapper).parentElement.removeChild(document.querySelector(this.config.wrapper));\n sibling.parentElement.insertBefore(newWrapper, sibling);\n paypal.Messages({\n amount,\n placement: this.config.placement,\n style: this.config.style\n }).render(this.config.wrapper);\n }\n\n shouldRender() {\n\n if (typeof paypal.Messages === 'undefined' || typeof this.config.wrapper === 'undefined' ) {\n return false;\n }\n if (! document.querySelector(this.config.wrapper)) {\n return false;\n }\n return true;\n }\n}\nexport default MessageRenderer;","class Spinner {\n\n constructor() {\n this.target = 'form.woocommerce-checkout';\n }\n\n setTarget(target) {\n this.target = target;\n }\n\n block() {\n\n jQuery( this.target ).block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n unblock() {\n\n jQuery( this.target ).unblock();\n }\n}\n\nexport default Spinner;\n","import MiniCartBootstap from './modules/ContextBootstrap/MiniCartBootstap';\nimport SingleProductBootstap from './modules/ContextBootstrap/SingleProductBootstap';\nimport CartBootstrap from './modules/ContextBootstrap/CartBootstap';\nimport CheckoutBootstap from './modules/ContextBootstrap/CheckoutBootstap';\nimport PayNowBootstrap from \"./modules/ContextBootstrap/PayNowBootstrap\";\nimport Renderer from './modules/Renderer/Renderer';\nimport ErrorHandler from './modules/ErrorHandler';\nimport CreditCardRenderer from \"./modules/Renderer/CreditCardRenderer\";\nimport dataClientIdAttributeHandler from \"./modules/DataClientIdAttributeHandler\";\nimport MessageRenderer from \"./modules/Renderer/MessageRenderer\";\nimport Spinner from \"./modules/Helper/Spinner\";\n\nconst bootstrap = () => {\n const errorHandler = new ErrorHandler(PayPalCommerceGateway.labels.error.generic);\n const spinner = new Spinner();\n const creditCardRenderer = new CreditCardRenderer(PayPalCommerceGateway, errorHandler, spinner);\n const renderer = new Renderer(creditCardRenderer, PayPalCommerceGateway);\n const messageRenderer = new MessageRenderer(PayPalCommerceGateway.messages);\n const context = PayPalCommerceGateway.context;\n if (context === 'mini-cart' || context === 'product') {\n if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {\n const miniCartBootstrap = new MiniCartBootstap(\n PayPalCommerceGateway,\n renderer\n );\n\n miniCartBootstrap.init();\n }\n }\n\n if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {\n const singleProductBootstrap = new SingleProductBootstap(\n PayPalCommerceGateway,\n renderer,\n messageRenderer,\n );\n\n singleProductBootstrap.init();\n }\n\n if (context === 'cart') {\n const cartBootstrap = new CartBootstrap(\n PayPalCommerceGateway,\n renderer,\n );\n\n cartBootstrap.init();\n }\n\n if (context === 'checkout') {\n const checkoutBootstap = new CheckoutBootstap(\n PayPalCommerceGateway,\n renderer,\n messageRenderer,\n spinner\n );\n\n checkoutBootstap.init();\n }\n\n if (context === 'pay-now' ) {\n const payNowBootstrap = new PayNowBootstrap(\n PayPalCommerceGateway,\n renderer,\n messageRenderer,\n spinner\n );\n payNowBootstrap.init();\n }\n\n if (context !== 'checkout') {\n messageRenderer.render();\n }\n};\ndocument.addEventListener(\n 'DOMContentLoaded',\n () => {\n if (!typeof (PayPalCommerceGateway)) {\n console.error('PayPal button could not be configured.');\n return;\n }\n const script = document.createElement('script');\n\n script.addEventListener('load', (event) => {\n bootstrap();\n });\n script.setAttribute('src', PayPalCommerceGateway.button.url);\n Object.entries(PayPalCommerceGateway.script_attributes).forEach(\n (keyValue) => {\n script.setAttribute(keyValue[0], keyValue[1]);\n }\n );\n\n if (PayPalCommerceGateway.data_client_id.set_attribute) {\n dataClientIdAttributeHandler(script, PayPalCommerceGateway.data_client_id);\n return;\n }\n\n document.body.append(script);\n },\n);\n"],"sourceRoot":""}
|
modules/ppcp-button/resources/js/button.js
CHANGED
@@ -18,15 +18,17 @@ const bootstrap = () => {
|
|
18 |
const messageRenderer = new MessageRenderer(PayPalCommerceGateway.messages);
|
19 |
const context = PayPalCommerceGateway.context;
|
20 |
if (context === 'mini-cart' || context === 'product') {
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
|
26 |
-
|
|
|
27 |
}
|
28 |
|
29 |
-
if (context === 'product') {
|
30 |
const singleProductBootstrap = new SingleProductBootstap(
|
31 |
PayPalCommerceGateway,
|
32 |
renderer,
|
18 |
const messageRenderer = new MessageRenderer(PayPalCommerceGateway.messages);
|
19 |
const context = PayPalCommerceGateway.context;
|
20 |
if (context === 'mini-cart' || context === 'product') {
|
21 |
+
if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {
|
22 |
+
const miniCartBootstrap = new MiniCartBootstap(
|
23 |
+
PayPalCommerceGateway,
|
24 |
+
renderer
|
25 |
+
);
|
26 |
|
27 |
+
miniCartBootstrap.init();
|
28 |
+
}
|
29 |
}
|
30 |
|
31 |
+
if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {
|
32 |
const singleProductBootstrap = new SingleProductBootstap(
|
33 |
PayPalCommerceGateway,
|
34 |
renderer,
|
modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js
CHANGED
@@ -21,6 +21,8 @@ class CheckoutActionHandler {
|
|
21 |
const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';
|
22 |
const formValues = jQuery(formSelector).serialize();
|
23 |
|
|
|
|
|
24 |
return fetch(this.config.ajax.create_order.endpoint, {
|
25 |
method: 'POST',
|
26 |
body: JSON.stringify({
|
@@ -29,7 +31,8 @@ class CheckoutActionHandler {
|
|
29 |
bn_code:bnCode,
|
30 |
context:this.config.context,
|
31 |
order_id:this.config.order_id,
|
32 |
-
form:formValues
|
|
|
33 |
})
|
34 |
}).then(function (res) {
|
35 |
return res.json();
|
21 |
const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review';
|
22 |
const formValues = jQuery(formSelector).serialize();
|
23 |
|
24 |
+
const createaccount = jQuery('#createaccount').is(":checked") ? true : false;
|
25 |
+
|
26 |
return fetch(this.config.ajax.create_order.endpoint, {
|
27 |
method: 'POST',
|
28 |
body: JSON.stringify({
|
31 |
bn_code:bnCode,
|
32 |
context:this.config.context,
|
33 |
order_id:this.config.order_id,
|
34 |
+
form:formValues,
|
35 |
+
createaccount: createaccount
|
36 |
})
|
37 |
}).then(function (res) {
|
38 |
return res.json();
|
modules/ppcp-button/resources/js/modules/ContextBootstrap/CartBootstap.js
CHANGED
@@ -39,4 +39,4 @@ class CartBootstrap {
|
|
39 |
}
|
40 |
}
|
41 |
|
42 |
-
export default CartBootstrap;
|
39 |
}
|
40 |
}
|
41 |
|
42 |
+
export default CartBootstrap;
|
modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js
CHANGED
@@ -7,6 +7,7 @@ class CreditCardRenderer {
|
|
7 |
this.errorHandler = errorHandler;
|
8 |
this.spinner = spinner;
|
9 |
this.cardValid = false;
|
|
|
10 |
}
|
11 |
|
12 |
render(wrapper, contextConfig) {
|
@@ -97,12 +98,8 @@ class CreditCardRenderer {
|
|
97 |
event.preventDefault();
|
98 |
}
|
99 |
this.errorHandler.clear();
|
100 |
-
const state = hostedFields.getState();
|
101 |
-
const formValid = Object.keys(state.fields).every(function (key) {
|
102 |
-
return state.fields[key].isValid;
|
103 |
-
});
|
104 |
|
105 |
-
if (formValid && this.cardValid) {
|
106 |
const save_card = this.defaultConfig.save_card ? true : false;
|
107 |
const vault = document.getElementById('ppcp-credit-card-vault') ?
|
108 |
document.getElementById('ppcp-credit-card-vault').checked : save_card;
|
@@ -134,6 +131,13 @@ class CreditCardRenderer {
|
|
134 |
const validCards = this.defaultConfig.hosted_fields.valid_cards;
|
135 |
this.cardValid = validCards.indexOf(event.cards[0].type) !== -1;
|
136 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
document.querySelector(wrapper + ' button').addEventListener(
|
138 |
'click',
|
139 |
submitEvent
|
7 |
this.errorHandler = errorHandler;
|
8 |
this.spinner = spinner;
|
9 |
this.cardValid = false;
|
10 |
+
this.formValid = false;
|
11 |
}
|
12 |
|
13 |
render(wrapper, contextConfig) {
|
98 |
event.preventDefault();
|
99 |
}
|
100 |
this.errorHandler.clear();
|
|
|
|
|
|
|
|
|
101 |
|
102 |
+
if (this.formValid && this.cardValid) {
|
103 |
const save_card = this.defaultConfig.save_card ? true : false;
|
104 |
const vault = document.getElementById('ppcp-credit-card-vault') ?
|
105 |
document.getElementById('ppcp-credit-card-vault').checked : save_card;
|
131 |
const validCards = this.defaultConfig.hosted_fields.valid_cards;
|
132 |
this.cardValid = validCards.indexOf(event.cards[0].type) !== -1;
|
133 |
})
|
134 |
+
hostedFields.on('validityChange', (event) => {
|
135 |
+
const formValid = Object.keys(event.fields).every(function (key) {
|
136 |
+
return event.fields[key].isValid;
|
137 |
+
});
|
138 |
+
this.formValid = formValid;
|
139 |
+
|
140 |
+
})
|
141 |
document.querySelector(wrapper + ' button').addEventListener(
|
142 |
'click',
|
143 |
submitEvent
|
modules/ppcp-button/services.php
CHANGED
@@ -59,7 +59,6 @@ return array(
|
|
59 |
if ( $paypal_disabled ) {
|
60 |
return new DisabledSmartButton();
|
61 |
}
|
62 |
-
$payee_repository = $container->get( 'api.repository.payee' );
|
63 |
$payer_factory = $container->get( 'api.factory.payer' );
|
64 |
$request_data = $container->get( 'button.request-data' );
|
65 |
|
@@ -69,11 +68,11 @@ return array(
|
|
69 |
$messages_apply = $container->get( 'button.helper.messages-apply' );
|
70 |
$environment = $container->get( 'onboarding.environment' );
|
71 |
$payment_token_repository = $container->get( 'subscription.repository.payment-token' );
|
|
|
72 |
return new SmartButton(
|
73 |
$container->get( 'button.url' ),
|
74 |
$container->get( 'session.handler' ),
|
75 |
$settings,
|
76 |
-
$payee_repository,
|
77 |
$payer_factory,
|
78 |
$client_id,
|
79 |
$request_data,
|
@@ -81,7 +80,8 @@ return array(
|
|
81 |
$subscription_helper,
|
82 |
$messages_apply,
|
83 |
$environment,
|
84 |
-
$payment_token_repository
|
|
|
85 |
);
|
86 |
},
|
87 |
'button.url' => static function ( $container ): string {
|
59 |
if ( $paypal_disabled ) {
|
60 |
return new DisabledSmartButton();
|
61 |
}
|
|
|
62 |
$payer_factory = $container->get( 'api.factory.payer' );
|
63 |
$request_data = $container->get( 'button.request-data' );
|
64 |
|
68 |
$messages_apply = $container->get( 'button.helper.messages-apply' );
|
69 |
$environment = $container->get( 'onboarding.environment' );
|
70 |
$payment_token_repository = $container->get( 'subscription.repository.payment-token' );
|
71 |
+
$settings_status = $container->get( 'wcgateway.settings.status' );
|
72 |
return new SmartButton(
|
73 |
$container->get( 'button.url' ),
|
74 |
$container->get( 'session.handler' ),
|
75 |
$settings,
|
|
|
76 |
$payer_factory,
|
77 |
$client_id,
|
78 |
$request_data,
|
80 |
$subscription_helper,
|
81 |
$messages_apply,
|
82 |
$environment,
|
83 |
+
$payment_token_repository,
|
84 |
+
$settings_status
|
85 |
);
|
86 |
},
|
87 |
'button.url' => static function ( $container ): string {
|
modules/ppcp-button/src/Assets/class-smartbutton.php
CHANGED
@@ -11,7 +11,6 @@ namespace WooCommerce\PayPalCommerce\Button\Assets;
|
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
14 |
-
use WooCommerce\PayPalCommerce\ApiClient\Repository\PayeeRepository;
|
15 |
use WooCommerce\PayPalCommerce\Button\Endpoint\ApproveOrderEndpoint;
|
16 |
use WooCommerce\PayPalCommerce\Button\Endpoint\ChangeCartEndpoint;
|
17 |
use WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint;
|
@@ -23,6 +22,7 @@ use WooCommerce\PayPalCommerce\Session\SessionHandler;
|
|
23 |
use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper;
|
24 |
use WooCommerce\PayPalCommerce\Subscription\Repository\PaymentTokenRepository;
|
25 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
|
|
26 |
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
27 |
|
28 |
/**
|
@@ -30,6 +30,13 @@ use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
|
30 |
*/
|
31 |
class SmartButton implements SmartButtonInterface {
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* The URL to the module.
|
35 |
*
|
@@ -51,13 +58,6 @@ class SmartButton implements SmartButtonInterface {
|
|
51 |
*/
|
52 |
private $settings;
|
53 |
|
54 |
-
/**
|
55 |
-
* The Payee Repository.
|
56 |
-
*
|
57 |
-
* @var PayeeRepository
|
58 |
-
*/
|
59 |
-
private $payee_repository;
|
60 |
-
|
61 |
/**
|
62 |
* The Payer Factory.
|
63 |
*
|
@@ -120,7 +120,6 @@ class SmartButton implements SmartButtonInterface {
|
|
120 |
* @param string $module_url The URL to the module.
|
121 |
* @param SessionHandler $session_handler The Session Handler.
|
122 |
* @param Settings $settings The Settings.
|
123 |
-
* @param PayeeRepository $payee_repository The Payee Repository.
|
124 |
* @param PayerFactory $payer_factory The Payer factory.
|
125 |
* @param string $client_id The client ID.
|
126 |
* @param RequestData $request_data The Request Data helper.
|
@@ -129,12 +128,12 @@ class SmartButton implements SmartButtonInterface {
|
|
129 |
* @param MessagesApply $messages_apply The Messages apply helper.
|
130 |
* @param Environment $environment The environment object.
|
131 |
* @param PaymentTokenRepository $payment_token_repository The payment token repository.
|
|
|
132 |
*/
|
133 |
public function __construct(
|
134 |
string $module_url,
|
135 |
SessionHandler $session_handler,
|
136 |
Settings $settings,
|
137 |
-
PayeeRepository $payee_repository,
|
138 |
PayerFactory $payer_factory,
|
139 |
string $client_id,
|
140 |
RequestData $request_data,
|
@@ -142,13 +141,13 @@ class SmartButton implements SmartButtonInterface {
|
|
142 |
SubscriptionHelper $subscription_helper,
|
143 |
MessagesApply $messages_apply,
|
144 |
Environment $environment,
|
145 |
-
PaymentTokenRepository $payment_token_repository
|
|
|
146 |
) {
|
147 |
|
148 |
$this->module_url = $module_url;
|
149 |
$this->session_handler = $session_handler;
|
150 |
$this->settings = $settings;
|
151 |
-
$this->payee_repository = $payee_repository;
|
152 |
$this->payer_factory = $payer_factory;
|
153 |
$this->client_id = $client_id;
|
154 |
$this->request_data = $request_data;
|
@@ -157,6 +156,7 @@ class SmartButton implements SmartButtonInterface {
|
|
157 |
$this->messages_apply = $messages_apply;
|
158 |
$this->environment = $environment;
|
159 |
$this->payment_token_repository = $payment_token_repository;
|
|
|
160 |
}
|
161 |
|
162 |
/**
|
@@ -202,7 +202,7 @@ class SmartButton implements SmartButtonInterface {
|
|
202 |
add_filter(
|
203 |
'woocommerce_credit_card_form_fields',
|
204 |
function ( $default_fields, $id ) {
|
205 |
-
if ( $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) && CreditCardGateway::ID === $id ) {
|
206 |
$default_fields['card-vault'] = sprintf(
|
207 |
'<p class="form-row form-row-wide"><label for="vault"><input class="ppcp-credit-card-vault" type="checkbox" id="ppcp-credit-card-vault" name="vault">%s</label></p>',
|
208 |
esc_html__( 'Save your Credit Card', 'woocommerce-paypal-payments' )
|
@@ -438,7 +438,7 @@ class SmartButton implements SmartButtonInterface {
|
|
438 |
*/
|
439 |
public function message_renderer() {
|
440 |
|
441 |
-
echo '<div id="ppcp-messages"></div>';
|
442 |
}
|
443 |
|
444 |
/**
|
@@ -612,16 +612,16 @@ class SmartButton implements SmartButtonInterface {
|
|
612 |
|
613 |
$this->request_data->enqueue_nonce_fix();
|
614 |
$localize = array(
|
615 |
-
'script_attributes'
|
616 |
-
'data_client_id'
|
617 |
'set_attribute' => ( is_checkout() && $this->dcc_is_enabled() ) || $this->can_save_vault_token(),
|
618 |
'endpoint' => home_url( \WC_AJAX::get_endpoint( DataClientIdEndpoint::ENDPOINT ) ),
|
619 |
'nonce' => wp_create_nonce( DataClientIdEndpoint::nonce() ),
|
620 |
'user' => get_current_user_id(),
|
621 |
),
|
622 |
-
'redirect'
|
623 |
-
'context'
|
624 |
-
'ajax'
|
625 |
'change_cart' => array(
|
626 |
'endpoint' => home_url( \WC_AJAX::get_endpoint( ChangeCartEndpoint::ENDPOINT ) ),
|
627 |
'nonce' => wp_create_nonce( ChangeCartEndpoint::nonce() ),
|
@@ -635,11 +635,11 @@ class SmartButton implements SmartButtonInterface {
|
|
635 |
'nonce' => wp_create_nonce( ApproveOrderEndpoint::nonce() ),
|
636 |
),
|
637 |
),
|
638 |
-
'enforce_vault'
|
639 |
-
'save_card'
|
640 |
-
'bn_codes'
|
641 |
-
'payer'
|
642 |
-
'button'
|
643 |
'wrapper' => '#ppc-button',
|
644 |
'mini_cart_wrapper' => '#ppc-button-minicart',
|
645 |
'cancel_wrapper' => '#ppcp-cancel',
|
@@ -650,6 +650,7 @@ class SmartButton implements SmartButtonInterface {
|
|
650 |
'shape' => $this->style_for_context( 'shape', 'mini-cart' ),
|
651 |
'label' => $this->style_for_context( 'label', 'mini-cart' ),
|
652 |
'tagline' => $this->style_for_context( 'tagline', 'mini-cart' ),
|
|
|
653 |
),
|
654 |
'style' => array(
|
655 |
'layout' => $this->style_for_context( 'layout', $this->context() ),
|
@@ -659,7 +660,7 @@ class SmartButton implements SmartButtonInterface {
|
|
659 |
'tagline' => $this->style_for_context( 'tagline', $this->context() ),
|
660 |
),
|
661 |
),
|
662 |
-
'hosted_fields'
|
663 |
'wrapper' => '#ppcp-hosted-fields',
|
664 |
'mini_cart_wrapper' => '#ppcp-hosted-fields-mini-cart',
|
665 |
'labels' => array(
|
@@ -677,8 +678,8 @@ class SmartButton implements SmartButtonInterface {
|
|
677 |
),
|
678 |
'valid_cards' => $this->dcc_applies->valid_cards(),
|
679 |
),
|
680 |
-
'messages'
|
681 |
-
'labels'
|
682 |
'error' => array(
|
683 |
'generic' => __(
|
684 |
'Something went wrong. Please try again or choose another payment source.',
|
@@ -686,7 +687,9 @@ class SmartButton implements SmartButtonInterface {
|
|
686 |
),
|
687 |
),
|
688 |
),
|
689 |
-
'order_id'
|
|
|
|
|
690 |
);
|
691 |
|
692 |
if ( $this->style_for_context( 'layout', 'mini-cart' ) !== 'horizontal' ) {
|
@@ -740,10 +743,6 @@ class SmartButton implements SmartButtonInterface {
|
|
740 |
) {
|
741 |
$params['buyer-country'] = WC()->customer->get_billing_country();
|
742 |
}
|
743 |
-
$payee = $this->payee_repository->payee();
|
744 |
-
if ( $payee->merchant_id() ) {
|
745 |
-
$params['merchant-id'] = $payee->merchant_id();
|
746 |
-
}
|
747 |
$disable_funding = $this->settings->has( 'disable_funding' ) ?
|
748 |
$this->settings->get( 'disable_funding' ) : array();
|
749 |
if ( ! is_checkout() ) {
|
@@ -754,6 +753,14 @@ class SmartButton implements SmartButtonInterface {
|
|
754 |
$params['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
755 |
}
|
756 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
$smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' );
|
758 |
return $smart_button_url;
|
759 |
}
|
@@ -939,4 +946,21 @@ class SmartButton implements SmartButtonInterface {
|
|
939 |
}
|
940 |
return (string) $value;
|
941 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
942 |
}
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
|
|
|
14 |
use WooCommerce\PayPalCommerce\Button\Endpoint\ApproveOrderEndpoint;
|
15 |
use WooCommerce\PayPalCommerce\Button\Endpoint\ChangeCartEndpoint;
|
16 |
use WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint;
|
22 |
use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper;
|
23 |
use WooCommerce\PayPalCommerce\Subscription\Repository\PaymentTokenRepository;
|
24 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
25 |
+
use Woocommerce\PayPalCommerce\WcGateway\Helper\SettingsStatus;
|
26 |
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
27 |
|
28 |
/**
|
30 |
*/
|
31 |
class SmartButton implements SmartButtonInterface {
|
32 |
|
33 |
+
/**
|
34 |
+
* The Settings status helper.
|
35 |
+
*
|
36 |
+
* @var SettingsStatus
|
37 |
+
*/
|
38 |
+
protected $settings_status;
|
39 |
+
|
40 |
/**
|
41 |
* The URL to the module.
|
42 |
*
|
58 |
*/
|
59 |
private $settings;
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
/**
|
62 |
* The Payer Factory.
|
63 |
*
|
120 |
* @param string $module_url The URL to the module.
|
121 |
* @param SessionHandler $session_handler The Session Handler.
|
122 |
* @param Settings $settings The Settings.
|
|
|
123 |
* @param PayerFactory $payer_factory The Payer factory.
|
124 |
* @param string $client_id The client ID.
|
125 |
* @param RequestData $request_data The Request Data helper.
|
128 |
* @param MessagesApply $messages_apply The Messages apply helper.
|
129 |
* @param Environment $environment The environment object.
|
130 |
* @param PaymentTokenRepository $payment_token_repository The payment token repository.
|
131 |
+
* @param SettingsStatus $settings_status The Settings status helper.
|
132 |
*/
|
133 |
public function __construct(
|
134 |
string $module_url,
|
135 |
SessionHandler $session_handler,
|
136 |
Settings $settings,
|
|
|
137 |
PayerFactory $payer_factory,
|
138 |
string $client_id,
|
139 |
RequestData $request_data,
|
141 |
SubscriptionHelper $subscription_helper,
|
142 |
MessagesApply $messages_apply,
|
143 |
Environment $environment,
|
144 |
+
PaymentTokenRepository $payment_token_repository,
|
145 |
+
SettingsStatus $settings_status
|
146 |
) {
|
147 |
|
148 |
$this->module_url = $module_url;
|
149 |
$this->session_handler = $session_handler;
|
150 |
$this->settings = $settings;
|
|
|
151 |
$this->payer_factory = $payer_factory;
|
152 |
$this->client_id = $client_id;
|
153 |
$this->request_data = $request_data;
|
156 |
$this->messages_apply = $messages_apply;
|
157 |
$this->environment = $environment;
|
158 |
$this->payment_token_repository = $payment_token_repository;
|
159 |
+
$this->settings_status = $settings_status;
|
160 |
}
|
161 |
|
162 |
/**
|
202 |
add_filter(
|
203 |
'woocommerce_credit_card_form_fields',
|
204 |
function ( $default_fields, $id ) {
|
205 |
+
if ( is_user_logged_in() && $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) && CreditCardGateway::ID === $id ) {
|
206 |
$default_fields['card-vault'] = sprintf(
|
207 |
'<p class="form-row form-row-wide"><label for="vault"><input class="ppcp-credit-card-vault" type="checkbox" id="ppcp-credit-card-vault" name="vault">%s</label></p>',
|
208 |
esc_html__( 'Save your Credit Card', 'woocommerce-paypal-payments' )
|
438 |
*/
|
439 |
public function message_renderer() {
|
440 |
|
441 |
+
echo '<div id="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
442 |
}
|
443 |
|
444 |
/**
|
612 |
|
613 |
$this->request_data->enqueue_nonce_fix();
|
614 |
$localize = array(
|
615 |
+
'script_attributes' => $this->attributes(),
|
616 |
+
'data_client_id' => array(
|
617 |
'set_attribute' => ( is_checkout() && $this->dcc_is_enabled() ) || $this->can_save_vault_token(),
|
618 |
'endpoint' => home_url( \WC_AJAX::get_endpoint( DataClientIdEndpoint::ENDPOINT ) ),
|
619 |
'nonce' => wp_create_nonce( DataClientIdEndpoint::nonce() ),
|
620 |
'user' => get_current_user_id(),
|
621 |
),
|
622 |
+
'redirect' => wc_get_checkout_url(),
|
623 |
+
'context' => $this->context(),
|
624 |
+
'ajax' => array(
|
625 |
'change_cart' => array(
|
626 |
'endpoint' => home_url( \WC_AJAX::get_endpoint( ChangeCartEndpoint::ENDPOINT ) ),
|
627 |
'nonce' => wp_create_nonce( ChangeCartEndpoint::nonce() ),
|
635 |
'nonce' => wp_create_nonce( ApproveOrderEndpoint::nonce() ),
|
636 |
),
|
637 |
),
|
638 |
+
'enforce_vault' => $this->has_subscriptions(),
|
639 |
+
'save_card' => $this->can_save_vault_token(),
|
640 |
+
'bn_codes' => $this->bn_codes(),
|
641 |
+
'payer' => $this->payerData(),
|
642 |
+
'button' => array(
|
643 |
'wrapper' => '#ppc-button',
|
644 |
'mini_cart_wrapper' => '#ppc-button-minicart',
|
645 |
'cancel_wrapper' => '#ppcp-cancel',
|
650 |
'shape' => $this->style_for_context( 'shape', 'mini-cart' ),
|
651 |
'label' => $this->style_for_context( 'label', 'mini-cart' ),
|
652 |
'tagline' => $this->style_for_context( 'tagline', 'mini-cart' ),
|
653 |
+
'height' => $this->settings->has( 'button_mini-cart_height' ) && $this->settings->get( 'button_mini-cart_height' ) ? $this->normalize_height( (int) $this->settings->get( 'button_mini-cart_height' ) ) : 35,
|
654 |
),
|
655 |
'style' => array(
|
656 |
'layout' => $this->style_for_context( 'layout', $this->context() ),
|
660 |
'tagline' => $this->style_for_context( 'tagline', $this->context() ),
|
661 |
),
|
662 |
),
|
663 |
+
'hosted_fields' => array(
|
664 |
'wrapper' => '#ppcp-hosted-fields',
|
665 |
'mini_cart_wrapper' => '#ppcp-hosted-fields-mini-cart',
|
666 |
'labels' => array(
|
678 |
),
|
679 |
'valid_cards' => $this->dcc_applies->valid_cards(),
|
680 |
),
|
681 |
+
'messages' => $this->message_values(),
|
682 |
+
'labels' => array(
|
683 |
'error' => array(
|
684 |
'generic' => __(
|
685 |
'Something went wrong. Please try again or choose another payment source.',
|
687 |
),
|
688 |
),
|
689 |
),
|
690 |
+
'order_id' => 'pay-now' === $this->context() ? absint( $wp->query_vars['order-pay'] ) : 0,
|
691 |
+
'single_product_buttons_enabled' => $this->settings->has( 'button_product_enabled' ) && $this->settings->get( 'button_product_enabled' ),
|
692 |
+
'mini_cart_buttons_enabled' => $this->settings->has( 'button_mini-cart_enabled' ) && $this->settings->get( 'button_mini-cart_enabled' ),
|
693 |
);
|
694 |
|
695 |
if ( $this->style_for_context( 'layout', 'mini-cart' ) !== 'horizontal' ) {
|
743 |
) {
|
744 |
$params['buyer-country'] = WC()->customer->get_billing_country();
|
745 |
}
|
|
|
|
|
|
|
|
|
746 |
$disable_funding = $this->settings->has( 'disable_funding' ) ?
|
747 |
$this->settings->get( 'disable_funding' ) : array();
|
748 |
if ( ! is_checkout() ) {
|
753 |
$params['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
754 |
}
|
755 |
|
756 |
+
$enable_funding = array( 'venmo' );
|
757 |
+
if ( $this->settings_status->pay_later_messaging_is_enabled() || ! in_array( 'credit', $disable_funding, true ) ) {
|
758 |
+
$enable_funding[] = 'paylater';
|
759 |
+
}
|
760 |
+
if ( count( $enable_funding ) > 0 ) {
|
761 |
+
$params['enable-funding'] = implode( ',', array_unique( $enable_funding ) );
|
762 |
+
}
|
763 |
+
|
764 |
$smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' );
|
765 |
return $smart_button_url;
|
766 |
}
|
946 |
}
|
947 |
return (string) $value;
|
948 |
}
|
949 |
+
|
950 |
+
/**
|
951 |
+
* Returns a value between 25 and 55.
|
952 |
+
*
|
953 |
+
* @param int $height The input value.
|
954 |
+
* @return int The normalized output value.
|
955 |
+
*/
|
956 |
+
private function normalize_height( int $height ): int {
|
957 |
+
if ( $height < 25 ) {
|
958 |
+
return 25;
|
959 |
+
}
|
960 |
+
if ( $height > 55 ) {
|
961 |
+
return 55;
|
962 |
+
}
|
963 |
+
|
964 |
+
return $height;
|
965 |
+
}
|
966 |
}
|
modules/ppcp-button/src/Endpoint/class-createorderendpoint.php
CHANGED
@@ -174,7 +174,11 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|
174 |
$this->set_bn_code( $data );
|
175 |
|
176 |
if ( 'checkout' === $data['context'] ) {
|
177 |
-
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
if ( 'pay-now' === $data['context'] && get_option( 'woocommerce_terms_page_id', '' ) !== '' ) {
|
180 |
$this->validate_paynow_form( $data['form'] );
|
@@ -201,6 +205,43 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|
201 |
return false;
|
202 |
}
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
/**
|
205 |
* Creates the order in the PayPal, uses data from WC order if provided.
|
206 |
*
|
@@ -341,39 +382,40 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|
341 |
}
|
342 |
|
343 |
/**
|
344 |
-
*
|
345 |
*
|
346 |
-
* @param
|
347 |
-
* @param \
|
348 |
-
*
|
349 |
-
* @return array
|
350 |
*/
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
|
|
355 |
|
356 |
-
|
357 |
-
|
358 |
-
* we want this order to be created. We will intercept it and leave it
|
359 |
-
* in the "Pending payment" status though, which than later will change
|
360 |
-
* during the "onApprove"-JS callback or the webhook listener.
|
361 |
-
*/
|
362 |
-
if ( ! $this->early_order_handler->should_create_early_order() ) {
|
363 |
-
wp_send_json_success( $order->to_array() );
|
364 |
}
|
365 |
-
$
|
366 |
-
return $data;
|
367 |
}
|
|
|
|
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
|
|
|
|
|
|
376 |
);
|
377 |
-
|
|
|
|
|
378 |
}
|
379 |
}
|
174 |
$this->set_bn_code( $data );
|
175 |
|
176 |
if ( 'checkout' === $data['context'] ) {
|
177 |
+
if ( isset( $data['createaccount'] ) && '1' === $data['createaccount'] ) {
|
178 |
+
$this->process_checkout_form_when_creating_account( $data['form'], $wc_order );
|
179 |
+
}
|
180 |
+
|
181 |
+
$this->process_checkout_form( $data['form'] );
|
182 |
}
|
183 |
if ( 'pay-now' === $data['context'] && get_option( 'woocommerce_terms_page_id', '' ) !== '' ) {
|
184 |
$this->validate_paynow_form( $data['form'] );
|
205 |
return false;
|
206 |
}
|
207 |
|
208 |
+
/**
|
209 |
+
* Once the checkout has been validated we execute this method.
|
210 |
+
*
|
211 |
+
* @param array $data The data.
|
212 |
+
* @param \WP_Error $errors The errors, which occurred.
|
213 |
+
*
|
214 |
+
* @return array
|
215 |
+
*/
|
216 |
+
public function after_checkout_validation( array $data, \WP_Error $errors ): array {
|
217 |
+
if ( ! $errors->errors ) {
|
218 |
+
|
219 |
+
$order = $this->create_paypal_order();
|
220 |
+
|
221 |
+
/**
|
222 |
+
* In case we are onboarded and everything is fine with the \WC_Order
|
223 |
+
* we want this order to be created. We will intercept it and leave it
|
224 |
+
* in the "Pending payment" status though, which than later will change
|
225 |
+
* during the "onApprove"-JS callback or the webhook listener.
|
226 |
+
*/
|
227 |
+
if ( ! $this->early_order_handler->should_create_early_order() ) {
|
228 |
+
wp_send_json_success( $order->to_array() );
|
229 |
+
}
|
230 |
+
$this->early_order_handler->register_for_order( $order );
|
231 |
+
return $data;
|
232 |
+
}
|
233 |
+
|
234 |
+
wp_send_json_error(
|
235 |
+
array(
|
236 |
+
'name' => '',
|
237 |
+
'message' => $errors->get_error_message(),
|
238 |
+
'code' => (int) $errors->get_error_code(),
|
239 |
+
'details' => array(),
|
240 |
+
)
|
241 |
+
);
|
242 |
+
return $data;
|
243 |
+
}
|
244 |
+
|
245 |
/**
|
246 |
* Creates the order in the PayPal, uses data from WC order if provided.
|
247 |
*
|
382 |
}
|
383 |
|
384 |
/**
|
385 |
+
* Processes checkout and creates the PayPal order after success form validation.
|
386 |
*
|
387 |
+
* @param string $form_values The values of the form.
|
388 |
+
* @param \WC_Order|null $wc_order WC order to get data from.
|
389 |
+
* @throws \Exception On Error.
|
|
|
390 |
*/
|
391 |
+
private function process_checkout_form_when_creating_account( string $form_values, \WC_Order $wc_order = null ) {
|
392 |
+
$form_values = explode( '&', $form_values );
|
393 |
+
$parsed_values = array();
|
394 |
+
foreach ( $form_values as $field ) {
|
395 |
+
$field = explode( '=', $field );
|
396 |
|
397 |
+
if ( count( $field ) !== 2 ) {
|
398 |
+
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
}
|
400 |
+
$parsed_values[ $field[0] ] = $field[1];
|
|
|
401 |
}
|
402 |
+
$_POST = $parsed_values;
|
403 |
+
$_REQUEST = $parsed_values;
|
404 |
|
405 |
+
add_action(
|
406 |
+
'woocommerce_after_checkout_validation',
|
407 |
+
function ( array $data, \WP_Error $errors ) use ( $wc_order ) {
|
408 |
+
if ( ! $errors->errors ) {
|
409 |
+
$order = $this->create_paypal_order( $wc_order );
|
410 |
+
wp_send_json_success( $order->to_array() );
|
411 |
+
return true;
|
412 |
+
}
|
413 |
+
},
|
414 |
+
10,
|
415 |
+
2
|
416 |
);
|
417 |
+
|
418 |
+
$checkout = \WC()->checkout();
|
419 |
+
$checkout->process_checkout();
|
420 |
}
|
421 |
}
|
modules/ppcp-button/src/class-buttonmodule.php
CHANGED
@@ -43,7 +43,7 @@ class ButtonModule implements ModuleInterface {
|
|
43 |
*
|
44 |
* @param ContainerInterface|null $container The Container.
|
45 |
*/
|
46 |
-
public function run( ContainerInterface $container
|
47 |
|
48 |
add_action(
|
49 |
'wp',
|
43 |
*
|
44 |
* @param ContainerInterface|null $container The Container.
|
45 |
*/
|
46 |
+
public function run( ContainerInterface $container ): void {
|
47 |
|
48 |
add_action(
|
49 |
'wp',
|
modules/ppcp-compat/extensions.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The compatibility module extensions.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\Compat
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\Compat;
|
11 |
+
|
12 |
+
return array();
|
modules/ppcp-compat/module.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The compatibility module.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\Compat
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\Compat;
|
11 |
+
|
12 |
+
use Dhii\Modular\Module\ModuleInterface;
|
13 |
+
|
14 |
+
return static function (): ModuleInterface {
|
15 |
+
return new CompatModule();
|
16 |
+
};
|
modules/ppcp-compat/services.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The compatibility module services.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\Compat
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\Compat;
|
11 |
+
|
12 |
+
return array();
|
modules/ppcp-compat/src/class-compatmodule.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The compatibility module.
|
4 |
+
*
|
5 |
+
* @package WooCommerce\PayPalCommerce\Compat
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace WooCommerce\PayPalCommerce\Compat;
|
11 |
+
|
12 |
+
use Dhii\Container\ServiceProvider;
|
13 |
+
use Dhii\Modular\Module\ModuleInterface;
|
14 |
+
use Interop\Container\ServiceProviderInterface;
|
15 |
+
use Psr\Container\ContainerInterface;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class CompatModule
|
19 |
+
*/
|
20 |
+
class CompatModule implements ModuleInterface {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Setup the compatibility module.
|
24 |
+
*
|
25 |
+
* @return ServiceProviderInterface
|
26 |
+
*/
|
27 |
+
public function setup(): ServiceProviderInterface {
|
28 |
+
return new ServiceProvider(
|
29 |
+
require __DIR__ . '/../services.php',
|
30 |
+
require __DIR__ . '/../extensions.php'
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Run the compatibility module.
|
36 |
+
*
|
37 |
+
* @param ContainerInterface|null $container The Container.
|
38 |
+
*/
|
39 |
+
public function run( ContainerInterface $container ): void {
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Returns the key for the module.
|
44 |
+
*
|
45 |
+
* @return string|void
|
46 |
+
*/
|
47 |
+
public function getKey() {
|
48 |
+
}
|
49 |
+
}
|
modules/ppcp-onboarding/src/class-onboardingmodule.php
CHANGED
@@ -40,7 +40,8 @@ class OnboardingModule implements ModuleInterface {
|
|
40 |
*
|
41 |
* @param ContainerInterface|null $container The container.
|
42 |
*/
|
43 |
-
public function run( ContainerInterface $container
|
|
|
44 |
$asset_loader = $container->get( 'onboarding.assets' );
|
45 |
/**
|
46 |
* The OnboardingAssets.
|
40 |
*
|
41 |
* @param ContainerInterface|null $container The container.
|
42 |
*/
|
43 |
+
public function run( ContainerInterface $container ): void {
|
44 |
+
|
45 |
$asset_loader = $container->get( 'onboarding.assets' );
|
46 |
/**
|
47 |
* The OnboardingAssets.
|
modules/ppcp-session/src/class-sessionmodule.php
CHANGED
@@ -37,7 +37,7 @@ class SessionModule implements ModuleInterface {
|
|
37 |
*
|
38 |
* @param ContainerInterface|null $container The container.
|
39 |
*/
|
40 |
-
public function run( ContainerInterface $container
|
41 |
add_action(
|
42 |
'woocommerce_init',
|
43 |
function () use ( $container ) {
|
37 |
*
|
38 |
* @param ContainerInterface|null $container The container.
|
39 |
*/
|
40 |
+
public function run( ContainerInterface $container ): void {
|
41 |
add_action(
|
42 |
'woocommerce_init',
|
43 |
function () use ( $container ) {
|
modules/ppcp-subscription/src/class-subscriptionmodule.php
CHANGED
@@ -44,7 +44,7 @@ class SubscriptionModule implements ModuleInterface {
|
|
44 |
*
|
45 |
* @param ContainerInterface|null $container The container.
|
46 |
*/
|
47 |
-
public function run( ContainerInterface $container
|
48 |
add_action(
|
49 |
'woocommerce_scheduled_subscription_payment_' . PayPalGateway::ID,
|
50 |
function ( $amount, $order ) use ( $container ) {
|
44 |
*
|
45 |
* @param ContainerInterface|null $container The container.
|
46 |
*/
|
47 |
+
public function run( ContainerInterface $container ): void {
|
48 |
add_action(
|
49 |
'woocommerce_scheduled_subscription_payment_' . PayPalGateway::ID,
|
50 |
function ( $amount, $order ) use ( $container ) {
|
modules/ppcp-wc-gateway/services.php
CHANGED
@@ -25,6 +25,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
|
25 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
26 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\TransactionUrlProvider;
|
27 |
use Woocommerce\PayPalCommerce\WcGateway\Helper\DccProductStatus;
|
|
|
28 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
|
29 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\ConnectAdminNotice;
|
30 |
use WooCommerce\PayPalCommerce\WcGateway\Processor\AuthorizedPaymentsProcessor;
|
@@ -114,6 +115,10 @@ return array(
|
|
114 |
'wcgateway.settings.sections-renderer' => static function ( $container ): SectionsRenderer {
|
115 |
return new SectionsRenderer();
|
116 |
},
|
|
|
|
|
|
|
|
|
117 |
'wcgateway.settings.render' => static function ( $container ): SettingsRenderer {
|
118 |
$settings = $container->get( 'wcgateway.settings' );
|
119 |
$state = $container->get( 'onboarding.state' );
|
@@ -121,13 +126,15 @@ return array(
|
|
121 |
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
122 |
$messages_apply = $container->get( 'button.helper.messages-apply' );
|
123 |
$dcc_product_status = $container->get( 'wcgateway.helper.dcc-product-status' );
|
|
|
124 |
return new SettingsRenderer(
|
125 |
$settings,
|
126 |
$state,
|
127 |
$fields,
|
128 |
$dcc_applies,
|
129 |
$messages_apply,
|
130 |
-
$dcc_product_status
|
|
|
131 |
);
|
132 |
},
|
133 |
'wcgateway.settings.listener' => static function ( $container ): SettingsListener {
|
@@ -828,7 +835,7 @@ return array(
|
|
828 |
),
|
829 |
'requirements' => array( 'messages' ),
|
830 |
'gateway' => 'paypal',
|
831 |
-
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more
|
832 |
'class' => array( 'ppcp-subheading' ),
|
833 |
),
|
834 |
'message_enabled' => array(
|
@@ -1131,7 +1138,7 @@ return array(
|
|
1131 |
),
|
1132 |
'requirements' => array( 'messages' ),
|
1133 |
'gateway' => 'paypal',
|
1134 |
-
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more
|
1135 |
'class' => array( 'ppcp-subheading' ),
|
1136 |
),
|
1137 |
'message_product_enabled' => array(
|
@@ -1434,7 +1441,7 @@ return array(
|
|
1434 |
),
|
1435 |
'requirements' => array( 'messages' ),
|
1436 |
'gateway' => 'paypal',
|
1437 |
-
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more
|
1438 |
'class' => array( 'ppcp-subheading' ),
|
1439 |
),
|
1440 |
'message_cart_enabled' => array(
|
@@ -1623,7 +1630,7 @@ return array(
|
|
1623 |
'type' => 'select',
|
1624 |
'class' => array(),
|
1625 |
'input_class' => array( 'wc-enhanced-select' ),
|
1626 |
-
'default' => '
|
1627 |
'desc_tip' => true,
|
1628 |
'description' => __(
|
1629 |
'If additional funding sources are available to the buyer through PayPal, such as Venmo, then multiple buttons are displayed in the space provided. Choose "vertical" for a dynamic list of alternative and local payment options, or "horizontal" when space is limited.',
|
@@ -1727,6 +1734,19 @@ return array(
|
|
1727 |
'requirements' => array(),
|
1728 |
'gateway' => 'paypal',
|
1729 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1730 |
|
1731 |
'disable_cards' => array(
|
1732 |
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
|
25 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
26 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\TransactionUrlProvider;
|
27 |
use Woocommerce\PayPalCommerce\WcGateway\Helper\DccProductStatus;
|
28 |
+
use Woocommerce\PayPalCommerce\WcGateway\Helper\SettingsStatus;
|
29 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
|
30 |
use WooCommerce\PayPalCommerce\WcGateway\Notice\ConnectAdminNotice;
|
31 |
use WooCommerce\PayPalCommerce\WcGateway\Processor\AuthorizedPaymentsProcessor;
|
115 |
'wcgateway.settings.sections-renderer' => static function ( $container ): SectionsRenderer {
|
116 |
return new SectionsRenderer();
|
117 |
},
|
118 |
+
'wcgateway.settings.status' => static function ( $container ): SettingsStatus {
|
119 |
+
$settings = $container->get( 'wcgateway.settings' );
|
120 |
+
return new SettingsStatus( $settings );
|
121 |
+
},
|
122 |
'wcgateway.settings.render' => static function ( $container ): SettingsRenderer {
|
123 |
$settings = $container->get( 'wcgateway.settings' );
|
124 |
$state = $container->get( 'onboarding.state' );
|
126 |
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
127 |
$messages_apply = $container->get( 'button.helper.messages-apply' );
|
128 |
$dcc_product_status = $container->get( 'wcgateway.helper.dcc-product-status' );
|
129 |
+
$settings_status = $container->get( 'wcgateway.settings.status' );
|
130 |
return new SettingsRenderer(
|
131 |
$settings,
|
132 |
$state,
|
133 |
$fields,
|
134 |
$dcc_applies,
|
135 |
$messages_apply,
|
136 |
+
$dcc_product_status,
|
137 |
+
$settings_status
|
138 |
);
|
139 |
},
|
140 |
'wcgateway.settings.listener' => static function ( $container ): SettingsListener {
|
835 |
),
|
836 |
'requirements' => array( 'messages' ),
|
837 |
'gateway' => 'paypal',
|
838 |
+
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more</a>. Pay Later button will show for eligible buyers and PayPal determines eligibility.', 'woocommerce-paypal-payments' ) ),
|
839 |
'class' => array( 'ppcp-subheading' ),
|
840 |
),
|
841 |
'message_enabled' => array(
|
1138 |
),
|
1139 |
'requirements' => array( 'messages' ),
|
1140 |
'gateway' => 'paypal',
|
1141 |
+
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more</a>. Pay Later button will show for eligible buyers and PayPal determines eligibility.', 'woocommerce-paypal-payments' ) ),
|
1142 |
'class' => array( 'ppcp-subheading' ),
|
1143 |
),
|
1144 |
'message_product_enabled' => array(
|
1441 |
),
|
1442 |
'requirements' => array( 'messages' ),
|
1443 |
'gateway' => 'paypal',
|
1444 |
+
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more</a>. Pay Later button will show for eligible buyers and PayPal determines eligibility.', 'woocommerce-paypal-payments' ) ),
|
1445 |
'class' => array( 'ppcp-subheading' ),
|
1446 |
),
|
1447 |
'message_cart_enabled' => array(
|
1630 |
'type' => 'select',
|
1631 |
'class' => array(),
|
1632 |
'input_class' => array( 'wc-enhanced-select' ),
|
1633 |
+
'default' => 'vertical',
|
1634 |
'desc_tip' => true,
|
1635 |
'description' => __(
|
1636 |
'If additional funding sources are available to the buyer through PayPal, such as Venmo, then multiple buttons are displayed in the space provided. Choose "vertical" for a dynamic list of alternative and local payment options, or "horizontal" when space is limited.',
|
1734 |
'requirements' => array(),
|
1735 |
'gateway' => 'paypal',
|
1736 |
),
|
1737 |
+
'button_mini-cart_height' => array(
|
1738 |
+
'title' => __( 'Button Height', 'woocommerce-paypal-payments' ),
|
1739 |
+
'type' => 'number',
|
1740 |
+
'default' => '35',
|
1741 |
+
'desc_tip' => true,
|
1742 |
+
'description' => __( 'Add a value from 25 to 55.', 'woocommerce-paypal-payments' ),
|
1743 |
+
'screens' => array(
|
1744 |
+
State::STATE_PROGRESSIVE,
|
1745 |
+
State::STATE_ONBOARDED,
|
1746 |
+
),
|
1747 |
+
'requirements' => array(),
|
1748 |
+
'gateway' => 'paypal',
|
1749 |
+
),
|
1750 |
|
1751 |
'disable_cards' => array(
|
1752 |
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
|
modules/ppcp-wc-gateway/src/Assets/class-settingspageassets.php
CHANGED
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
|
10 |
namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
|
|
13 |
|
14 |
/**
|
15 |
* Class SettingsPageAssets
|
@@ -111,13 +112,17 @@ class SettingsPageAssets {
|
|
111 |
true
|
112 |
);
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
}
|
10 |
namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
14 |
|
15 |
/**
|
16 |
* Class SettingsPageAssets
|
112 |
true
|
113 |
);
|
114 |
|
115 |
+
try {
|
116 |
+
$token = $bearer->bearer();
|
117 |
+
wp_localize_script(
|
118 |
+
'ppcp-gateway-settings',
|
119 |
+
'PayPalCommerceGatewaySettings',
|
120 |
+
array(
|
121 |
+
'vaulting_features_available' => $token->vaulting_available(),
|
122 |
+
)
|
123 |
+
);
|
124 |
+
} catch ( RuntimeException $exception ) {
|
125 |
+
return;
|
126 |
+
}
|
127 |
}
|
128 |
}
|
modules/ppcp-wc-gateway/src/Helper/class-settingsstatus.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Helper to get settings status.
|
4 |
+
*
|
5 |
+
* @package Woocommerce\PayPalCommerce\WcGateway\Helper
|
6 |
+
*/
|
7 |
+
|
8 |
+
declare(strict_types=1);
|
9 |
+
|
10 |
+
namespace Woocommerce\PayPalCommerce\WcGateway\Helper;
|
11 |
+
|
12 |
+
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class SettingsStatus
|
16 |
+
*/
|
17 |
+
class SettingsStatus {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The Settings.
|
21 |
+
*
|
22 |
+
* @var Settings
|
23 |
+
*/
|
24 |
+
protected $settings;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* SettingsStatus constructor.
|
28 |
+
*
|
29 |
+
* @param Settings $settings The Settings.
|
30 |
+
*/
|
31 |
+
public function __construct( Settings $settings ) {
|
32 |
+
$this->settings = $settings;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Check whether Pay Later message is enabled either for checkout, cart or product page.
|
37 |
+
*
|
38 |
+
* @return bool
|
39 |
+
* @throws \WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException When a setting was not found.
|
40 |
+
*/
|
41 |
+
public function pay_later_messaging_is_enabled(): bool {
|
42 |
+
$pay_later_message_enabled_for_checkout = $this->settings->has( 'message_enabled' )
|
43 |
+
&& (bool) $this->settings->get( 'message_enabled' );
|
44 |
+
|
45 |
+
$pay_later_message_enabled_for_cart = $this->settings->has( 'message_cart_enabled' )
|
46 |
+
&& (bool) $this->settings->get( 'message_cart_enabled' );
|
47 |
+
|
48 |
+
$pay_later_message_enabled_for_product = $this->settings->has( 'message_product_enabled' )
|
49 |
+
&& (bool) $this->settings->get( 'message_product_enabled' );
|
50 |
+
|
51 |
+
return $pay_later_message_enabled_for_checkout ||
|
52 |
+
$pay_later_message_enabled_for_cart ||
|
53 |
+
$pay_later_message_enabled_for_product;
|
54 |
+
}
|
55 |
+
}
|
modules/ppcp-wc-gateway/src/Settings/class-settingslistener.php
CHANGED
@@ -11,6 +11,7 @@ namespace WooCommerce\PayPalCommerce\WcGateway\Settings;
|
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\PayPalBearer;
|
|
|
14 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
15 |
use WooCommerce\PayPalCommerce\Onboarding\State;
|
16 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
@@ -147,11 +148,23 @@ class SettingsListener {
|
|
147 |
return;
|
148 |
}
|
149 |
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
|
157 |
/**
|
@@ -315,6 +328,7 @@ class SettingsListener {
|
|
315 |
$settings[ $key ] = isset( $raw_data[ $key ] );
|
316 |
break;
|
317 |
case 'text':
|
|
|
318 |
case 'ppcp-text-input':
|
319 |
case 'ppcp-password':
|
320 |
$settings[ $key ] = isset( $raw_data[ $key ] ) ? sanitize_text_field( $raw_data[ $key ] ) : '';
|
11 |
|
12 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
13 |
use WooCommerce\PayPalCommerce\ApiClient\Authentication\PayPalBearer;
|
14 |
+
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
15 |
use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
16 |
use WooCommerce\PayPalCommerce\Onboarding\State;
|
17 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
148 |
return;
|
149 |
}
|
150 |
|
151 |
+
try {
|
152 |
+
$token = $this->bearer->bearer();
|
153 |
+
if ( ! $token->vaulting_available() ) {
|
154 |
+
$this->settings->set( 'vault_enabled', false );
|
155 |
+
$this->settings->persist();
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
} catch ( RuntimeException $exception ) {
|
159 |
+
add_action(
|
160 |
+
'admin_notices',
|
161 |
+
function () use ( $exception ) {
|
162 |
+
printf(
|
163 |
+
'<div class="notice notice-error"><p>%s</p></div>',
|
164 |
+
esc_attr( $exception->getMessage() )
|
165 |
+
);
|
166 |
+
}
|
167 |
+
);
|
168 |
}
|
169 |
|
170 |
/**
|
328 |
$settings[ $key ] = isset( $raw_data[ $key ] );
|
329 |
break;
|
330 |
case 'text':
|
331 |
+
case 'number':
|
332 |
case 'ppcp-text-input':
|
333 |
case 'ppcp-password':
|
334 |
$settings[ $key ] = isset( $raw_data[ $key ] ) ? sanitize_text_field( $raw_data[ $key ] ) : '';
|
modules/ppcp-wc-gateway/src/Settings/class-settingsrenderer.php
CHANGED
@@ -16,12 +16,20 @@ use WooCommerce\PayPalCommerce\Onboarding\State;
|
|
16 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
17 |
use Psr\Container\ContainerInterface;
|
18 |
use Woocommerce\PayPalCommerce\WcGateway\Helper\DccProductStatus;
|
|
|
19 |
|
20 |
/**
|
21 |
* Class SettingsRenderer
|
22 |
*/
|
23 |
class SettingsRenderer {
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/**
|
26 |
* The settings.
|
27 |
*
|
@@ -73,6 +81,7 @@ class SettingsRenderer {
|
|
73 |
* @param DccApplies $dcc_applies Whether DCC gateway can be shown.
|
74 |
* @param MessagesApply $messages_apply Whether messages can be shown.
|
75 |
* @param DccProductStatus $dcc_product_status The product status.
|
|
|
76 |
*/
|
77 |
public function __construct(
|
78 |
ContainerInterface $settings,
|
@@ -80,7 +89,8 @@ class SettingsRenderer {
|
|
80 |
array $fields,
|
81 |
DccApplies $dcc_applies,
|
82 |
MessagesApply $messages_apply,
|
83 |
-
DccProductStatus $dcc_product_status
|
|
|
84 |
) {
|
85 |
|
86 |
$this->settings = $settings;
|
@@ -89,6 +99,7 @@ class SettingsRenderer {
|
|
89 |
$this->dcc_applies = $dcc_applies;
|
90 |
$this->messages_apply = $messages_apply;
|
91 |
$this->dcc_product_status = $dcc_product_status;
|
|
|
92 |
}
|
93 |
|
94 |
/**
|
@@ -106,7 +117,7 @@ class SettingsRenderer {
|
|
106 |
$pay_later_messages_title = __( 'Pay Later Messaging', 'woocommerce-paypal-payments' );
|
107 |
|
108 |
$enabled = $this->paypal_vaulting_is_enabled() ? $vaulting_title : $pay_later_messages_title;
|
109 |
-
$disabled = $this->pay_later_messaging_is_enabled() ? $vaulting_title : $pay_later_messages_title;
|
110 |
|
111 |
$pay_later_messages_or_vaulting_text = sprintf(
|
112 |
// translators: %1$s and %2$s is translated PayPal vaulting and Pay Later Messaging strings.
|
@@ -149,26 +160,6 @@ class SettingsRenderer {
|
|
149 |
return $this->settings->has( 'vault_enabled' ) && (bool) $this->settings->get( 'vault_enabled' );
|
150 |
}
|
151 |
|
152 |
-
/**
|
153 |
-
* Check whether Pay Later message is enabled either for checkout, cart or product page.
|
154 |
-
*
|
155 |
-
* @return bool
|
156 |
-
*/
|
157 |
-
private function pay_later_messaging_is_enabled(): bool {
|
158 |
-
$pay_later_message_enabled_for_checkout = $this->settings->has( 'message_enabled' )
|
159 |
-
&& (bool) $this->settings->get( 'message_enabled' );
|
160 |
-
|
161 |
-
$pay_later_message_enabled_for_cart = $this->settings->has( 'message_cart_enabled' )
|
162 |
-
&& (bool) $this->settings->get( 'message_cart_enabled' );
|
163 |
-
|
164 |
-
$pay_later_message_enabled_for_product = $this->settings->has( 'message_product_enabled' )
|
165 |
-
&& (bool) $this->settings->get( 'message_product_enabled' );
|
166 |
-
|
167 |
-
return $pay_later_message_enabled_for_checkout ||
|
168 |
-
$pay_later_message_enabled_for_cart ||
|
169 |
-
$pay_later_message_enabled_for_product;
|
170 |
-
}
|
171 |
-
|
172 |
/**
|
173 |
* Check if current screen is PayPal checkout settings screen.
|
174 |
*
|
@@ -557,6 +548,6 @@ class SettingsRenderer {
|
|
557 |
}
|
558 |
|
559 |
return $this->is_paypal_checkout_screen() && $this->paypal_vaulting_is_enabled()
|
560 |
-
|| $this->is_paypal_checkout_screen() && $this->pay_later_messaging_is_enabled();
|
561 |
}
|
562 |
}
|
16 |
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
17 |
use Psr\Container\ContainerInterface;
|
18 |
use Woocommerce\PayPalCommerce\WcGateway\Helper\DccProductStatus;
|
19 |
+
use Woocommerce\PayPalCommerce\WcGateway\Helper\SettingsStatus;
|
20 |
|
21 |
/**
|
22 |
* Class SettingsRenderer
|
23 |
*/
|
24 |
class SettingsRenderer {
|
25 |
|
26 |
+
/**
|
27 |
+
* The Settings status helper.
|
28 |
+
*
|
29 |
+
* @var SettingsStatus
|
30 |
+
*/
|
31 |
+
protected $settings_status;
|
32 |
+
|
33 |
/**
|
34 |
* The settings.
|
35 |
*
|
81 |
* @param DccApplies $dcc_applies Whether DCC gateway can be shown.
|
82 |
* @param MessagesApply $messages_apply Whether messages can be shown.
|
83 |
* @param DccProductStatus $dcc_product_status The product status.
|
84 |
+
* @param SettingsStatus $settings_status The Settings status helper.
|
85 |
*/
|
86 |
public function __construct(
|
87 |
ContainerInterface $settings,
|
89 |
array $fields,
|
90 |
DccApplies $dcc_applies,
|
91 |
MessagesApply $messages_apply,
|
92 |
+
DccProductStatus $dcc_product_status,
|
93 |
+
SettingsStatus $settings_status
|
94 |
) {
|
95 |
|
96 |
$this->settings = $settings;
|
99 |
$this->dcc_applies = $dcc_applies;
|
100 |
$this->messages_apply = $messages_apply;
|
101 |
$this->dcc_product_status = $dcc_product_status;
|
102 |
+
$this->settings_status = $settings_status;
|
103 |
}
|
104 |
|
105 |
/**
|
117 |
$pay_later_messages_title = __( 'Pay Later Messaging', 'woocommerce-paypal-payments' );
|
118 |
|
119 |
$enabled = $this->paypal_vaulting_is_enabled() ? $vaulting_title : $pay_later_messages_title;
|
120 |
+
$disabled = $this->settings_status->pay_later_messaging_is_enabled() ? $vaulting_title : $pay_later_messages_title;
|
121 |
|
122 |
$pay_later_messages_or_vaulting_text = sprintf(
|
123 |
// translators: %1$s and %2$s is translated PayPal vaulting and Pay Later Messaging strings.
|
160 |
return $this->settings->has( 'vault_enabled' ) && (bool) $this->settings->get( 'vault_enabled' );
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
/**
|
164 |
* Check if current screen is PayPal checkout settings screen.
|
165 |
*
|
548 |
}
|
549 |
|
550 |
return $this->is_paypal_checkout_screen() && $this->paypal_vaulting_is_enabled()
|
551 |
+
|| $this->is_paypal_checkout_screen() && $this->settings_status->pay_later_messaging_is_enabled();
|
552 |
}
|
553 |
}
|
modules/ppcp-wc-gateway/src/class-wcgatewaymodule.php
CHANGED
@@ -53,7 +53,7 @@ class WcGatewayModule implements ModuleInterface {
|
|
53 |
*
|
54 |
* @param ContainerInterface|null $container The container.
|
55 |
*/
|
56 |
-
public function run( ContainerInterface $container
|
57 |
$this->register_payment_gateways( $container );
|
58 |
$this->register_order_functionality( $container );
|
59 |
$this->register_columns( $container );
|
@@ -135,6 +135,18 @@ class WcGatewayModule implements ModuleInterface {
|
|
135 |
$endpoint->handle_request();
|
136 |
}
|
137 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
|
140 |
/**
|
53 |
*
|
54 |
* @param ContainerInterface|null $container The container.
|
55 |
*/
|
56 |
+
public function run( ContainerInterface $container ): void {
|
57 |
$this->register_payment_gateways( $container );
|
58 |
$this->register_order_functionality( $container );
|
59 |
$this->register_columns( $container );
|
135 |
$endpoint->handle_request();
|
136 |
}
|
137 |
);
|
138 |
+
|
139 |
+
add_filter(
|
140 |
+
'woocommerce_email_recipient_customer_on_hold_order',
|
141 |
+
function( $recipient, $order ) {
|
142 |
+
if ( $order->get_payment_method() === PayPalGateway::ID || $order->get_payment_method() === CreditCardGateway::ID ) {
|
143 |
+
$recipient = '';
|
144 |
+
}
|
145 |
+
return $recipient;
|
146 |
+
},
|
147 |
+
10,
|
148 |
+
2
|
149 |
+
);
|
150 |
}
|
151 |
|
152 |
/**
|
modules/ppcp-webhooks/src/class-webhookmodule.php
CHANGED
@@ -36,7 +36,7 @@ class WebhookModule implements ModuleInterface {
|
|
36 |
*
|
37 |
* @param ContainerInterface|null $container The Container.
|
38 |
*/
|
39 |
-
public function run( ContainerInterface $container
|
40 |
add_action(
|
41 |
'rest_api_init',
|
42 |
static function () use ( $container ) {
|
36 |
*
|
37 |
* @param ContainerInterface|null $container The Container.
|
38 |
*/
|
39 |
+
public function run( ContainerInterface $container ): void {
|
40 |
add_action(
|
41 |
'rest_api_init',
|
42 |
static function () use ( $container ) {
|
modules/woocommerce-logging/src/class-woocommerceloggingmodule.php
CHANGED
@@ -36,7 +36,7 @@ class WooCommerceLoggingModule implements ModuleInterface {
|
|
36 |
*
|
37 |
* @param ContainerInterface $container The container.
|
38 |
*/
|
39 |
-
public function run( ContainerInterface $container
|
40 |
}
|
41 |
|
42 |
|
36 |
*
|
37 |
* @param ContainerInterface $container The container.
|
38 |
*/
|
39 |
+
public function run( ContainerInterface $container ): void {
|
40 |
}
|
41 |
|
42 |
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: woocommerce, automattic
|
3 |
Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, shop, shopping, cart, checkout
|
4 |
Requires at least: 5.3
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 7.1
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -58,6 +58,22 @@ Follow the steps below to connect the plugin to your PayPal account:
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
= 1.3.2 =
|
62 |
* Fix - Improve Subscription plugin support. #161
|
63 |
* Fix - Disable vault setting if vaulting feature is not available. #150
|
2 |
Contributors: woocommerce, automattic
|
3 |
Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, shop, shopping, cart, checkout
|
4 |
Requires at least: 5.3
|
5 |
+
Tested up to: 5.8
|
6 |
Requires PHP: 7.1
|
7 |
+
Stable tag: 1.4.0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 1.4.0 =
|
62 |
+
* Add - Venmo update #169
|
63 |
+
* Add - Pay Later Button –Global Expansion #182
|
64 |
+
* Add - Add Canada to advanced credit and debit card #180
|
65 |
+
* Add - Add button height setting for mini cart #181
|
66 |
+
* Add - Add BN Code to Pay Later Messaging #183
|
67 |
+
* Add - Add 30 seconds timeout by default to all API requests #184
|
68 |
+
* Fix - ACDC checkout error: "Card Details not valid"; but payment completes #193
|
69 |
+
* Fix - Incorrect API credentials cause fatal error #187
|
70 |
+
* Fix - PayPal payment fails if a new user account is created during the checkout process #177
|
71 |
+
* Fix - Disabled PayPal button appears when another button is loaded on the same page #192
|
72 |
+
* Fix - [UNPROCESSABLE_ENTITY] error during checkout #172
|
73 |
+
* Fix - Do not send customer email when order status is on hold #173
|
74 |
+
* Fix - Remove merchant-id query parameter in JSSDK #179
|
75 |
+
* Fix - Error on Plugin activation with Zettle POS Integration for WooCommerce #195
|
76 |
+
|
77 |
= 1.3.2 =
|
78 |
* Fix - Improve Subscription plugin support. #161
|
79 |
* Fix - Disable vault setting if vaulting feature is not available. #150
|
src/class-pluginmodule.php
CHANGED
@@ -31,7 +31,7 @@ class PluginModule implements ModuleInterface {
|
|
31 |
*
|
32 |
* @param ContainerInterface|null $container The Container.
|
33 |
*/
|
34 |
-
public function run( ContainerInterface $container
|
35 |
}
|
36 |
|
37 |
/**
|
31 |
*
|
32 |
* @param ContainerInterface|null $container The Container.
|
33 |
*/
|
34 |
+
public function run( ContainerInterface $container ): void {
|
35 |
}
|
36 |
|
37 |
/**
|
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 ComposerAutoloaderInite10b41e28707caa8003f07ad0a5b2aa3::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -249,7 +249,13 @@ class InstalledVersions
|
|
249 |
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
250 |
|
251 |
if (null === self::$installed) {
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
|
255 |
return self::$installed;
|
@@ -316,7 +322,13 @@ class InstalledVersions
|
|
316 |
}
|
317 |
|
318 |
if (null === self::$installed) {
|
319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
}
|
321 |
$installed[] = self::$installed;
|
322 |
|
249 |
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
250 |
|
251 |
if (null === self::$installed) {
|
252 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
253 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
254 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
255 |
+
self::$installed = include __DIR__ . '/installed.php';
|
256 |
+
} else {
|
257 |
+
self::$installed = array();
|
258 |
+
}
|
259 |
}
|
260 |
|
261 |
return self::$installed;
|
322 |
}
|
323 |
|
324 |
if (null === self::$installed) {
|
325 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
326 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
327 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
328 |
+
self::$installed = require __DIR__ . '/installed.php';
|
329 |
+
} else {
|
330 |
+
self::$installed = array();
|
331 |
+
}
|
332 |
}
|
333 |
$installed[] = self::$installed;
|
334 |
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -102,6 +102,7 @@ return array(
|
|
102 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesApply' => $baseDir . '/modules/ppcp-button/src/Helper/class-messagesapply.php',
|
103 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesDisclaimers' => $baseDir . '/modules/ppcp-button/src/Helper/class-messagesdisclaimers.php',
|
104 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\ThreeDSecure' => $baseDir . '/modules/ppcp-button/src/Helper/class-threedsecure.php',
|
|
|
105 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Assets\\OnboardingAssets' => $baseDir . '/modules/ppcp-onboarding/src/Assets/class-onboardingassets.php',
|
106 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Endpoint\\LoginSellerEndpoint' => $baseDir . '/modules/ppcp-onboarding/src/Endpoint/class-loginsellerendpoint.php',
|
107 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Environment' => $baseDir . '/modules/ppcp-onboarding/src/class-environment.php',
|
@@ -155,4 +156,5 @@ return array(
|
|
155 |
'WooCommerce\\WooCommerce\\Logging\\WooCommerceLoggingModule' => $baseDir . '/modules/woocommerce-logging/src/class-woocommerceloggingmodule.php',
|
156 |
'Woocommerce\\PayPalCommerce\\ApiClient\\Entity\\Capture' => $baseDir . '/modules/ppcp-api-client/src/Entity/class-capture.php',
|
157 |
'Woocommerce\\PayPalCommerce\\WcGateway\\Helper\\DccProductStatus' => $baseDir . '/modules/ppcp-wc-gateway/src/Helper/class-dccproductstatus.php',
|
|
|
158 |
);
|
102 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesApply' => $baseDir . '/modules/ppcp-button/src/Helper/class-messagesapply.php',
|
103 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesDisclaimers' => $baseDir . '/modules/ppcp-button/src/Helper/class-messagesdisclaimers.php',
|
104 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\ThreeDSecure' => $baseDir . '/modules/ppcp-button/src/Helper/class-threedsecure.php',
|
105 |
+
'WooCommerce\\PayPalCommerce\\Compat\\CompatModule' => $baseDir . '/modules/ppcp-compat/src/class-compatmodule.php',
|
106 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Assets\\OnboardingAssets' => $baseDir . '/modules/ppcp-onboarding/src/Assets/class-onboardingassets.php',
|
107 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Endpoint\\LoginSellerEndpoint' => $baseDir . '/modules/ppcp-onboarding/src/Endpoint/class-loginsellerendpoint.php',
|
108 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Environment' => $baseDir . '/modules/ppcp-onboarding/src/class-environment.php',
|
156 |
'WooCommerce\\WooCommerce\\Logging\\WooCommerceLoggingModule' => $baseDir . '/modules/woocommerce-logging/src/class-woocommerceloggingmodule.php',
|
157 |
'Woocommerce\\PayPalCommerce\\ApiClient\\Entity\\Capture' => $baseDir . '/modules/ppcp-api-client/src/Entity/class-capture.php',
|
158 |
'Woocommerce\\PayPalCommerce\\WcGateway\\Helper\\DccProductStatus' => $baseDir . '/modules/ppcp-wc-gateway/src/Helper/class-dccproductstatus.php',
|
159 |
+
'Woocommerce\\PayPalCommerce\\WcGateway\\Helper\\SettingsStatus' => $baseDir . '/modules/ppcp-wc-gateway/src/Helper/class-settingsstatus.php',
|
160 |
);
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -15,7 +15,6 @@ return array(
|
|
15 |
'Dhii\\Factory\\' => array($vendorDir . '/dhii/factory-interface/src'),
|
16 |
'Dhii\\Exception\\' => array($vendorDir . '/dhii/exception-interface/src'),
|
17 |
'Dhii\\Data\\Container\\' => array($vendorDir . '/dhii/data-container-interface/src'),
|
18 |
-
'Dhii\\Data\\' => array($vendorDir . '/dhii/data-key-value-aware-interface/src'),
|
19 |
'Dhii\\Container\\' => array($vendorDir . '/dhii/containers/src'),
|
20 |
'Dhii\\Collection\\' => array($vendorDir . '/dhii/collections-interface/src'),
|
21 |
);
|
15 |
'Dhii\\Factory\\' => array($vendorDir . '/dhii/factory-interface/src'),
|
16 |
'Dhii\\Exception\\' => array($vendorDir . '/dhii/exception-interface/src'),
|
17 |
'Dhii\\Data\\Container\\' => array($vendorDir . '/dhii/data-container-interface/src'),
|
|
|
18 |
'Dhii\\Container\\' => array($vendorDir . '/dhii/containers/src'),
|
19 |
'Dhii\\Collection\\' => array($vendorDir . '/dhii/collections-interface/src'),
|
20 |
);
|
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 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit676d4bb90dad167891cc9fe8fa075f37
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,19 +53,19 @@ class ComposerAutoloaderInit676d4bb90dad167891cc9fe8fa075f37
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
function
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInite10b41e28707caa8003f07ad0a5b2aa3
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInite10b41e28707caa8003f07ad0a5b2aa3', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInite10b41e28707caa8003f07ad0a5b2aa3', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInite10b41e28707caa8003f07ad0a5b2aa3::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
+
$includeFiles = Composer\Autoload\ComposerStaticInite10b41e28707caa8003f07ad0a5b2aa3::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequiree10b41e28707caa8003f07ad0a5b2aa3($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
function composerRequiree10b41e28707caa8003f07ad0a5b2aa3($fileIdentifier, $file)
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
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',
|
@@ -28,7 +28,6 @@ class ComposerStaticInit676d4bb90dad167891cc9fe8fa075f37
|
|
28 |
'Dhii\\Factory\\' => 13,
|
29 |
'Dhii\\Exception\\' => 15,
|
30 |
'Dhii\\Data\\Container\\' => 20,
|
31 |
-
'Dhii\\Data\\' => 10,
|
32 |
'Dhii\\Container\\' => 15,
|
33 |
'Dhii\\Collection\\' => 16,
|
34 |
),
|
@@ -71,10 +70,6 @@ class ComposerStaticInit676d4bb90dad167891cc9fe8fa075f37
|
|
71 |
array (
|
72 |
0 => __DIR__ . '/..' . '/dhii/data-container-interface/src',
|
73 |
),
|
74 |
-
'Dhii\\Data\\' =>
|
75 |
-
array (
|
76 |
-
0 => __DIR__ . '/..' . '/dhii/data-key-value-aware-interface/src',
|
77 |
-
),
|
78 |
'Dhii\\Container\\' =>
|
79 |
array (
|
80 |
0 => __DIR__ . '/..' . '/dhii/containers/src',
|
@@ -182,6 +177,7 @@ class ComposerStaticInit676d4bb90dad167891cc9fe8fa075f37
|
|
182 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesApply' => __DIR__ . '/../..' . '/modules/ppcp-button/src/Helper/class-messagesapply.php',
|
183 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesDisclaimers' => __DIR__ . '/../..' . '/modules/ppcp-button/src/Helper/class-messagesdisclaimers.php',
|
184 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\ThreeDSecure' => __DIR__ . '/../..' . '/modules/ppcp-button/src/Helper/class-threedsecure.php',
|
|
|
185 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Assets\\OnboardingAssets' => __DIR__ . '/../..' . '/modules/ppcp-onboarding/src/Assets/class-onboardingassets.php',
|
186 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Endpoint\\LoginSellerEndpoint' => __DIR__ . '/../..' . '/modules/ppcp-onboarding/src/Endpoint/class-loginsellerendpoint.php',
|
187 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Environment' => __DIR__ . '/../..' . '/modules/ppcp-onboarding/src/class-environment.php',
|
@@ -235,14 +231,15 @@ class ComposerStaticInit676d4bb90dad167891cc9fe8fa075f37
|
|
235 |
'WooCommerce\\WooCommerce\\Logging\\WooCommerceLoggingModule' => __DIR__ . '/../..' . '/modules/woocommerce-logging/src/class-woocommerceloggingmodule.php',
|
236 |
'Woocommerce\\PayPalCommerce\\ApiClient\\Entity\\Capture' => __DIR__ . '/../..' . '/modules/ppcp-api-client/src/Entity/class-capture.php',
|
237 |
'Woocommerce\\PayPalCommerce\\WcGateway\\Helper\\DccProductStatus' => __DIR__ . '/../..' . '/modules/ppcp-wc-gateway/src/Helper/class-dccproductstatus.php',
|
|
|
238 |
);
|
239 |
|
240 |
public static function getInitializer(ClassLoader $loader)
|
241 |
{
|
242 |
return \Closure::bind(function () use ($loader) {
|
243 |
-
$loader->prefixLengthsPsr4 =
|
244 |
-
$loader->prefixDirsPsr4 =
|
245 |
-
$loader->classMap =
|
246 |
|
247 |
}, null, ClassLoader::class);
|
248 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInite10b41e28707caa8003f07ad0a5b2aa3
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
28 |
'Dhii\\Factory\\' => 13,
|
29 |
'Dhii\\Exception\\' => 15,
|
30 |
'Dhii\\Data\\Container\\' => 20,
|
|
|
31 |
'Dhii\\Container\\' => 15,
|
32 |
'Dhii\\Collection\\' => 16,
|
33 |
),
|
70 |
array (
|
71 |
0 => __DIR__ . '/..' . '/dhii/data-container-interface/src',
|
72 |
),
|
|
|
|
|
|
|
|
|
73 |
'Dhii\\Container\\' =>
|
74 |
array (
|
75 |
0 => __DIR__ . '/..' . '/dhii/containers/src',
|
177 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesApply' => __DIR__ . '/../..' . '/modules/ppcp-button/src/Helper/class-messagesapply.php',
|
178 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\MessagesDisclaimers' => __DIR__ . '/../..' . '/modules/ppcp-button/src/Helper/class-messagesdisclaimers.php',
|
179 |
'WooCommerce\\PayPalCommerce\\Button\\Helper\\ThreeDSecure' => __DIR__ . '/../..' . '/modules/ppcp-button/src/Helper/class-threedsecure.php',
|
180 |
+
'WooCommerce\\PayPalCommerce\\Compat\\CompatModule' => __DIR__ . '/../..' . '/modules/ppcp-compat/src/class-compatmodule.php',
|
181 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Assets\\OnboardingAssets' => __DIR__ . '/../..' . '/modules/ppcp-onboarding/src/Assets/class-onboardingassets.php',
|
182 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Endpoint\\LoginSellerEndpoint' => __DIR__ . '/../..' . '/modules/ppcp-onboarding/src/Endpoint/class-loginsellerendpoint.php',
|
183 |
'WooCommerce\\PayPalCommerce\\Onboarding\\Environment' => __DIR__ . '/../..' . '/modules/ppcp-onboarding/src/class-environment.php',
|
231 |
'WooCommerce\\WooCommerce\\Logging\\WooCommerceLoggingModule' => __DIR__ . '/../..' . '/modules/woocommerce-logging/src/class-woocommerceloggingmodule.php',
|
232 |
'Woocommerce\\PayPalCommerce\\ApiClient\\Entity\\Capture' => __DIR__ . '/../..' . '/modules/ppcp-api-client/src/Entity/class-capture.php',
|
233 |
'Woocommerce\\PayPalCommerce\\WcGateway\\Helper\\DccProductStatus' => __DIR__ . '/../..' . '/modules/ppcp-wc-gateway/src/Helper/class-dccproductstatus.php',
|
234 |
+
'Woocommerce\\PayPalCommerce\\WcGateway\\Helper\\SettingsStatus' => __DIR__ . '/../..' . '/modules/ppcp-wc-gateway/src/Helper/class-settingsstatus.php',
|
235 |
);
|
236 |
|
237 |
public static function getInitializer(ClassLoader $loader)
|
238 |
{
|
239 |
return \Closure::bind(function () use ($loader) {
|
240 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInite10b41e28707caa8003f07ad0a5b2aa3::$prefixLengthsPsr4;
|
241 |
+
$loader->prefixDirsPsr4 = ComposerStaticInite10b41e28707caa8003f07ad0a5b2aa3::$prefixDirsPsr4;
|
242 |
+
$loader->classMap = ComposerStaticInite10b41e28707caa8003f07ad0a5b2aa3::$classMap;
|
243 |
|
244 |
}, null, ClassLoader::class);
|
245 |
}
|
vendor/composer/installed.json
CHANGED
@@ -218,55 +218,6 @@
|
|
218 |
"abandoned": "dhii/collections-interface",
|
219 |
"install-path": "../dhii/data-container-interface"
|
220 |
},
|
221 |
-
{
|
222 |
-
"name": "dhii/data-key-value-aware-interface",
|
223 |
-
"version": "v0.1",
|
224 |
-
"version_normalized": "0.1.0.0",
|
225 |
-
"source": {
|
226 |
-
"type": "git",
|
227 |
-
"url": "https://github.com/Dhii/data-key-value-aware-interface.git",
|
228 |
-
"reference": "220232bc9040fab78a6c039f5a4a5f9542317bdc"
|
229 |
-
},
|
230 |
-
"dist": {
|
231 |
-
"type": "zip",
|
232 |
-
"url": "https://api.github.com/repos/Dhii/data-key-value-aware-interface/zipball/220232bc9040fab78a6c039f5a4a5f9542317bdc",
|
233 |
-
"reference": "220232bc9040fab78a6c039f5a4a5f9542317bdc",
|
234 |
-
"shasum": ""
|
235 |
-
},
|
236 |
-
"require": {
|
237 |
-
"php": "^5.3 | ^7.0"
|
238 |
-
},
|
239 |
-
"require-dev": {
|
240 |
-
"codeclimate/php-test-reporter": "<=0.3.2",
|
241 |
-
"dhii/php-cs-fixer-config": "dev-php-5.3",
|
242 |
-
"phpunit/phpunit": "4.*",
|
243 |
-
"ptrofimov/xpmock": "^1.1"
|
244 |
-
},
|
245 |
-
"time": "2017-01-21T17:35:30+00:00",
|
246 |
-
"type": "library",
|
247 |
-
"installation-source": "dist",
|
248 |
-
"autoload": {
|
249 |
-
"psr-4": {
|
250 |
-
"Dhii\\Data\\": "src/"
|
251 |
-
}
|
252 |
-
},
|
253 |
-
"notification-url": "https://packagist.org/downloads/",
|
254 |
-
"license": [
|
255 |
-
"MIT"
|
256 |
-
],
|
257 |
-
"authors": [
|
258 |
-
{
|
259 |
-
"name": "Dhii Team",
|
260 |
-
"email": "development@dhii.co"
|
261 |
-
}
|
262 |
-
],
|
263 |
-
"description": "Interfaces that aim to increase interoperability of value objects",
|
264 |
-
"support": {
|
265 |
-
"issues": "https://github.com/Dhii/data-key-value-aware-interface/issues",
|
266 |
-
"source": "https://github.com/Dhii/data-key-value-aware-interface/tree/master"
|
267 |
-
},
|
268 |
-
"install-path": "../dhii/data-key-value-aware-interface"
|
269 |
-
},
|
270 |
{
|
271 |
"name": "dhii/exception-interface",
|
272 |
"version": "v0.2",
|
@@ -382,38 +333,34 @@
|
|
382 |
},
|
383 |
{
|
384 |
"name": "dhii/module-interface",
|
385 |
-
"version": "v0.
|
386 |
-
"version_normalized": "0.
|
387 |
"source": {
|
388 |
"type": "git",
|
389 |
"url": "https://github.com/Dhii/module-interface.git",
|
390 |
-
"reference": "
|
391 |
},
|
392 |
"dist": {
|
393 |
"type": "zip",
|
394 |
-
"url": "https://api.github.com/repos/Dhii/module-interface/zipball/
|
395 |
-
"reference": "
|
396 |
"shasum": ""
|
397 |
},
|
398 |
"require": {
|
399 |
-
"
|
400 |
-
"
|
401 |
-
"
|
402 |
-
"php": "^5.3 | ^7.0"
|
403 |
},
|
404 |
"require-dev": {
|
405 |
-
"
|
406 |
-
"
|
407 |
-
"
|
408 |
-
"phpunit/phpunit": "^4.8",
|
409 |
-
"psr/container": "^1.0",
|
410 |
-
"ptrofimov/xpmock": "^1.1"
|
411 |
},
|
412 |
-
"time": "
|
413 |
"type": "library",
|
414 |
"extra": {
|
415 |
"branch-alias": {
|
416 |
-
"dev-develop": "0.
|
417 |
}
|
418 |
},
|
419 |
"installation-source": "dist",
|
@@ -435,7 +382,7 @@
|
|
435 |
"description": "Interfaces for modules",
|
436 |
"support": {
|
437 |
"issues": "https://github.com/Dhii/module-interface/issues",
|
438 |
-
"source": "https://github.com/Dhii/module-interface/tree/
|
439 |
},
|
440 |
"install-path": "../dhii/module-interface"
|
441 |
},
|
218 |
"abandoned": "dhii/collections-interface",
|
219 |
"install-path": "../dhii/data-container-interface"
|
220 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
{
|
222 |
"name": "dhii/exception-interface",
|
223 |
"version": "v0.2",
|
333 |
},
|
334 |
{
|
335 |
"name": "dhii/module-interface",
|
336 |
+
"version": "v0.3.0-alpha1",
|
337 |
+
"version_normalized": "0.3.0.0-alpha1",
|
338 |
"source": {
|
339 |
"type": "git",
|
340 |
"url": "https://github.com/Dhii/module-interface.git",
|
341 |
+
"reference": "e93feaf37e183ac22114e3fd86650bd987fa83d1"
|
342 |
},
|
343 |
"dist": {
|
344 |
"type": "zip",
|
345 |
+
"url": "https://api.github.com/repos/Dhii/module-interface/zipball/e93feaf37e183ac22114e3fd86650bd987fa83d1",
|
346 |
+
"reference": "e93feaf37e183ac22114e3fd86650bd987fa83d1",
|
347 |
"shasum": ""
|
348 |
},
|
349 |
"require": {
|
350 |
+
"container-interop/service-provider": "^0.4",
|
351 |
+
"php": "^7.1 | ^8.0",
|
352 |
+
"psr/container": "^1.0"
|
|
|
353 |
},
|
354 |
"require-dev": {
|
355 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
356 |
+
"slevomat/coding-standard": "^6.0",
|
357 |
+
"vimeo/psalm": "^3.11.7 | ^4.0"
|
|
|
|
|
|
|
358 |
},
|
359 |
+
"time": "2021-01-14T19:21:28+00:00",
|
360 |
"type": "library",
|
361 |
"extra": {
|
362 |
"branch-alias": {
|
363 |
+
"dev-develop": "0.3.x-dev"
|
364 |
}
|
365 |
},
|
366 |
"installation-source": "dist",
|
382 |
"description": "Interfaces for modules",
|
383 |
"support": {
|
384 |
"issues": "https://github.com/Dhii/module-interface/issues",
|
385 |
+
"source": "https://github.com/Dhii/module-interface/tree/v0.3.0-alpha1"
|
386 |
},
|
387 |
"install-path": "../dhii/module-interface"
|
388 |
},
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'woocommerce/woocommerce-paypal-payments',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -46,15 +46,6 @@
|
|
46 |
'reference' => '6be46e427184b95785d9dd563d6acf2e0700cc31',
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
-
'dhii/data-key-value-aware-interface' => array(
|
50 |
-
'pretty_version' => 'v0.1',
|
51 |
-
'version' => '0.1.0.0',
|
52 |
-
'type' => 'library',
|
53 |
-
'install_path' => __DIR__ . '/../dhii/data-key-value-aware-interface',
|
54 |
-
'aliases' => array(),
|
55 |
-
'reference' => '220232bc9040fab78a6c039f5a4a5f9542317bdc',
|
56 |
-
'dev_requirement' => false,
|
57 |
-
),
|
58 |
'dhii/exception-interface' => array(
|
59 |
'pretty_version' => 'v0.2',
|
60 |
'version' => '0.2.0.0',
|
@@ -74,12 +65,12 @@
|
|
74 |
'dev_requirement' => false,
|
75 |
),
|
76 |
'dhii/module-interface' => array(
|
77 |
-
'pretty_version' => 'v0.
|
78 |
-
'version' => '0.
|
79 |
'type' => 'library',
|
80 |
'install_path' => __DIR__ . '/../dhii/module-interface',
|
81 |
'aliases' => array(),
|
82 |
-
'reference' => '
|
83 |
'dev_requirement' => false,
|
84 |
),
|
85 |
'dhii/stringable-interface' => array(
|
@@ -133,7 +124,7 @@
|
|
133 |
'type' => 'wordpress-plugin',
|
134 |
'install_path' => __DIR__ . '/../../',
|
135 |
'aliases' => array(),
|
136 |
-
'reference' => '
|
137 |
'dev_requirement' => false,
|
138 |
),
|
139 |
),
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'fbbcb12e45513f7785e1e03d86e1c72b95b46b90',
|
9 |
'name' => 'woocommerce/woocommerce-paypal-payments',
|
10 |
'dev' => false,
|
11 |
),
|
46 |
'reference' => '6be46e427184b95785d9dd563d6acf2e0700cc31',
|
47 |
'dev_requirement' => false,
|
48 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
'dhii/exception-interface' => array(
|
50 |
'pretty_version' => 'v0.2',
|
51 |
'version' => '0.2.0.0',
|
65 |
'dev_requirement' => false,
|
66 |
),
|
67 |
'dhii/module-interface' => array(
|
68 |
+
'pretty_version' => 'v0.3.0-alpha1',
|
69 |
+
'version' => '0.3.0.0-alpha1',
|
70 |
'type' => 'library',
|
71 |
'install_path' => __DIR__ . '/../dhii/module-interface',
|
72 |
'aliases' => array(),
|
73 |
+
'reference' => 'e93feaf37e183ac22114e3fd86650bd987fa83d1',
|
74 |
'dev_requirement' => false,
|
75 |
),
|
76 |
'dhii/stringable-interface' => array(
|
124 |
'type' => 'wordpress-plugin',
|
125 |
'install_path' => __DIR__ . '/../../',
|
126 |
'aliases' => array(),
|
127 |
+
'reference' => 'fbbcb12e45513f7785e1e03d86e1c72b95b46b90',
|
128 |
'dev_requirement' => false,
|
129 |
),
|
130 |
),
|
vendor/dhii/data-key-value-aware-interface/.codeclimate.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
---
|
2 |
-
engines:
|
3 |
-
duplication:
|
4 |
-
enabled: true
|
5 |
-
config:
|
6 |
-
languages:
|
7 |
-
- php
|
8 |
-
fixme:
|
9 |
-
enabled: true
|
10 |
-
phpmd:
|
11 |
-
enabled: true
|
12 |
-
ratings:
|
13 |
-
paths:
|
14 |
-
- "**.inc"
|
15 |
-
- "**.php"
|
16 |
-
exclude_paths:
|
17 |
-
- test/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/.php_cs
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once __DIR__.DIRECTORY_SEPARATOR.'vendor/autoload.php';
|
4 |
-
$config = Dhii\Configuration\PHPCSFixer\Config::create();
|
5 |
-
$fixers = $config->getFixers();
|
6 |
-
|
7 |
-
$toRemove = array();
|
8 |
-
foreach ($toRemove as $_fixer) {
|
9 |
-
if (($removeIndex = array_search($_fixer, $fixers)) === false) {
|
10 |
-
continue;
|
11 |
-
}
|
12 |
-
|
13 |
-
unset($fixers[$removeIndex]);
|
14 |
-
}
|
15 |
-
|
16 |
-
$toAdd = array();
|
17 |
-
foreach ($toAdd as $_fixer) {
|
18 |
-
if (($removeIndex = array_search($_fixer, $fixers)) !== false) {
|
19 |
-
continue;
|
20 |
-
}
|
21 |
-
|
22 |
-
$fixers[] = $_fixer;
|
23 |
-
}
|
24 |
-
|
25 |
-
$config->fixers($fixers);
|
26 |
-
$config->getFinder()->in(__DIR__.DIRECTORY_SEPARATOR.'src');
|
27 |
-
return $config;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/CHANGELOG.md
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
# Change log
|
2 |
-
All notable changes to this project will be documented in this file.
|
3 |
-
|
4 |
-
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5 |
-
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6 |
-
|
7 |
-
## [0.1] - 2017-01-21
|
8 |
-
Initial release, of the interop interfaces.
|
9 |
-
|
10 |
-
### Added
|
11 |
-
- Interop interfaces.
|
12 |
-
- Tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/README.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
## Key/Value Aware Interface ##
|
2 |
-
[![Build Status](https://travis-ci.org/Dhii/data-key-value-aware-interface.svg?branch=master)](https://travis-ci.org/Dhii/data-key-value-aware-interface)
|
3 |
-
[![Code Climate](https://codeclimate.com/github/Dhii/data-key-value-aware-interface/badges/gpa.svg)](https://codeclimate.com/github/Dhii/data-key-value-aware-interface)
|
4 |
-
[![Test Coverage](https://codeclimate.com/github/Dhii/data-key-value-aware-interface/badges/coverage.svg)](https://codeclimate.com/github/Dhii/data-key-value-aware-interface/coverage)
|
5 |
-
|
6 |
-
Increase interoperability of value objects by depending on this package.
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/composer.json
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "dhii/data-key-value-aware-interface",
|
3 |
-
"description": "Interfaces that aim to increase interoperability of value objects",
|
4 |
-
"type": "library",
|
5 |
-
"license": "MIT",
|
6 |
-
"authors": [
|
7 |
-
{
|
8 |
-
"name": "Dhii Team",
|
9 |
-
"email": "development@dhii.co"
|
10 |
-
}
|
11 |
-
],
|
12 |
-
"minimum-stability": "dev",
|
13 |
-
"require": {
|
14 |
-
"php": "^5.3 | ^7.0"
|
15 |
-
},
|
16 |
-
"require-dev": {
|
17 |
-
"dhii/php-cs-fixer-config": "dev-php-5.3",
|
18 |
-
"phpunit/phpunit": "4.*",
|
19 |
-
"codeclimate/php-test-reporter": "<=0.3.2",
|
20 |
-
"ptrofimov/xpmock": "^1.1"
|
21 |
-
},
|
22 |
-
"autoload": {
|
23 |
-
"psr-4": {
|
24 |
-
"Dhii\\Data\\": "src/"
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/composer.lock
DELETED
@@ -1,2016 +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#composer-lock-the-lock-file",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"hash": "6167d787b5e70ba6f43df2f23a2bd412",
|
8 |
-
"content-hash": "68e2338a39a45ad48cb0a3dfcb125f71",
|
9 |
-
"packages": [],
|
10 |
-
"packages-dev": [
|
11 |
-
{
|
12 |
-
"name": "codeclimate/php-test-reporter",
|
13 |
-
"version": "v0.3.2",
|
14 |
-
"source": {
|
15 |
-
"type": "git",
|
16 |
-
"url": "https://github.com/codeclimate/php-test-reporter.git",
|
17 |
-
"reference": "3a2d3ebdc1df5acf372458c15041af240a6fc016"
|
18 |
-
},
|
19 |
-
"dist": {
|
20 |
-
"type": "zip",
|
21 |
-
"url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/3a2d3ebdc1df5acf372458c15041af240a6fc016",
|
22 |
-
"reference": "3a2d3ebdc1df5acf372458c15041af240a6fc016",
|
23 |
-
"shasum": ""
|
24 |
-
},
|
25 |
-
"require": {
|
26 |
-
"ext-curl": "*",
|
27 |
-
"php": ">=5.3",
|
28 |
-
"satooshi/php-coveralls": "1.0.*",
|
29 |
-
"symfony/console": ">=2.0"
|
30 |
-
},
|
31 |
-
"require-dev": {
|
32 |
-
"ext-xdebug": "*",
|
33 |
-
"phpunit/phpunit": "3.7.*@stable"
|
34 |
-
},
|
35 |
-
"bin": [
|
36 |
-
"composer/bin/test-reporter"
|
37 |
-
],
|
38 |
-
"type": "library",
|
39 |
-
"extra": {
|
40 |
-
"branch-alias": {
|
41 |
-
"dev-master": "0.3.x-dev"
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"autoload": {
|
45 |
-
"psr-0": {
|
46 |
-
"CodeClimate\\Component": "src/",
|
47 |
-
"CodeClimate\\Bundle": "src/"
|
48 |
-
}
|
49 |
-
},
|
50 |
-
"notification-url": "https://packagist.org/downloads/",
|
51 |
-
"license": [
|
52 |
-
"MIT"
|
53 |
-
],
|
54 |
-
"authors": [
|
55 |
-
{
|
56 |
-
"name": "Code Climate",
|
57 |
-
"email": "hello@codeclimate.com",
|
58 |
-
"homepage": "https://codeclimate.com"
|
59 |
-
}
|
60 |
-
],
|
61 |
-
"description": "PHP client for reporting test coverage to Code Climate",
|
62 |
-
"homepage": "https://github.com/codeclimate/php-test-reporter",
|
63 |
-
"keywords": [
|
64 |
-
"codeclimate",
|
65 |
-
"coverage"
|
66 |
-
],
|
67 |
-
"time": "2016-04-19 16:54:33"
|
68 |
-
},
|
69 |
-
{
|
70 |
-
"name": "dhii/php-cs-fixer-config",
|
71 |
-
"version": "dev-php-5.3",
|
72 |
-
"source": {
|
73 |
-
"type": "git",
|
74 |
-
"url": "https://github.com/Dhii/php-cs-fixer-config.git",
|
75 |
-
"reference": "ee3cc6c906a1aa4dca2bcbfcfef684dbd1ebb8ca"
|
76 |
-
},
|
77 |
-
"dist": {
|
78 |
-
"type": "zip",
|
79 |
-
"url": "https://api.github.com/repos/Dhii/php-cs-fixer-config/zipball/ee3cc6c906a1aa4dca2bcbfcfef684dbd1ebb8ca",
|
80 |
-
"reference": "ee3cc6c906a1aa4dca2bcbfcfef684dbd1ebb8ca",
|
81 |
-
"shasum": ""
|
82 |
-
},
|
83 |
-
"require": {
|
84 |
-
"friendsofphp/php-cs-fixer": ">=1.11 <1.12",
|
85 |
-
"php": "^5.3 | ^7.0"
|
86 |
-
},
|
87 |
-
"require-dev": {
|
88 |
-
"phpunit/phpunit": "^4.8"
|
89 |
-
},
|
90 |
-
"type": "library",
|
91 |
-
"autoload": {
|
92 |
-
"psr-4": {
|
93 |
-
"Dhii\\Configuration\\PHPCSFixer\\": "src/"
|
94 |
-
}
|
95 |
-
},
|
96 |
-
"notification-url": "https://packagist.org/downloads/",
|
97 |
-
"license": [
|
98 |
-
"MIT"
|
99 |
-
],
|
100 |
-
"authors": [
|
101 |
-
{
|
102 |
-
"name": "Dhii Team",
|
103 |
-
"email": "development@dhii.co"
|
104 |
-
}
|
105 |
-
],
|
106 |
-
"description": "A default PHP CS Fixer config implementation",
|
107 |
-
"time": "2016-09-03 14:45:03"
|
108 |
-
},
|
109 |
-
{
|
110 |
-
"name": "doctrine/instantiator",
|
111 |
-
"version": "dev-master",
|
112 |
-
"source": {
|
113 |
-
"type": "git",
|
114 |
-
"url": "https://github.com/doctrine/instantiator.git",
|
115 |
-
"reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a"
|
116 |
-
},
|
117 |
-
"dist": {
|
118 |
-
"type": "zip",
|
119 |
-
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/416fb8ad1d095a87f1d21bc40711843cd122fd4a",
|
120 |
-
"reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a",
|
121 |
-
"shasum": ""
|
122 |
-
},
|
123 |
-
"require": {
|
124 |
-
"php": ">=5.3,<8.0-DEV"
|
125 |
-
},
|
126 |
-
"require-dev": {
|
127 |
-
"athletic/athletic": "~0.1.8",
|
128 |
-
"ext-pdo": "*",
|
129 |
-
"ext-phar": "*",
|
130 |
-
"phpunit/phpunit": "~4.0",
|
131 |
-
"squizlabs/php_codesniffer": "~2.0"
|
132 |
-
},
|
133 |
-
"type": "library",
|
134 |
-
"extra": {
|
135 |
-
"branch-alias": {
|
136 |
-
"dev-master": "1.0.x-dev"
|
137 |
-
}
|
138 |
-
},
|
139 |
-
"autoload": {
|
140 |
-
"psr-4": {
|
141 |
-
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
142 |
-
}
|
143 |
-
},
|
144 |
-
"notification-url": "https://packagist.org/downloads/",
|
145 |
-
"license": [
|
146 |
-
"MIT"
|
147 |
-
],
|
148 |
-
"authors": [
|
149 |
-
{
|
150 |
-
"name": "Marco Pivetta",
|
151 |
-
"email": "ocramius@gmail.com",
|
152 |
-
"homepage": "http://ocramius.github.com/"
|
153 |
-
}
|
154 |
-
],
|
155 |
-
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
156 |
-
"homepage": "https://github.com/doctrine/instantiator",
|
157 |
-
"keywords": [
|
158 |
-
"constructor",
|
159 |
-
"instantiate"
|
160 |
-
],
|
161 |
-
"time": "2016-03-31 10:24:22"
|
162 |
-
},
|
163 |
-
{
|
164 |
-
"name": "friendsofphp/php-cs-fixer",
|
165 |
-
"version": "v1.11.8",
|
166 |
-
"source": {
|
167 |
-
"type": "git",
|
168 |
-
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
169 |
-
"reference": "117137e9970054d022b7656209f094dab852b90c"
|
170 |
-
},
|
171 |
-
"dist": {
|
172 |
-
"type": "zip",
|
173 |
-
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/117137e9970054d022b7656209f094dab852b90c",
|
174 |
-
"reference": "117137e9970054d022b7656209f094dab852b90c",
|
175 |
-
"shasum": ""
|
176 |
-
},
|
177 |
-
"require": {
|
178 |
-
"ext-tokenizer": "*",
|
179 |
-
"php": ">=5.3.6",
|
180 |
-
"sebastian/diff": "~1.1",
|
181 |
-
"symfony/console": "~2.3|~3.0",
|
182 |
-
"symfony/event-dispatcher": "~2.1|~3.0",
|
183 |
-
"symfony/filesystem": "~2.1|~3.0",
|
184 |
-
"symfony/finder": "~2.1|~3.0",
|
185 |
-
"symfony/process": "~2.3|~3.0",
|
186 |
-
"symfony/stopwatch": "~2.5|~3.0"
|
187 |
-
},
|
188 |
-
"conflict": {
|
189 |
-
"hhvm": "<3.9"
|
190 |
-
},
|
191 |
-
"require-dev": {
|
192 |
-
"phpunit/phpunit": "^4.5|^5",
|
193 |
-
"satooshi/php-coveralls": "^0.7.1"
|
194 |
-
},
|
195 |
-
"bin": [
|
196 |
-
"php-cs-fixer"
|
197 |
-
],
|
198 |
-
"type": "application",
|
199 |
-
"autoload": {
|
200 |
-
"psr-4": {
|
201 |
-
"Symfony\\CS\\": "Symfony/CS/"
|
202 |
-
}
|
203 |
-
},
|
204 |
-
"notification-url": "https://packagist.org/downloads/",
|
205 |
-
"license": [
|
206 |
-
"MIT"
|
207 |
-
],
|
208 |
-
"authors": [
|
209 |
-
{
|
210 |
-
"name": "Dariusz Rumiński",
|
211 |
-
"email": "dariusz.ruminski@gmail.com"
|
212 |
-
},
|
213 |
-
{
|
214 |
-
"name": "Fabien Potencier",
|
215 |
-
"email": "fabien@symfony.com"
|
216 |
-
}
|
217 |
-
],
|
218 |
-
"description": "A tool to automatically fix PHP code style",
|
219 |
-
"time": "2016-08-16 23:31:05"
|
220 |
-
},
|
221 |
-
{
|
222 |
-
"name": "guzzle/guzzle",
|
223 |
-
"version": "dev-master",
|
224 |
-
"source": {
|
225 |
-
"type": "git",
|
226 |
-
"url": "https://github.com/guzzle/guzzle3.git",
|
227 |
-
"reference": "f7778ed85e3db90009d79725afd6c3a82dab32fe"
|
228 |
-
},
|
229 |
-
"dist": {
|
230 |
-
"type": "zip",
|
231 |
-
"url": "https://api.github.com/repos/guzzle/guzzle3/zipball/f7778ed85e3db90009d79725afd6c3a82dab32fe",
|
232 |
-
"reference": "f7778ed85e3db90009d79725afd6c3a82dab32fe",
|
233 |
-
"shasum": ""
|
234 |
-
},
|
235 |
-
"require": {
|
236 |
-
"ext-curl": "*",
|
237 |
-
"php": ">=5.3.3",
|
238 |
-
"symfony/event-dispatcher": "~2.1"
|
239 |
-
},
|
240 |
-
"replace": {
|
241 |
-
"guzzle/batch": "self.version",
|
242 |
-
"guzzle/cache": "self.version",
|
243 |
-
"guzzle/common": "self.version",
|
244 |
-
"guzzle/http": "self.version",
|
245 |
-
"guzzle/inflection": "self.version",
|
246 |
-
"guzzle/iterator": "self.version",
|
247 |
-
"guzzle/log": "self.version",
|
248 |
-
"guzzle/parser": "self.version",
|
249 |
-
"guzzle/plugin": "self.version",
|
250 |
-
"guzzle/plugin-async": "self.version",
|
251 |
-
"guzzle/plugin-backoff": "self.version",
|
252 |
-
"guzzle/plugin-cache": "self.version",
|
253 |
-
"guzzle/plugin-cookie": "self.version",
|
254 |
-
"guzzle/plugin-curlauth": "self.version",
|
255 |
-
"guzzle/plugin-error-response": "self.version",
|
256 |
-
"guzzle/plugin-history": "self.version",
|
257 |
-
"guzzle/plugin-log": "self.version",
|
258 |
-
"guzzle/plugin-md5": "self.version",
|
259 |
-
"guzzle/plugin-mock": "self.version",
|
260 |
-
"guzzle/plugin-oauth": "self.version",
|
261 |
-
"guzzle/service": "self.version",
|
262 |
-
"guzzle/stream": "self.version"
|
263 |
-
},
|
264 |
-
"require-dev": {
|
265 |
-
"doctrine/cache": "~1.3",
|
266 |
-
"monolog/monolog": "~1.0",
|
267 |
-
"phpunit/phpunit": "3.7.*",
|
268 |
-
"psr/log": "~1.0",
|
269 |
-
"symfony/class-loader": "~2.1",
|
270 |
-
"zendframework/zend-cache": "2.*,<2.3",
|
271 |
-
"zendframework/zend-log": "2.*,<2.3"
|
272 |
-
},
|
273 |
-
"suggest": {
|
274 |
-
"guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
|
275 |
-
},
|
276 |
-
"type": "library",
|
277 |
-
"extra": {
|
278 |
-
"branch-alias": {
|
279 |
-
"dev-master": "3.9-dev"
|
280 |
-
}
|
281 |
-
},
|
282 |
-
"autoload": {
|
283 |
-
"psr-0": {
|
284 |
-
"Guzzle": "src/",
|
285 |
-
"Guzzle\\Tests": "tests/"
|
286 |
-
}
|
287 |
-
},
|
288 |
-
"notification-url": "https://packagist.org/downloads/",
|
289 |
-
"license": [
|
290 |
-
"MIT"
|
291 |
-
],
|
292 |
-
"authors": [
|
293 |
-
{
|
294 |
-
"name": "Michael Dowling",
|
295 |
-
"email": "mtdowling@gmail.com",
|
296 |
-
"homepage": "https://github.com/mtdowling"
|
297 |
-
},
|
298 |
-
{
|
299 |
-
"name": "Guzzle Community",
|
300 |
-
"homepage": "https://github.com/guzzle/guzzle/contributors"
|
301 |
-
}
|
302 |
-
],
|
303 |
-
"description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle",
|
304 |
-
"homepage": "http://guzzlephp.org/",
|
305 |
-
"keywords": [
|
306 |
-
"client",
|
307 |
-
"curl",
|
308 |
-
"framework",
|
309 |
-
"http",
|
310 |
-
"http client",
|
311 |
-
"rest",
|
312 |
-
"web service"
|
313 |
-
],
|
314 |
-
"abandoned": "guzzlehttp/guzzle",
|
315 |
-
"time": "2016-10-26 18:22:07"
|
316 |
-
},
|
317 |
-
{
|
318 |
-
"name": "phpdocumentor/reflection-common",
|
319 |
-
"version": "dev-master",
|
320 |
-
"source": {
|
321 |
-
"type": "git",
|
322 |
-
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
323 |
-
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
|
324 |
-
},
|
325 |
-
"dist": {
|
326 |
-
"type": "zip",
|
327 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
328 |
-
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
329 |
-
"shasum": ""
|
330 |
-
},
|
331 |
-
"require": {
|
332 |
-
"php": ">=5.5"
|
333 |
-
},
|
334 |
-
"require-dev": {
|
335 |
-
"phpunit/phpunit": "^4.6"
|
336 |
-
},
|
337 |
-
"type": "library",
|
338 |
-
"extra": {
|
339 |
-
"branch-alias": {
|
340 |
-
"dev-master": "1.0.x-dev"
|
341 |
-
}
|
342 |
-
},
|
343 |
-
"autoload": {
|
344 |
-
"psr-4": {
|
345 |
-
"phpDocumentor\\Reflection\\": [
|
346 |
-
"src"
|
347 |
-
]
|
348 |
-
}
|
349 |
-
},
|
350 |
-
"notification-url": "https://packagist.org/downloads/",
|
351 |
-
"license": [
|
352 |
-
"MIT"
|
353 |
-
],
|
354 |
-
"authors": [
|
355 |
-
{
|
356 |
-
"name": "Jaap van Otterdijk",
|
357 |
-
"email": "opensource@ijaap.nl"
|
358 |
-
}
|
359 |
-
],
|
360 |
-
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
|
361 |
-
"homepage": "http://www.phpdoc.org",
|
362 |
-
"keywords": [
|
363 |
-
"FQSEN",
|
364 |
-
"phpDocumentor",
|
365 |
-
"phpdoc",
|
366 |
-
"reflection",
|
367 |
-
"static analysis"
|
368 |
-
],
|
369 |
-
"time": "2015-12-27 11:43:31"
|
370 |
-
},
|
371 |
-
{
|
372 |
-
"name": "phpdocumentor/reflection-docblock",
|
373 |
-
"version": "3.1.1",
|
374 |
-
"source": {
|
375 |
-
"type": "git",
|
376 |
-
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
377 |
-
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
|
378 |
-
},
|
379 |
-
"dist": {
|
380 |
-
"type": "zip",
|
381 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
|
382 |
-
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
|
383 |
-
"shasum": ""
|
384 |
-
},
|
385 |
-
"require": {
|
386 |
-
"php": ">=5.5",
|
387 |
-
"phpdocumentor/reflection-common": "^1.0@dev",
|
388 |
-
"phpdocumentor/type-resolver": "^0.2.0",
|
389 |
-
"webmozart/assert": "^1.0"
|
390 |
-
},
|
391 |
-
"require-dev": {
|
392 |
-
"mockery/mockery": "^0.9.4",
|
393 |
-
"phpunit/phpunit": "^4.4"
|
394 |
-
},
|
395 |
-
"type": "library",
|
396 |
-
"autoload": {
|
397 |
-
"psr-4": {
|
398 |
-
"phpDocumentor\\Reflection\\": [
|
399 |
-
"src/"
|
400 |
-
]
|
401 |
-
}
|
402 |
-
},
|
403 |
-
"notification-url": "https://packagist.org/downloads/",
|
404 |
-
"license": [
|
405 |
-
"MIT"
|
406 |
-
],
|
407 |
-
"authors": [
|
408 |
-
{
|
409 |
-
"name": "Mike van Riel",
|
410 |
-
"email": "me@mikevanriel.com"
|
411 |
-
}
|
412 |
-
],
|
413 |
-
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
414 |
-
"time": "2016-09-30 07:12:33"
|
415 |
-
},
|
416 |
-
{
|
417 |
-
"name": "phpdocumentor/type-resolver",
|
418 |
-
"version": "0.2.1",
|
419 |
-
"source": {
|
420 |
-
"type": "git",
|
421 |
-
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
422 |
-
"reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
|
423 |
-
},
|
424 |
-
"dist": {
|
425 |
-
"type": "zip",
|
426 |
-
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
|
427 |
-
"reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
|
428 |
-
"shasum": ""
|
429 |
-
},
|
430 |
-
"require": {
|
431 |
-
"php": ">=5.5",
|
432 |
-
"phpdocumentor/reflection-common": "^1.0"
|
433 |
-
},
|
434 |
-
"require-dev": {
|
435 |
-
"mockery/mockery": "^0.9.4",
|
436 |
-
"phpunit/phpunit": "^5.2||^4.8.24"
|
437 |
-
},
|
438 |
-
"type": "library",
|
439 |
-
"extra": {
|
440 |
-
"branch-alias": {
|
441 |
-
"dev-master": "1.0.x-dev"
|
442 |
-
}
|
443 |
-
},
|
444 |
-
"autoload": {
|
445 |
-
"psr-4": {
|
446 |
-
"phpDocumentor\\Reflection\\": [
|
447 |
-
"src/"
|
448 |
-
]
|
449 |
-
}
|
450 |
-
},
|
451 |
-
"notification-url": "https://packagist.org/downloads/",
|
452 |
-
"license": [
|
453 |
-
"MIT"
|
454 |
-
],
|
455 |
-
"authors": [
|
456 |
-
{
|
457 |
-
"name": "Mike van Riel",
|
458 |
-
"email": "me@mikevanriel.com"
|
459 |
-
}
|
460 |
-
],
|
461 |
-
"time": "2016-11-25 06:54:22"
|
462 |
-
},
|
463 |
-
{
|
464 |
-
"name": "phpspec/prophecy",
|
465 |
-
"version": "dev-master",
|
466 |
-
"source": {
|
467 |
-
"type": "git",
|
468 |
-
"url": "https://github.com/phpspec/prophecy.git",
|
469 |
-
"reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
|
470 |
-
},
|
471 |
-
"dist": {
|
472 |
-
"type": "zip",
|
473 |
-
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
|
474 |
-
"reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
|
475 |
-
"shasum": ""
|
476 |
-
},
|
477 |
-
"require": {
|
478 |
-
"doctrine/instantiator": "^1.0.2",
|
479 |
-
"php": "^5.3|^7.0",
|
480 |
-
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
|
481 |
-
"sebastian/comparator": "^1.1",
|
482 |
-
"sebastian/recursion-context": "^1.0|^2.0"
|
483 |
-
},
|
484 |
-
"require-dev": {
|
485 |
-
"phpspec/phpspec": "^2.0",
|
486 |
-
"phpunit/phpunit": "^4.8 || ^5.6.5"
|
487 |
-
},
|
488 |
-
"type": "library",
|
489 |
-
"extra": {
|
490 |
-
"branch-alias": {
|
491 |
-
"dev-master": "1.6.x-dev"
|
492 |
-
}
|
493 |
-
},
|
494 |
-
"autoload": {
|
495 |
-
"psr-0": {
|
496 |
-
"Prophecy\\": "src/"
|
497 |
-
}
|
498 |
-
},
|
499 |
-
"notification-url": "https://packagist.org/downloads/",
|
500 |
-
"license": [
|
501 |
-
"MIT"
|
502 |
-
],
|
503 |
-
"authors": [
|
504 |
-
{
|
505 |
-
"name": "Konstantin Kudryashov",
|
506 |
-
"email": "ever.zet@gmail.com",
|
507 |
-
"homepage": "http://everzet.com"
|
508 |
-
},
|
509 |
-
{
|
510 |
-
"name": "Marcello Duarte",
|
511 |
-
"email": "marcello.duarte@gmail.com"
|
512 |
-
}
|
513 |
-
],
|
514 |
-
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
515 |
-
"homepage": "https://github.com/phpspec/prophecy",
|
516 |
-
"keywords": [
|
517 |
-
"Double",
|
518 |
-
"Dummy",
|
519 |
-
"fake",
|
520 |
-
"mock",
|
521 |
-
"spy",
|
522 |
-
"stub"
|
523 |
-
],
|
524 |
-
"time": "2016-11-21 14:58:47"
|
525 |
-
},
|
526 |
-
{
|
527 |
-
"name": "phpunit/php-code-coverage",
|
528 |
-
"version": "2.2.x-dev",
|
529 |
-
"source": {
|
530 |
-
"type": "git",
|
531 |
-
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
532 |
-
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
|
533 |
-
},
|
534 |
-
"dist": {
|
535 |
-
"type": "zip",
|
536 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
537 |
-
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
538 |
-
"shasum": ""
|
539 |
-
},
|
540 |
-
"require": {
|
541 |
-
"php": ">=5.3.3",
|
542 |
-
"phpunit/php-file-iterator": "~1.3",
|
543 |
-
"phpunit/php-text-template": "~1.2",
|
544 |
-
"phpunit/php-token-stream": "~1.3",
|
545 |
-
"sebastian/environment": "^1.3.2",
|
546 |
-
"sebastian/version": "~1.0"
|
547 |
-
},
|
548 |
-
"require-dev": {
|
549 |
-
"ext-xdebug": ">=2.1.4",
|
550 |
-
"phpunit/phpunit": "~4"
|
551 |
-
},
|
552 |
-
"suggest": {
|
553 |
-
"ext-dom": "*",
|
554 |
-
"ext-xdebug": ">=2.2.1",
|
555 |
-
"ext-xmlwriter": "*"
|
556 |
-
},
|
557 |
-
"type": "library",
|
558 |
-
"extra": {
|
559 |
-
"branch-alias": {
|
560 |
-
"dev-master": "2.2.x-dev"
|
561 |
-
}
|
562 |
-
},
|
563 |
-
"autoload": {
|
564 |
-
"classmap": [
|
565 |
-
"src/"
|
566 |
-
]
|
567 |
-
},
|
568 |
-
"notification-url": "https://packagist.org/downloads/",
|
569 |
-
"license": [
|
570 |
-
"BSD-3-Clause"
|
571 |
-
],
|
572 |
-
"authors": [
|
573 |
-
{
|
574 |
-
"name": "Sebastian Bergmann",
|
575 |
-
"email": "sb@sebastian-bergmann.de",
|
576 |
-
"role": "lead"
|
577 |
-
}
|
578 |
-
],
|
579 |
-
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
580 |
-
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
581 |
-
"keywords": [
|
582 |
-
"coverage",
|
583 |
-
"testing",
|
584 |
-
"xunit"
|
585 |
-
],
|
586 |
-
"time": "2015-10-06 15:47:00"
|
587 |
-
},
|
588 |
-
{
|
589 |
-
"name": "phpunit/php-file-iterator",
|
590 |
-
"version": "dev-master",
|
591 |
-
"source": {
|
592 |
-
"type": "git",
|
593 |
-
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
594 |
-
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
|
595 |
-
},
|
596 |
-
"dist": {
|
597 |
-
"type": "zip",
|
598 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
|
599 |
-
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
|
600 |
-
"shasum": ""
|
601 |
-
},
|
602 |
-
"require": {
|
603 |
-
"php": ">=5.3.3"
|
604 |
-
},
|
605 |
-
"type": "library",
|
606 |
-
"extra": {
|
607 |
-
"branch-alias": {
|
608 |
-
"dev-master": "1.4.x-dev"
|
609 |
-
}
|
610 |
-
},
|
611 |
-
"autoload": {
|
612 |
-
"classmap": [
|
613 |
-
"src/"
|
614 |
-
]
|
615 |
-
},
|
616 |
-
"notification-url": "https://packagist.org/downloads/",
|
617 |
-
"license": [
|
618 |
-
"BSD-3-Clause"
|
619 |
-
],
|
620 |
-
"authors": [
|
621 |
-
{
|
622 |
-
"name": "Sebastian Bergmann",
|
623 |
-
"email": "sb@sebastian-bergmann.de",
|
624 |
-
"role": "lead"
|
625 |
-
}
|
626 |
-
],
|
627 |
-
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
628 |
-
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
629 |
-
"keywords": [
|
630 |
-
"filesystem",
|
631 |
-
"iterator"
|
632 |
-
],
|
633 |
-
"time": "2016-10-03 07:40:28"
|
634 |
-
},
|
635 |
-
{
|
636 |
-
"name": "phpunit/php-text-template",
|
637 |
-
"version": "1.2.1",
|
638 |
-
"source": {
|
639 |
-
"type": "git",
|
640 |
-
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
641 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
642 |
-
},
|
643 |
-
"dist": {
|
644 |
-
"type": "zip",
|
645 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
646 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
647 |
-
"shasum": ""
|
648 |
-
},
|
649 |
-
"require": {
|
650 |
-
"php": ">=5.3.3"
|
651 |
-
},
|
652 |
-
"type": "library",
|
653 |
-
"autoload": {
|
654 |
-
"classmap": [
|
655 |
-
"src/"
|
656 |
-
]
|
657 |
-
},
|
658 |
-
"notification-url": "https://packagist.org/downloads/",
|
659 |
-
"license": [
|
660 |
-
"BSD-3-Clause"
|
661 |
-
],
|
662 |
-
"authors": [
|
663 |
-
{
|
664 |
-
"name": "Sebastian Bergmann",
|
665 |
-
"email": "sebastian@phpunit.de",
|
666 |
-
"role": "lead"
|
667 |
-
}
|
668 |
-
],
|
669 |
-
"description": "Simple template engine.",
|
670 |
-
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
671 |
-
"keywords": [
|
672 |
-
"template"
|
673 |
-
],
|
674 |
-
"time": "2015-06-21 13:50:34"
|
675 |
-
},
|
676 |
-
{
|
677 |
-
"name": "phpunit/php-timer",
|
678 |
-
"version": "1.0.8",
|
679 |
-
"source": {
|
680 |
-
"type": "git",
|
681 |
-
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
682 |
-
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
|
683 |
-
},
|
684 |
-
"dist": {
|
685 |
-
"type": "zip",
|
686 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
|
687 |
-
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
|
688 |
-
"shasum": ""
|
689 |
-
},
|
690 |
-
"require": {
|
691 |
-
"php": ">=5.3.3"
|
692 |
-
},
|
693 |
-
"require-dev": {
|
694 |
-
"phpunit/phpunit": "~4|~5"
|
695 |
-
},
|
696 |
-
"type": "library",
|
697 |
-
"autoload": {
|
698 |
-
"classmap": [
|
699 |
-
"src/"
|
700 |
-
]
|
701 |
-
},
|
702 |
-
"notification-url": "https://packagist.org/downloads/",
|
703 |
-
"license": [
|
704 |
-
"BSD-3-Clause"
|
705 |
-
],
|
706 |
-
"authors": [
|
707 |
-
{
|
708 |
-
"name": "Sebastian Bergmann",
|
709 |
-
"email": "sb@sebastian-bergmann.de",
|
710 |
-
"role": "lead"
|
711 |
-
}
|
712 |
-
],
|
713 |
-
"description": "Utility class for timing",
|
714 |
-
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
715 |
-
"keywords": [
|
716 |
-
"timer"
|
717 |
-
],
|
718 |
-
"time": "2016-05-12 18:03:57"
|
719 |
-
},
|
720 |
-
{
|
721 |
-
"name": "phpunit/php-token-stream",
|
722 |
-
"version": "dev-master",
|
723 |
-
"source": {
|
724 |
-
"type": "git",
|
725 |
-
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
726 |
-
"reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
|
727 |
-
},
|
728 |
-
"dist": {
|
729 |
-
"type": "zip",
|
730 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
|
731 |
-
"reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
|
732 |
-
"shasum": ""
|
733 |
-
},
|
734 |
-
"require": {
|
735 |
-
"ext-tokenizer": "*",
|
736 |
-
"php": ">=5.3.3"
|
737 |
-
},
|
738 |
-
"require-dev": {
|
739 |
-
"phpunit/phpunit": "~4.2"
|
740 |
-
},
|
741 |
-
"type": "library",
|
742 |
-
"extra": {
|
743 |
-
"branch-alias": {
|
744 |
-
"dev-master": "1.4-dev"
|
745 |
-
}
|
746 |
-
},
|
747 |
-
"autoload": {
|
748 |
-
"classmap": [
|
749 |
-
"src/"
|
750 |
-
]
|
751 |
-
},
|
752 |
-
"notification-url": "https://packagist.org/downloads/",
|
753 |
-
"license": [
|
754 |
-
"BSD-3-Clause"
|
755 |
-
],
|
756 |
-
"authors": [
|
757 |
-
{
|
758 |
-
"name": "Sebastian Bergmann",
|
759 |
-
"email": "sebastian@phpunit.de"
|
760 |
-
}
|
761 |
-
],
|
762 |
-
"description": "Wrapper around PHP's tokenizer extension.",
|
763 |
-
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
764 |
-
"keywords": [
|
765 |
-
"tokenizer"
|
766 |
-
],
|
767 |
-
"time": "2016-11-15 14:06:22"
|
768 |
-
},
|
769 |
-
{
|
770 |
-
"name": "phpunit/phpunit",
|
771 |
-
"version": "4.8.x-dev",
|
772 |
-
"source": {
|
773 |
-
"type": "git",
|
774 |
-
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
775 |
-
"reference": "1202e3ce2047810607df9858a7bf8d5573077deb"
|
776 |
-
},
|
777 |
-
"dist": {
|
778 |
-
"type": "zip",
|
779 |
-
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1202e3ce2047810607df9858a7bf8d5573077deb",
|
780 |
-
"reference": "1202e3ce2047810607df9858a7bf8d5573077deb",
|
781 |
-
"shasum": ""
|
782 |
-
},
|
783 |
-
"require": {
|
784 |
-
"ext-dom": "*",
|
785 |
-
"ext-json": "*",
|
786 |
-
"ext-pcre": "*",
|
787 |
-
"ext-reflection": "*",
|
788 |
-
"ext-spl": "*",
|
789 |
-
"php": ">=5.3.3",
|
790 |
-
"phpspec/prophecy": "^1.3.1",
|
791 |
-
"phpunit/php-code-coverage": "~2.1",
|
792 |
-
"phpunit/php-file-iterator": "~1.4",
|
793 |
-
"phpunit/php-text-template": "~1.2",
|
794 |
-
"phpunit/php-timer": "^1.0.6",
|
795 |
-
"phpunit/phpunit-mock-objects": "~2.3",
|
796 |
-
"sebastian/comparator": "~1.2.2",
|
797 |
-
"sebastian/diff": "~1.2",
|
798 |
-
"sebastian/environment": "~1.3",
|
799 |
-
"sebastian/exporter": "~1.2",
|
800 |
-
"sebastian/global-state": "~1.0",
|
801 |
-
"sebastian/version": "~1.0",
|
802 |
-
"symfony/yaml": "~2.1|~3.0"
|
803 |
-
},
|
804 |
-
"suggest": {
|
805 |
-
"phpunit/php-invoker": "~1.1"
|
806 |
-
},
|
807 |
-
"bin": [
|
808 |
-
"phpunit"
|
809 |
-
],
|
810 |
-
"type": "library",
|
811 |
-
"extra": {
|
812 |
-
"branch-alias": {
|
813 |
-
"dev-master": "4.8.x-dev"
|
814 |
-
}
|
815 |
-
},
|
816 |
-
"autoload": {
|
817 |
-
"classmap": [
|
818 |
-
"src/"
|
819 |
-
]
|
820 |
-
},
|
821 |
-
"notification-url": "https://packagist.org/downloads/",
|
822 |
-
"license": [
|
823 |
-
"BSD-3-Clause"
|
824 |
-
],
|
825 |
-
"authors": [
|
826 |
-
{
|
827 |
-
"name": "Sebastian Bergmann",
|
828 |
-
"email": "sebastian@phpunit.de",
|
829 |
-
"role": "lead"
|
830 |
-
}
|
831 |
-
],
|
832 |
-
"description": "The PHP Unit Testing framework.",
|
833 |
-
"homepage": "https://phpunit.de/",
|
834 |
-
"keywords": [
|
835 |
-
"phpunit",
|
836 |
-
"testing",
|
837 |
-
"xunit"
|
838 |
-
],
|
839 |
-
"time": "2017-01-21 14:05:27"
|
840 |
-
},
|
841 |
-
{
|
842 |
-
"name": "phpunit/phpunit-mock-objects",
|
843 |
-
"version": "2.3.x-dev",
|
844 |
-
"source": {
|
845 |
-
"type": "git",
|
846 |
-
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
847 |
-
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
|
848 |
-
},
|
849 |
-
"dist": {
|
850 |
-
"type": "zip",
|
851 |
-
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
852 |
-
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
853 |
-
"shasum": ""
|
854 |
-
},
|
855 |
-
"require": {
|
856 |
-
"doctrine/instantiator": "^1.0.2",
|
857 |
-
"php": ">=5.3.3",
|
858 |
-
"phpunit/php-text-template": "~1.2",
|
859 |
-
"sebastian/exporter": "~1.2"
|
860 |
-
},
|
861 |
-
"require-dev": {
|
862 |
-
"phpunit/phpunit": "~4.4"
|
863 |
-
},
|
864 |
-
"suggest": {
|
865 |
-
"ext-soap": "*"
|
866 |
-
},
|
867 |
-
"type": "library",
|
868 |
-
"extra": {
|
869 |
-
"branch-alias": {
|
870 |
-
"dev-master": "2.3.x-dev"
|
871 |
-
}
|
872 |
-
},
|
873 |
-
"autoload": {
|
874 |
-
"classmap": [
|
875 |
-
"src/"
|
876 |
-
]
|
877 |
-
},
|
878 |
-
"notification-url": "https://packagist.org/downloads/",
|
879 |
-
"license": [
|
880 |
-
"BSD-3-Clause"
|
881 |
-
],
|
882 |
-
"authors": [
|
883 |
-
{
|
884 |
-
"name": "Sebastian Bergmann",
|
885 |
-
"email": "sb@sebastian-bergmann.de",
|
886 |
-
"role": "lead"
|
887 |
-
}
|
888 |
-
],
|
889 |
-
"description": "Mock Object library for PHPUnit",
|
890 |
-
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
891 |
-
"keywords": [
|
892 |
-
"mock",
|
893 |
-
"xunit"
|
894 |
-
],
|
895 |
-
"time": "2015-10-02 06:51:40"
|
896 |
-
},
|
897 |
-
{
|
898 |
-
"name": "psr/log",
|
899 |
-
"version": "dev-master",
|
900 |
-
"source": {
|
901 |
-
"type": "git",
|
902 |
-
"url": "https://github.com/php-fig/log.git",
|
903 |
-
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
904 |
-
},
|
905 |
-
"dist": {
|
906 |
-
"type": "zip",
|
907 |
-
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
908 |
-
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
909 |
-
"shasum": ""
|
910 |
-
},
|
911 |
-
"require": {
|
912 |
-
"php": ">=5.3.0"
|
913 |
-
},
|
914 |
-
"type": "library",
|
915 |
-
"extra": {
|
916 |
-
"branch-alias": {
|
917 |
-
"dev-master": "1.0.x-dev"
|
918 |
-
}
|
919 |
-
},
|
920 |
-
"autoload": {
|
921 |
-
"psr-4": {
|
922 |
-
"Psr\\Log\\": "Psr/Log/"
|
923 |
-
}
|
924 |
-
},
|
925 |
-
"notification-url": "https://packagist.org/downloads/",
|
926 |
-
"license": [
|
927 |
-
"MIT"
|
928 |
-
],
|
929 |
-
"authors": [
|
930 |
-
{
|
931 |
-
"name": "PHP-FIG",
|
932 |
-
"homepage": "http://www.php-fig.org/"
|
933 |
-
}
|
934 |
-
],
|
935 |
-
"description": "Common interface for logging libraries",
|
936 |
-
"homepage": "https://github.com/php-fig/log",
|
937 |
-
"keywords": [
|
938 |
-
"log",
|
939 |
-
"psr",
|
940 |
-
"psr-3"
|
941 |
-
],
|
942 |
-
"time": "2016-10-10 12:19:37"
|
943 |
-
},
|
944 |
-
{
|
945 |
-
"name": "ptrofimov/xpmock",
|
946 |
-
"version": "1.1.5",
|
947 |
-
"source": {
|
948 |
-
"type": "git",
|
949 |
-
"url": "https://github.com/ptrofimov/xpmock.git",
|
950 |
-
"reference": "5b95ace33624b66bf4e854071b8856722fde515e"
|
951 |
-
},
|
952 |
-
"dist": {
|
953 |
-
"type": "zip",
|
954 |
-
"url": "https://api.github.com/repos/ptrofimov/xpmock/zipball/5b95ace33624b66bf4e854071b8856722fde515e",
|
955 |
-
"reference": "5b95ace33624b66bf4e854071b8856722fde515e",
|
956 |
-
"shasum": ""
|
957 |
-
},
|
958 |
-
"require": {
|
959 |
-
"php": ">=5.3.0"
|
960 |
-
},
|
961 |
-
"require-dev": {
|
962 |
-
"phpunit/phpunit": "3.7.*"
|
963 |
-
},
|
964 |
-
"type": "library",
|
965 |
-
"autoload": {
|
966 |
-
"psr-0": {
|
967 |
-
"Xpmock": "src"
|
968 |
-
}
|
969 |
-
},
|
970 |
-
"notification-url": "https://packagist.org/downloads/",
|
971 |
-
"license": [
|
972 |
-
"MIT"
|
973 |
-
],
|
974 |
-
"description": "PHPUnit: simple syntax to create mock-objects",
|
975 |
-
"time": "2014-01-02 16:42:27"
|
976 |
-
},
|
977 |
-
{
|
978 |
-
"name": "satooshi/php-coveralls",
|
979 |
-
"version": "1.0.x-dev",
|
980 |
-
"source": {
|
981 |
-
"type": "git",
|
982 |
-
"url": "https://github.com/satooshi/php-coveralls.git",
|
983 |
-
"reference": "da51d304fe8622bf9a6da39a8446e7afd432115c"
|
984 |
-
},
|
985 |
-
"dist": {
|
986 |
-
"type": "zip",
|
987 |
-
"url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c",
|
988 |
-
"reference": "da51d304fe8622bf9a6da39a8446e7afd432115c",
|
989 |
-
"shasum": ""
|
990 |
-
},
|
991 |
-
"require": {
|
992 |
-
"ext-json": "*",
|
993 |
-
"ext-simplexml": "*",
|
994 |
-
"guzzle/guzzle": "^2.8|^3.0",
|
995 |
-
"php": ">=5.3.3",
|
996 |
-
"psr/log": "^1.0",
|
997 |
-
"symfony/config": "^2.1|^3.0",
|
998 |
-
"symfony/console": "^2.1|^3.0",
|
999 |
-
"symfony/stopwatch": "^2.0|^3.0",
|
1000 |
-
"symfony/yaml": "^2.0|^3.0"
|
1001 |
-
},
|
1002 |
-
"suggest": {
|
1003 |
-
"symfony/http-kernel": "Allows Symfony integration"
|
1004 |
-
},
|
1005 |
-
"bin": [
|
1006 |
-
"bin/coveralls"
|
1007 |
-
],
|
1008 |
-
"type": "library",
|
1009 |
-
"autoload": {
|
1010 |
-
"psr-4": {
|
1011 |
-
"Satooshi\\": "src/Satooshi/"
|
1012 |
-
}
|
1013 |
-
},
|
1014 |
-
"notification-url": "https://packagist.org/downloads/",
|
1015 |
-
"license": [
|
1016 |
-
"MIT"
|
1017 |
-
],
|
1018 |
-
"authors": [
|
1019 |
-
{
|
1020 |
-
"name": "Kitamura Satoshi",
|
1021 |
-
"email": "with.no.parachute@gmail.com",
|
1022 |
-
"homepage": "https://www.facebook.com/satooshi.jp"
|
1023 |
-
}
|
1024 |
-
],
|
1025 |
-
"description": "PHP client library for Coveralls API",
|
1026 |
-
"homepage": "https://github.com/satooshi/php-coveralls",
|
1027 |
-
"keywords": [
|
1028 |
-
"ci",
|
1029 |
-
"coverage",
|
1030 |
-
"github",
|
1031 |
-
"test"
|
1032 |
-
],
|
1033 |
-
"time": "2016-01-20 17:35:46"
|
1034 |
-
},
|
1035 |
-
{
|
1036 |
-
"name": "sebastian/comparator",
|
1037 |
-
"version": "dev-master",
|
1038 |
-
"source": {
|
1039 |
-
"type": "git",
|
1040 |
-
"url": "https://github.com/sebastianbergmann/comparator.git",
|
1041 |
-
"reference": "2f09d5a251c4a92d1a80518c2166b5d0d742bc63"
|
1042 |
-
},
|
1043 |
-
"dist": {
|
1044 |
-
"type": "zip",
|
1045 |
-
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2f09d5a251c4a92d1a80518c2166b5d0d742bc63",
|
1046 |
-
"reference": "2f09d5a251c4a92d1a80518c2166b5d0d742bc63",
|
1047 |
-
"shasum": ""
|
1048 |
-
},
|
1049 |
-
"require": {
|
1050 |
-
"php": "^5.3.3 || ^7.0",
|
1051 |
-
"sebastian/diff": "^1.2",
|
1052 |
-
"sebastian/exporter": "^1.2 || ^2.0"
|
1053 |
-
},
|
1054 |
-
"require-dev": {
|
1055 |
-
"phpunit/phpunit": "^4.8"
|
1056 |
-
},
|
1057 |
-
"type": "library",
|
1058 |
-
"extra": {
|
1059 |
-
"branch-alias": {
|
1060 |
-
"dev-master": "1.2.x-dev"
|
1061 |
-
}
|
1062 |
-
},
|
1063 |
-
"autoload": {
|
1064 |
-
"classmap": [
|
1065 |
-
"src/"
|
1066 |
-
]
|
1067 |
-
},
|
1068 |
-
"notification-url": "https://packagist.org/downloads/",
|
1069 |
-
"license": [
|
1070 |
-
"BSD-3-Clause"
|
1071 |
-
],
|
1072 |
-
"authors": [
|
1073 |
-
{
|
1074 |
-
"name": "Jeff Welch",
|
1075 |
-
"email": "whatthejeff@gmail.com"
|
1076 |
-
},
|
1077 |
-
{
|
1078 |
-
"name": "Volker Dusch",
|
1079 |
-
"email": "github@wallbash.com"
|
1080 |
-
},
|
1081 |
-
{
|
1082 |
-
"name": "Bernhard Schussek",
|
1083 |
-
"email": "bschussek@2bepublished.at"
|
1084 |
-
},
|
1085 |
-
{
|
1086 |
-
"name": "Sebastian Bergmann",
|
1087 |
-
"email": "sebastian@phpunit.de"
|
1088 |
-
}
|
1089 |
-
],
|
1090 |
-
"description": "Provides the functionality to compare PHP values for equality",
|
1091 |
-
"homepage": "http://www.github.com/sebastianbergmann/comparator",
|
1092 |
-
"keywords": [
|
1093 |
-
"comparator",
|
1094 |
-
"compare",
|
1095 |
-
"equality"
|
1096 |
-
],
|
1097 |
-
"time": "2016-12-10 08:07:52"
|
1098 |
-
},
|
1099 |
-
{
|
1100 |
-
"name": "sebastian/diff",
|
1101 |
-
"version": "dev-master",
|
1102 |
-
"source": {
|
1103 |
-
"type": "git",
|
1104 |
-
"url": "https://github.com/sebastianbergmann/diff.git",
|
1105 |
-
"reference": "d0814318784b7756fb932116acd19ee3b0cbe67a"
|
1106 |
-
},
|
1107 |
-
"dist": {
|
1108 |
-
"type": "zip",
|
1109 |
-
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/d0814318784b7756fb932116acd19ee3b0cbe67a",
|
1110 |
-
"reference": "d0814318784b7756fb932116acd19ee3b0cbe67a",
|
1111 |
-
"shasum": ""
|
1112 |
-
},
|
1113 |
-
"require": {
|
1114 |
-
"php": ">=5.3.3"
|
1115 |
-
},
|
1116 |
-
"require-dev": {
|
1117 |
-
"phpunit/phpunit": "~4.8"
|
1118 |
-
},
|
1119 |
-
"type": "library",
|
1120 |
-
"extra": {
|
1121 |
-
"branch-alias": {
|
1122 |
-
"dev-master": "1.4-dev"
|
1123 |
-
}
|
1124 |
-
},
|
1125 |
-
"autoload": {
|
1126 |
-
"classmap": [
|
1127 |
-
"src/"
|
1128 |
-
]
|
1129 |
-
},
|
1130 |
-
"notification-url": "https://packagist.org/downloads/",
|
1131 |
-
"license": [
|
1132 |
-
"BSD-3-Clause"
|
1133 |
-
],
|
1134 |
-
"authors": [
|
1135 |
-
{
|
1136 |
-
"name": "Kore Nordmann",
|
1137 |
-
"email": "mail@kore-nordmann.de"
|
1138 |
-
},
|
1139 |
-
{
|
1140 |
-
"name": "Sebastian Bergmann",
|
1141 |
-
"email": "sebastian@phpunit.de"
|
1142 |
-
}
|
1143 |
-
],
|
1144 |
-
"description": "Diff implementation",
|
1145 |
-
"homepage": "https://github.com/sebastianbergmann/diff",
|
1146 |
-
"keywords": [
|
1147 |
-
"diff"
|
1148 |
-
],
|
1149 |
-
"time": "2016-10-03 07:45:03"
|
1150 |
-
},
|
1151 |
-
{
|
1152 |
-
"name": "sebastian/environment",
|
1153 |
-
"version": "1.3.x-dev",
|
1154 |
-
"source": {
|
1155 |
-
"type": "git",
|
1156 |
-
"url": "https://github.com/sebastianbergmann/environment.git",
|
1157 |
-
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
|
1158 |
-
},
|
1159 |
-
"dist": {
|
1160 |
-
"type": "zip",
|
1161 |
-
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
|
1162 |
-
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
|
1163 |
-
"shasum": ""
|
1164 |
-
},
|
1165 |
-
"require": {
|
1166 |
-
"php": "^5.3.3 || ^7.0"
|
1167 |
-
},
|
1168 |
-
"require-dev": {
|
1169 |
-
"phpunit/phpunit": "^4.8 || ^5.0"
|
1170 |
-
},
|
1171 |
-
"type": "library",
|
1172 |
-
"extra": {
|
1173 |
-
"branch-alias": {
|
1174 |
-
"dev-master": "1.3.x-dev"
|
1175 |
-
}
|
1176 |
-
},
|
1177 |
-
"autoload": {
|
1178 |
-
"classmap": [
|
1179 |
-
"src/"
|
1180 |
-
]
|
1181 |
-
},
|
1182 |
-
"notification-url": "https://packagist.org/downloads/",
|
1183 |
-
"license": [
|
1184 |
-
"BSD-3-Clause"
|
1185 |
-
],
|
1186 |
-
"authors": [
|
1187 |
-
{
|
1188 |
-
"name": "Sebastian Bergmann",
|
1189 |
-
"email": "sebastian@phpunit.de"
|
1190 |
-
}
|
1191 |
-
],
|
1192 |
-
"description": "Provides functionality to handle HHVM/PHP environments",
|
1193 |
-
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
1194 |
-
"keywords": [
|
1195 |
-
"Xdebug",
|
1196 |
-
"environment",
|
1197 |
-
"hhvm"
|
1198 |
-
],
|
1199 |
-
"time": "2016-08-18 05:49:44"
|
1200 |
-
},
|
1201 |
-
{
|
1202 |
-
"name": "sebastian/exporter",
|
1203 |
-
"version": "1.2.x-dev",
|
1204 |
-
"source": {
|
1205 |
-
"type": "git",
|
1206 |
-
"url": "https://github.com/sebastianbergmann/exporter.git",
|
1207 |
-
"reference": "7dfcd2418aacbdb5e123fb23ac735acfdd6c588d"
|
1208 |
-
},
|
1209 |
-
"dist": {
|
1210 |
-
"type": "zip",
|
1211 |
-
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7dfcd2418aacbdb5e123fb23ac735acfdd6c588d",
|
1212 |
-
"reference": "7dfcd2418aacbdb5e123fb23ac735acfdd6c588d",
|
1213 |
-
"shasum": ""
|
1214 |
-
},
|
1215 |
-
"require": {
|
1216 |
-
"php": ">=5.3.3",
|
1217 |
-
"sebastian/recursion-context": "~1.0"
|
1218 |
-
},
|
1219 |
-
"require-dev": {
|
1220 |
-
"ext-mbstring": "*",
|
1221 |
-
"phpunit/phpunit": "~4.4"
|
1222 |
-
},
|
1223 |
-
"type": "library",
|
1224 |
-
"extra": {
|
1225 |
-
"branch-alias": {
|
1226 |
-
"dev-master": "1.3.x-dev"
|
1227 |
-
}
|
1228 |
-
},
|
1229 |
-
"autoload": {
|
1230 |
-
"classmap": [
|
1231 |
-
"src/"
|
1232 |
-
]
|
1233 |
-
},
|
1234 |
-
"notification-url": "https://packagist.org/downloads/",
|
1235 |
-
"license": [
|
1236 |
-
"BSD-3-Clause"
|
1237 |
-
],
|
1238 |
-
"authors": [
|
1239 |
-
{
|
1240 |
-
"name": "Jeff Welch",
|
1241 |
-
"email": "whatthejeff@gmail.com"
|
1242 |
-
},
|
1243 |
-
{
|
1244 |
-
"name": "Volker Dusch",
|
1245 |
-
"email": "github@wallbash.com"
|
1246 |
-
},
|
1247 |
-
{
|
1248 |
-
"name": "Bernhard Schussek",
|
1249 |
-
"email": "bschussek@2bepublished.at"
|
1250 |
-
},
|
1251 |
-
{
|
1252 |
-
"name": "Sebastian Bergmann",
|
1253 |
-
"email": "sebastian@phpunit.de"
|
1254 |
-
},
|
1255 |
-
{
|
1256 |
-
"name": "Adam Harvey",
|
1257 |
-
"email": "aharvey@php.net"
|
1258 |
-
}
|
1259 |
-
],
|
1260 |
-
"description": "Provides the functionality to export PHP variables for visualization",
|
1261 |
-
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
1262 |
-
"keywords": [
|
1263 |
-
"export",
|
1264 |
-
"exporter"
|
1265 |
-
],
|
1266 |
-
"time": "2016-10-03 07:44:30"
|
1267 |
-
},
|
1268 |
-
{
|
1269 |
-
"name": "sebastian/global-state",
|
1270 |
-
"version": "1.1.x-dev",
|
1271 |
-
"source": {
|
1272 |
-
"type": "git",
|
1273 |
-
"url": "https://github.com/sebastianbergmann/global-state.git",
|
1274 |
-
"reference": "5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d"
|
1275 |
-
},
|
1276 |
-
"dist": {
|
1277 |
-
"type": "zip",
|
1278 |
-
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d",
|
1279 |
-
"reference": "5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d",
|
1280 |
-
"shasum": ""
|
1281 |
-
},
|
1282 |
-
"require": {
|
1283 |
-
"php": ">=5.3.3"
|
1284 |
-
},
|
1285 |
-
"require-dev": {
|
1286 |
-
"phpunit/phpunit": "~4.2|~5.0"
|
1287 |
-
},
|
1288 |
-
"suggest": {
|
1289 |
-
"ext-uopz": "*"
|
1290 |
-
},
|
1291 |
-
"type": "library",
|
1292 |
-
"extra": {
|
1293 |
-
"branch-alias": {
|
1294 |
-
"dev-master": "1.0-dev"
|
1295 |
-
}
|
1296 |
-
},
|
1297 |
-
"autoload": {
|
1298 |
-
"classmap": [
|
1299 |
-
"src/"
|
1300 |
-
]
|
1301 |
-
},
|
1302 |
-
"notification-url": "https://packagist.org/downloads/",
|
1303 |
-
"license": [
|
1304 |
-
"BSD-3-Clause"
|
1305 |
-
],
|
1306 |
-
"authors": [
|
1307 |
-
{
|
1308 |
-
"name": "Sebastian Bergmann",
|
1309 |
-
"email": "sebastian@phpunit.de"
|
1310 |
-
}
|
1311 |
-
],
|
1312 |
-
"description": "Snapshotting of global state",
|
1313 |
-
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
1314 |
-
"keywords": [
|
1315 |
-
"global state"
|
1316 |
-
],
|
1317 |
-
"time": "2016-10-03 07:46:22"
|
1318 |
-
},
|
1319 |
-
{
|
1320 |
-
"name": "sebastian/recursion-context",
|
1321 |
-
"version": "1.0.x-dev",
|
1322 |
-
"source": {
|
1323 |
-
"type": "git",
|
1324 |
-
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
1325 |
-
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7"
|
1326 |
-
},
|
1327 |
-
"dist": {
|
1328 |
-
"type": "zip",
|
1329 |
-
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
|
1330 |
-
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
|
1331 |
-
"shasum": ""
|
1332 |
-
},
|
1333 |
-
"require": {
|
1334 |
-
"php": ">=5.3.3"
|
1335 |
-
},
|
1336 |
-
"require-dev": {
|
1337 |
-
"phpunit/phpunit": "~4.4"
|
1338 |
-
},
|
1339 |
-
"type": "library",
|
1340 |
-
"extra": {
|
1341 |
-
"branch-alias": {
|
1342 |
-
"dev-master": "1.0.x-dev"
|
1343 |
-
}
|
1344 |
-
},
|
1345 |
-
"autoload": {
|
1346 |
-
"classmap": [
|
1347 |
-
"src/"
|
1348 |
-
]
|
1349 |
-
},
|
1350 |
-
"notification-url": "https://packagist.org/downloads/",
|
1351 |
-
"license": [
|
1352 |
-
"BSD-3-Clause"
|
1353 |
-
],
|
1354 |
-
"authors": [
|
1355 |
-
{
|
1356 |
-
"name": "Jeff Welch",
|
1357 |
-
"email": "whatthejeff@gmail.com"
|
1358 |
-
},
|
1359 |
-
{
|
1360 |
-
"name": "Sebastian Bergmann",
|
1361 |
-
"email": "sebastian@phpunit.de"
|
1362 |
-
},
|
1363 |
-
{
|
1364 |
-
"name": "Adam Harvey",
|
1365 |
-
"email": "aharvey@php.net"
|
1366 |
-
}
|
1367 |
-
],
|
1368 |
-
"description": "Provides functionality to recursively process PHP variables",
|
1369 |
-
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
1370 |
-
"time": "2016-10-03 07:41:43"
|
1371 |
-
},
|
1372 |
-
{
|
1373 |
-
"name": "sebastian/version",
|
1374 |
-
"version": "1.0.6",
|
1375 |
-
"source": {
|
1376 |
-
"type": "git",
|
1377 |
-
"url": "https://github.com/sebastianbergmann/version.git",
|
1378 |
-
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
|
1379 |
-
},
|
1380 |
-
"dist": {
|
1381 |
-
"type": "zip",
|
1382 |
-
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
1383 |
-
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
1384 |
-
"shasum": ""
|
1385 |
-
},
|
1386 |
-
"type": "library",
|
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 |
-
"role": "lead"
|
1401 |
-
}
|
1402 |
-
],
|
1403 |
-
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
1404 |
-
"homepage": "https://github.com/sebastianbergmann/version",
|
1405 |
-
"time": "2015-06-21 13:59:46"
|
1406 |
-
},
|
1407 |
-
{
|
1408 |
-
"name": "symfony/config",
|
1409 |
-
"version": "dev-master",
|
1410 |
-
"source": {
|
1411 |
-
"type": "git",
|
1412 |
-
"url": "https://github.com/symfony/config.git",
|
1413 |
-
"reference": "ba3da262813160b4963fb36f573c886592da6acb"
|
1414 |
-
},
|
1415 |
-
"dist": {
|
1416 |
-
"type": "zip",
|
1417 |
-
"url": "https://api.github.com/repos/symfony/config/zipball/ba3da262813160b4963fb36f573c886592da6acb",
|
1418 |
-
"reference": "ba3da262813160b4963fb36f573c886592da6acb",
|
1419 |
-
"shasum": ""
|
1420 |
-
},
|
1421 |
-
"require": {
|
1422 |
-
"php": ">=5.5.9",
|
1423 |
-
"symfony/filesystem": "~2.8|~3.0"
|
1424 |
-
},
|
1425 |
-
"require-dev": {
|
1426 |
-
"symfony/yaml": "~3.0"
|
1427 |
-
},
|
1428 |
-
"suggest": {
|
1429 |
-
"symfony/yaml": "To use the yaml reference dumper"
|
1430 |
-
},
|
1431 |
-
"type": "library",
|
1432 |
-
"extra": {
|
1433 |
-
"branch-alias": {
|
1434 |
-
"dev-master": "3.3-dev"
|
1435 |
-
}
|
1436 |
-
},
|
1437 |
-
"autoload": {
|
1438 |
-
"psr-4": {
|
1439 |
-
"Symfony\\Component\\Config\\": ""
|
1440 |
-
},
|
1441 |
-
"exclude-from-classmap": [
|
1442 |
-
"/Tests/"
|
1443 |
-
]
|
1444 |
-
},
|
1445 |
-
"notification-url": "https://packagist.org/downloads/",
|
1446 |
-
"license": [
|
1447 |
-
"MIT"
|
1448 |
-
],
|
1449 |
-
"authors": [
|
1450 |
-
{
|
1451 |
-
"name": "Fabien Potencier",
|
1452 |
-
"email": "fabien@symfony.com"
|
1453 |
-
},
|
1454 |
-
{
|
1455 |
-
"name": "Symfony Community",
|
1456 |
-
"homepage": "https://symfony.com/contributors"
|
1457 |
-
}
|
1458 |
-
],
|
1459 |
-
"description": "Symfony Config Component",
|
1460 |
-
"homepage": "https://symfony.com",
|
1461 |
-
"time": "2017-01-09 21:03:44"
|
1462 |
-
},
|
1463 |
-
{
|
1464 |
-
"name": "symfony/console",
|
1465 |
-
"version": "dev-master",
|
1466 |
-
"source": {
|
1467 |
-
"type": "git",
|
1468 |
-
"url": "https://github.com/symfony/console.git",
|
1469 |
-
"reference": "08efa49aa07dde0747198c6075a1061c750e9884"
|
1470 |
-
},
|
1471 |
-
"dist": {
|
1472 |
-
"type": "zip",
|
1473 |
-
"url": "https://api.github.com/repos/symfony/console/zipball/08efa49aa07dde0747198c6075a1061c750e9884",
|
1474 |
-
"reference": "08efa49aa07dde0747198c6075a1061c750e9884",
|
1475 |
-
"shasum": ""
|
1476 |
-
},
|
1477 |
-
"require": {
|
1478 |
-
"php": ">=5.5.9",
|
1479 |
-
"symfony/debug": "~2.8|~3.0",
|
1480 |
-
"symfony/polyfill-mbstring": "~1.0"
|
1481 |
-
},
|
1482 |
-
"require-dev": {
|
1483 |
-
"psr/log": "~1.0",
|
1484 |
-
"symfony/dependency-injection": "~2.8|~3.0",
|
1485 |
-
"symfony/event-dispatcher": "~2.8|~3.0",
|
1486 |
-
"symfony/filesystem": "~2.8|~3.0",
|
1487 |
-
"symfony/http-kernel": "~2.8|~3.0",
|
1488 |
-
"symfony/process": "~2.8|~3.0"
|
1489 |
-
},
|
1490 |
-
"suggest": {
|
1491 |
-
"psr/log": "For using the console logger",
|
1492 |
-
"symfony/event-dispatcher": "",
|
1493 |
-
"symfony/filesystem": "",
|
1494 |
-
"symfony/process": ""
|
1495 |
-
},
|
1496 |
-
"type": "library",
|
1497 |
-
"extra": {
|
1498 |
-
"branch-alias": {
|
1499 |
-
"dev-master": "3.3-dev"
|
1500 |
-
}
|
1501 |
-
},
|
1502 |
-
"autoload": {
|
1503 |
-
"psr-4": {
|
1504 |
-
"Symfony\\Component\\Console\\": ""
|
1505 |
-
},
|
1506 |
-
"exclude-from-classmap": [
|
1507 |
-
"/Tests/"
|
1508 |
-
]
|
1509 |
-
},
|
1510 |
-
"notification-url": "https://packagist.org/downloads/",
|
1511 |
-
"license": [
|
1512 |
-
"MIT"
|
1513 |
-
],
|
1514 |
-
"authors": [
|
1515 |
-
{
|
1516 |
-
"name": "Fabien Potencier",
|
1517 |
-
"email": "fabien@symfony.com"
|
1518 |
-
},
|
1519 |
-
{
|
1520 |
-
"name": "Symfony Community",
|
1521 |
-
"homepage": "https://symfony.com/contributors"
|
1522 |
-
}
|
1523 |
-
],
|
1524 |
-
"description": "Symfony Console Component",
|
1525 |
-
"homepage": "https://symfony.com",
|
1526 |
-
"time": "2017-01-11 12:05:48"
|
1527 |
-
},
|
1528 |
-
{
|
1529 |
-
"name": "symfony/debug",
|
1530 |
-
"version": "dev-master",
|
1531 |
-
"source": {
|
1532 |
-
"type": "git",
|
1533 |
-
"url": "https://github.com/symfony/debug.git",
|
1534 |
-
"reference": "e990e0b4f58e2cb64ebf05845fa982d06011957d"
|
1535 |
-
},
|
1536 |
-
"dist": {
|
1537 |
-
"type": "zip",
|
1538 |
-
"url": "https://api.github.com/repos/symfony/debug/zipball/e990e0b4f58e2cb64ebf05845fa982d06011957d",
|
1539 |
-
"reference": "e990e0b4f58e2cb64ebf05845fa982d06011957d",
|
1540 |
-
"shasum": ""
|
1541 |
-
},
|
1542 |
-
"require": {
|
1543 |
-
"php": ">=5.5.9",
|
1544 |
-
"psr/log": "~1.0"
|
1545 |
-
},
|
1546 |
-
"conflict": {
|
1547 |
-
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
1548 |
-
},
|
1549 |
-
"require-dev": {
|
1550 |
-
"symfony/http-kernel": "~2.8|~3.0"
|
1551 |
-
},
|
1552 |
-
"type": "library",
|
1553 |
-
"extra": {
|
1554 |
-
"branch-alias": {
|
1555 |
-
"dev-master": "3.3-dev"
|
1556 |
-
}
|
1557 |
-
},
|
1558 |
-
"autoload": {
|
1559 |
-
"psr-4": {
|
1560 |
-
"Symfony\\Component\\Debug\\": ""
|
1561 |
-
},
|
1562 |
-
"exclude-from-classmap": [
|
1563 |
-
"/Tests/"
|
1564 |
-
]
|
1565 |
-
},
|
1566 |
-
"notification-url": "https://packagist.org/downloads/",
|
1567 |
-
"license": [
|
1568 |
-
"MIT"
|
1569 |
-
],
|
1570 |
-
"authors": [
|
1571 |
-
{
|
1572 |
-
"name": "Fabien Potencier",
|
1573 |
-
"email": "fabien@symfony.com"
|
1574 |
-
},
|
1575 |
-
{
|
1576 |
-
"name": "Symfony Community",
|
1577 |
-
"homepage": "https://symfony.com/contributors"
|
1578 |
-
}
|
1579 |
-
],
|
1580 |
-
"description": "Symfony Debug Component",
|
1581 |
-
"homepage": "https://symfony.com",
|
1582 |
-
"time": "2017-01-20 10:22:07"
|
1583 |
-
},
|
1584 |
-
{
|
1585 |
-
"name": "symfony/event-dispatcher",
|
1586 |
-
"version": "2.8.x-dev",
|
1587 |
-
"source": {
|
1588 |
-
"type": "git",
|
1589 |
-
"url": "https://github.com/symfony/event-dispatcher.git",
|
1590 |
-
"reference": "74877977f90fb9c3e46378d5764217c55f32df34"
|
1591 |
-
},
|
1592 |
-
"dist": {
|
1593 |
-
"type": "zip",
|
1594 |
-
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74877977f90fb9c3e46378d5764217c55f32df34",
|
1595 |
-
"reference": "74877977f90fb9c3e46378d5764217c55f32df34",
|
1596 |
-
"shasum": ""
|
1597 |
-
},
|
1598 |
-
"require": {
|
1599 |
-
"php": ">=5.3.9"
|
1600 |
-
},
|
1601 |
-
"require-dev": {
|
1602 |
-
"psr/log": "~1.0",
|
1603 |
-
"symfony/config": "~2.0,>=2.0.5|~3.0.0",
|
1604 |
-
"symfony/dependency-injection": "~2.6|~3.0.0",
|
1605 |
-
"symfony/expression-language": "~2.6|~3.0.0",
|
1606 |
-
"symfony/stopwatch": "~2.3|~3.0.0"
|
1607 |
-
},
|
1608 |
-
"suggest": {
|
1609 |
-
"symfony/dependency-injection": "",
|
1610 |
-
"symfony/http-kernel": ""
|
1611 |
-
},
|
1612 |
-
"type": "library",
|
1613 |
-
"extra": {
|
1614 |
-
"branch-alias": {
|
1615 |
-
"dev-master": "2.8-dev"
|
1616 |
-
}
|
1617 |
-
},
|
1618 |
-
"autoload": {
|
1619 |
-
"psr-4": {
|
1620 |
-
"Symfony\\Component\\EventDispatcher\\": ""
|
1621 |
-
},
|
1622 |
-
"exclude-from-classmap": [
|
1623 |
-
"/Tests/"
|
1624 |
-
]
|
1625 |
-
},
|
1626 |
-
"notification-url": "https://packagist.org/downloads/",
|
1627 |
-
"license": [
|
1628 |
-
"MIT"
|
1629 |
-
],
|
1630 |
-
"authors": [
|
1631 |
-
{
|
1632 |
-
"name": "Fabien Potencier",
|
1633 |
-
"email": "fabien@symfony.com"
|
1634 |
-
},
|
1635 |
-
{
|
1636 |
-
"name": "Symfony Community",
|
1637 |
-
"homepage": "https://symfony.com/contributors"
|
1638 |
-
}
|
1639 |
-
],
|
1640 |
-
"description": "Symfony EventDispatcher Component",
|
1641 |
-
"homepage": "https://symfony.com",
|
1642 |
-
"time": "2017-01-02 20:30:24"
|
1643 |
-
},
|
1644 |
-
{
|
1645 |
-
"name": "symfony/filesystem",
|
1646 |
-
"version": "dev-master",
|
1647 |
-
"source": {
|
1648 |
-
"type": "git",
|
1649 |
-
"url": "https://github.com/symfony/filesystem.git",
|
1650 |
-
"reference": "b2de62936fea037d501159f52b7b6172cc962282"
|
1651 |
-
},
|
1652 |
-
"dist": {
|
1653 |
-
"type": "zip",
|
1654 |
-
"url": "https://api.github.com/repos/symfony/filesystem/zipball/b2de62936fea037d501159f52b7b6172cc962282",
|
1655 |
-
"reference": "b2de62936fea037d501159f52b7b6172cc962282",
|
1656 |
-
"shasum": ""
|
1657 |
-
},
|
1658 |
-
"require": {
|
1659 |
-
"php": ">=5.5.9"
|
1660 |
-
},
|
1661 |
-
"type": "library",
|
1662 |
-
"extra": {
|
1663 |
-
"branch-alias": {
|
1664 |
-
"dev-master": "3.3-dev"
|
1665 |
-
}
|
1666 |
-
},
|
1667 |
-
"autoload": {
|
1668 |
-
"psr-4": {
|
1669 |
-
"Symfony\\Component\\Filesystem\\": ""
|
1670 |
-
},
|
1671 |
-
"exclude-from-classmap": [
|
1672 |
-
"/Tests/"
|
1673 |
-
]
|
1674 |
-
},
|
1675 |
-
"notification-url": "https://packagist.org/downloads/",
|
1676 |
-
"license": [
|
1677 |
-
"MIT"
|
1678 |
-
],
|
1679 |
-
"authors": [
|
1680 |
-
{
|
1681 |
-
"name": "Fabien Potencier",
|
1682 |
-
"email": "fabien@symfony.com"
|
1683 |
-
},
|
1684 |
-
{
|
1685 |
-
"name": "Symfony Community",
|
1686 |
-
"homepage": "https://symfony.com/contributors"
|
1687 |
-
}
|
1688 |
-
],
|
1689 |
-
"description": "Symfony Filesystem Component",
|
1690 |
-
"homepage": "https://symfony.com",
|
1691 |
-
"time": "2017-01-08 21:15:04"
|
1692 |
-
},
|
1693 |
-
{
|
1694 |
-
"name": "symfony/finder",
|
1695 |
-
"version": "dev-master",
|
1696 |
-
"source": {
|
1697 |
-
"type": "git",
|
1698 |
-
"url": "https://github.com/symfony/finder.git",
|
1699 |
-
"reference": "791ac099b1687c0bd82f7230ec0d8fc8550c81dc"
|
1700 |
-
},
|
1701 |
-
"dist": {
|
1702 |
-
"type": "zip",
|
1703 |
-
"url": "https://api.github.com/repos/symfony/finder/zipball/791ac099b1687c0bd82f7230ec0d8fc8550c81dc",
|
1704 |
-
"reference": "791ac099b1687c0bd82f7230ec0d8fc8550c81dc",
|
1705 |
-
"shasum": ""
|
1706 |
-
},
|
1707 |
-
"require": {
|
1708 |
-
"php": ">=5.5.9"
|
1709 |
-
},
|
1710 |
-
"type": "library",
|
1711 |
-
"extra": {
|
1712 |
-
"branch-alias": {
|
1713 |
-
"dev-master": "3.3-dev"
|
1714 |
-
}
|
1715 |
-
},
|
1716 |
-
"autoload": {
|
1717 |
-
"psr-4": {
|
1718 |
-
"Symfony\\Component\\Finder\\": ""
|
1719 |
-
},
|
1720 |
-
"exclude-from-classmap": [
|
1721 |
-
"/Tests/"
|
1722 |
-
]
|
1723 |
-
},
|
1724 |
-
"notification-url": "https://packagist.org/downloads/",
|
1725 |
-
"license": [
|
1726 |
-
"MIT"
|
1727 |
-
],
|
1728 |
-
"authors": [
|
1729 |
-
{
|
1730 |
-
"name": "Fabien Potencier",
|
1731 |
-
"email": "fabien@symfony.com"
|
1732 |
-
},
|
1733 |
-
{
|
1734 |
-
"name": "Symfony Community",
|
1735 |
-
"homepage": "https://symfony.com/contributors"
|
1736 |
-
}
|
1737 |
-
],
|
1738 |
-
"description": "Symfony Finder Component",
|
1739 |
-
"homepage": "https://symfony.com",
|
1740 |
-
"time": "2017-01-02 20:33:09"
|
1741 |
-
},
|
1742 |
-
{
|
1743 |
-
"name": "symfony/polyfill-mbstring",
|
1744 |
-
"version": "dev-master",
|
1745 |
-
"source": {
|
1746 |
-
"type": "git",
|
1747 |
-
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
1748 |
-
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
|
1749 |
-
},
|
1750 |
-
"dist": {
|
1751 |
-
"type": "zip",
|
1752 |
-
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
|
1753 |
-
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
|
1754 |
-
"shasum": ""
|
1755 |
-
},
|
1756 |
-
"require": {
|
1757 |
-
"php": ">=5.3.3"
|
1758 |
-
},
|
1759 |
-
"suggest": {
|
1760 |
-
"ext-mbstring": "For best performance"
|
1761 |
-
},
|
1762 |
-
"type": "library",
|
1763 |
-
"extra": {
|
1764 |
-
"branch-alias": {
|
1765 |
-
"dev-master": "1.3-dev"
|
1766 |
-
}
|
1767 |
-
},
|
1768 |
-
"autoload": {
|
1769 |
-
"psr-4": {
|
1770 |
-
"Symfony\\Polyfill\\Mbstring\\": ""
|
1771 |
-
},
|
1772 |
-
"files": [
|
1773 |
-
"bootstrap.php"
|
1774 |
-
]
|
1775 |
-
},
|
1776 |
-
"notification-url": "https://packagist.org/downloads/",
|
1777 |
-
"license": [
|
1778 |
-
"MIT"
|
1779 |
-
],
|
1780 |
-
"authors": [
|
1781 |
-
{
|
1782 |
-
"name": "Nicolas Grekas",
|
1783 |
-
"email": "p@tchwork.com"
|
1784 |
-
},
|
1785 |
-
{
|
1786 |
-
"name": "Symfony Community",
|
1787 |
-
"homepage": "https://symfony.com/contributors"
|
1788 |
-
}
|
1789 |
-
],
|
1790 |
-
"description": "Symfony polyfill for the Mbstring extension",
|
1791 |
-
"homepage": "https://symfony.com",
|
1792 |
-
"keywords": [
|
1793 |
-
"compatibility",
|
1794 |
-
"mbstring",
|
1795 |
-
"polyfill",
|
1796 |
-
"portable",
|
1797 |
-
"shim"
|
1798 |
-
],
|
1799 |
-
"time": "2016-11-14 01:06:16"
|
1800 |
-
},
|
1801 |
-
{
|
1802 |
-
"name": "symfony/process",
|
1803 |
-
"version": "dev-master",
|
1804 |
-
"source": {
|
1805 |
-
"type": "git",
|
1806 |
-
"url": "https://github.com/symfony/process.git",
|
1807 |
-
"reference": "6c687d5ae36a8677a6e3ce020d12b18feac79d5b"
|
1808 |
-
},
|
1809 |
-
"dist": {
|
1810 |
-
"type": "zip",
|
1811 |
-
"url": "https://api.github.com/repos/symfony/process/zipball/6c687d5ae36a8677a6e3ce020d12b18feac79d5b",
|
1812 |
-
"reference": "6c687d5ae36a8677a6e3ce020d12b18feac79d5b",
|
1813 |
-
"shasum": ""
|
1814 |
-
},
|
1815 |
-
"require": {
|
1816 |
-
"php": ">=5.5.9"
|
1817 |
-
},
|
1818 |
-
"type": "library",
|
1819 |
-
"extra": {
|
1820 |
-
"branch-alias": {
|
1821 |
-
"dev-master": "3.3-dev"
|
1822 |
-
}
|
1823 |
-
},
|
1824 |
-
"autoload": {
|
1825 |
-
"psr-4": {
|
1826 |
-
"Symfony\\Component\\Process\\": ""
|
1827 |
-
},
|
1828 |
-
"exclude-from-classmap": [
|
1829 |
-
"/Tests/"
|
1830 |
-
]
|
1831 |
-
},
|
1832 |
-
"notification-url": "https://packagist.org/downloads/",
|
1833 |
-
"license": [
|
1834 |
-
"MIT"
|
1835 |
-
],
|
1836 |
-
"authors": [
|
1837 |
-
{
|
1838 |
-
"name": "Fabien Potencier",
|
1839 |
-
"email": "fabien@symfony.com"
|
1840 |
-
},
|
1841 |
-
{
|
1842 |
-
"name": "Symfony Community",
|
1843 |
-
"homepage": "https://symfony.com/contributors"
|
1844 |
-
}
|
1845 |
-
],
|
1846 |
-
"description": "Symfony Process Component",
|
1847 |
-
"homepage": "https://symfony.com",
|
1848 |
-
"time": "2017-01-02 20:33:09"
|
1849 |
-
},
|
1850 |
-
{
|
1851 |
-
"name": "symfony/stopwatch",
|
1852 |
-
"version": "dev-master",
|
1853 |
-
"source": {
|
1854 |
-
"type": "git",
|
1855 |
-
"url": "https://github.com/symfony/stopwatch.git",
|
1856 |
-
"reference": "edfe3407825f9657fd38a05171eb5b8df8563146"
|
1857 |
-
},
|
1858 |
-
"dist": {
|
1859 |
-
"type": "zip",
|
1860 |
-
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/edfe3407825f9657fd38a05171eb5b8df8563146",
|
1861 |
-
"reference": "edfe3407825f9657fd38a05171eb5b8df8563146",
|
1862 |
-
"shasum": ""
|
1863 |
-
},
|
1864 |
-
"require": {
|
1865 |
-
"php": ">=5.5.9"
|
1866 |
-
},
|
1867 |
-
"type": "library",
|
1868 |
-
"extra": {
|
1869 |
-
"branch-alias": {
|
1870 |
-
"dev-master": "3.3-dev"
|
1871 |
-
}
|
1872 |
-
},
|
1873 |
-
"autoload": {
|
1874 |
-
"psr-4": {
|
1875 |
-
"Symfony\\Component\\Stopwatch\\": ""
|
1876 |
-
},
|
1877 |
-
"exclude-from-classmap": [
|
1878 |
-
"/Tests/"
|
1879 |
-
]
|
1880 |
-
},
|
1881 |
-
"notification-url": "https://packagist.org/downloads/",
|
1882 |
-
"license": [
|
1883 |
-
"MIT"
|
1884 |
-
],
|
1885 |
-
"authors": [
|
1886 |
-
{
|
1887 |
-
"name": "Fabien Potencier",
|
1888 |
-
"email": "fabien@symfony.com"
|
1889 |
-
},
|
1890 |
-
{
|
1891 |
-
"name": "Symfony Community",
|
1892 |
-
"homepage": "https://symfony.com/contributors"
|
1893 |
-
}
|
1894 |
-
],
|
1895 |
-
"description": "Symfony Stopwatch Component",
|
1896 |
-
"homepage": "https://symfony.com",
|
1897 |
-
"time": "2017-01-02 20:33:09"
|
1898 |
-
},
|
1899 |
-
{
|
1900 |
-
"name": "symfony/yaml",
|
1901 |
-
"version": "dev-master",
|
1902 |
-
"source": {
|
1903 |
-
"type": "git",
|
1904 |
-
"url": "https://github.com/symfony/yaml.git",
|
1905 |
-
"reference": "d67fe7eaf6fdb1a9350bf2bdd727d64dbd814ddc"
|
1906 |
-
},
|
1907 |
-
"dist": {
|
1908 |
-
"type": "zip",
|
1909 |
-
"url": "https://api.github.com/repos/symfony/yaml/zipball/d67fe7eaf6fdb1a9350bf2bdd727d64dbd814ddc",
|
1910 |
-
"reference": "d67fe7eaf6fdb1a9350bf2bdd727d64dbd814ddc",
|
1911 |
-
"shasum": ""
|
1912 |
-
},
|
1913 |
-
"require": {
|
1914 |
-
"php": ">=5.5.9"
|
1915 |
-
},
|
1916 |
-
"require-dev": {
|
1917 |
-
"symfony/console": "~2.8|~3.0"
|
1918 |
-
},
|
1919 |
-
"suggest": {
|
1920 |
-
"symfony/console": "For validating YAML files using the lint command"
|
1921 |
-
},
|
1922 |
-
"type": "library",
|
1923 |
-
"extra": {
|
1924 |
-
"branch-alias": {
|
1925 |
-
"dev-master": "3.3-dev"
|
1926 |
-
}
|
1927 |
-
},
|
1928 |
-
"autoload": {
|
1929 |
-
"psr-4": {
|
1930 |
-
"Symfony\\Component\\Yaml\\": ""
|
1931 |
-
},
|
1932 |
-
"exclude-from-classmap": [
|
1933 |
-
"/Tests/"
|
1934 |
-
]
|
1935 |
-
},
|
1936 |
-
"notification-url": "https://packagist.org/downloads/",
|
1937 |
-
"license": [
|
1938 |
-
"MIT"
|
1939 |
-
],
|
1940 |
-
"authors": [
|
1941 |
-
{
|
1942 |
-
"name": "Fabien Potencier",
|
1943 |
-
"email": "fabien@symfony.com"
|
1944 |
-
},
|
1945 |
-
{
|
1946 |
-
"name": "Symfony Community",
|
1947 |
-
"homepage": "https://symfony.com/contributors"
|
1948 |
-
}
|
1949 |
-
],
|
1950 |
-
"description": "Symfony Yaml Component",
|
1951 |
-
"homepage": "https://symfony.com",
|
1952 |
-
"time": "2017-01-21 07:50:08"
|
1953 |
-
},
|
1954 |
-
{
|
1955 |
-
"name": "webmozart/assert",
|
1956 |
-
"version": "dev-master",
|
1957 |
-
"source": {
|
1958 |
-
"type": "git",
|
1959 |
-
"url": "https://github.com/webmozart/assert.git",
|
1960 |
-
"reference": "4a8bf11547e139e77b651365113fc12850c43d9a"
|
1961 |
-
},
|
1962 |
-
"dist": {
|
1963 |
-
"type": "zip",
|
1964 |
-
"url": "https://api.github.com/repos/webmozart/assert/zipball/4a8bf11547e139e77b651365113fc12850c43d9a",
|
1965 |
-
"reference": "4a8bf11547e139e77b651365113fc12850c43d9a",
|
1966 |
-
"shasum": ""
|
1967 |
-
},
|
1968 |
-
"require": {
|
1969 |
-
"php": "^5.3.3 || ^7.0"
|
1970 |
-
},
|
1971 |
-
"require-dev": {
|
1972 |
-
"phpunit/phpunit": "^4.6",
|
1973 |
-
"sebastian/version": "^1.0.1"
|
1974 |
-
},
|
1975 |
-
"type": "library",
|
1976 |
-
"extra": {
|
1977 |
-
"branch-alias": {
|
1978 |
-
"dev-master": "1.3-dev"
|
1979 |
-
}
|
1980 |
-
},
|
1981 |
-
"autoload": {
|
1982 |
-
"psr-4": {
|
1983 |
-
"Webmozart\\Assert\\": "src/"
|
1984 |
-
}
|
1985 |
-
},
|
1986 |
-
"notification-url": "https://packagist.org/downloads/",
|
1987 |
-
"license": [
|
1988 |
-
"MIT"
|
1989 |
-
],
|
1990 |
-
"authors": [
|
1991 |
-
{
|
1992 |
-
"name": "Bernhard Schussek",
|
1993 |
-
"email": "bschussek@gmail.com"
|
1994 |
-
}
|
1995 |
-
],
|
1996 |
-
"description": "Assertions to validate method input/output with nice error messages.",
|
1997 |
-
"keywords": [
|
1998 |
-
"assert",
|
1999 |
-
"check",
|
2000 |
-
"validate"
|
2001 |
-
],
|
2002 |
-
"time": "2016-11-23 20:04:41"
|
2003 |
-
}
|
2004 |
-
],
|
2005 |
-
"aliases": [],
|
2006 |
-
"minimum-stability": "dev",
|
2007 |
-
"stability-flags": {
|
2008 |
-
"dhii/php-cs-fixer-config": 20
|
2009 |
-
},
|
2010 |
-
"prefer-stable": false,
|
2011 |
-
"prefer-lowest": false,
|
2012 |
-
"platform": {
|
2013 |
-
"php": "^5.3 | ^7.0"
|
2014 |
-
},
|
2015 |
-
"platform-dev": []
|
2016 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/nbproject/project.properties
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_create_2e_tests=false
|
2 |
-
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_enabled=false
|
3 |
-
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_path=
|
4 |
-
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_enabled=false
|
5 |
-
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_path=
|
6 |
-
auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_enabled=false
|
7 |
-
auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_path=
|
8 |
-
auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_enabled=false
|
9 |
-
auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_path=
|
10 |
-
auxiliary.org-netbeans-modules-php-phpunit.test_2e_groups_2e_ask=false
|
11 |
-
auxiliary.org-netbeans-modules-php-phpunit.test_2e_run_2e_all=false
|
12 |
-
file.reference.data-value-interface-vendor=vendor
|
13 |
-
file.reference.data-value-object-interface-vendor=vendor
|
14 |
-
file.reference.test-functional=test/functional
|
15 |
-
include.path=\
|
16 |
-
${php.global.include.path}:\
|
17 |
-
${file.reference.data-value-interface-vendor}
|
18 |
-
php.version=PHP_53
|
19 |
-
source.encoding=UTF-8
|
20 |
-
src.dir=src
|
21 |
-
tags.asp=false
|
22 |
-
tags.short=false
|
23 |
-
test.src.dir=${file.reference.test-functional}
|
24 |
-
testing.providers=PhpUnit
|
25 |
-
web.root=.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/nbproject/project.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project xmlns="http://www.netbeans.org/ns/project/1">
|
3 |
-
<type>org.netbeans.modules.php.project</type>
|
4 |
-
<configuration>
|
5 |
-
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
6 |
-
<name>dhii - data-key-value-aware-interface</name>
|
7 |
-
</data>
|
8 |
-
</configuration>
|
9 |
-
</project>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/phpunit.xml
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<phpunit
|
3 |
-
colors="true"
|
4 |
-
bootstrap="test/bootstrap.php"
|
5 |
-
>
|
6 |
-
<php>
|
7 |
-
<ini name="display_errors" value="1" />
|
8 |
-
<ini name="display_startup_errors" value="1" />
|
9 |
-
</php>
|
10 |
-
<testsuites>
|
11 |
-
<testsuite name="Unit Tests">
|
12 |
-
<directory>./test/unit/</directory>
|
13 |
-
</testsuite>
|
14 |
-
<testsuite name="Functional Tests">
|
15 |
-
<directory>./test/functional/</directory>
|
16 |
-
</testsuite>
|
17 |
-
</testsuites>
|
18 |
-
<filter>
|
19 |
-
<whitelist processUncoveredFilesFromWhitelist="true">
|
20 |
-
<directory suffix=".php">src</directory>
|
21 |
-
</whitelist>
|
22 |
-
</filter>
|
23 |
-
<logging>
|
24 |
-
<log type="coverage-html" target="./test/coverage/html" lowUpperBound="35"
|
25 |
-
highLowerBound="80"/>
|
26 |
-
<log type="coverage-clover" target="./test/coverage/clover.xml"/>
|
27 |
-
<log type="coverage-php" target="./test/coverage/serialized"/>
|
28 |
-
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
|
29 |
-
<log type="json" target="./test/log/logfile.json"/>
|
30 |
-
<log type="tap" target="./test/log/logfile.tap"/>
|
31 |
-
<log type="junit" target="./test/log/logfile.xml" logIncompleteSkipped="false"/>
|
32 |
-
<log type="testdox-html" target="./test/log/testdox.html"/>
|
33 |
-
<log type="testdox-text" target="./test/log/testdox.txt"/>
|
34 |
-
</logging>
|
35 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/src/KeyAwareInterface.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Data;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Something that can have a key.
|
7 |
-
*
|
8 |
-
* A key is an identifier, i.e. a code.
|
9 |
-
*
|
10 |
-
* @since 0.1
|
11 |
-
*/
|
12 |
-
interface KeyAwareInterface
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* Retrieve the key of interface.
|
16 |
-
*
|
17 |
-
* @since 0.1
|
18 |
-
*
|
19 |
-
* @return string The key that this interface has.
|
20 |
-
*/
|
21 |
-
public function getKey();
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/src/KeyValueAwareInterface.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Data;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Represents something that can have a key and a value.
|
7 |
-
*
|
8 |
-
* An example could be an option, or a collection item, or a mapping.
|
9 |
-
*
|
10 |
-
* @since 0.1
|
11 |
-
*/
|
12 |
-
interface KeyValueAwareInterface extends
|
13 |
-
KeyAwareInterface,
|
14 |
-
ValueAwareInterface
|
15 |
-
{
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/src/ValueAwareInterface.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Data;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Something that can represent or have a value.
|
7 |
-
*
|
8 |
-
* @since 0.1
|
9 |
-
*/
|
10 |
-
interface ValueAwareInterface
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Retrieves the value that this object represents.
|
14 |
-
*
|
15 |
-
* @since 0.1
|
16 |
-
*
|
17 |
-
* @return mixed The value that this object represents.
|
18 |
-
*/
|
19 |
-
public function getValue();
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/test/bootstrap.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
error_reporting(E_ALL | E_STRICT);
|
4 |
-
|
5 |
-
require_once dirname(__FILE__).'/../vendor/autoload.php';
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/test/functional/KeyAwareInterfaceTest.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Data\FuncTest;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests {@see \Dhii\Data\ValueAwareInterface}.
|
7 |
-
*
|
8 |
-
* @since 0.1
|
9 |
-
*/
|
10 |
-
class KeyAwareInterfaceTest extends \Xpmock\TestCase
|
11 |
-
{
|
12 |
-
const TEST_SUBJECT_CLASSNAME = 'Dhii\\Data\\KeyAwareInterface';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Creates a new instance of the test subject.
|
16 |
-
*
|
17 |
-
* @since 0.1
|
18 |
-
*
|
19 |
-
* @return \Dhii\Data\KeyAwareInterface A new instance of the test subject.
|
20 |
-
*/
|
21 |
-
public function createInstance()
|
22 |
-
{
|
23 |
-
$mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)
|
24 |
-
->getKey()
|
25 |
-
->new();
|
26 |
-
|
27 |
-
return $mock;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Tests whether a valid instance of the test subject can be created.
|
32 |
-
*
|
33 |
-
* @since 0.1
|
34 |
-
*/
|
35 |
-
public function testCanBeCreated()
|
36 |
-
{
|
37 |
-
$subject = $this->createInstance();
|
38 |
-
|
39 |
-
$this->assertInstanceOf(static::TEST_SUBJECT_CLASSNAME, $subject, 'A valid instance of the test subject could not be created');
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/test/functional/KeyValueAwareInterfaceTest.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Data\FuncTest;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests {@see \Dhii\Data\KeyValueAwareInterface
|
7 |
-
*
|
8 |
-
* @since 0.1
|
9 |
-
*/
|
10 |
-
class KeyValueAwareInterfaceTest extends \Xpmock\TestCase
|
11 |
-
{
|
12 |
-
const TEST_SUBJECT_CLASSNAME = 'Dhii\\Data\\ValueAwareInterface';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Creates a new instance of the test subject.
|
16 |
-
*
|
17 |
-
* @since 0.1
|
18 |
-
*
|
19 |
-
* @return \Dhii\Data\KeyValueAwareInterface A new instance of the test subject.
|
20 |
-
*/
|
21 |
-
public function createInstance()
|
22 |
-
{
|
23 |
-
$mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)
|
24 |
-
->getKey()
|
25 |
-
->getValue()
|
26 |
-
->new();
|
27 |
-
|
28 |
-
return $mock;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Tests whether a valid instance of the test subject can be created.
|
33 |
-
*
|
34 |
-
* @since 0.1
|
35 |
-
*/
|
36 |
-
public function testCanBeCreated()
|
37 |
-
{
|
38 |
-
$subject = $this->createInstance();
|
39 |
-
|
40 |
-
$this->assertInstanceOf(static::TEST_SUBJECT_CLASSNAME, $subject, 'A valid instance of the test subject could not be created');
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/data-key-value-aware-interface/test/functional/ValueAwareInterfaceTest.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Data\FuncTest;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests {@see \Dhii\Data\ValueAwareInterface}.
|
7 |
-
*
|
8 |
-
* @since 0.1
|
9 |
-
*/
|
10 |
-
class ValueAwareInterfaceTest extends \Xpmock\TestCase
|
11 |
-
{
|
12 |
-
const TEST_SUBJECT_CLASSNAME = 'Dhii\\Data\\ValueAwareInterface';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Creates a new instance of the test subject.
|
16 |
-
*
|
17 |
-
* @since 0.1
|
18 |
-
*
|
19 |
-
* @return \Dhii\Data\ValueAwareInterface A new instance of the test subject.
|
20 |
-
*/
|
21 |
-
public function createInstance()
|
22 |
-
{
|
23 |
-
$mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)
|
24 |
-
->getValue()
|
25 |
-
->new();
|
26 |
-
|
27 |
-
return $mock;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Tests whether a valid instance of the test subject can be created.
|
32 |
-
*
|
33 |
-
* @since 0.1
|
34 |
-
*/
|
35 |
-
public function testCanBeCreated()
|
36 |
-
{
|
37 |
-
$subject = $this->createInstance();
|
38 |
-
|
39 |
-
$this->assertInstanceOf(static::TEST_SUBJECT_CLASSNAME, $subject, 'A valid instance of the test subject could not be created');
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/module-interface/.env.example
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BASE_PATH=./
|
2 |
+
BUILD_ROOT_PATH=/app/
|
3 |
+
PROJECT_NAME=dhii_module-interface
|
4 |
+
|
5 |
+
PHP_BUILD_VERSION=7.1
|
6 |
+
PHP_TEST_VERSION=7.1
|
vendor/dhii/module-interface/CHANGELOG.md
CHANGED
@@ -4,8 +4,29 @@ All notable changes to this project will be documented in this file.
|
|
4 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
## [0.1] - 2019-11-05
|
8 |
Stable release
|
9 |
|
|
|
|
|
|
|
10 |
## [0.1-alpha1] - 2018-05-07
|
11 |
Initial version.
|
4 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6 |
|
7 |
+
## [[*next-version*]] - YYYY-MM-DD
|
8 |
+
|
9 |
+
## [0.3.0-alpha1] - 2021-01-14
|
10 |
+
### Added
|
11 |
+
- Support for PHP 8.
|
12 |
+
- **BC-breaking**: `ModuleInterface#run()` now declares `void` return type.
|
13 |
+
|
14 |
+
## [0.2.0-alpha1] - 2020-04-10
|
15 |
+
### Changed
|
16 |
+
- Module `setup()` now returns a `ServiceProviderInterface` instance.
|
17 |
+
- Module `run()` now requires the `ContainerInterface` argument.
|
18 |
+
- Modules are no longer key-aware.
|
19 |
+
|
20 |
+
### Removed
|
21 |
+
- `DependenciesAwareInterface` has been removed.
|
22 |
+
- `ModuleFactoryInterface` has been removed.
|
23 |
+
- `ModuleKeyAwareInterface` has been removed.
|
24 |
+
|
25 |
## [0.1] - 2019-11-05
|
26 |
Stable release
|
27 |
|
28 |
+
### Fixed
|
29 |
+
- Modules are now allowed to throw specialized exceptions.
|
30 |
+
|
31 |
## [0.1-alpha1] - 2018-05-07
|
32 |
Initial version.
|
vendor/dhii/module-interface/README.md
CHANGED
@@ -4,27 +4,287 @@
|
|
4 |
[![Code Climate](https://codeclimate.com/github/Dhii/module-interface/badges/gpa.svg)](https://codeclimate.com/github/Dhii/module-interface)
|
5 |
[![Test Coverage](https://codeclimate.com/github/Dhii/module-interface/badges/coverage.svg)](https://codeclimate.com/github/Dhii/module-interface/coverage)
|
6 |
[![Latest Stable Version](https://poser.pugx.org/dhii/module-interface/version)](https://packagist.org/packages/dhii/module-interface)
|
7 |
-
[![This package complies with Dhii standards](https://img.shields.io/badge/Dhii-Compliant-green.svg?style=flat-square)][Dhii]
|
8 |
|
9 |
## Details
|
10 |
This package contains interfaces that are useful in describing modules and their attributes and behaviour.
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
### Interfaces
|
13 |
-
- [`ModuleInterface`][
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
their own services SHOULD therefore rely only on what is provided to `run()`, which gives the application the means
|
19 |
-
to add or override services. Nevertheless, implementations MUST NOT assume that the container received by `run()` is
|
20 |
-
the same container returned from `setup()`.
|
21 |
|
22 |
-
###
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
[Dhii]: https://github.com/Dhii/dhii
|
29 |
|
30 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
4 |
[![Code Climate](https://codeclimate.com/github/Dhii/module-interface/badges/gpa.svg)](https://codeclimate.com/github/Dhii/module-interface)
|
5 |
[![Test Coverage](https://codeclimate.com/github/Dhii/module-interface/badges/coverage.svg)](https://codeclimate.com/github/Dhii/module-interface/coverage)
|
6 |
[![Latest Stable Version](https://poser.pugx.org/dhii/module-interface/version)](https://packagist.org/packages/dhii/module-interface)
|
|
|
7 |
|
8 |
## Details
|
9 |
This package contains interfaces that are useful in describing modules and their attributes and behaviour.
|
10 |
+
|
11 |
+
### Requirements
|
12 |
+
- PHP: 7.1 and up, until 8.
|
13 |
+
|
14 |
+
Officially supports at least up to php 7.4.x.
|
15 |
|
16 |
### Interfaces
|
17 |
+
- [`ModuleInterface`][] - The interface for a module. A module is an object that represents an
|
18 |
+
application fragment. Modules are prepared using `setup()`, which returns a `ServiceProviderInterface` instance that
|
19 |
+
the application may consume, and invoked using `run()`, consuming the application's DI container.
|
20 |
+
- [`ModuleAwareInterface`][] - Something that can have a module retrieved.
|
21 |
+
- [`ModuleExceptionInterface`][] - An exception thrown by a module.
|
|
|
|
|
|
|
22 |
|
23 |
+
### Usage
|
24 |
+
#### Module Package
|
25 |
+
In your module's pacakge, create a file that returns a module factory. This factory MUST return an instance
|
26 |
+
of `ModuleInterface` from this pacakge. By convention, this file has
|
27 |
+
the name `module.php`, and is located in the root directory. Below is a very basic example. In real life,
|
28 |
+
the service provider and the module will often have named classes of their own, and factories and extensions
|
29 |
+
will be located in `services.php` and `extensions.php` respectively, by convention.
|
30 |
+
|
31 |
+
```php
|
32 |
+
// module.php
|
33 |
+
use Dhii\Modular\Module\ModuleInterface;
|
34 |
+
use Interop\Container\ServiceProviderInterface;
|
35 |
+
use Psr\Container\ContainerInterface;
|
36 |
+
|
37 |
+
return function () {
|
38 |
+
return new class () implements ModuleInterface {
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Declares services of this module.
|
42 |
+
*
|
43 |
+
* @return ServiceProviderInterface The service provider with the factories and extensions of this module.
|
44 |
+
*/
|
45 |
+
public function setup() : ServiceProviderInterface
|
46 |
+
{
|
47 |
+
return new class () implements ServiceProviderInterface
|
48 |
+
{
|
49 |
+
/**
|
50 |
+
* Only the factory of the last module in load order is applied.
|
51 |
+
*
|
52 |
+
* @return array|callable[] A map of service names to service definitions.
|
53 |
+
*/
|
54 |
+
public function getFactories()
|
55 |
+
{
|
56 |
+
return [
|
57 |
+
// A factory always gets one parameter: the container.
|
58 |
+
'my_module/my_service' => function (ContainerInterface $c) {
|
59 |
+
// Create and return your service instance
|
60 |
+
return new MyService();
|
61 |
+
},
|
62 |
+
];
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* All extensions are always applied, in load order.
|
67 |
+
*
|
68 |
+
* @return array|callable[] A map of service names to extensions.
|
69 |
+
*/
|
70 |
+
public function getExtensions()
|
71 |
+
{
|
72 |
+
return [
|
73 |
+
// An extension gets an additional parameter:
|
74 |
+
// the value returned by the factory or the previously applied extensions.
|
75 |
+
'other_module/other_service' => function (
|
76 |
+
ContainerInterface $c,
|
77 |
+
OtherServiceInterface $previous
|
78 |
+
): OtherServiceInterface {
|
79 |
+
// Perhaps decorate $previous and return the decorator
|
80 |
+
return new MyDecorator($previous);
|
81 |
+
},
|
82 |
+
];
|
83 |
+
}
|
84 |
+
};
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Consumes services of this and other modules.
|
89 |
+
*
|
90 |
+
* @param ContainerInterface $c A container with the services of all modules.
|
91 |
+
*/
|
92 |
+
public function run(ContainerInterface $c)
|
93 |
+
{
|
94 |
+
$myService = $c->get('my_module/my_service');
|
95 |
+
$myService->doSomething();
|
96 |
+
}
|
97 |
+
};
|
98 |
+
};
|
99 |
+
```
|
100 |
+
|
101 |
+
In the above example, the module declares a service `my_module/my_service`, and an extension
|
102 |
+
for the `other_module/other_service`, which may be found in another module. Note that by convention,
|
103 |
+
the service name contains the module name prefix, separated by forward slash `/`. It's possible
|
104 |
+
to further "nest" services by adding slash-separated "levels". In the future, some container
|
105 |
+
implementations will add benefits for modules that use this convention.
|
106 |
+
|
107 |
+
Applications would often need the ability to do something with the arbitrary set of
|
108 |
+
modules they require. In order for an application to be able to group all modules
|
109 |
+
together, declare the package type in your `composer.json` to be `dhii-mod` by convention.
|
110 |
+
Following this convention would allow all modules written by all authors to be treated
|
111 |
+
uniformly.
|
112 |
+
|
113 |
+
```json
|
114 |
+
{
|
115 |
+
"name": "me/my_module",
|
116 |
+
"type": "dhii-mod"
|
117 |
+
}
|
118 |
+
```
|
119 |
+
|
120 |
+
What's important here:
|
121 |
+
|
122 |
+
1. A module's `setup()` method should not cause side effects.
|
123 |
+
|
124 |
+
The setup method is intended for the modules to prepare for action. Modules should not actually
|
125 |
+
peform the actions during this method. The container is not available in this method, and therefore
|
126 |
+
the module cannot use any services, whether of itself or of other modules, in this method. Do not
|
127 |
+
try to make the module use its own services here.
|
128 |
+
|
129 |
+
2. Implement the correct interfaces.
|
130 |
+
|
131 |
+
A module MUST implement `ModuleInterface`. The module's `setup()` method MUST return `ServiceProviderInterface`.
|
132 |
+
Even though the [Service Provider][`container-interop/service-provider`] standard is experimental, and has been experimental for a long time, the
|
133 |
+
module standard relies heavily on it. If the module standard becomes ubiquitous, this could push
|
134 |
+
FIG to go forward with the Service Provider standard, hopefully making it into a PSR.
|
135 |
+
|
136 |
+
3. Observe conventions.
|
137 |
+
|
138 |
+
It is important that conventions outlined here are observed. Some are necessary for smooth operation of
|
139 |
+
modules and/or consuming applications. Some others may not make a difference right now, but could
|
140 |
+
add benefits in the future. Please observe these conventions to ensure an optimal experience
|
141 |
+
for yourself and for other users of the standard.
|
142 |
+
|
143 |
+
#### Consumer Package
|
144 |
+
##### Module Installation
|
145 |
+
The package that consumes modules, which is usually the application, would need to require the modules.
|
146 |
+
The below example uses the [`oomphinc/composer-installers-extender`][] lib to configure Composer
|
147 |
+
so that it installs all `dhii-mod` packages into the `modules` directory in the application root.
|
148 |
+
Packages `me/my_module` and `me/my_other_module` would therefore go into `modules/me/my_module` and
|
149 |
+
`modules/me/my_other_module` respectively.
|
150 |
+
|
151 |
+
```json
|
152 |
+
{
|
153 |
+
"name": "me/my_app",
|
154 |
+
"require": {
|
155 |
+
"me/my_module": "^0.1",
|
156 |
+
"me/my_other_module": "^0.1",
|
157 |
+
"oomphinc/composer-installers-extender": "^1.1"
|
158 |
+
},
|
159 |
+
|
160 |
+
"extra": {
|
161 |
+
"installer-types": ["dhii-mod"],
|
162 |
+
"installer-paths": {
|
163 |
+
"modules/{$vendor}/{$name}": ["type:dhii-mod"]
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
```
|
168 |
+
|
169 |
+
##### Module Loading
|
170 |
+
Once a module has been required, it must be loaded. Module files must be explicitly loaded by the
|
171 |
+
application, because the application is what determines module load order. The load order is
|
172 |
+
the fundamental principle that allows modules to extend and override each other's services
|
173 |
+
in a simple and intuitive way:
|
174 |
+
|
175 |
+
1. Factories in modules that are loaded later will completely override factories of modules loaded earlier.
|
176 |
+
|
177 |
+
Ultimately, for each service, only one factory will be used: the one declared last. So if `my_other_module`
|
178 |
+
is loaded after `my_module`, and it declares a service `my_module/my_service`,
|
179 |
+
then it will override the `my_module/my_service` service declared by `my_module`.
|
180 |
+
In short: **last factory wins**.
|
181 |
+
|
182 |
+
2. Extensions in modules that are loaded later will be applied after extensions of modules loaded earlier.
|
183 |
+
|
184 |
+
Ultimately, extensions from _all_ modules will be applied on top of what is returned by the factory.
|
185 |
+
So if `my_other_module` declares an extension `other_module/other_service`, it will be applied after
|
186 |
+
the extension `other_module/other_service` declared by `my_module`.
|
187 |
+
In short: **later extensions extend previous extensions**.
|
188 |
+
|
189 |
+
Continuing from the examples above, if something in the application requests the service `other_module/other_service`
|
190 |
+
declared by `my_other_module`, this is what is going to happen:
|
191 |
+
|
192 |
+
1. The factory in `my_other_module` is invoked.
|
193 |
+
2. The extension in `my_module` is invoked, and receives the result of the above factory as `$previous`.
|
194 |
+
3. The extension in `my_other_module` is invoked, and receives the result of the above extension as `$previous`
|
195 |
+
4. The caller of `get('other_module/other_service')` receives the result of the above extension.
|
196 |
+
|
197 |
+
Thus, any module can override and/or extend services from any other module. Below is an example of what
|
198 |
+
an application's bootstrap code could look like. This example uses classes from [`dhii/containers`][].
|
199 |
+
|
200 |
+
```php
|
201 |
+
// bootstrap.php
|
202 |
+
|
203 |
+
use Dhii\Modular\Module\ModuleInterface;
|
204 |
+
use Interop\Container\ServiceProviderInterface;
|
205 |
+
use Dhii\Container\CompositeCachingServiceProvider;
|
206 |
+
use Dhii\Container\DelegatingContainer;
|
207 |
+
use Dhii\Container\CachingContainer;
|
208 |
+
|
209 |
+
(function ($file) {
|
210 |
+
$baseDir = dirname($file);
|
211 |
+
$modulesDir = "$baseDir/modules";
|
212 |
+
|
213 |
+
// Order is important!
|
214 |
+
$moduleNames = [
|
215 |
+
'me/my_module',
|
216 |
+
'me/my_other_module',
|
217 |
+
];
|
218 |
+
|
219 |
+
// Create and load all modules
|
220 |
+
/* @var $modules ModuleInterface[] */
|
221 |
+
$modules = [];
|
222 |
+
foreach ($moduleNames as $moduleName) {
|
223 |
+
$moduleFactory = require_once("$modulesDir/$moduleName/module.php");
|
224 |
+
$module = $moduleFactory();
|
225 |
+
$modules[$moduleName] = $module;
|
226 |
+
}
|
227 |
+
|
228 |
+
// Retrieve all modules' service providers
|
229 |
+
/* @var $providers ServiceProviderInterface[] */
|
230 |
+
$providers = [];
|
231 |
+
foreach ($modules as $module) {
|
232 |
+
$providers[] = $module->setup();
|
233 |
+
}
|
234 |
+
|
235 |
+
// Group all service providers into one
|
236 |
+
$provider = new CompositeCachingServiceProvider();
|
237 |
+
$container = new CachingContainer(new DelegatingContainer($provider, $parentContainer = null));
|
238 |
+
|
239 |
+
// Run all modules
|
240 |
+
foreach ($modules as $module) {
|
241 |
+
$module->run($container);
|
242 |
+
}
|
243 |
+
})(__FILE__);
|
244 |
+
```
|
245 |
+
|
246 |
+
The above will load, setup, and run modules `me/my_module` and `me/my_other_module`, in that order,
|
247 |
+
from the `modules` directory, provided that conventions have been followed by those modules.
|
248 |
+
What's important to note here:
|
249 |
+
|
250 |
+
1. First _all_ modules are set up, and then _all_ modules are run.
|
251 |
+
|
252 |
+
If you set up and run modules in the same step, it will not work, because the bootstrap
|
253 |
+
will not have the opportunity to configure the application's DI container with services
|
254 |
+
from all modules.
|
255 |
+
|
256 |
+
2. The `CompositeCachingServiceProvider` is what is responsible for resolving services correctly.
|
257 |
+
|
258 |
+
This relieves the application, as the process can seem complicated, and is quite re-usable.
|
259 |
+
The usage of this class is recommended.
|
260 |
+
|
261 |
+
3. The `DelegatingContainer` optionally accepts a parent container.
|
262 |
+
|
263 |
+
If your application is a module itself, and needs to be part of a larger application with its
|
264 |
+
own DI container, supply it as the 2nd parameter. This will ensure that services will always
|
265 |
+
be retrieved from the top-most container, regardless of where the definition is declared.
|
266 |
+
|
267 |
+
4. The `CachingContainer` ensures services are cached.
|
268 |
+
|
269 |
+
Effectively, this means that all services are singletons, i.e. there will only be one instance
|
270 |
+
of each service in the application. This is most commonly the desired behaviour. Without the
|
271 |
+
`CachingContainer`, i.e. with just the `DelegatingContainer`, service definitions will get
|
272 |
+
invoked every time `get()` is called, which is usually undesirable.
|
273 |
+
|
274 |
+
5. Conventions are important.
|
275 |
+
|
276 |
+
If modules did not place the `module.php` file into their root directories, the bootstrap
|
277 |
+
would not be able to load each module by just its package name. Modules which do not
|
278 |
+
follow that convention must have their `module.php` file loaded separately, which would
|
279 |
+
make the bootstrap code more complicated.
|
280 |
|
281 |
|
282 |
[Dhii]: https://github.com/Dhii/dhii
|
283 |
|
284 |
+
[`dhii/containers`]: https://packagist.org/packages/dhii/containers
|
285 |
+
[`oomphinc/composer-installers-extender`]: https://packagist.org/packages/oomphinc/composer-installers-extender
|
286 |
+
[`container-interop/service-provider`]: https://packagist.org/packages/container-interop/service-provider
|
287 |
+
|
288 |
+
[`ModuleInterface`]: src/ModuleInterface.php
|
289 |
+
[`ModuleAwareInterface`]: src/ModuleAwareInterface.php
|
290 |
+
[`ModuleExceptionInterface`]: src/Exception/ModuleExceptionInterface.php
|
vendor/dhii/module-interface/composer.json
CHANGED
@@ -12,18 +12,14 @@
|
|
12 |
"prefer-stable": true,
|
13 |
"minimum-stability": "dev",
|
14 |
"require": {
|
15 |
-
"php": "^
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"dhii/factory-interface": "^0.1-alpha1"
|
19 |
},
|
20 |
"require-dev": {
|
21 |
-
"phpunit/phpunit": "^
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"codeclimate/php-test-reporter": "<=0.3.2",
|
25 |
-
"dhii/stringable-interface": "^0.1",
|
26 |
-
"psr/container": "^1.0"
|
27 |
},
|
28 |
"autoload": {
|
29 |
"psr-4": {
|
@@ -32,17 +28,16 @@
|
|
32 |
},
|
33 |
"autoload-dev": {
|
34 |
"psr-4": {
|
35 |
-
"Dhii\\Modular\\Module\\UnitTest\\": "
|
36 |
-
"Dhii\\Modular\\Module\\
|
37 |
}
|
38 |
},
|
39 |
"scripts": {
|
40 |
-
"test": "phpunit"
|
41 |
-
"csfix": "php-cs-fixer fix -vvv"
|
42 |
},
|
43 |
"extra": {
|
44 |
"branch-alias": {
|
45 |
-
"dev-develop": "0.
|
46 |
}
|
47 |
}
|
48 |
}
|
12 |
"prefer-stable": true,
|
13 |
"minimum-stability": "dev",
|
14 |
"require": {
|
15 |
+
"php": "^7.1 | ^8.0",
|
16 |
+
"psr/container": "^1.0",
|
17 |
+
"container-interop/service-provider": "^0.4"
|
|
|
18 |
},
|
19 |
"require-dev": {
|
20 |
+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
|
21 |
+
"vimeo/psalm": "^3.11.7 | ^4.0",
|
22 |
+
"slevomat/coding-standard": "^6.0"
|
|
|
|
|
|
|
23 |
},
|
24 |
"autoload": {
|
25 |
"psr-4": {
|
28 |
},
|
29 |
"autoload-dev": {
|
30 |
"psr-4": {
|
31 |
+
"Dhii\\Modular\\Module\\UnitTest\\": "tests/unit",
|
32 |
+
"Dhii\\Modular\\Module\\Test\\": "tests/stubs"
|
33 |
}
|
34 |
},
|
35 |
"scripts": {
|
36 |
+
"test": "phpunit"
|
|
|
37 |
},
|
38 |
"extra": {
|
39 |
"branch-alias": {
|
40 |
+
"dev-develop": "0.3.x-dev"
|
41 |
}
|
42 |
}
|
43 |
}
|
vendor/dhii/module-interface/docker-compose.yml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: '3.4'
|
2 |
+
services:
|
3 |
+
|
4 |
+
build:
|
5 |
+
build:
|
6 |
+
context: ./
|
7 |
+
dockerfile: docker/Dockerfile
|
8 |
+
target: build
|
9 |
+
args:
|
10 |
+
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
|
11 |
+
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
|
12 |
+
container_name: "${PROJECT_NAME}_build"
|
13 |
+
working_dir: ${BUILD_ROOT_PATH}
|
14 |
+
volumes:
|
15 |
+
- ${BASE_PATH}:${BUILD_ROOT_PATH}
|
16 |
+
|
17 |
+
test:
|
18 |
+
build:
|
19 |
+
context: ./
|
20 |
+
dockerfile: docker/Dockerfile
|
21 |
+
target: test
|
22 |
+
args:
|
23 |
+
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
|
24 |
+
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
|
25 |
+
PHP_TEST_VERSION: $PHP_TEST_VERSION
|
26 |
+
container_name: "${PROJECT_NAME}_test"
|
27 |
+
working_dir: ${BUILD_ROOT_PATH}
|
28 |
+
volumes:
|
29 |
+
- ${BASE_PATH}:${BUILD_ROOT_PATH}
|
vendor/dhii/module-interface/docker/Dockerfile
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
ARG PHP_BUILD_VERSION
|
2 |
+
ARG PHP_TEST_VERSION
|
3 |
+
|
4 |
+
# Composer on correct PHP version
|
5 |
+
FROM php:${PHP_BUILD_VERSION}-cli as build
|
6 |
+
|
7 |
+
ARG BUILD_ROOT_PATH
|
8 |
+
|
9 |
+
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
10 |
+
RUN apt-get update
|
11 |
+
RUN apt-get install -y zip unzip curl git
|
12 |
+
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
13 |
+
RUN php composer-setup.php --install-dir=/usr/bin --filename=composer
|
14 |
+
RUN php -r "unlink('composer-setup.php');"
|
15 |
+
|
16 |
+
WORKDIR ${BUILD_ROOT_PATH}
|
17 |
+
COPY . ./
|
18 |
+
|
19 |
+
|
20 |
+
FROM php:${PHP_TEST_VERSION}-cli as test
|
21 |
+
|
22 |
+
ARG BUILD_ROOT_PATH
|
23 |
+
|
24 |
+
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
25 |
+
RUN pecl install xdebug-2.6.0
|
26 |
+
RUN docker-php-ext-install pcntl
|
27 |
+
RUN docker-php-ext-install posix
|
28 |
+
|
29 |
+
WORKDIR ${BUILD_ROOT_PATH}
|
30 |
+
COPY --from=build ${BUILD_ROOT_PATH} ${BUILD_ROOT_PATH}
|
31 |
+
|
32 |
+
|
33 |
+
# Install PHP dev dependencies
|
34 |
+
FROM build as vendor-dev
|
35 |
+
|
36 |
+
ARG BUILD_ROOT_PATH
|
37 |
+
|
38 |
+
WORKDIR ${BUILD_ROOT_PATH}
|
39 |
+
RUN composer install
|
vendor/dhii/module-interface/phpcs.xml.dist
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="plugin"
|
3 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
+
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
|
5 |
+
|
6 |
+
<file>./src</file>
|
7 |
+
|
8 |
+
|
9 |
+
<config name="installed_paths" value="../../slevomat/coding-standard"/>
|
10 |
+
|
11 |
+
<rule ref="PSR12"/>
|
12 |
+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"/>
|
13 |
+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
|
14 |
+
<type>warning</type>
|
15 |
+
</rule>
|
16 |
+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
|
17 |
+
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
|
18 |
+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
19 |
+
<properties>
|
20 |
+
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
|
21 |
+
<property name="newlinesCountAfterDeclare" value="2"/>
|
22 |
+
<property name="spacesCountAroundEqualsSign" value="0"/>
|
23 |
+
</properties>
|
24 |
+
</rule>
|
25 |
+
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
|
26 |
+
<properties>
|
27 |
+
<property name="groups" type="array">
|
28 |
+
<element value="uses"/>
|
29 |
+
|
30 |
+
<!-- Public constants are first but you don't care about the order of protected or private constants -->
|
31 |
+
<element value="public constants"/>
|
32 |
+
<element value="constants"/>
|
33 |
+
|
34 |
+
<!-- You don't care about the order among the properties. The same can be done with "properties" shortcut -->
|
35 |
+
<element value="public properties, protected properties, private properties, properties"/>
|
36 |
+
|
37 |
+
<!-- Constructor is first, then all public methods, then protected/private methods and magic methods are last -->
|
38 |
+
<element value="constructor"/>
|
39 |
+
<element value="all public methods"/>
|
40 |
+
<element value="methods"/>
|
41 |
+
<element value="magic methods"/>
|
42 |
+
</property>
|
43 |
+
</properties>
|
44 |
+
</rule>
|
45 |
+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/>
|
46 |
+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
|
47 |
+
<rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall"/>
|
48 |
+
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
|
49 |
+
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
|
50 |
+
</ruleset>
|
vendor/dhii/module-interface/phpmd.xml
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
<ruleset name="Dhii Standard"
|
4 |
-
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
5 |
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
6 |
-
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
|
7 |
-
http://pmd.sf.net/ruleset_xml_schema.xsd"
|
8 |
-
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
9 |
-
<description>A standard Dhii ruleset</description>
|
10 |
-
|
11 |
-
<!-- Standard Rules of CodeClimate -->
|
12 |
-
<rule ref="rulesets/cleancode.xml" />
|
13 |
-
<rule ref="rulesets/codesize.xml" />
|
14 |
-
<rule ref="rulesets/controversial.xml" />
|
15 |
-
<rule ref="rulesets/design.xml" />
|
16 |
-
<rule ref="rulesets/naming.xml" />
|
17 |
-
<rule ref="rulesets/unusedcode.xml" />
|
18 |
-
|
19 |
-
|
20 |
-
<rule ref="rulesets/controversial.xml/CamelCasePropertyName">
|
21 |
-
<properties>
|
22 |
-
<property name="allow-underscore" value="true" />
|
23 |
-
</properties>
|
24 |
-
</rule>
|
25 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/module-interface/phpunit.xml.dist
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<phpunit
|
3 |
+
colors="true"
|
4 |
+
bootstrap="tests/bootstrap.php"
|
5 |
+
>
|
6 |
+
<php>
|
7 |
+
<ini name="display_errors" value="1" />
|
8 |
+
<ini name="display_startup_errors" value="1" />
|
9 |
+
</php>
|
10 |
+
<testsuites>
|
11 |
+
<testsuite name="unit">
|
12 |
+
<directory>tests/unit</directory>
|
13 |
+
</testsuite>
|
14 |
+
</testsuites>
|
15 |
+
<filter>
|
16 |
+
<whitelist processUncoveredFilesFromWhitelist="true">
|
17 |
+
<directory suffix=".php">src</directory>
|
18 |
+
</whitelist>
|
19 |
+
</filter>
|
20 |
+
</phpunit>
|
vendor/dhii/module-interface/psalm.xml.dist
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<psalm
|
3 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
+
xmlns="https://getpsalm.org/schema/config"
|
5 |
+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
6 |
+
xmlns:xi="http://www.w3.org/2001/XInclude"
|
7 |
+
totallyTyped="false"
|
8 |
+
useDocblockTypes="true"
|
9 |
+
usePhpDocMethodsWithoutMagicCall="false"
|
10 |
+
strictBinaryOperands="true"
|
11 |
+
rememberPropertyAssignmentsAfterCall="true"
|
12 |
+
allowPhpStormGenerics="true"
|
13 |
+
allowCoercionFromStringToClassConst="false"
|
14 |
+
allowStringToStandInForClass="false"
|
15 |
+
memoizeMethodCallResults="false"
|
16 |
+
hoistConstants="false"
|
17 |
+
addParamDefaultToDocblockType="false"
|
18 |
+
checkForThrowsDocblock="true"
|
19 |
+
checkForThrowsInGlobalScope="false"
|
20 |
+
ignoreInternalFunctionFalseReturn="false"
|
21 |
+
ignoreInternalFunctionNullReturn="false"
|
22 |
+
throwExceptionOnError="false"
|
23 |
+
hideExternalErrors="true"
|
24 |
+
allowFileIncludes="true"
|
25 |
+
>
|
26 |
+
<projectFiles>
|
27 |
+
<directory name="src"/>
|
28 |
+
</projectFiles>
|
29 |
+
|
30 |
+
<extraFiles>
|
31 |
+
<ignoreFiles>
|
32 |
+
<directory name="vendor/phpspec/prophecy"/>
|
33 |
+
</ignoreFiles>
|
34 |
+
</extraFiles>
|
35 |
+
|
36 |
+
|
37 |
+
<issueHandlers>
|
38 |
+
<ConflictingReferenceConstraint errorLevel="error"/>
|
39 |
+
<ContinueOutsideLoop errorLevel="error"/>
|
40 |
+
<DuplicateArrayKey errorLevel="error"/>
|
41 |
+
<DuplicateClass errorLevel="error"/>
|
42 |
+
<DuplicateFunction errorLevel="error"/>
|
43 |
+
<DuplicateMethod errorLevel="error"/>
|
44 |
+
<DuplicateParam errorLevel="error"/>
|
45 |
+
<EmptyArrayAccess errorLevel="error"/>
|
46 |
+
<FalsableReturnStatement errorLevel="error"/>
|
47 |
+
<FalseOperand errorLevel="error"/>
|
48 |
+
<ForbiddenCode errorLevel="error"/>
|
49 |
+
<ForbiddenEcho errorLevel="error"/>
|
50 |
+
<InaccessibleClassConstant errorLevel="error"/>
|
51 |
+
<InaccessibleMethod errorLevel="error"/>
|
52 |
+
<InterfaceInstantiation errorLevel="error"/>
|
53 |
+
<InaccessibleProperty errorLevel="error"/>
|
54 |
+
<InternalClass errorLevel="error"/>
|
55 |
+
<InternalMethod errorLevel="error"/>
|
56 |
+
<InternalProperty errorLevel="error"/>
|
57 |
+
<InvalidArgument errorLevel="error"/>
|
58 |
+
<InvalidArrayAccess errorLevel="error"/>
|
59 |
+
<InvalidArrayAssignment errorLevel="error"/>
|
60 |
+
<InvalidArrayOffset errorLevel="error"/>
|
61 |
+
<InvalidCast errorLevel="error"/>
|
62 |
+
<InvalidCatch errorLevel="error"/>
|
63 |
+
<InvalidClass errorLevel="error"/>
|
64 |
+
<InvalidClone errorLevel="error"/>
|
65 |
+
<InvalidFalsableReturnType errorLevel="error"/>
|
66 |
+
<InvalidThrow errorLevel="error"/>
|
67 |
+
<InvalidToString errorLevel="error"/>
|
68 |
+
<LoopInvalidation errorLevel="error"/>
|
69 |
+
<InvalidNullableReturnType errorLevel="error"/>
|
70 |
+
<LessSpecificReturnType errorLevel="error"/>
|
71 |
+
<InvalidGlobal errorLevel="error"/>
|
72 |
+
<InvalidIterator errorLevel="error"/>
|
73 |
+
<InvalidMethodCall errorLevel="error"/>
|
74 |
+
<InvalidFunctionCall errorLevel="error"/>
|
75 |
+
<ImplicitToStringCast errorLevel="error"/>
|
76 |
+
<ImplementedReturnTypeMismatch errorLevel="error"/>
|
77 |
+
<InvalidParamDefault errorLevel="error"/>
|
78 |
+
<InvalidPassByReference errorLevel="error"/>
|
79 |
+
<InvalidPropertyAssignment errorLevel="error"/>
|
80 |
+
<InvalidPropertyAssignmentValue errorLevel="error"/>
|
81 |
+
<InvalidPropertyFetch errorLevel="error"/>
|
82 |
+
<InvalidReturnStatement errorLevel="error"/>
|
83 |
+
<InvalidReturnType errorLevel="error"/>
|
84 |
+
<InvalidScalarArgument errorLevel="error"/>
|
85 |
+
<InvalidScope errorLevel="error"/>
|
86 |
+
<InvalidStaticInvocation errorLevel="error"/>
|
87 |
+
<MissingConstructor errorLevel="error"/>
|
88 |
+
<MissingDependency errorLevel="error"/>
|
89 |
+
<MissingFile errorLevel="error"/>
|
90 |
+
<MixedArgument errorLevel="error"/>
|
91 |
+
<MoreSpecificImplementedParamType errorLevel="error"/>
|
92 |
+
<MoreSpecificReturnType errorLevel="error"/>
|
93 |
+
<NoValue errorLevel="error"/>
|
94 |
+
<NoInterfaceProperties errorLevel="error"/>
|
95 |
+
<NonStaticSelfCall errorLevel="error"/>
|
96 |
+
<NullableReturnStatement errorLevel="error"/>
|
97 |
+
<NullArgument errorLevel="error"/>
|
98 |
+
<NullArrayAccess errorLevel="error"/>
|
99 |
+
<NullArrayOffset errorLevel="error"/>
|
100 |
+
<NullFunctionCall errorLevel="error"/>
|
101 |
+
<NullIterator errorLevel="error"/>
|
102 |
+
<NullOperand errorLevel="error"/>
|
103 |
+
<NullPropertyAssignment errorLevel="error"/>
|
104 |
+
<NullPropertyFetch errorLevel="error"/>
|
105 |
+
<NullReference errorLevel="error"/>
|
106 |
+
<OverriddenMethodAccess errorLevel="error"/>
|
107 |
+
<OverriddenPropertyAccess errorLevel="error"/>
|
108 |
+
<ParadoxicalCondition errorLevel="error"/>
|
109 |
+
<ParentNotFound errorLevel="error"/>
|
110 |
+
<LessSpecificImplementedReturnType errorLevel="error"/>
|
111 |
+
<MissingParamType errorLevel="error"/>
|
112 |
+
<MissingClosureParamType errorLevel="error"/>
|
113 |
+
<MissingClosureReturnType errorLevel="error"/>
|
114 |
+
<MissingPropertyType errorLevel="error"/>
|
115 |
+
<UndefinedConstant errorLevel="error"/>
|
116 |
+
|
117 |
+
<AssignmentToVoid errorLevel="info"/>
|
118 |
+
<DeprecatedClass errorLevel="info"/>
|
119 |
+
<DeprecatedConstant errorLevel="info"/>
|
120 |
+
<DeprecatedTrait errorLevel="info"/>
|
121 |
+
<DocblockTypeContradiction errorLevel="info"/>
|
122 |
+
<InvalidDocblock errorLevel="info"/>
|
123 |
+
<InvalidDocblockParamName errorLevel="info"/>
|
124 |
+
<InvalidTemplateParam errorLevel="info"/>
|
125 |
+
<DeprecatedInterface errorLevel="info"/>
|
126 |
+
<DeprecatedMethod errorLevel="info"/>
|
127 |
+
<DeprecatedProperty errorLevel="info"/>
|
128 |
+
<MethodSignatureMustOmitReturnType errorLevel="info"/>
|
129 |
+
<MismatchingDocblockParamType errorLevel="info"/>
|
130 |
+
<MismatchingDocblockReturnType errorLevel="info"/>
|
131 |
+
<MissingDocblockType errorLevel="info"/>
|
132 |
+
<MissingParamType errorLevel="info"/>
|
133 |
+
<MissingTemplateParam errorLevel="info"/>
|
134 |
+
<MissingThrowsDocblock errorLevel="info"/>
|
135 |
+
<MixedArgumentTypeCoercion errorLevel="info"/>
|
136 |
+
<MixedArrayAccess errorLevel="info"/>
|
137 |
+
<MixedArrayAssignment errorLevel="info"/>
|
138 |
+
<MixedArrayOffset errorLevel="info"/>
|
139 |
+
<MixedArrayTypeCoercion errorLevel="info"/>
|
140 |
+
<MixedAssignment errorLevel="info"/>
|
141 |
+
<MixedFunctionCall errorLevel="info"/>
|
142 |
+
<MixedInferredReturnType errorLevel="info"/>
|
143 |
+
<MixedMethodCall errorLevel="info"/>
|
144 |
+
<MixedOperand errorLevel="info"/>
|
145 |
+
<MixedPropertyAssignment errorLevel="info"/>
|
146 |
+
<MixedPropertyFetch errorLevel="info"/>
|
147 |
+
<MixedPropertyTypeCoercion errorLevel="info"/>
|
148 |
+
<MixedReturnStatement errorLevel="info"/>
|
149 |
+
<MixedReturnTypeCoercion errorLevel="info"/>
|
150 |
+
<MixedStringOffsetAssignment errorLevel="info"/>
|
151 |
+
</issueHandlers>
|
152 |
+
</psalm>
|
vendor/dhii/module-interface/src/DependenciesAwareInterface.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Modular\Module;
|
4 |
-
|
5 |
-
use Dhii\Util\String\StringableInterface as Stringable;
|
6 |
-
use stdClass;
|
7 |
-
use Traversable;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Something that is aware of, and can provide, a list of dependencies.
|
11 |
-
*
|
12 |
-
* @since [*next-version*]
|
13 |
-
*/
|
14 |
-
interface DependenciesAwareInterface
|
15 |
-
{
|
16 |
-
/**
|
17 |
-
* Retrieves the dependencies.
|
18 |
-
*
|
19 |
-
* @since [*next-version*]
|
20 |
-
*
|
21 |
-
* @return string[]|Stringable[]|stdClass|Traversable A list of dependencies.
|
22 |
-
*/
|
23 |
-
public function getDependencies();
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/module-interface/src/Exception/ModuleExceptionInterface.php
CHANGED
@@ -1,17 +1,19 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
namespace Dhii\Modular\Module\Exception;
|
4 |
|
5 |
use Dhii\Modular\Module\ModuleAwareInterface;
|
6 |
-
use
|
7 |
|
8 |
/**
|
9 |
* Represents an exception that is thrown in relation to a module.
|
10 |
*
|
11 |
-
* @since
|
12 |
*/
|
13 |
interface ModuleExceptionInterface extends
|
14 |
-
|
15 |
ModuleAwareInterface
|
16 |
{
|
17 |
}
|
1 |
<?php
|
2 |
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
namespace Dhii\Modular\Module\Exception;
|
6 |
|
7 |
use Dhii\Modular\Module\ModuleAwareInterface;
|
8 |
+
use Throwable;
|
9 |
|
10 |
/**
|
11 |
* Represents an exception that is thrown in relation to a module.
|
12 |
*
|
13 |
+
* @since 0.2
|
14 |
*/
|
15 |
interface ModuleExceptionInterface extends
|
16 |
+
Throwable,
|
17 |
ModuleAwareInterface
|
18 |
{
|
19 |
}
|
vendor/dhii/module-interface/src/ModuleAwareInterface.php
CHANGED
@@ -1,20 +1,22 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
namespace Dhii\Modular\Module;
|
4 |
|
5 |
/**
|
6 |
* Something that can have a module instance retrieved.
|
7 |
*
|
8 |
-
* @since
|
9 |
*/
|
10 |
interface ModuleAwareInterface
|
11 |
{
|
12 |
/**
|
13 |
* Retrieves the module that is associated with this instance.
|
14 |
*
|
15 |
-
* @since
|
16 |
*
|
17 |
* @return ModuleInterface|null The module, if applicable; otherwise, null.
|
18 |
*/
|
19 |
-
public function getModule();
|
20 |
}
|
1 |
<?php
|
2 |
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
namespace Dhii\Modular\Module;
|
6 |
|
7 |
/**
|
8 |
* Something that can have a module instance retrieved.
|
9 |
*
|
10 |
+
* @since 0.2
|
11 |
*/
|
12 |
interface ModuleAwareInterface
|
13 |
{
|
14 |
/**
|
15 |
* Retrieves the module that is associated with this instance.
|
16 |
*
|
17 |
+
* @since 0.2
|
18 |
*
|
19 |
* @return ModuleInterface|null The module, if applicable; otherwise, null.
|
20 |
*/
|
21 |
+
public function getModule(): ?ModuleInterface;
|
22 |
}
|
vendor/dhii/module-interface/src/ModuleFactoryInterface.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Modular\Module;
|
4 |
-
|
5 |
-
use Dhii\Factory\FactoryInterface;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Something that can create new module instances from module configuration.
|
9 |
-
*
|
10 |
-
* @since [*next-version*]
|
11 |
-
*/
|
12 |
-
interface ModuleFactoryInterface extends FactoryInterface
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* {@inheritdoc}
|
16 |
-
*
|
17 |
-
* @since [*next-version*]
|
18 |
-
*
|
19 |
-
* @return ModuleInterface The created module instance.
|
20 |
-
*/
|
21 |
-
public function make($config = null);
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/module-interface/src/ModuleInterface.php
CHANGED
@@ -1,44 +1,54 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
namespace Dhii\Modular\Module;
|
4 |
|
5 |
-
use Dhii\
|
|
|
6 |
use Psr\Container\ContainerInterface;
|
7 |
|
8 |
/**
|
9 |
-
*
|
10 |
-
*
|
11 |
-
* A module is represented by an key, which is not limited to any type or form. It can be numeric, a slug, a hash or
|
12 |
-
* even a user-friendly name. What matters is that it **uniquely** identifies the module.
|
13 |
*
|
14 |
-
* @since
|
15 |
*/
|
16 |
-
interface ModuleInterface
|
17 |
{
|
18 |
/**
|
19 |
-
* Performs module-specific setup and
|
|
|
|
|
|
|
|
|
20 |
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
|
|
24 |
*
|
25 |
-
* @since
|
26 |
*
|
27 |
-
* @return
|
|
|
|
|
28 |
*/
|
29 |
-
public function setup();
|
30 |
|
31 |
/**
|
32 |
* Runs the module.
|
33 |
*
|
34 |
-
* This method MUST be called
|
35 |
-
*
|
36 |
-
*
|
37 |
-
*
|
|
|
|
|
|
|
38 |
*
|
39 |
-
* @
|
40 |
*
|
41 |
-
* @
|
42 |
*/
|
43 |
-
public function run(ContainerInterface $c
|
44 |
}
|
1 |
<?php
|
2 |
|
3 |
+
declare(strict_types=1);
|
4 |
+
|
5 |
namespace Dhii\Modular\Module;
|
6 |
|
7 |
+
use Dhii\Modular\Module\Exception\ModuleExceptionInterface;
|
8 |
+
use Interop\Container\ServiceProviderInterface;
|
9 |
use Psr\Container\ContainerInterface;
|
10 |
|
11 |
/**
|
12 |
+
* Something that represents an application module.
|
|
|
|
|
|
|
13 |
*
|
14 |
+
* @since 0.2
|
15 |
*/
|
16 |
+
interface ModuleInterface
|
17 |
{
|
18 |
/**
|
19 |
+
* Performs module-specific setup and provides a service provider.
|
20 |
+
*
|
21 |
+
* This method SHOULD be called at least once before {@link ModuleInterface::run()} may be invoked for a particular
|
22 |
+
* module instance. The returned service provider instance SHOULD be incorporated by the application into the
|
23 |
+
* container instance that is then given to this module's {@link ModuleInterface::run()} method.
|
24 |
*
|
25 |
+
* The application MAY also incorporate the service provider into the container instance given to other modules,
|
26 |
+
* but this is not required. As such, services factories in the returned service provider should not assume the
|
27 |
+
* existence of other module's services. Use proxy services together with {@link ContainerInterface::has()} for
|
28 |
+
* optionally integrating with other modules.
|
29 |
*
|
30 |
+
* @since 0.2
|
31 |
*
|
32 |
+
* @return ServiceProviderInterface A service provider instance for this module's services.
|
33 |
+
*
|
34 |
+
* @throws ModuleExceptionInterface If module setup failed and/or a service provider instance could not be returned.
|
35 |
*/
|
36 |
+
public function setup(): ServiceProviderInterface;
|
37 |
|
38 |
/**
|
39 |
* Runs the module.
|
40 |
*
|
41 |
+
* This method MUST be called after the module has been set up using {@link ModuleInterface::setup()}. A services
|
42 |
+
* container MUST be given to this method, and MUST incorporate the services from the service provider returned
|
43 |
+
* by the same module's {@link ModuleInterface::setup()} method. This container instance is not guaranteed to be
|
44 |
+
* the same instance given to other modules. As such, it is strongly advised to assume it is not, and to avoid
|
45 |
+
* referencing services from other modules.
|
46 |
+
*
|
47 |
+
* @since 0.2
|
48 |
*
|
49 |
+
* @param ContainerInterface $c A services container instance.
|
50 |
*
|
51 |
+
* @throws ModuleExceptionInterface If the module failed to run.
|
52 |
*/
|
53 |
+
public function run(ContainerInterface $c): void;
|
54 |
}
|
vendor/dhii/module-interface/src/ModuleKeyAwareInterface.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Dhii\Modular\Module;
|
4 |
-
|
5 |
-
use Dhii\Util\String\StringableInterface as Stringable;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Something that can have a module key retrieved.
|
9 |
-
*
|
10 |
-
* @since [*next-version*]
|
11 |
-
*/
|
12 |
-
interface ModuleKeyAwareInterface
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* Retrieves the module key associated with this instance.
|
16 |
-
*
|
17 |
-
* @since [*next-version*]
|
18 |
-
*
|
19 |
-
* @return string|Stringable|null The key, if applicable; otherwise, null.
|
20 |
-
*/
|
21 |
-
public function getModuleKey();
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dhii/module-interface/tests/bootstrap.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
error_reporting(E_ALL | E_STRICT);
|
4 |
+
|
5 |
+
require_once dirname(__FILE__).'/../vendor/autoload.php';
|
vendor/dhii/module-interface/tests/stubs/GetImplementingMockBuilderCapableTrait.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Modular\Module\Test;
|
4 |
+
|
5 |
+
use PHPUnit\Framework\MockObject\MockBuilder;
|
6 |
+
use Throwable;
|
7 |
+
use Exception;
|
8 |
+
use Error;
|
9 |
+
use PHPUnit\Framework\TestCase;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Eases development of tests by allowing creation of more complex mocks.
|
13 |
+
*
|
14 |
+
* The original {@see TestCase::getMockBuilder()} allows mocking only a class or an interface.
|
15 |
+
* But sometimes, it is necessary to mock a class that implements one or more interfaces.
|
16 |
+
* One such case is with exceptions: testing an interface that extends {@see Throwable} requires the extension
|
17 |
+
* of {@see Exception} or {@see Error} by the mock.
|
18 |
+
*/
|
19 |
+
trait GetImplementingMockBuilderCapableTrait
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* Retrieves a builder for a class that extends the specified base class, while implementing the specified interfaces.
|
23 |
+
*
|
24 |
+
* @param string $baseClassName The name of the base class to extend.
|
25 |
+
* @param array $interfaceNames The names of interfaces to implement
|
26 |
+
* @return MockBuilder A builder for the new class.
|
27 |
+
*/
|
28 |
+
public function getImplementingMockBuilder(string $baseClassName, array $interfaceNames)
|
29 |
+
{
|
30 |
+
$className = uniqid("{$baseClassName}_");
|
31 |
+
$interfaceNames = implode(', ', $interfaceNames);
|
32 |
+
$classString = "abstract class $className extends $baseClassName implements $interfaceNames {}";
|
33 |
+
|
34 |
+
eval($classString);
|
35 |
+
|
36 |
+
return $this->getMockBuilder($className);
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Retrieves a mock builder for the specified classname.
|
41 |
+
*
|
42 |
+
* @param string $className Name of the class/interface/trait to build a mock for.
|
43 |
+
* @return MockBuilder The builder.
|
44 |
+
*/
|
45 |
+
// The below declaration is commented out becaue it's impossible
|
46 |
+
// to make it compatible with both PHPUnit 7 and 9.
|
47 |
+
//abstract public function getMockBuilder(string $className): MockBuilder;
|
48 |
+
}
|
vendor/dhii/module-interface/tests/unit/Exception/ModuleExceptionInterfaceTest.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Modular\Module\UnitTest\Exception;
|
4 |
+
|
5 |
+
use Dhii\Modular\Module\Exception\ModuleExceptionInterface as TestSubject;
|
6 |
+
use Dhii\Modular\Module\ModuleAwareInterface;
|
7 |
+
use Dhii\Modular\Module\Test\GetImplementingMockBuilderCapableTrait;
|
8 |
+
use Exception;
|
9 |
+
use PHPUnit\Framework\MockObject\MockObject;
|
10 |
+
use PHPUnit\Framework\TestCase;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Tests {@see TestSubject}.
|
14 |
+
*
|
15 |
+
* @since 0.2
|
16 |
+
*/
|
17 |
+
class ModuleExceptionInterfaceTest extends TestCase
|
18 |
+
{
|
19 |
+
use GetImplementingMockBuilderCapableTrait;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Creates a new instance of the test subject.
|
23 |
+
*
|
24 |
+
* @since 0.2
|
25 |
+
*
|
26 |
+
* @return TestSubject&MockObject
|
27 |
+
*/
|
28 |
+
public function createInstance()
|
29 |
+
{
|
30 |
+
$mock = $this->getImplementingMockBuilder(Exception::class, [TestSubject::class])
|
31 |
+
->setMethods([])
|
32 |
+
->getMock();
|
33 |
+
|
34 |
+
return $mock;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Tests whether a valid instance of the test subject can be created.
|
39 |
+
*
|
40 |
+
* @since 0.2
|
41 |
+
*/
|
42 |
+
public function testCanBeCreated()
|
43 |
+
{
|
44 |
+
$subject = $this->createInstance();
|
45 |
+
|
46 |
+
$this->assertInstanceOf(
|
47 |
+
TestSubject::class,
|
48 |
+
$subject,
|
49 |
+
'A valid instance of the test subject could not be created'
|
50 |
+
);
|
51 |
+
|
52 |
+
$this->assertInstanceOf(
|
53 |
+
'Throwable',
|
54 |
+
$subject,
|
55 |
+
'Exception must be throwable'
|
56 |
+
);
|
57 |
+
|
58 |
+
$this->assertInstanceOf(
|
59 |
+
ModuleAwareInterface::class,
|
60 |
+
$subject,
|
61 |
+
'Subject does not implement required interface'
|
62 |
+
);
|
63 |
+
}
|
64 |
+
}
|
vendor/dhii/module-interface/tests/unit/ModuleAwareInterfaceTest.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Modular\Module\UnitTest;
|
4 |
+
|
5 |
+
use Dhii\Modular\Module\ModuleAwareInterface as TestSubject;
|
6 |
+
use PHPUnit_Framework_MockObject_MockObject as MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Tests {@see TestSubject}.
|
11 |
+
*
|
12 |
+
* @since 0.2
|
13 |
+
*/
|
14 |
+
class ModuleAwareInterfaceTest extends TestCase
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* Creates a new instance of the test subject.
|
18 |
+
*
|
19 |
+
* @since 0.2
|
20 |
+
*
|
21 |
+
* @return TestSubject&MockObject
|
22 |
+
*/
|
23 |
+
public function createInstance()
|
24 |
+
{
|
25 |
+
$mock = $this->getMockBuilder(TestSubject::class)
|
26 |
+
->getMock();
|
27 |
+
|
28 |
+
return $mock;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Tests whether a valid instance of the test subject can be created.
|
33 |
+
*
|
34 |
+
* @since 0.2
|
35 |
+
*/
|
36 |
+
public function testCanBeCreated()
|
37 |
+
{
|
38 |
+
$subject = $this->createInstance();
|
39 |
+
|
40 |
+
$this->assertInstanceOf(
|
41 |
+
TestSubject::class,
|
42 |
+
$subject,
|
43 |
+
'A valid instance of the test subject could not be created'
|
44 |
+
);
|
45 |
+
}
|
46 |
+
}
|
vendor/dhii/module-interface/tests/unit/ModuleInterfaceTest.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Dhii\Modular\Module\UnitTest;
|
4 |
+
|
5 |
+
use Dhii\Modular\Module\ModuleInterface as TestSubject;
|
6 |
+
use PHPUnit\Framework\MockObject\MockObject as MockObject;
|
7 |
+
use PHPUnit\Framework\TestCase;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Tests {@see TestSubject}.
|
11 |
+
*
|
12 |
+
* @since 0.2
|
13 |
+
*/
|
14 |
+
class ModuleInterfaceTest extends TestCase
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* Creates a new instance of the test subject.
|
18 |
+
*
|
19 |
+
* @since 0.2
|
20 |
+
*
|
21 |
+
* @return TestSubject&MockObject
|
22 |
+
*/
|
23 |
+
public function createInstance()
|
24 |
+
{
|
25 |
+
$mock = $this->getMockBuilder(TestSubject::class)
|
26 |
+
->getMock();
|
27 |
+
|
28 |
+
return $mock;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Tests whether a valid instance of the test subject can be created.
|
33 |
+
*
|
34 |
+
* @since 0.2
|
35 |
+
*/
|
36 |
+
public function testCanBeCreated()
|
37 |
+
{
|
38 |
+
$subject = $this->createInstance();
|
39 |
+
|
40 |
+
$this->assertInstanceOf(
|
41 |
+
TestSubject::class,
|
42 |
+
$subject,
|
43 |
+
'A valid instance of the test subject could not be created'
|
44 |
+
);
|
45 |
+
}
|
46 |
+
}
|
vendor/dhii/module-interface/travis.php.ini
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
memory_limit = 2048M
|
|
woocommerce-paypal-payments.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: WooCommerce PayPal Payments
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/
|
5 |
* Description: PayPal's latest complete payments processing solution. Accept PayPal, Pay Later, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
|
6 |
-
* Version: 1.
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com/
|
9 |
* License: GPL-2.0
|
10 |
* Requires PHP: 7.1
|
11 |
* WC requires at least: 3.9
|
12 |
-
* WC tested up to:
|
13 |
* Text Domain: woocommerce-paypal-payments
|
14 |
*
|
15 |
* @package WooCommerce\PayPalCommerce
|
3 |
* Plugin Name: WooCommerce PayPal Payments
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/
|
5 |
* Description: PayPal's latest complete payments processing solution. Accept PayPal, Pay Later, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
|
6 |
+
* Version: 1.4.0
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com/
|
9 |
* License: GPL-2.0
|
10 |
* Requires PHP: 7.1
|
11 |
* WC requires at least: 3.9
|
12 |
+
* WC tested up to: 5.5
|
13 |
* Text Domain: woocommerce-paypal-payments
|
14 |
*
|
15 |
* @package WooCommerce\PayPalCommerce
|